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 //---------------------------------------------------------------------------
20 #include <wx/collpane.h>
23 MAKE_CONST_WXSTRING(CollapsiblePaneNameStr);
32 MustHaveApp(wxCollapsiblePane);
33 DocStr(wxCollapsiblePane,
34 "A collapsable pane is a container with an embedded button-like
35 control which can be used by the user to collapse or expand the pane's
38 Once constructed you should use the `GetPane` function to access the
39 pane and add your controls inside it (i.e. use the window returned
40 from `GetPane` as the parent for the controls which must go in the
41 pane, NOT the wx.CollapsiblePane itself!).
43 Note that because of its nature of control which can dynamically (and
44 drastically) change its size at run-time under user-input, when
45 putting a wx.CollapsiblePane inside a `wx.Sizer` you should be careful
46 to add it with a proportion value of zero; this is because otherwise
47 all other windows with non-zero proportion values would automatically
48 get resized each time the user expands or collapses the pane window,
49 usually resulting a weird, flickering effect.", "");
51 class wxCollapsiblePane : public wxControl
54 %pythonAppend wxCollapsiblePane "self._setOORInfo(self)";
55 %pythonAppend wxCollapsiblePane() "";
58 wxCollapsiblePane(wxWindow *parent,
59 wxWindowID winid = -1,
60 const wxString& label = wxPyEmptyString,
61 const wxPoint& pos = wxDefaultPosition,
62 const wxSize& size = wxDefaultSize,
63 long style = wxCP_DEFAULT_STYLE,
64 const wxValidator& val = wxDefaultValidator,
65 const wxString& name = wxPyCollapsiblePaneNameStr),
66 "Create and show a wx.CollapsiblePane", "");
70 "Precreate a wx.CollapsiblePane for 2-phase creation.", "",
75 bool , Create(wxWindow *parent,
77 const wxString& label = wxPyEmptyString,
78 const wxPoint& pos = wxDefaultPosition,
79 const wxSize& size = wxDefaultSize,
80 long style = wxCP_DEFAULT_STYLE,
81 const wxValidator& val = wxDefaultValidator,
82 const wxString& name = wxPyCollapsiblePaneNameStr),
89 virtual void , Collapse(bool collapse = true),
90 "Collapses or expands the pane window.", "");
94 "Same as Collapse(False).", "");
98 virtual bool , IsCollapsed() const,
99 "Returns ``True`` if the pane window is currently hidden.", "");
102 bool , IsExpanded() const,
103 "Returns ``True`` if the pane window is currently shown.", "");
107 virtual wxWindow *, GetPane() const,
108 "Returns a reference to the pane window. Use the returned `wx.Window`
109 as the parent of widgets to make them part of the collapsible area.", "");
115 //---------------------------------------------------------------------------
118 %constant wxEventType wxEVT_COMMAND_COLLPANE_CHANGED;
120 EVT_COLLAPSIBLEPANE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_COLLPANE_CHANGED, 1 )
123 class wxCollapsiblePaneEvent : public wxCommandEvent
126 //wxCollapsiblePaneEvent() {}
127 wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed);
129 bool GetCollapsed() const;
130 void SetCollapsed(bool c);
133 //---------------------------------------------------------------------------