]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/windows3.i
correction for memory leak
[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:
09f3d4e6
RD
64 wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE);
65
08127323
RD
66 void SetEdge(wxSashEdgePosition edge);
67 wxSashEdgePosition GetEdge();
68 void SetDragRect(const wxRect& rect);
69 wxRect GetDragRect();
70 void SetDragStatus(wxSashDragStatus status);
71 wxSashDragStatus GetDragStatus();
72};
73
74
75
76class wxSashWindow: public wxWindow {
77public:
78 wxSashWindow(wxWindow* parent, wxWindowID id,
b68dc582
RD
79 const wxPoint& pos = wxDefaultPosition,
80 const wxSize& size = wxDefaultSize,
08127323
RD
81 long style = wxCLIP_CHILDREN | wxSW_3D,
82 const char* name = "sashWindow");
09f3d4e6 83 %name(wxPreSashWindow)wxSashWindow();
08127323 84
09f3d4e6
RD
85 bool Create(wxWindow* parent, wxWindowID id,
86 const wxPoint& pos = wxDefaultPosition,
87 const wxSize& size = wxDefaultSize,
88 long style = wxCLIP_CHILDREN | wxSW_3D,
89 const char* name = "sashWindow");
08127323
RD
90
91 bool GetSashVisible(wxSashEdgePosition edge);
92 int GetDefaultBorderSize();
93 int GetEdgeMargin(wxSashEdgePosition edge);
94 int GetExtraBorderSize();
95 int GetMaximumSizeX();
96 int GetMaximumSizeY();
97 int GetMinimumSizeX();
98 int GetMinimumSizeY();
99 bool HasBorder(wxSashEdgePosition edge);
100 void SetDefaultBorderSize(int width);
101 void SetExtraBorderSize(int width);
102 void SetMaximumSizeX(int min);
103 void SetMaximumSizeY(int min);
104 void SetMinimumSizeX(int min);
105 void SetMinimumSizeY(int min);
106 void SetSashVisible(wxSashEdgePosition edge, bool visible);
107 void SetSashBorder(wxSashEdgePosition edge, bool hasBorder);
108
109};
110
111
112//---------------------------------------------------------------------------
113
114enum wxLayoutOrientation {
115 wxLAYOUT_HORIZONTAL,
116 wxLAYOUT_VERTICAL
117};
118
119enum wxLayoutAlignment {
120 wxLAYOUT_NONE,
121 wxLAYOUT_TOP,
122 wxLAYOUT_LEFT,
123 wxLAYOUT_RIGHT,
124 wxLAYOUT_BOTTOM,
125};
126
127
128enum {
129 wxEVT_QUERY_LAYOUT_INFO,
130 wxEVT_CALCULATE_LAYOUT,
131};
132
133
134class wxQueryLayoutInfoEvent: public wxEvent {
135public:
09f3d4e6 136 wxQueryLayoutInfoEvent(wxWindowID id = 0);
08127323
RD
137
138 void SetRequestedLength(int length);
139 int GetRequestedLength();
140 void SetFlags(int flags);
141 int GetFlags();
142 void SetSize(const wxSize& size);
143 wxSize GetSize();
144 void SetOrientation(wxLayoutOrientation orient);
145 wxLayoutOrientation GetOrientation();
146 void SetAlignment(wxLayoutAlignment align);
147 wxLayoutAlignment GetAlignment();
148};
149
150
151
152class wxCalculateLayoutEvent: public wxEvent {
153public:
09f3d4e6
RD
154 wxCalculateLayoutEvent(wxWindowID id = 0);
155
08127323
RD
156 void SetFlags(int flags);
157 int GetFlags();
158 void SetRect(const wxRect& rect);
159 wxRect GetRect();
160};
161
162
163class wxSashLayoutWindow: public wxSashWindow {
164public:
165 wxSashLayoutWindow(wxWindow* parent, wxWindowID id,
b68dc582
RD
166 const wxPoint& pos = wxDefaultPosition,
167 const wxSize& size = wxDefaultSize,
08127323
RD
168 long style = wxCLIP_CHILDREN | wxSW_3D,
169 const char* name = "layoutWindow");
09f3d4e6 170 %name(wxPreSashLayoutWindow)wxSashLayoutWindow();
08127323 171
09f3d4e6
RD
172 bool Create(wxWindow* parent, wxWindowID id,
173 const wxPoint& pos = wxDefaultPosition,
174 const wxSize& size = wxDefaultSize,
175 long style = wxCLIP_CHILDREN | wxSW_3D,
176 const char* name = "layoutWindow");
08127323
RD
177
178 wxLayoutAlignment GetAlignment();
179 wxLayoutOrientation GetOrientation();
180 void SetAlignment(wxLayoutAlignment alignment);
181 void SetDefaultSize(const wxSize& size);
182 void SetOrientation(wxLayoutOrientation orientation);
183};
184
185//---------------------------------------------------------------------------
186
9416aa89 187class wxLayoutAlgorithm : public wxObject {
08127323
RD
188public:
189 wxLayoutAlgorithm();
190 ~wxLayoutAlgorithm();
191
192 bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL);
193 bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL);
cf694132 194 bool LayoutWindow(wxWindow* parent, wxWindow* mainWindow = NULL);
08127323
RD
195};
196
197
198//---------------------------------------------------------------------------
2abc0a0f 199