]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/windows3.i
changes for wxDash
[wxWidgets.git] / utils / wxPython / src / windows3.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: windows3.i
3 // Purpose: SWIG definitions of MORE window classes
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 22-Dec-1998
8 // RCS-ID: $Id$
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 %module windows3
14
15 %{
16 #include "helpers.h"
17 #include <wx/sashwin.h>
18 #include <wx/laywin.h>
19 %}
20
21 //----------------------------------------------------------------------
22
23 %include typemaps.i
24 %include my_typemaps.i
25
26 // Import some definitions of other classes, etc.
27 %import _defs.i
28 %import misc.i
29 %import gdi.i
30 %import windows.i
31 %import windows2.i
32 %import mdi.i
33 %import events.i
34
35 %pragma(python) code = "import wx"
36
37 //---------------------------------------------------------------------------
38
39 enum wxSashEdgePosition {
40 wxSASH_TOP = 0,
41 wxSASH_RIGHT,
42 wxSASH_BOTTOM,
43 wxSASH_LEFT,
44 wxSASH_NONE = 100
45 };
46
47 enum {
48 wxEVT_SASH_DRAGGED,
49 wxSW_3D,
50 };
51
52 enum wxSashDragStatus
53 {
54 wxSASH_STATUS_OK,
55 wxSASH_STATUS_OUT_OF_RANGE
56 };
57
58
59 class wxSashEvent : public wxCommandEvent {
60 public:
61 void SetEdge(wxSashEdgePosition edge);
62 wxSashEdgePosition GetEdge();
63 void SetDragRect(const wxRect& rect);
64 wxRect GetDragRect();
65 void SetDragStatus(wxSashDragStatus status);
66 wxSashDragStatus GetDragStatus();
67 };
68
69
70
71 class wxSashWindow: public wxWindow {
72 public:
73 wxSashWindow(wxWindow* parent, wxWindowID id,
74 const wxPoint& pos = wxPyDefaultPosition,
75 const wxSize& size = wxPyDefaultSize,
76 long style = wxCLIP_CHILDREN | wxSW_3D,
77 const char* name = "sashWindow");
78
79 %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
80
81 bool GetSashVisible(wxSashEdgePosition edge);
82 int GetDefaultBorderSize();
83 int GetEdgeMargin(wxSashEdgePosition edge);
84 int GetExtraBorderSize();
85 int GetMaximumSizeX();
86 int GetMaximumSizeY();
87 int GetMinimumSizeX();
88 int GetMinimumSizeY();
89 bool HasBorder(wxSashEdgePosition edge);
90 void SetDefaultBorderSize(int width);
91 void SetExtraBorderSize(int width);
92 void SetMaximumSizeX(int min);
93 void SetMaximumSizeY(int min);
94 void SetMinimumSizeX(int min);
95 void SetMinimumSizeY(int min);
96 void SetSashVisible(wxSashEdgePosition edge, bool visible);
97 void SetSashBorder(wxSashEdgePosition edge, bool hasBorder);
98
99 };
100
101
102 //---------------------------------------------------------------------------
103
104 enum wxLayoutOrientation {
105 wxLAYOUT_HORIZONTAL,
106 wxLAYOUT_VERTICAL
107 };
108
109 enum wxLayoutAlignment {
110 wxLAYOUT_NONE,
111 wxLAYOUT_TOP,
112 wxLAYOUT_LEFT,
113 wxLAYOUT_RIGHT,
114 wxLAYOUT_BOTTOM,
115 };
116
117
118 enum {
119 wxEVT_QUERY_LAYOUT_INFO,
120 wxEVT_CALCULATE_LAYOUT,
121 };
122
123
124 class wxQueryLayoutInfoEvent: public wxEvent {
125 public:
126
127 void SetRequestedLength(int length);
128 int GetRequestedLength();
129 void SetFlags(int flags);
130 int GetFlags();
131 void SetSize(const wxSize& size);
132 wxSize GetSize();
133 void SetOrientation(wxLayoutOrientation orient);
134 wxLayoutOrientation GetOrientation();
135 void SetAlignment(wxLayoutAlignment align);
136 wxLayoutAlignment GetAlignment();
137 };
138
139
140
141 class wxCalculateLayoutEvent: public wxEvent {
142 public:
143 void SetFlags(int flags);
144 int GetFlags();
145 void SetRect(const wxRect& rect);
146 wxRect GetRect();
147 };
148
149
150 class wxSashLayoutWindow: public wxSashWindow {
151 public:
152 wxSashLayoutWindow(wxWindow* parent, wxWindowID id,
153 const wxPoint& pos = wxPyDefaultPosition,
154 const wxSize& size = wxPyDefaultSize,
155 long style = wxCLIP_CHILDREN | wxSW_3D,
156 const char* name = "layoutWindow");
157
158 %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
159 %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT)"
160 %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO)"
161
162
163 wxLayoutAlignment GetAlignment();
164 wxLayoutOrientation GetOrientation();
165 void SetAlignment(wxLayoutAlignment alignment);
166 void SetDefaultSize(const wxSize& size);
167 void SetOrientation(wxLayoutOrientation orientation);
168 };
169
170 //---------------------------------------------------------------------------
171
172 class wxLayoutAlgorithm {
173 public:
174 wxLayoutAlgorithm();
175 ~wxLayoutAlgorithm();
176
177 bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL);
178 bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL);
179 bool LayoutWindow(wxWindow* parent, wxWindow* mainWindow = NULL);
180 };
181
182
183 //---------------------------------------------------------------------------
184
185
186
187 //---------------------------------------------------------------------------