]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/sashwin.tex
better documentation for wxWindow::SetSizerAndFit()
[wxWidgets.git] / docs / latex / wx / sashwin.tex
1 \section{\class{wxSashWindow}}\label{wxsashwindow}
2
3 wxSashWindow allows any of its edges to have a sash which can be dragged
4 to resize the window. The actual content window will be created by the application
5 as a child of wxSashWindow. The window (or an ancestor) will be notified of a drag
6 via a \helpref{wxSashEvent}{wxsashevent} notification.
7
8 \wxheading{Derived from}
9
10 \helpref{wxWindow}{wxwindow}\\
11 \helpref{wxEvtHandler}{wxevthandler}\\
12 \helpref{wxObject}{wxobject}
13
14 \wxheading{Include files}
15
16 <wx/sashwin.h>
17
18 \wxheading{Library}
19
20 \helpref{wxAdv}{librarieslist}
21
22 \wxheading{Window styles}
23
24 The following styles apply in addition to the normal wxWindow styles.
25
26 \twocolwidtha{5cm}%
27 \begin{twocollist}\itemsep=0pt
28 \twocolitem{\windowstyle{wxSW\_3D}}{Draws a 3D effect sash and border.}
29 \twocolitem{\windowstyle{wxSW\_3DSASH}}{Draws a 3D effect sash.}
30 \twocolitem{\windowstyle{wxSW\_3DBORDER}}{Draws a 3D effect border.}
31 \twocolitem{\windowstyle{wxSW\_BORDER}}{Draws a thin black border.}
32 \end{twocollist}
33
34 See also \helpref{window styles overview}{windowstyles}.
35
36 \wxheading{Event handling}
37
38 \twocolwidtha{7cm}%
39 \begin{twocollist}\itemsep=0pt
40 \twocolitem{{\bf EVT\_SASH\_DRAGGED(id, func)}}{Process a wxEVT\_SASH\_DRAGGED event,
41 when the user has finished dragging a sash.}
42 \twocolitem{{\bf EVT\_SASH\_DRAGGED\_RANGE(id1, id2, func)}}{Process a wxEVT\_SASH\_DRAGGED\_RANGE event,
43 when the user has finished dragging a sash. The event handler is called when windows with ids in the
44 given range have their sashes dragged.}
45 \end{twocollist}
46
47 \wxheading{Data types}
48
49 {\small
50 \begin{verbatim}
51 enum wxSashEdgePosition {
52 wxSASH_TOP = 0,
53 wxSASH_RIGHT,
54 wxSASH_BOTTOM,
55 wxSASH_LEFT,
56 wxSASH_NONE = 100
57 };
58 \end{verbatim}
59 }
60
61 \wxheading{See also}
62
63 \helpref{wxSashEvent}{wxsashevent}, \helpref{wxSashLayoutWindow}{wxsashlayoutwindow}, \helpref{Event handling overview}{eventhandlingoverview}
64
65 \latexignore{\rtfignore{\wxheading{Members}}}
66
67 \membersection{wxSashWindow::wxSashWindow}\label{wxsashwindowctor}
68
69 \func{}{wxSashWindow}{\void}
70
71 Default constructor.
72
73 \func{}{wxSashWindow}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},
74 \param{const wxPoint\& }{pos = wxDefaultPosition},
75 \param{const wxSize\& }{size = wxDefaultSize},
76 \param{long }{style = wxCLIP\_CHILDREN \pipe wxSW\_3D},
77 \param{const wxString\& }{name = "sashWindow"}}
78
79 Constructs a sash window, which can be a child of a frame, dialog or any other non-control window.
80
81 \wxheading{Parameters}
82
83 \docparam{parent}{Pointer to a parent window.}
84
85 \docparam{id}{Window identifier. If -1, will automatically create an identifier.}
86
87 \docparam{pos}{Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashWindows
88 should generate a default position for the window. If using the wxSashWindow class directly, supply
89 an actual position.}
90
91 \docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashWindows
92 should generate a default size for the window.}
93
94 \docparam{style}{Window style. For window styles, please see \helpref{wxSashWindow}{wxsashwindow}.}
95
96 \docparam{name}{Window name.}
97
98 \membersection{wxSashWindow::\destruct{wxSashWindow}}\label{wxsashwindowdtor}
99
100 \func{}{\destruct{wxSashWindow}}{\void}
101
102 Destructor.
103
104 \membersection{wxSashWindow::GetSashVisible}\label{wxsashwindowgetsashvisible}
105
106 \constfunc{bool}{GetSashVisible}{\param{wxSashEdgePosition }{edge}}
107
108 Returns true if a sash is visible on the given edge, false otherwise.
109
110 \wxheading{Parameters}
111
112 \docparam{edge}{Edge. One of wxSASH\_TOP, wxSASH\_RIGHT, wxSASH\_BOTTOM, wxSASH\_LEFT.}
113
114 \wxheading{See also}
115
116 \helpref{wxSashWindow::SetSashVisible}{wxsashwindowsetsashvisible}
117
118 \membersection{wxSashWindow::GetMaximumSizeX}\label{wxsashwindowgetmaximumsizex}
119
120 \constfunc{int}{GetMaximumSizeX}{\void}
121
122 Gets the maximum window size in the x direction.
123
124 \membersection{wxSashWindow::GetMaximumSizeY}\label{wxsashwindowgetmaximumsizey}
125
126 \constfunc{int}{GetMaximumSizeY}{\void}
127
128 Gets the maximum window size in the y direction.
129
130 \membersection{wxSashWindow::GetMinimumSizeX}\label{wxsashwindowgetminimumsizex}
131
132 \func{int}{GetMinimumSizeX}{\void}
133
134 Gets the minimum window size in the x direction.
135
136 \membersection{wxSashWindow::GetMinimumSizeY}\label{wxsashwindowgetminimumsizey}
137
138 \constfunc{int}{GetMinimumSizeY}{\void}
139
140 Gets the minimum window size in the y direction.
141
142 \membersection{wxSashWindow::HasBorder}\label{wxsashwindowhasborder}
143
144 \constfunc{bool}{HasBorder}{\param{wxSashEdgePosition }{edge}}
145
146 Returns true if the sash has a border, false otherwise.
147 This function is obsolete since the sash border property is unused.
148
149 \wxheading{Parameters}
150
151 \docparam{edge}{Edge. One of wxSASH\_TOP, wxSASH\_RIGHT, wxSASH\_BOTTOM, wxSASH\_LEFT.}
152
153 \wxheading{See also}
154
155 \helpref{wxSashWindow::SetSashBorder}{wxsashwindowsetsashborder}
156
157 \membersection{wxSashWindow::SetMaximumSizeX}\label{wxsashwindowsetmaximumsizex}
158
159 \func{void}{SetMaximumSizeX}{\param{int}{ min}}
160
161 Sets the maximum window size in the x direction.
162
163 \membersection{wxSashWindow::SetMaximumSizeY}\label{wxsashwindowsetmaximumsizey}
164
165 \func{void}{SetMaximumSizeY}{\param{int}{ min}}
166
167 Sets the maximum window size in the y direction.
168
169 \membersection{wxSashWindow::SetMinimumSizeX}\label{wxsashwindowsetminimumsizex}
170
171 \func{void}{SetMinimumSizeX}{\param{int}{ min}}
172
173 Sets the minimum window size in the x direction.
174
175 \membersection{wxSashWindow::SetMinimumSizeY}\label{wxsashwindowsetminimumsizey}
176
177 \func{void}{SetMinimumSizeY}{\param{int}{ min}}
178
179 Sets the minimum window size in the y direction.
180
181 \membersection{wxSashWindow::SetSashVisible}\label{wxsashwindowsetsashvisible}
182
183 \func{void}{SetSashVisible}{\param{wxSashEdgePosition }{edge}, \param{bool}{ visible}}
184
185 Call this function to make a sash visible or invisible on a particular edge.
186
187 \wxheading{Parameters}
188
189 \docparam{edge}{Edge to change. One of wxSASH\_TOP, wxSASH\_RIGHT, wxSASH\_BOTTOM, wxSASH\_LEFT.}
190
191 \docparam{visible}{true to make the sash visible, false to make it invisible.}
192
193 \wxheading{See also}
194
195 \helpref{wxSashWindow::GetSashVisible}{wxsashwindowgetsashvisible}
196
197 \membersection{wxSashWindow::SetSashBorder}\label{wxsashwindowsetsashborder}
198
199 \func{void}{SetSashBorder}{\param{wxSashEdgePosition }{edge}, \param{bool}{ hasBorder}}
200
201 Call this function to give the sash a border, or remove the border.
202 This function is obsolete since the sash border property is unused.
203
204 \wxheading{Parameters}
205
206 \docparam{edge}{Edge to change. One of wxSASH\_TOP, wxSASH\_RIGHT, wxSASH\_BOTTOM, wxSASH\_LEFT.}
207
208 \docparam{hasBorder}{true to give the sash a border visible, false to remove it.}
209
210 \wxheading{See also}
211
212 \helpref{wxSashWindow::HasBorder}{wxsashwindowhasborder}
213