File: wx199.htm

package info (click to toggle)
wxwin2-doc 2.01-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,540 kB
  • ctags: 5,968
  • sloc: cpp: 15,157; makefile: 434; sh: 6
file content (255 lines) | stat: -rw-r--r-- 8,882 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<HTML>
<head><title>wxSashWindow</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="wxsashwindow"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx198.htm#wxsashlayoutwindow"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx200.htm#wxscreendc"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H2>wxSashWindow</H2>
<P>
wxSashWindow allows any of its edges to have a sash which can be dragged
to resize the window. The actual content window will be created by the application
as a child of wxSashWindow. The window (or an ancestor) will be notified of a drag
via a <A HREF="wx197.htm#wxsashevent">wxSashEvent</A> notification.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx260.htm#wxwindow">wxWindow</A><BR>

<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><BR>

<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/sashwin.h&gt;<P>
<B><FONT COLOR="#FF0000">Window styles</FONT></B><P>
The following styles apply in addition to the normal wxWindow styles.<P>

<TABLE>


<TR><TD VALIGN=TOP>
<B>wxSW_3D</B>
</TD>

<TD VALIGN=TOP>
Draws the sashes in 3D.
</TD></TR>


</TABLE>
<P>
See also <A HREF="wx305.htm#windowstyles">window styles overview</A>.<P>
<B><FONT COLOR="#FF0000">Event handling</FONT></B><P>

<TABLE>


<TR><TD VALIGN=TOP>
<B>EVT_SASH_DRAGGED(id, func)</B>
</TD>

<TD VALIGN=TOP>
Process a wxEVT_SASH_DRAGGED event,
when the user has finished dragging a sash.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>EVT_SASH_DRAGGED_RANGE(id1, id2, func)</B>
</TD>

<TD VALIGN=TOP>
Process a wxEVT_SASH_DRAGGED_RANGE event,
when the user has finished dragging a sash. The event handler is called when windows with ids in the
given range have their sashes dragged.
</TD></TR>


</TABLE>
<P>
<B><FONT COLOR="#FF0000">Data types</FONT></B><P>
<FONT SIZE=2>
<PRE>
enum wxSashEdgePosition {
    wxSASH_TOP = 0,
    wxSASH_RIGHT,
    wxSASH_BOTTOM,
    wxSASH_LEFT,
    wxSASH_NONE = 100
};
</PRE>
</FONT><P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx197.htm#wxsashevent">wxSashEvent</A>, <A HREF="wx198.htm#wxsashlayoutwindow">wxSashLayoutWindow</A>, <A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic803">wxSashWindow::wxSashWindow</A><BR>
<A HREF="#topic804">wxSashWindow::~wxSashWindow</A><BR>
<A HREF="#wxsashwindowgetsashvisible">wxSashWindow::GetSashVisible</A><BR>
<A HREF="#wxsashwindowgetmaximumsizex">wxSashWindow::GetMaximumSizeX</A><BR>
<A HREF="#wxsashwindowgetmaximumsizey">wxSashWindow::GetMaximumSizeY</A><BR>
<A HREF="#wxsashwindowgetminimumsizex">wxSashWindow::GetMinimumSizeX</A><BR>
<A HREF="#wxsashwindowgetminimumsizey">wxSashWindow::GetMinimumSizeY</A><BR>
<A HREF="#wxsashwindowhasborder">wxSashWindow::HasBorder</A><BR>
<A HREF="#wxsashwindowsetmaximumsizex">wxSashWindow::SetMaximumSizeX</A><BR>
<A HREF="#wxsashwindowsetmaximumsizey">wxSashWindow::SetMaximumSizeY</A><BR>
<A HREF="#wxsashwindowsetminimumsizex">wxSashWindow::SetMinimumSizeX</A><BR>
<A HREF="#wxsashwindowsetminimumsizey">wxSashWindow::SetMinimumSizeY</A><BR>
<A HREF="#wxsashwindowsetsashvisible">wxSashWindow::SetSashVisible</A><BR>
<A HREF="#wxsashwindowsetsashborder">wxSashWindow::SetSashBorder</A><BR>
<P>

<HR>
<A NAME="topic803"></A>
<H3>wxSashWindow::wxSashWindow</H3>
<P>
<B></B> <B>wxSashWindow</B>()<P>
Default constructor.<P>
<B></B> <B>wxSashWindow</B>(<B>wxSashWindow*</B><I> parent</I>, <B>wxSashWindowID </B><I>id</I>,
 <B>const wxPoint&amp; </B><I>pos = wxDefaultPosition</I>,
 <B>const wxSize&amp; </B><I>size = wxDefaultSize</I>,
 <B>long </B><I>style = wxCLIP_CHILDREN |  wxSW_3D</I>,
 <B>const wxString&amp; </B><I>name = "sashWindow"</I>)<P>
Constructs a sash window, which can be a child of a frame, dialog or any other non-control window.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>parent</I><UL><UL>
Pointer to a parent window.</UL></UL>
<P>
<I>id</I><UL><UL>
Window identifier. If -1, will automatically create an identifier.</UL></UL>
<P>
<I>pos</I><UL><UL>
Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashWindows
should generate a default position for the window. If using the wxSashWindow class directly, supply
an actual position.</UL></UL>
<P>
<I>size</I><UL><UL>
Window size. wxDefaultSize is (-1, -1) which indicates that wxSashWindows
should generate a default size for the window.</UL></UL>
<P>
<I>style</I><UL><UL>
Window style. For window styles, please see <A HREF="wx199.htm#wxsashwindow">wxSashWindow</A>.</UL></UL>
<P>
<I>name</I><UL><UL>
Window name.</UL></UL>
<P>

