X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a194bda7be7c240a3856413e19d7152ecfd7439..b09857ae000a60704207d63290be937584805fb0:/interface/wx/splitter.h diff --git a/interface/wx/splitter.h b/interface/wx/splitter.h index 35348ce9fe..0338f0a4ff 100644 --- a/interface/wx/splitter.h +++ b/interface/wx/splitter.h @@ -6,6 +6,32 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + +#define wxSP_NOBORDER 0x0000 +#define wxSP_THIN_SASH 0x0000 // NB: the default is 3D sash +#define wxSP_NOSASH 0x0010 +#define wxSP_PERMIT_UNSPLIT 0x0040 +#define wxSP_LIVE_UPDATE 0x0080 +#define wxSP_3DSASH 0x0100 +#define wxSP_3DBORDER 0x0200 +#define wxSP_NO_XP_THEME 0x0400 +#define wxSP_BORDER wxSP_3DBORDER +#define wxSP_3D (wxSP_3DBORDER | wxSP_3DSASH) + + +enum wxSplitMode +{ + wxSPLIT_HORIZONTAL = 1, + wxSPLIT_VERTICAL +}; + +enum +{ + wxSPLIT_DRAG_NONE, + wxSPLIT_DRAG_DRAGGING, + wxSPLIT_DRAG_LEFT_DOWN +}; + /** @class wxSplitterWindow @@ -137,16 +163,25 @@ public: int GetSashPosition() const; /** - Returns the sash size in pixels. + Returns the default sash size in pixels or 0 if it is invisible. + + @see GetDefaultSashSize(), IsSashInvisible() + */ + int GetSashSize() const; + + /** + Returns the default sash size in pixels. The size of the sash is its width for a vertically split window and its height for a horizontally split one. Its other direction is the same as the client size of the window in the corresponding direction. - The sash size is platform-dependent because it conforms to the current - platform look-and-feel and cannot be changed. + The default sash size is platform-dependent because it conforms to the + current platform look-and-feel and cannot be changed. + + @since 2.9.4 */ - int GetSashSize() const; + int GetDefaultSashSize() const; /** Gets the split mode. @@ -179,6 +214,17 @@ public: */ void Initialize(wxWindow* window); + /** + Returns @true if the sash is invisible even when the window is split, @false otherwise. + + @remark This is a shortcut for HasFlag(wxSP_NOSASH) + + @see SetSashInvisible() + + @since 2.9.4 + */ + bool IsSashInvisible() const; + /** Returns @true if the window is split, @false otherwise. */ @@ -309,6 +355,25 @@ public: */ void SetSplitMode(int mode); + /** + Sets whether the sash should be invisible, even when the window is + split. + + When the sash is invisible, it doesn't appear on the screen at all and, + in particular, doesn't allow the user to resize the windows. + + @remarks Only sets the internal variable; does not update the display. + + @param invisible + If @true, the sash is always invisible, else it is shown when the + window is split. + + @see IsSashInvisible() + + @since 2.9.4 + */ + void SetSashInvisible(bool invisible=true); + /** Initializes the top and bottom panes of the splitter window. The child windows are shown if they are currently hidden. @@ -489,3 +554,8 @@ public: void SetSashPosition(int pos); }; + +wxEventType wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED; +wxEventType wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING; +wxEventType wxEVT_COMMAND_SPLITTER_DOUBLECLICKED; +wxEventType wxEVT_COMMAND_SPLITTER_UNSPLIT;