1 \section{\class{wxSashLayoutWindow
}}\label{wxsashlayoutwindow
}
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.
10 The documentation for
\helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
} explains
11 the purpose of this class in more detail.
13 \wxheading{Derived from
}
15 \helpref{wxSashWindow
}{wxsashwindow
}\\
16 \helpref{wxWindow
}{wxwindow
}\\
17 \helpref{wxEvtHandler
}{wxevthandler
}\\
18 \helpref{wxObject
}{wxobject
}
20 \wxheading{Include files
}
24 \wxheading{Window styles
}
26 See
\helpref{wxSashWindow
}{wxsashwindow
}.
28 \wxheading{Event handling
}
30 This class handles the EVT
\_QUERY\_LAYOUT\_INFO and EVT
\_CALCULATE\_LAYOUT events
31 for you. However, if you use sashes, see
\helpref{wxSashWindow
}{wxsashwindow
} for
32 relevant event information.
34 See also
\helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
} for information
35 about the layout events.
39 \helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
},
\helpref{wxSashWindow
}{wxsashwindow
},
\helpref{Event handling overview
}{eventhandlingoverview
}
41 \latexignore{\rtfignore{\wxheading{Members
}}}
43 \membersection{wxSashLayoutWindow::wxSashLayoutWindow
}\label{wxsashlayoutwindowctor
}
45 \func{}{wxSashLayoutWindow
}{\void}
49 \func{}{wxSashLayoutWindow
}{\param{wxSashLayoutWindow*
}{ parent
},
\param{wxWindowID
}{id
},
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"
}}
55 Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.
57 \wxheading{Parameters
}
59 \docparam{parent
}{Pointer to a parent window.
}
61 \docparam{id
}{Window identifier. If -
1, will automatically create an identifier.
}
63 \docparam{pos
}{Window position. wxDefaultPosition is (-
1, -
1) which indicates that wxSashLayoutWindows
64 should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
67 \docparam{size
}{Window size. wxDefaultSize is (-
1, -
1) which indicates that wxSashLayoutWindows
68 should generate a default size for the window.
}
70 \docparam{style
}{Window style. For window styles, please see
\helpref{wxSashLayoutWindow
}{wxsashlayoutwindow
}.
}
72 \docparam{name
}{Window name.
}
75 \membersection{wxSashLayoutWindow::Create
}\label{wxsashlayoutwindowcreate
}
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"
}}
83 Initializes a sash layout window, which can be a child of a frame, dialog or any other non-control window.
85 \wxheading{Parameters
}
87 \docparam{parent
}{Pointer to a parent window.
}
89 \docparam{id
}{Window identifier. If -
1, will automatically create an identifier.
}
91 \docparam{pos
}{Window position. wxDefaultPosition is (-
1, -
1) which indicates that wxSashLayoutWindows
92 should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
95 \docparam{size
}{Window size. wxDefaultSize is (-
1, -
1) which indicates that wxSashLayoutWindows
96 should generate a default size for the window.
}
98 \docparam{style
}{Window style. For window styles, please see
\helpref{wxSashLayoutWindow
}{wxsashlayoutwindow
}.
}
100 \docparam{name
}{Window name.
}
103 \membersection{wxSashLayoutWindow::GetAlignment
}\label{wxsashlayoutwindowgetalignment
}
105 \constfunc{wxLayoutAlignment
}{GetAlignment
}{\void}
107 Returns the alignment of the window: one of wxLAYOUT
\_TOP, wxLAYOUT
\_LEFT, wxLAYOUT
\_RIGHT, wxLAYOUT
\_BOTTOM.
109 \membersection{wxSashLayoutWindow::GetOrientation
}\label{wxsashlayoutwindowgetorientation
}
111 \constfunc{wxLayoutOrientation
}{GetOrientation
}{\void}
113 Returns the orientation of the window: one of wxLAYOUT
\_HORIZONTAL, wxLAYOUT
\_VERTICAL.
115 \membersection{wxSashLayoutWindow::OnCalculateLayout
}\label{wxsashlayoutwindowoncalculatelayout
}
117 \func{void
}{OnCalculateLayout
}{\param{wxCalculateLayoutEvent\&
}{ event
}}
119 The default handler for the event that is generated by wxLayoutAlgorithm. The implementation
120 of this function calls wxCalculateLayoutEvent::SetRect to shrink the provided size according to
121 how much space this window takes up. For further details,
122 see
\helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
} and
\helpref{wxCalculateLayoutEvent
}{wxcalculatelayoutevent
}.
124 \membersection{wxSashLayoutWindow::OnQueryLayoutInfo
}\label{wxsashlayoutwindowonquerylayoutinfo
}
126 \func{void
}{OnQueryLayoutInfo
}{\param{wxQueryLayoutInfoEvent\&
}{ event
}}
128 The default handler for the event that is generated by OnCalculateLayout to get
129 size, alignment and orientation information for the window. The implementation
130 of this function uses member variables as set by accessors called by the application.
131 For further details, see
\helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
} and
\helpref{wxQueryLayoutInfoEvent
}{wxquerylayoutinfoevent
}.
133 \membersection{wxSashLayoutWindow::SetAlignment
}\label{wxsashlayoutwindowsetalignment
}
135 \func{void
}{SetAlignment
}{\param{wxLayoutAlignment
}{ alignment
}}
137 Sets the alignment of the window (which edge of the available parent client area the window
138 is attached to).
{\it alignment
} is one of wxLAYOUT
\_TOP, wxLAYOUT
\_LEFT, wxLAYOUT
\_RIGHT, wxLAYOUT
\_BOTTOM.
140 \membersection{wxSashLayoutWindow::SetDefaultSize
}\label{wxsashlayoutwindowsetdefaultsize
}
142 \func{void
}{SetDefaultSize
}{\param{const wxSize\&
}{size
}}
144 Sets the default dimensions of the window. The dimension other than the orientation will be fixed to this
145 value, and the orientation dimension will be ignored and the window stretched to fit the available space.
147 \membersection{wxSashLayoutWindow::SetOrientation
}\label{wxsashlayoutwindowsetorientation
}
149 \func{void
}{SetOrientation
}{\param{wxLayoutOrientation
}{ orientation
}}
151 Sets the orientation of the window (the direction the window will stretch in, to fill the available
152 parent client area).
{\it orientation
} is one of wxLAYOUT
\_HORIZONTAL, wxLAYOUT
\_VERTICAL.