<HR>
<A NAME="topic804"></A>
<H3>wxSashWindow::~wxSashWindow</H3>
<P>
<B></B> <B>~wxSashWindow</B>()<P>
Destructor.<P>

<HR>
<A NAME="wxsashwindowgetsashvisible"></A>
<H3>wxSashWindow::GetSashVisible</H3>
<P>
<B>bool</B> <B>GetSashVisible</B>(<B>wxSashEdgePosition </B><I>edge</I>) <B>const</B><P>
Returns TRUE if a sash is visible on the given edge, FALSE otherwise.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>edge</I><UL><UL>
Edge. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx199.htm#wxsashwindowsetsashvisible">wxSashWindow::SetSashVisible</A><P>

<HR>
<A NAME="wxsashwindowgetmaximumsizex"></A>
<H3>wxSashWindow::GetMaximumSizeX</H3>
<P>
<B>int</B> <B>GetMaximumSizeX</B>() <B>const</B><P>
Gets the maximum window size in the x direction.<P>

<HR>
<A NAME="wxsashwindowgetmaximumsizey"></A>
<H3>wxSashWindow::GetMaximumSizeY</H3>
<P>
<B>int</B> <B>GetMaximumSizeY</B>() <B>const</B><P>
Gets the maximum window size in the y direction.<P>

<HR>
<A NAME="wxsashwindowgetminimumsizex"></A>
<H3>wxSashWindow::GetMinimumSizeX</H3>
<P>
<B>int</B> <B>GetMinimumSizeX</B>()<P>
Gets the minimum window size in the x direction.<P>

<HR>
<A NAME="wxsashwindowgetminimumsizey"></A>
<H3>wxSashWindow::GetMinimumSizeY</H3>
<P>
<B>int</B> <B>GetMinimumSizeY</B>(<B>int</B><I> min</I>) <B>const</B><P>
Gets the minimum window size in the y direction.<P>

<HR>
<A NAME="wxsashwindowhasborder"></A>
<H3>wxSashWindow::HasBorder</H3>
<P>
<B>bool</B> <B>HasBorder</B>(<B>wxSashEdgePosition </B><I>edge</I>) <B>const</B><P>
Returns TRUE if the sash has a border, FALSE otherwise.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>edge</I><UL><UL>
Edge. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx199.htm#wxsashwindowsetsashborder">wxSashWindow::SetSashBorder</A><P>

<HR>
<A NAME="wxsashwindowsetmaximumsizex"></A>
<H3>wxSashWindow::SetMaximumSizeX</H3>
<P>
<B>void</B> <B>SetMaximumSizeX</B>(<B>int</B><I> min</I>)<P>
Sets the maximum window size in the x direction.<P>

<HR>
<A NAME="wxsashwindowsetmaximumsizey"></A>
<H3>wxSashWindow::SetMaximumSizeY</H3>
<P>
<B>void</B> <B>SetMaximumSizeY</B>(<B>int</B><I> min</I>)<P>
Sets the maximum window size in the y direction.<P>

<HR>
<A NAME="wxsashwindowsetminimumsizex"></A>
<H3>wxSashWindow::SetMinimumSizeX</H3>
<P>
<B>void</B> <B>SetMinimumSizeX</B>(<B>int</B><I> min</I>)<P>
Sets the minimum window size in the x direction.<P>

<HR>
<A NAME="wxsashwindowsetminimumsizey"></A>
<H3>wxSashWindow::SetMinimumSizeY</H3>
<P>
<B>void</B> <B>SetMinimumSizeY</B>(<B>int</B><I> min</I>)<P>
Sets the minimum window size in the y direction.<P>

<HR>
<A NAME="wxsashwindowsetsashvisible"></A>
<H3>wxSashWindow::SetSashVisible</H3>
<P>
<B>void</B> <B>SetSashVisible</B>(<B>wxSashEdgePosition </B><I>edge</I>, <B>bool</B><I> visible</I>)<P>
Call this function to make a sash visible or invisible on a particular edge.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>edge</I><UL><UL>
Edge to change. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.</UL></UL>
<P>
<I>visible</I><UL><UL>
TRUE to make the sash visible, FALSE to make it invisible.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx199.htm#wxsashwindowgetsashvisible">wxSashWindow::GetSashVisible</A><P>

<HR>
<A NAME="wxsashwindowsetsashborder"></A>
<H3>wxSashWindow::SetSashBorder</H3>
<P>
<B>void</B> <B>SetSashBorder</B>(<B>wxSashEdgePosition </B><I>edge</I>, <B>bool</B><I> hasBorder</I>)<P>
Call this function to give the sash a border, or remove the border.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>edge</I><UL><UL>
Edge to change. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.</UL></UL>
<P>
<I>hasBorder</I><UL><UL>
TRUE to give the sash a border visible, FALSE to remove it.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx199.htm#wxsashwindowhasborder">wxSashWindow::HashBorder</A><P>

</BODY></HTML>