📄 sashlayw.tex
字号:
\section{\class{wxSashLayoutWindow}}\label{wxsashlayoutwindow}wxSashLayoutWindow responds to OnCalculateLayout events generatedby \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}. It allows theapplication to use simple accessors to specify how the window should belaid out, rather than having to respond to events. The fact thatthe 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} explainsthe 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 eventsfor you. However, if you use sashes, see \helpref{wxSashWindow}{wxsashwindow} forrelevant event information.See also \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} for informationabout 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 wxSashLayoutWindowsshould generate a default position for the window. If using the wxSashLayoutWindow class directly, supplyan actual position.}\docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindowsshould 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 wxSashLayoutWindowsshould generate a default position for the window. If using the wxSashLayoutWindow class directly, supplyan actual position.}\docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindowsshould 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 implementationof this function calls wxCalculateLayoutEvent::SetRect to shrink the provided size according tohow 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 getsize, alignment and orientation information for the window. The implementationof 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 windowis 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 thisvalue, 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 availableparent client area). {\it orientation} is one of wxLAYOUT\_HORIZONTAL, wxLAYOUT\_VERTICAL.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -