]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/windows3.i
highlight the focused item in non report mode too
[wxWidgets.git] / 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 wxSW_3DSASH,
51 wxSW_3DBORDER,
52 wxSW_BORDER
53 };
54
55 enum wxSashDragStatus
56 {
57 wxSASH_STATUS_OK,
58 wxSASH_STATUS_OUT_OF_RANGE
59 };
60
61
62 class wxSashEvent : public wxCommandEvent {
63 public:
64 void SetEdge(wxSashEdgePosition edge);
65 wxSashEdgePosition GetEdge();
66 void SetDragRect(const wxRect& rect);
67 wxRect GetDragRect();
68 void SetDragStatus(wxSashDragStatus status);
69 wxSashDragStatus GetDragStatus();
70 };
71
72
73
74 class wxSashWindow: public wxWindow {
75 public:
76 wxSashWindow(wxWindow* parent, wxWindowID id,
77 const wxPoint& pos = wxDefaultPosition,
78 const wxSize& size = wxDefaultSize,
79 long style = wxCLIP_CHILDREN | wxSW_3D,
80 const char* name = "sashWindow");
81
82 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
83
84 bool GetSashVisible(wxSashEdgePosition edge);
85 int GetDefaultBorderSize();
86 int GetEdgeMargin(wxSashEdgePosition edge);
87 int GetExtraBorderSize();
88 int GetMaximumSizeX();
89 int GetMaximumSizeY();
90 int GetMinimumSizeX();
91 int GetMinimumSizeY();
92 bool HasBorder(wxSashEdgePosition edge);
93 void SetDefaultBorderSize(int width);
94 void SetExtraBorderSize(int width);
95 void SetMaximumSizeX(int min);
96 void SetMaximumSizeY(int min);
97 void SetMinimumSizeX(int min);
98 void SetMinimumSizeY(int min);
99 void SetSashVisible(wxSashEdgePosition edge, bool visible);
100 void SetSashBorder(wxSashEdgePosition edge, bool hasBorder);
101
102 };
103
104
105 //---------------------------------------------------------------------------
106
107 enum wxLayoutOrientation {
108 wxLAYOUT_HORIZONTAL,
109 wxLAYOUT_VERTICAL
110 };
111
112 enum wxLayoutAlignment {
113 wxLAYOUT_NONE,
114 wxLAYOUT_TOP,
115 wxLAYOUT_LEFT,
116 wxLAYOUT_RIGHT,
117 wxLAYOUT_BOTTOM,
118 };
119
120
121 enum {
122 wxEVT_QUERY_LAYOUT_INFO,
123 wxEVT_CALCULATE_LAYOUT,
124 };
125
126
127 class wxQueryLayoutInfoEvent: public wxEvent {
128 public:
129
130 void SetRequestedLength(int length);
131 int GetRequestedLength();
132 void SetFlags(int flags);
133 int GetFlags();
134 void SetSize(const wxSize& size);
135 wxSize GetSize();
136 void SetOrientation(wxLayoutOrientation orient);
137 wxLayoutOrientation GetOrientation();
138 void SetAlignment(wxLayoutAlignment align);
139 wxLayoutAlignment GetAlignment();
140 };
141
142
143
144 class wxCalculateLayoutEvent: public wxEvent {
145 public:
146 void SetFlags(int flags);
147 int GetFlags();
148 void SetRect(const wxRect& rect);
149 wxRect GetRect();
150 };
151
152
153 class wxSashLayoutWindow: public wxSashWindow {
154 public:
155 wxSashLayoutWindow(wxWindow* parent, wxWindowID id,
156 const wxPoint& pos = wxDefaultPosition,
157 const wxSize& size = wxDefaultSize,
158 long style = wxCLIP_CHILDREN | wxSW_3D,
159 const char* name = "layoutWindow");
160
161 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
162 %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT)"
163 %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO)"
164
165
166 wxLayoutAlignment GetAlignment();
167 wxLayoutOrientation GetOrientation();
168 void SetAlignment(wxLayoutAlignment alignment);
169 void SetDefaultSize(const wxSize& size);
170 void SetOrientation(wxLayoutOrientation orientation);
171 };
172
173 //---------------------------------------------------------------------------
174
175 class wxLayoutAlgorithm : public wxObject {
176 public:
177 wxLayoutAlgorithm();
178 ~wxLayoutAlgorithm();
179
180 bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL);
181 bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL);
182 bool LayoutWindow(wxWindow* parent, wxWindow* mainWindow = NULL);
183 };
184
185
186 //---------------------------------------------------------------------------
187
188
189
190 //---------------------------------------------------------------------------