9a75ba66de
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
156 lines
6.3 KiB
TeX
156 lines
6.3 KiB
TeX
\section{\class{wxSashLayoutWindow}}\label{wxsashlayoutwindow}
|
|
|
|
wxSashLayoutWindow responds to OnCalculateLayout events generated
|
|
by \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}. It allows the
|
|
application to use simple accessors to specify how the window should be
|
|
laid out, rather than having to respond to events. The fact that
|
|
the class derives from wxSashWindow allows sashes to be used if required,
|
|
to allow the windows to be user-resizable.
|
|
|
|
The documentation for \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} explains
|
|
the purpose of this class in more detail.
|
|
|
|
\wxheading{Derived from}
|
|
|
|
\helpref{wxSashWindow}{wxsashwindow}\\
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
\wxheading{Include files}
|
|
|
|
<wx/laywin.h>
|
|
|
|
\wxheading{Window styles}
|
|
|
|
See \helpref{wxSashWindow}{wxsashwindow}.
|
|
|
|
\wxheading{Event handling}
|
|
|
|
This class handles the EVT\_QUERY\_LAYOUT\_INFO and EVT\_CALCULATE\_LAYOUT events
|
|
for you. However, if you use sashes, see \helpref{wxSashWindow}{wxsashwindow} for
|
|
relevant event information.
|
|
|
|
See also \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} for information
|
|
about the layout events.
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}, \helpref{wxSashWindow}{wxsashwindow}, \helpref{Event handling overview}{eventhandlingoverview}
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
\membersection{wxSashLayoutWindow::wxSashLayoutWindow}\label{wxsashlayoutwindowctor}
|
|
|
|
\func{}{wxSashLayoutWindow}{\void}
|
|
|
|
Default constructor.
|
|
|
|
\func{}{wxSashLayoutWindow}{\param{wxSashLayoutWindow*}{ parent}, \param{wxWindowID }{id},
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition},
|
|
\param{const wxSize\& }{size = wxDefaultSize},
|
|
\param{long }{style = wxCLIP\_CHILDREN \pipe wxSW\_3D},
|
|
\param{const wxString\& }{name = "layoutWindow"}}
|
|
|
|
Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.
|
|
|
|
\wxheading{Parameters}
|
|
|
|
\docparam{parent}{Pointer to a parent window.}
|
|
|
|
\docparam{id}{Window identifier. If -1, will automatically create an identifier.}
|
|
|
|
\docparam{pos}{Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashLayoutWindows
|
|
should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
|
|
an actual position.}
|
|
|
|
\docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows
|
|
should generate a default size for the window.}
|
|
|
|
\docparam{style}{Window style. For window styles, please see \helpref{wxSashLayoutWindow}{wxsashlayoutwindow}.}
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
|
|
\membersection{wxSashLayoutWindow::Create}\label{wxsashlayoutwindowcreate}
|
|
|
|
\func{bool}{Create}{\param{wxSashLayoutWindow*}{ parent}, \param{wxWindowID }{id},
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition},
|
|
\param{const wxSize\& }{size = wxDefaultSize},
|
|
\param{long }{style = wxCLIP\_CHILDREN \pipe wxSW\_3D},
|
|
\param{const wxString\& }{name = "layoutWindow"}}
|
|
|
|
Initializes a sash layout window, which can be a child of a frame, dialog or any other non-control window.
|
|
|
|
\wxheading{Parameters}
|
|
|
|
\docparam{parent}{Pointer to a parent window.}
|
|
|
|
\docparam{id}{Window identifier. If -1, will automatically create an identifier.}
|
|
|
|
\docparam{pos}{Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashLayoutWindows
|
|
should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
|
|
an actual position.}
|
|
|
|
\docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows
|
|
should generate a default size for the window.}
|
|
|
|
\docparam{style}{Window style. For window styles, please see \helpref{wxSashLayoutWindow}{wxsashlayoutwindow}.}
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
|
|
\membersection{wxSashLayoutWindow::GetAlignment}\label{wxsashlayoutwindowgetalignment}
|
|
|
|
\constfunc{wxLayoutAlignment}{GetAlignment}{\void}
|
|
|
|
Returns the alignment of the window: one of wxLAYOUT\_TOP, wxLAYOUT\_LEFT, wxLAYOUT\_RIGHT, wxLAYOUT\_BOTTOM.
|
|
|
|
\membersection{wxSashLayoutWindow::GetOrientation}\label{wxsashlayoutwindowgetorientation}
|
|
|
|
\constfunc{wxLayoutOrientation}{GetOrientation}{\void}
|
|
|
|
Returns the orientation of the window: one of wxLAYOUT\_HORIZONTAL, wxLAYOUT\_VERTICAL.
|
|
|
|
\membersection{wxSashLayoutWindow::OnCalculateLayout}\label{wxsashlayoutwindowoncalculatelayout}
|
|
|
|
\func{void}{OnCalculateLayout}{\param{wxCalculateLayoutEvent\&}{ event}}
|
|
|
|
The default handler for the event that is generated by wxLayoutAlgorithm. The implementation
|
|
of this function calls wxCalculateLayoutEvent::SetRect to shrink the provided size according to
|
|
how much space this window takes up. For further details,
|
|
see \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} and \helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}.
|
|
|
|
\membersection{wxSashLayoutWindow::OnQueryLayoutInfo}\label{wxsashlayoutwindowonquerylayoutinfo}
|
|
|
|
\func{void}{OnQueryLayoutInfo}{\param{wxQueryLayoutInfoEvent\&}{ event}}
|
|
|
|
The default handler for the event that is generated by OnCalculateLayout to get
|
|
size, alignment and orientation information for the window. The implementation
|
|
of this function uses member variables as set by accessors called by the application.
|
|
For further details, see \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} and \helpref{wxQueryLayoutInfoEvent}{wxquerylayoutinfoevent}.
|
|
|
|
\membersection{wxSashLayoutWindow::SetAlignment}\label{wxsashlayoutwindowsetalignment}
|
|
|
|
\func{void}{SetAlignment}{\param{wxLayoutAlignment}{ alignment}}
|
|
|
|
Sets the alignment of the window (which edge of the available parent client area the window
|
|
is attached to). {\it alignment} is one of wxLAYOUT\_TOP, wxLAYOUT\_LEFT, wxLAYOUT\_RIGHT, wxLAYOUT\_BOTTOM.
|
|
|
|
\membersection{wxSashLayoutWindow::SetDefaultSize}\label{wxsashlayoutwindowsetdefaultsize}
|
|
|
|
\func{void}{SetDefaultSize}{\param{const wxSize\& }{size}}
|
|
|
|
Sets the default dimensions of the window. The dimension other than the orientation will be fixed to this
|
|
value, and the orientation dimension will be ignored and the window stretched to fit the available space.
|
|
|
|
\membersection{wxSashLayoutWindow::SetOrientation}\label{wxsashlayoutwindowsetorientation}
|
|
|
|
\func{void}{SetOrientation}{\param{wxLayoutOrientation}{ orientation}}
|
|
|
|
Sets the orientation of the window (the direction the window will stretch in, to fill the available
|
|
parent client area). {\it orientation} is one of wxLAYOUT\_HORIZONTAL, wxLAYOUT\_VERTICAL.
|
|
|
|
|
|
|