]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/sashlayw.tex
escape underscores introduced by the last change
[wxWidgets.git] / docs / latex / wx / sashlayw.tex
CommitLineData
6fb26ea3
JS
1\section{\class{wxSashLayoutWindow}}\label{wxsashlayoutwindow}
2
3wxSashLayoutWindow responds to OnCalculateLayout events generated
4by \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}. It allows the
5application to use simple accessors to specify how the window should be
6laid out, rather than having to respond to events. The fact that
7the class derives from wxSashWindow allows sashes to be used if required,
8to allow the windows to be user-resizable.
9
10The documentation for \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} explains
11the purpose of this class in more detail.
12
13\wxheading{Derived from}
14
15\helpref{wxSashWindow}{wxsashwindow}\\
16\helpref{wxWindow}{wxwindow}\\
17\helpref{wxEvtHandler}{wxevthandler}\\
18\helpref{wxObject}{wxobject}
19
954b8ae6
JS
20\wxheading{Include files}
21
22<wx/laywin.h>
23
a7af285d
VZ
24\wxheading{Library}
25
26\helpref{wxAdv}{librarieslist}
27
6fb26ea3
JS
28\wxheading{Window styles}
29
30See \helpref{wxSashWindow}{wxsashwindow}.
31
32\wxheading{Event handling}
33
34This class handles the EVT\_QUERY\_LAYOUT\_INFO and EVT\_CALCULATE\_LAYOUT events
35for you. However, if you use sashes, see \helpref{wxSashWindow}{wxsashwindow} for
36relevant event information.
37
38See also \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} for information
39about the layout events.
40
41\wxheading{See also}
42
43\helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}, \helpref{wxSashWindow}{wxsashwindow}, \helpref{Event handling overview}{eventhandlingoverview}
44
45\latexignore{\rtfignore{\wxheading{Members}}}
46
39275175 47\membersection{wxSashLayoutWindow::wxSashLayoutWindow}\label{wxsashlayoutwindowctor}
6fb26ea3
JS
48
49\func{}{wxSashLayoutWindow}{\void}
50
51Default constructor.
52
9a75ba66 53\func{}{wxSashLayoutWindow}{\param{wxSashLayoutWindow*}{ parent}, \param{wxWindowID }{id},
6fb26ea3
JS
54 \param{const wxPoint\& }{pos = wxDefaultPosition},
55 \param{const wxSize\& }{size = wxDefaultSize},
56 \param{long }{style = wxCLIP\_CHILDREN \pipe wxSW\_3D},
57 \param{const wxString\& }{name = "layoutWindow"}}
58
59Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.
60
61\wxheading{Parameters}
62
63\docparam{parent}{Pointer to a parent window.}
64
65\docparam{id}{Window identifier. If -1, will automatically create an identifier.}
66
67\docparam{pos}{Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashLayoutWindows
68should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
69an actual position.}
70
71\docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows
72should generate a default size for the window.}
73
74\docparam{style}{Window style. For window styles, please see \helpref{wxSashLayoutWindow}{wxsashlayoutwindow}.}
75
76\docparam{name}{Window name.}
77
6fb26ea3 78
9a75ba66
RN
79\membersection{wxSashLayoutWindow::Create}\label{wxsashlayoutwindowcreate}
80
81\func{bool}{Create}{\param{wxSashLayoutWindow*}{ parent}, \param{wxWindowID }{id},
82 \param{const wxPoint\& }{pos = wxDefaultPosition},
83 \param{const wxSize\& }{size = wxDefaultSize},
84 \param{long }{style = wxCLIP\_CHILDREN \pipe wxSW\_3D},
85 \param{const wxString\& }{name = "layoutWindow"}}
86
87Initializes a sash layout window, which can be a child of a frame, dialog or any other non-control window.
88
89\wxheading{Parameters}
90
91\docparam{parent}{Pointer to a parent window.}
92
93\docparam{id}{Window identifier. If -1, will automatically create an identifier.}
94
95\docparam{pos}{Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashLayoutWindows
96should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
97an actual position.}
98
99\docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows
100should generate a default size for the window.}
101
102\docparam{style}{Window style. For window styles, please see \helpref{wxSashLayoutWindow}{wxsashlayoutwindow}.}
103
104\docparam{name}{Window name.}
6fb26ea3 105
6fb26ea3
JS
106
107\membersection{wxSashLayoutWindow::GetAlignment}\label{wxsashlayoutwindowgetalignment}
108
109\constfunc{wxLayoutAlignment}{GetAlignment}{\void}
110
111Returns the alignment of the window: one of wxLAYOUT\_TOP, wxLAYOUT\_LEFT, wxLAYOUT\_RIGHT, wxLAYOUT\_BOTTOM.
112
113\membersection{wxSashLayoutWindow::GetOrientation}\label{wxsashlayoutwindowgetorientation}
114
115\constfunc{wxLayoutOrientation}{GetOrientation}{\void}
116
117Returns the orientation of the window: one of wxLAYOUT\_HORIZONTAL, wxLAYOUT\_VERTICAL.
118
119\membersection{wxSashLayoutWindow::OnCalculateLayout}\label{wxsashlayoutwindowoncalculatelayout}
120
121\func{void}{OnCalculateLayout}{\param{wxCalculateLayoutEvent\&}{ event}}
122
123The default handler for the event that is generated by wxLayoutAlgorithm. The implementation
124of this function calls wxCalculateLayoutEvent::SetRect to shrink the provided size according to
125how much space this window takes up. For further details,
126see \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} and \helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}.
127
128\membersection{wxSashLayoutWindow::OnQueryLayoutInfo}\label{wxsashlayoutwindowonquerylayoutinfo}
129
130\func{void}{OnQueryLayoutInfo}{\param{wxQueryLayoutInfoEvent\&}{ event}}
131
132The default handler for the event that is generated by OnCalculateLayout to get
133size, alignment and orientation information for the window. The implementation
134of this function uses member variables as set by accessors called by the application.
135For further details, see \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} and \helpref{wxQueryLayoutInfoEvent}{wxquerylayoutinfoevent}.
136
137\membersection{wxSashLayoutWindow::SetAlignment}\label{wxsashlayoutwindowsetalignment}
138
139\func{void}{SetAlignment}{\param{wxLayoutAlignment}{ alignment}}
140
141Sets the alignment of the window (which edge of the available parent client area the window
142is attached to). {\it alignment} is one of wxLAYOUT\_TOP, wxLAYOUT\_LEFT, wxLAYOUT\_RIGHT, wxLAYOUT\_BOTTOM.
143
144\membersection{wxSashLayoutWindow::SetDefaultSize}\label{wxsashlayoutwindowsetdefaultsize}
145
146\func{void}{SetDefaultSize}{\param{const wxSize\& }{size}}
147
148Sets the default dimensions of the window. The dimension other than the orientation will be fixed to this
149value, and the orientation dimension will be ignored and the window stretched to fit the available space.
150
151\membersection{wxSashLayoutWindow::SetOrientation}\label{wxsashlayoutwindowsetorientation}
152
153\func{void}{SetOrientation}{\param{wxLayoutOrientation}{ orientation}}
154
155Sets the orientation of the window (the direction the window will stretch in, to fill the available
156parent client area). {\it orientation} is one of wxLAYOUT\_HORIZONTAL, wxLAYOUT\_VERTICAL.
157
158
159