1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions of MORE window classes
7 // Created: 22-Dec-1998
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
17 #include <wx/sashwin.h>
18 #include <wx/laywin.h>
19 #include <wx/popupwin.h>
22 //----------------------------------------------------------------------
25 %include my_typemaps.i
27 // Import some definitions of other classes, etc.
36 %pragma(python) code = "import wx"
38 //---------------------------------------------------------------------------
40 enum wxSashEdgePosition {
59 wxSASH_STATUS_OUT_OF_RANGE
63 class wxSashEvent : public wxCommandEvent {
65 wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE);
67 void SetEdge(wxSashEdgePosition edge);
68 wxSashEdgePosition GetEdge();
69 void SetDragRect(const wxRect& rect);
71 void SetDragStatus(wxSashDragStatus status);
72 wxSashDragStatus GetDragStatus();
77 class wxSashWindow: public wxWindow {
79 wxSashWindow(wxWindow* parent, wxWindowID id,
80 const wxPoint& pos = wxDefaultPosition,
81 const wxSize& size = wxDefaultSize,
82 long style = wxCLIP_CHILDREN | wxSW_3D,
83 const char* name = "sashWindow");
84 %name(wxPreSashWindow)wxSashWindow();
86 bool Create(wxWindow* parent, wxWindowID id,
87 const wxPoint& pos = wxDefaultPosition,
88 const wxSize& size = wxDefaultSize,
89 long style = wxCLIP_CHILDREN | wxSW_3D,
90 const char* name = "sashWindow");
92 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
93 %pragma(python) addtomethod = "wxPreSashWindow:val._setOORInfo(self)"
95 bool GetSashVisible(wxSashEdgePosition edge);
96 int GetDefaultBorderSize();
97 int GetEdgeMargin(wxSashEdgePosition edge);
98 int GetExtraBorderSize();
99 int GetMaximumSizeX();
100 int GetMaximumSizeY();
101 int GetMinimumSizeX();
102 int GetMinimumSizeY();
103 bool HasBorder(wxSashEdgePosition edge);
104 void SetDefaultBorderSize(int width);
105 void SetExtraBorderSize(int width);
106 void SetMaximumSizeX(int min);
107 void SetMaximumSizeY(int min);
108 void SetMinimumSizeX(int min);
109 void SetMinimumSizeY(int min);
110 void SetSashVisible(wxSashEdgePosition edge, bool visible);
111 void SetSashBorder(wxSashEdgePosition edge, bool hasBorder);
116 //---------------------------------------------------------------------------
118 enum wxLayoutOrientation {
123 enum wxLayoutAlignment {
133 wxEVT_QUERY_LAYOUT_INFO,
134 wxEVT_CALCULATE_LAYOUT,
138 class wxQueryLayoutInfoEvent: public wxEvent {
140 wxQueryLayoutInfoEvent(wxWindowID id = 0);
142 void SetRequestedLength(int length);
143 int GetRequestedLength();
144 void SetFlags(int flags);
146 void SetSize(const wxSize& size);
148 void SetOrientation(wxLayoutOrientation orient);
149 wxLayoutOrientation GetOrientation();
150 void SetAlignment(wxLayoutAlignment align);
151 wxLayoutAlignment GetAlignment();
156 class wxCalculateLayoutEvent: public wxEvent {
158 wxCalculateLayoutEvent(wxWindowID id = 0);
160 void SetFlags(int flags);
162 void SetRect(const wxRect& rect);
167 class wxSashLayoutWindow: public wxSashWindow {
169 wxSashLayoutWindow(wxWindow* parent, wxWindowID id,
170 const wxPoint& pos = wxDefaultPosition,
171 const wxSize& size = wxDefaultSize,
172 long style = wxCLIP_CHILDREN | wxSW_3D,
173 const char* name = "layoutWindow");
174 %name(wxPreSashLayoutWindow)wxSashLayoutWindow();
176 bool Create(wxWindow* parent, wxWindowID id,
177 const wxPoint& pos = wxDefaultPosition,
178 const wxSize& size = wxDefaultSize,
179 long style = wxCLIP_CHILDREN | wxSW_3D,
180 const char* name = "layoutWindow");
182 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
183 %pragma(python) addtomethod = "wxPreSashLayoutWindow:val._setOORInfo(self)"
185 wxLayoutAlignment GetAlignment();
186 wxLayoutOrientation GetOrientation();
187 void SetAlignment(wxLayoutAlignment alignment);
188 void SetDefaultSize(const wxSize& size);
189 void SetOrientation(wxLayoutOrientation orientation);
192 //---------------------------------------------------------------------------
194 class wxLayoutAlgorithm : public wxObject {
197 ~wxLayoutAlgorithm();
199 bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL);
200 bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL);
201 bool LayoutWindow(wxWindow* parent, wxWindow* mainWindow = NULL);
205 //---------------------------------------------------------------------------
207 // wxPopupWindow: a special kind of top level window used for popup menus,
208 // combobox popups and such.
209 class wxPopupWindow : public wxWindow {
211 wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE);
212 %name(wxPrePopupWindow)wxPopupWindow();
214 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
215 %pragma(python) addtomethod = "wxPrePopupWindow:val._setOORInfo(self)"
217 bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
219 void Position(const wxPoint& ptOrigin,
225 class wxPyPopupTransientWindow : public wxPopupTransientWindow
228 wxPyPopupTransientWindow() : wxPopupTransientWindow() {}
229 wxPyPopupTransientWindow(wxWindow* parent, int style = wxBORDER_NONE)
230 : wxPopupTransientWindow(parent, style) {}
232 DEC_PYCALLBACK_BOOL_ME(ProcessLeftDown);
236 IMP_PYCALLBACK_BOOL_ME(wxPyPopupTransientWindow, wxPopupTransientWindow, ProcessLeftDown);
242 // wxPopupTransientWindow: a wxPopupWindow which disappears automatically
243 // when the user clicks mouse outside it or if it loses focus in any other way
244 %name(wxPopupTransientWindow) class wxPyPopupTransientWindow : public wxPopupWindow
247 wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE);
248 %name(wxPrePopupTransientWindow)wxPyPopupTransientWindow();
250 void _setCallbackInfo(PyObject* self, PyObject* _class);
251 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPopupTransientWindow)"
253 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
254 %pragma(python) addtomethod = "wxPrePopupTransientWindow:val._setOORInfo(self)"
256 // popup the window (this will show it too) and keep focus at winFocus
257 // (or itself if it's NULL), dismiss the popup if we lose focus
258 virtual void Popup(wxWindow *focus = NULL);
261 virtual void Dismiss();
264 //---------------------------------------------------------------------------