+
+
+ // Manage whether individual windows or sub-sizers are considered
+ // in the layout calculations or not.
+
+ %addmethods {
+ void Show(PyObject* item, bool show = TRUE) {
+ wxWindow* window;
+ wxSizer* sizer;
+ // Find out what type the item is and call the real method
+ if (! SWIG_GetPtrObj(item, (void**)&window, "_wxWindow_p"))
+ self->Show(window, show);
+ else if (!SWIG_GetPtrObj(item, (void**)&sizer, "_wxSizer_p"))
+ self->Show(sizer, show);
+ else
+ PyErr_SetString(PyExc_TypeError, "wxWindow or wxSizer expected.");
+ }
+
+ void Hide(PyObject* item) {
+ wxWindow* window;
+ wxSizer* sizer;
+ // Find out what type the item is and call the real method
+ if (! SWIG_GetPtrObj(item, (void**)&window, "_wxWindow_p"))
+ self->Hide(window);
+ else if (!SWIG_GetPtrObj(item, (void**)&sizer, "_wxSizer_p"))
+ self->Hide(sizer);
+ else
+ PyErr_SetString(PyExc_TypeError, "wxWindow or wxSizer expected.");
+ }
+
+ bool IsShown(PyObject* item) {
+ wxWindow* window;
+ wxSizer* sizer;
+ // Find out what type the item is and call the real method
+ if (! SWIG_GetPtrObj(item, (void**)&window, "_wxWindow_p"))
+ return self->IsShown(window);
+ else if (!SWIG_GetPtrObj(item, (void**)&sizer, "_wxSizer_p"))
+ return self->IsShown(sizer);
+ else {
+ PyErr_SetString(PyExc_TypeError, "wxWindow or wxSizer expected.");
+ return FALSE;
+ }
+ }
+ }
+
+
+ // Recursively call wxWindow::Show() on all sizer items.
+ void ShowItems(bool show);
+