1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface for wxCollapsiblePane
7 // Created: 10-Nov-2006
9 // Copyright: (c) 2006 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
19 MAKE_CONST_WXSTRING(CollapsiblePaneNameStr);
28 MustHaveApp(wxCollapsiblePane);
29 DocStr(wxCollapsiblePane,
30 "A collapsable pane is a container with an embedded button-like
31 control which can be used by the user to collapse or expand the pane's
34 Once constructed you should use the `GetPane` function to access the
35 pane and add your controls inside it (i.e. use the window returned
36 from `GetPane` as the parent for the controls which must go in the
37 pane, NOT the wx.CollapsiblePane itself!).
39 Note that because of its nature of control which can dynamically (and
40 drastically) change its size at run-time under user-input, when
41 putting a wx.CollapsiblePane inside a `wx.Sizer` you should be careful
42 to add it with a proportion value of zero; this is because otherwise
43 all other windows with non-zero proportion values would automatically
44 get resized each time the user expands or collapses the pane window,
45 usually resulting a weird, flickering effect.", "");
47 class wxCollapsiblePane : public wxControl
50 %pythonAppend wxCollapsiblePane "self._setOORInfo(self)";
51 %pythonAppend wxCollapsiblePane() "";
54 wxCollapsiblePane(wxWindow *parent,
55 wxWindowID winid = -1,
56 const wxString& label = wxPyEmptyString,
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize& size = wxDefaultSize,
59 long style = wxCP_DEFAULT_STYLE,
60 const wxValidator& val = wxDefaultValidator,
61 const wxString& name = wxPyCollapsiblePaneNameStr),
62 "Create and show a wx.CollapsiblePane", "");
66 "Precreate a wx.CollapsiblePane for 2-phase creation.", "",
71 bool , Create(wxWindow *parent,
73 const wxString& label = wxPyEmptyString,
74 const wxPoint& pos = wxDefaultPosition,
75 const wxSize& size = wxDefaultSize,
76 long style = wxCP_DEFAULT_STYLE,
77 const wxValidator& val = wxDefaultValidator,
78 const wxString& name = wxPyCollapsiblePaneNameStr),
85 virtual void , Collapse(bool collapse = true),
86 "Collapses or expands the pane window.", "");
90 "Same as Collapse(False).", "");
94 virtual bool , IsCollapsed() const,
95 "Returns ``True`` if the pane window is currently hidden.", "");
98 bool , IsExpanded() const,
99 "Returns ``True`` if the pane window is currently shown.", "");
103 virtual wxWindow *, GetPane() const,
104 "Returns a reference to the pane window. Use the returned `wx.Window`
105 as the parent of widgets to make them part of the collapsible area.", "");
107 %property(Expanded, IsExpanded);
108 %property(Collapsed, IsCollapsed);
113 //---------------------------------------------------------------------------
116 %constant wxEventType wxEVT_COMMAND_COLLPANE_CHANGED;
118 EVT_COLLAPSIBLEPANE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_COLLPANE_CHANGED, 1 )
121 class wxCollapsiblePaneEvent : public wxCommandEvent
124 //wxCollapsiblePaneEvent() {}
125 wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed);
127 bool GetCollapsed() const;
128 void SetCollapsed(bool c);
130 %property(Collapsed, GetCollapsed, SetCollapsed);
133 //---------------------------------------------------------------------------