]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/sashlayw.tex
fixed anchor link naming, indentation in some places, added the <hr> divisor, fixed...
[wxWidgets.git] / docs / latex / wx / sashlayw.tex
1 \section{\class{wxSashLayoutWindow}}\label{wxsashlayoutwindow}
2
3 wxSashLayoutWindow responds to OnCalculateLayout events generated
4 by \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}. It allows the
5 application to use simple accessors to specify how the window should be
6 laid out, rather than having to respond to events. The fact that
7 the class derives from wxSashWindow allows sashes to be used if required,
8 to allow the windows to be user-resizable.
9
10 The documentation for \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} explains
11 the 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
20 \wxheading{Include files}
21
22 <wx/laywin.h>
23
24 \wxheading{Library}
25
26 \helpref{wxAdv}{librarieslist}
27
28 \wxheading{Window styles}
29
30 See \helpref{wxSashWindow}{wxsashwindow}.
31
32 \wxheading{Event handling}
33
34 This class handles the EVT\_QUERY\_LAYOUT\_INFO and EVT\_CALCULATE\_LAYOUT events
35 for you. However, if you use sashes, see \helpref{wxSashWindow}{wxsashwindow} for
36 relevant event information.
37
38 See also \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} for information
39 about 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
47 \membersection{wxSashLayoutWindow::wxSashLayoutWindow}\label{wxsashlayoutwindowctor}
48
49 \func{}{wxSashLayoutWindow}{\void}
50
51 Default constructor.
52
53 \func{}{wxSashLayoutWindow}{\param{wxSashLayoutWindow*}{ parent}, \param{wxWindowID }{id},
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
59 Constructs 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
68 should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
69 an actual position.}
70
71 \docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows
72 should 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
78
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
87 Initializes 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
96 should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
97 an actual position.}
98
99 \docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows
100 should 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.}
105
106
107 \membersection{wxSashLayoutWindow::GetAlignment}\label{wxsashlayoutwindowgetalignment}
108
109 \constfunc{wxLayoutAlignment}{GetAlignment}{\void}
110
111 Returns 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
117 Returns 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
123 The default handler for the event that is generated by wxLayoutAlgorithm. The implementation
124 of this function calls wxCalculateLayoutEvent::SetRect to shrink the provided size according to
125 how much space this window takes up. For further details,
126 see \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} and \helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}.
127
128 \membersection{wxSashLayoutWindow::OnQueryLayoutInfo}\label{wxsashlayoutwindowonquerylayoutinfo}
129
130 \func{void}{OnQueryLayoutInfo}{\param{wxQueryLayoutInfoEvent\&}{ event}}
131
132 The default handler for the event that is generated by OnCalculateLayout to get
133 size, alignment and orientation information for the window. The implementation
134 of this function uses member variables as set by accessors called by the application.
135 For 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
141 Sets the alignment of the window (which edge of the available parent client area the window
142 is 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
148 Sets the default dimensions of the window. The dimension other than the orientation will be fixed to this
149 value, 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
155 Sets the orientation of the window (the direction the window will stretch in, to fill the available
156 parent client area). {\it orientation} is one of wxLAYOUT\_HORIZONTAL, wxLAYOUT\_VERTICAL.
157
158
159