📄 splitter.tex
字号:
\section{\class{wxSplitterWindow}}\label{wxsplitterwindow}\overview{wxSplitterWindow overview}{wxsplitterwindowoverview}This class manages up to two subwindows. The current view can besplit into two programmatically (perhaps from a menu command), and unspliteither programmatically or via the wxSplitterWindow user interface.\wxheading{Window styles}\begin{twocollist}\itemsep=0pt\twocolitem{\windowstyle{wxSP\_3D}}{Draws a 3D effect border and sash.}\twocolitem{\windowstyle{wxSP\_3DSASH}}{Draws a 3D effect sash.}\twocolitem{\windowstyle{wxSP\_3DBORDER}}{Synonym for wxSP\_BORDER.}\twocolitem{\windowstyle{wxSP\_BORDER}}{Draws a standard border.}\twocolitem{\windowstyle{wxSP\_NOBORDER}}{No border (default).}\twocolitem{\windowstyle{wxSP\_NO\_XP\_THEME}}{Under Windows XP, switches off the attempt to draw thesplitter using Windows XP theming, so the borders and sash will take on the pre-XP look.}\twocolitem{\windowstyle{wxSP\_PERMIT\_UNSPLIT}}{Always allow tounsplit, even with the minimum pane size other than zero.}\twocolitem{\windowstyle{wxSP\_LIVE\_UPDATE}}{Don't draw XOR line but resize the child windows immediately.}\end{twocollist}See also \helpref{window styles overview}{windowstyles}.\wxheading{Derived from}\helpref{wxWindow}{wxwindow}\\\helpref{wxEvtHandler}{wxevthandler}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/splitter.h>\wxheading{Event handling}To process input from a splitter control, use the following event handlermacros to direct input to member functions that take a \helpref{wxSplitterEvent}{wxsplitterevent} argument.\twocolwidtha{10cm}\begin{twocollist}\itemsep=0pt\twocolitem{{\bf EVT\_SPLITTER\_SASH\_POS\_CHANGING(id, func)}}{The sashposition is in the process of being changed. May be used to modify theposition of the tracking bar to properly reflect the position thatwould be set if the drag were to be completed at this point. Processesa wxEVT\_COMMAND\_SPLITTER\_SASH\_POS\_CHANGING event.}\twocolitem{{\bf EVT\_SPLITTER\_SASH\_POS\_CHANGED(id, func)}}{The sashposition was changed. May be used to modify the sash position beforeit is set, or to prevent the change from taking place.Processes a wxEVT\_COMMAND\_SPLITTER\_SASH\_POS\_CHANGED event.}\twocolitem{{\bf EVT\_SPLITTER\_UNSPLIT(id, func)}}{The splitter has been justunsplit. Processes a wxEVT\_COMMAND\_SPLITTER\_UNSPLIT event.}\twocolitem{{\bf EVT\_SPLITTER\_DCLICK(id, func)}}{The sash was doubleclicked. The default behaviour is to unsplit the window when this happens(unless the minimum pane size has been set to a value greater than zero).Processes a wxEVT\_COMMAND\_SPLITTER\_DOUBLECLICKED event.}\end{twocollist}%\wxheading{See also}\helpref{wxSplitterEvent}{wxsplitterevent}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxSplitterWindow::wxSplitterWindow}\label{wxsplitterwindowctor}\func{}{wxSplitterWindow}{\void}Default constructor.\func{}{wxSplitterWindow}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp\param{long }{style=wxSP\_3D}, \param{const wxString\&}{ name = "splitterWindow"}}Constructor for creating the window.\wxheading{Parameters}\docparam{parent}{The parent of the splitter window.}\docparam{id}{The window identifier.}\docparam{pos}{The window position.}\docparam{size}{The window size.}\docparam{style}{The window style. See \helpref{wxSplitterWindow}{wxsplitterwindow}.}\docparam{name}{The window name.}\wxheading{Remarks}After using this constructor, you must create either one or two subwindowswith the splitter window as parent, and then call one of \helpref{wxSplitterWindow::Initialize}{wxsplitterwindowinitialize},\rtfsp\helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically} and \helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally} inorder to set the pane(s).You can create two windows, with one hidden when not being shown; or you cancreate and delete the second pane on demand.\wxheading{See also}\helpref{wxSplitterWindow::Initialize}{wxsplitterwindowinitialize}, \helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally},\rtfsp\helpref{wxSplitterWindow::Create}{wxsplitterwindowcreate}\membersection{wxSplitterWindow::\destruct{wxSplitterWindow}}\label{wxsplitterwindowdtor}\func{}{\destruct{wxSplitterWindow}}{\void}Destroys the wxSplitterWindow and its children.\membersection{wxSplitterWindow::Create}\label{wxsplitterwindowcreate}\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \rtfsp\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp\param{long }{style=wxSP\_3D}, \param{const wxString\&}{ name = "splitterWindow"}}Creation function, for two-step construction. See \helpref{wxSplitterWindow::wxSplitterWindow}{wxsplitterwindowctor} fordetails.\membersection{wxSplitterWindow::GetMinimumPaneSize}\label{wxsplitterwindowgetminimumpanesize}\constfunc{int}{GetMinimumPaneSize}{\void}Returns the current minimum pane size (defaults to zero).\wxheading{See also}\helpref{wxSplitterWindow::SetMinimumPaneSize}{wxsplitterwindowsetminimumpanesize}\membersection{wxSplitterWindow::GetSashGravity}\label{wxsplitterwindowgetsashgravity}\func{double}{GetSashGravity}{\void}Returns the current sash gravity.\wxheading{See also}\helpref{wxSplitterWindow::SetSashGravity}{wxsplitterwindowsetsashgravity}\membersection{wxSplitterWindow::GetSashPosition}\label{wxsplitterwindowgetsashposition}\func{int}{GetSashPosition}{\void}Returns the current sash position.\wxheading{See also}\helpref{wxSplitterWindow::SetSashPosition}{wxsplitterwindowsetsashposition}\membersection{wxSplitterWindow::GetSplitMode}\label{wxsplitterwindowgetsplitmode}\constfunc{int}{GetSplitMode}{\void}Gets the split mode.\wxheading{See also}\helpref{wxSplitterWindow::SetSplitMode}{wxsplitterwindowsetsplitmode}, \helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}.\membersection{wxSplitterWindow::GetWindow1}\label{wxsplitterwindowgetwindow1}\constfunc{wxWindow*}{GetWindow1}{\void}Returns the left/top or only pane.\membersection{wxSplitterWindow::GetWindow2}\label{wxsplitterwindowgetwindow2}\constfunc{wxWindow*}{GetWindow2}{\void}Returns the right/bottom pane.\membersection{wxSplitterWindow::Initialize}\label{wxsplitterwindowinitialize}\func{void}{Initialize}{\param{wxWindow* }{window}}Initializes the splitter window to have one pane. The child window isshown if it is currently hidden.\wxheading{Parameters}\docparam{window}{The pane for the unsplit window.}\wxheading{Remarks}This should be called if you wish to initially view only a single pane in the splitter window.\wxheading{See also}\helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}\membersection{wxSplitterWindow::IsSplit}\label{wxsplitterwindowissplit}\constfunc{bool}{IsSplit}{\void}Returns true if the window is split, false otherwise.\membersection{wxSplitterWindow::OnDoubleClickSash}\label{wxsplitterwindowondoubleclicksash}\func{virtual void}{OnDoubleClickSash}{\param{int }{x}, \param{int }{y}}Application-overridable function called when the sash is double-clicked withthe left mouse button.\wxheading{Parameters}\docparam{x}{The x position of the mouse cursor.}\docparam{y}{The y position of the mouse cursor.}\wxheading{Remarks}The default implementation of this function calls \helpref{Unsplit}{wxsplitterwindowunsplit} ifthe minimum pane size is zero.\wxheading{See also}\helpref{wxSplitterWindow::Unsplit}{wxsplitterwindowunsplit}\membersection{wxSplitterWindow::OnUnsplit}\label{wxsplitterwindowonunsplit}\func{virtual void}{OnUnsplit}{\param{wxWindow* }{removed}}Application-overridable function called when the window is unsplit, eitherprogrammatically or using the wxSplitterWindow user interface.\wxheading{Parameters}\docparam{removed}{The window being removed.}\wxheading{Remarks}The default implementation of this function simply hides {\it removed}. Youmay wish to delete the window.\membersection{wxSplitterWindow::OnSashPositionChange}\label{wxsplitterwindowonsashpositionchange}\func{virtual bool}{OnSashPositionChange}{\param{int }{newSashPosition}}Application-overridable function called when the sash position is changed by
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -