]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_collpane.i
removed code inside USE_SIZABLE_CALENDAR, we should allow making the main calendar...
[wxWidgets.git] / wxPython / src / _collpane.i
CommitLineData
73470a17
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: _collpane.i
3// Purpose: SWIG interface for wxCollapsiblePane
4//
5// Author: Robin Dunn
6//
7// Created: 10-Nov-2006
8// RCS-ID: $Id$
9// Copyright: (c) 2006 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13// Not a %module
14
15
16//---------------------------------------------------------------------------
17%newgroup
18
73470a17
RD
19MAKE_CONST_WXSTRING(CollapsiblePaneNameStr);
20
21enum {
22 wxCP_DEFAULT_STYLE,
23 wxCP_NO_TLW_RESIZE
24};
25
26
27
28MustHaveApp(wxCollapsiblePane);
29DocStr(wxCollapsiblePane,
30"A collapsable pane is a container with an embedded button-like
31control which can be used by the user to collapse or expand the pane's
32contents.
33
34Once constructed you should use the `GetPane` function to access the
35pane and add your controls inside it (i.e. use the window returned
36from `GetPane` as the parent for the controls which must go in the
37pane, NOT the wx.CollapsiblePane itself!).
38
39Note that because of its nature of control which can dynamically (and
40drastically) change its size at run-time under user-input, when
41putting a wx.CollapsiblePane inside a `wx.Sizer` you should be careful
42to add it with a proportion value of zero; this is because otherwise
43all other windows with non-zero proportion values would automatically
44get resized each time the user expands or collapses the pane window,
45usually resulting a weird, flickering effect.", "");
46
47class wxCollapsiblePane : public wxControl
48{
49public:
50 %pythonAppend wxCollapsiblePane "self._setOORInfo(self)";
51 %pythonAppend wxCollapsiblePane() "";
52
53 DocCtorStr(
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", "");
63
64 DocCtorStrName(
65 wxCollapsiblePane(),
66 "Precreate a wx.CollapsiblePane for 2-phase creation.", "",
67 PreCollapsiblePane);
68
69
70 DocDeclStr(
71 bool , Create(wxWindow *parent,
72 wxWindowID winid =-1,
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),
79 "", "");
80
81
82
83
84 DocDeclStr(
85 virtual void , Collapse(bool collapse = true),
86 "Collapses or expands the pane window.", "");
87
88 DocDeclStr(
89 void , Expand(),
90 "Same as Collapse(False).", "");
91
92
93 DocDeclStr(
94 virtual bool , IsCollapsed() const,
95 "Returns ``True`` if the pane window is currently hidden.", "");
96
97 DocDeclStr(
98 bool , IsExpanded() const,
99 "Returns ``True`` if the pane window is currently shown.", "");
100
101
102 DocDeclStr(
103 virtual wxWindow *, GetPane() const,
104 "Returns a reference to the pane window. Use the returned `wx.Window`
105as the parent of widgets to make them part of the collapsible area.", "");
bafc875b
RD
106
107 %property(Expanded, IsExpanded);
108 %property(Collapsed, IsCollapsed);
73470a17
RD
109};
110
111
112
113//---------------------------------------------------------------------------
114
115
116%constant wxEventType wxEVT_COMMAND_COLLPANE_CHANGED;
117%pythoncode {
118 EVT_COLLAPSIBLEPANE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_COLLPANE_CHANGED, 1 )
119}
120
121class wxCollapsiblePaneEvent : public wxCommandEvent
122{
123public:
124 //wxCollapsiblePaneEvent() {}
125 wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed);
126
127 bool GetCollapsed() const;
128 void SetCollapsed(bool c);
bafc875b
RD
129
130 %property(Collapsed, GetCollapsed, SetCollapsed);
73470a17
RD
131};
132
133//---------------------------------------------------------------------------