.\" This is a wxWidgets manpage page generated from the XML docs .TH wxSplitterWindow 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxSplitterWindow \- Window which can be split vertically or horizontally .SH DESCRIPTION wxSplitterWindow overview This class manages up to two subwindows. The current view can be split into two programmatically (perhaps from a menu command), and unsplit either programmatically or via the wxSplitterWindow user interface. .SH "PARENTS" wxWindow wxEvtHandler wxObject .SH "INCLUDE FILES" wx/splitter.h .SH MEMBERS .SS wxSplitterWindow () Default constructor. .SS wxSplitterWindow (wxWindow* parentwxWindowID idconst wxPoint& point = wxDefaultPositionconst wxSize& size = wxDefaultSizelong style = wxSP_3Dconst wxString& name = "splitterWindow") .SS ~wxSplitterWindow () Destroys the wxSplitterWindow and its children. .SS bool Create (wxWindow* parentwxWindowID idconst wxPoint& point = wxDefaultPositionconst wxSize& size = wxDefaultSizelong style = wxSP_3Dconst wxString& name = "splitterWindow") Creation function, for two-step construction. See wxSplitterWindow::wxSplitterWindow for details. .SS int GetMinimumPaneSize () Returns the current minimum pane size (defaults to zero). .SS double GetSashGravity () Returns the current sash gravity. .SS int GetSashPosition () Returns the current sash position. .SS int GetSplitMode () .SS wxWindow* GetWindow1 () Returns the left/top or only pane. .SS wxWindow* GetWindow2 () Returns the right/bottom pane. .SS void Initialize (wxWindow* window) Initializes the splitter window to have one pane. The child window is shown if it is currently hidden. .SS bool IsSplit () Returns true if the window is split, false otherwise. .SS virtual void OnDoubleClickSash (int xint y) Application-overridable function called when the sash is double-clicked with the left mouse button. .SS virtual void OnUnsplit (wxWindow* removed) Application-overridable function called when the window is unsplit, either programmatically or using the wxSplitterWindow user interface. .SS virtual bool OnSashPositionChange (int newSashPosition) Application-overridable function called when the sash position is changed by user. It may return false to prevent the change or true to allow it. .SS bool ReplaceWindow (wxWindow * winOldwxWindow * winNew) This function replaces one of the windows managed by the wxSplitterWindow with another one. It is in general better to use it instead of calling Unsplit() and then resplitting the window back because it will provoke much less flicker (if any). It is valid to call this function whether the splitter has two windows or only one. Both parameters should be non-NULL and winOld must specify one of the windows managed by the splitter. If the parameters are incorrect or the window couldn't be replaced, false is returned. Otherwise the function will return true, but please notice that it will not delete the replaced window and you may wish to do it yourself. \wxheading{See also} wxSplitterWindow::GetMinimumPaneSize .SS void SetSashGravity (double gravity) Sets the sash gravity. .SS void SetSashPosition (int positionconst bool redraw = true) Sets the sash position. .SS void SetSashSize (int size) Sets the sash size. Normally, the sash size is determined according to the metrics of each platform, but the application can override this, for example to show a thin sash that the user is not expected to drag. If size is more -1, the custom sash size will be used. .SS void SetMinimumPaneSize (int paneSize) Sets the minimum pane size. .SS void SetSplitMode (int mode) .SS bool SplitHorizontally (wxWindow* window1wxWindow* window2int sashPosition = 0) .SS bool SplitVertically (wxWindow* window1wxWindow* window2int sashPosition = 0) .SS bool Unsplit (wxWindow* toRemove = NULL) .SS void UpdateSize () Causes any pending sizing of the sash and child panes to take place immediately. Such resizing normally takes place in idle time, in order to wait for layout to be completed. However, this can cause unacceptable flicker as the panes are resized after the window has been shown. To work around this, you can perform window layout (for example by sending a size event to the parent window), and then call this function, before showing the top-level window. .SH "WINDOW STYLES" .SS wxSP_3D Draws a 3D effect border and sash. .SS wxSP_3DSASH Draws a 3D effect sash. .SS wxSP_3DBORDER Synonym for wxSP_BORDER. .SS wxSP_BORDER Draws a standard border. .SS wxSP_NOBORDER No border (default). .SS wxSP_NO_XP_THEME wxSP_NO_XP_THEME .SS wxSP_PERMIT_UNSPLIT wxSP_PERMIT_UNSPLIT .SS wxSP_LIVE_UPDATE Don't draw XOR line but resize the child windows immediately. .SH EVENTS .SS EVT_SPLITTER_SASH_POS_CHANGING(id, func) The sash position is in the process of being changed. May be used to modify the position of the tracking bar to properly reflect the position that would be set if the drag were to be completed at this point. Processes a wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING event. .SS EVT_SPLITTER_SASH_POS_CHANGED(id, func) The sash position was changed. May be used to modify the sash position before it is set, or to prevent the change from taking place. Processes a wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED event. .SS EVT_SPLITTER_UNSPLIT(id, func) The splitter has been just unsplit. Processes a wxEVT_COMMAND_SPLITTER_UNSPLIT event. .SS EVT_SPLITTER_DCLICK(id, func) The sash was double clicked. 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. .SH "SEE ALSO" wxWindow wxEvtHandler wxObject wxSplitterEvent .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.