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