]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/windows3.i
don't try to refresh the menu bar before showing it, fixes crash on startup with...
[wxWidgets.git] / wxPython / src / windows3.i
CommitLineData
08127323
RD
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
39enum wxSashEdgePosition {
40 wxSASH_TOP = 0,
41 wxSASH_RIGHT,
42 wxSASH_BOTTOM,
43 wxSASH_LEFT,
44 wxSASH_NONE = 100
45};
46
47enum {
48 wxEVT_SASH_DRAGGED,
49 wxSW_3D,
1b62f00d
RD
50 wxSW_3DSASH,
51 wxSW_3DBORDER,
52 wxSW_BORDER
08127323
RD
53};
54
55enum wxSashDragStatus
56{
57 wxSASH_STATUS_OK,
58 wxSASH_STATUS_OUT_OF_RANGE
59};
60
61
62class wxSashEvent : public wxCommandEvent {
63public:
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
74class wxSashWindow: public wxWindow {
75public:
76 wxSashWindow(wxWindow* parent, wxWindowID id,
b68dc582
RD
77 const wxPoint& pos = wxDefaultPosition,
78 const wxSize& size = wxDefaultSize,
08127323
RD
79 long style = wxCLIP_CHILDREN | wxSW_3D,
80 const char* name = "sashWindow");
81
f6bcfd97 82 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
08127323
RD
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
107enum wxLayoutOrientation {
108 wxLAYOUT_HORIZONTAL,
109 wxLAYOUT_VERTICAL
110};
111
112enum wxLayoutAlignment {
113 wxLAYOUT_NONE,
114 wxLAYOUT_TOP,
115 wxLAYOUT_LEFT,
116 wxLAYOUT_RIGHT,
117 wxLAYOUT_BOTTOM,
118};
119
120
121enum {
122 wxEVT_QUERY_LAYOUT_INFO,
123 wxEVT_CALCULATE_LAYOUT,
124};
125
126
127class wxQueryLayoutInfoEvent: public wxEvent {
128public:
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
144class wxCalculateLayoutEvent: public wxEvent {
145public:
146 void SetFlags(int flags);
147 int GetFlags();
148 void SetRect(const wxRect& rect);
149 wxRect GetRect();
150};
151
152
153class wxSashLayoutWindow: public wxSashWindow {
154public:
155 wxSashLayoutWindow(wxWindow* parent, wxWindowID id,
b68dc582
RD
156 const wxPoint& pos = wxDefaultPosition,
157 const wxSize& size = wxDefaultSize,
08127323
RD
158 long style = wxCLIP_CHILDREN | wxSW_3D,
159 const char* name = "layoutWindow");
160
f6bcfd97
BP
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)"
08127323
RD
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
9416aa89 175class wxLayoutAlgorithm : public wxObject {
08127323
RD
176public:
177 wxLayoutAlgorithm();
178 ~wxLayoutAlgorithm();
179
180 bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL);
181 bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL);
cf694132 182 bool LayoutWindow(wxWindow* parent, wxWindow* mainWindow = NULL);
08127323
RD
183};
184
185
186//---------------------------------------------------------------------------
2abc0a0f
RD
187
188
189
190//---------------------------------------------------------------------------