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