X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74c57d1ff65edd1da6f4f8d30be55db47f6d27a7..0cc1d4ff2a0c78666f35bbfa34fcc609d7862709:/include/wx/generic/splitter.h diff --git a/include/wx/generic/splitter.h b/include/wx/generic/splitter.h index 3d1745b0a1..c11307d69a 100644 --- a/include/wx/generic/splitter.h +++ b/include/wx/generic/splitter.h @@ -5,14 +5,14 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __SPLITTERH_G__ #define __SPLITTERH_G__ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "splitter.h" #endif @@ -71,7 +71,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D, - const wxString& name = "splitter") + const wxString& name = wxT("splitter")) { Init(); Create(parent, id, pos, size, style, name); @@ -83,7 +83,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D, - const wxString& name = "splitter"); + const wxString& name = wxT("splitter")); // Gets the only or left/top pane wxWindow *GetWindow1() const { return m_windowOne; } @@ -215,7 +215,7 @@ public: protected: // event handlers -#ifdef __WXMSW__ +#if defined(__WXMSW__) || defined(__WXMAC__) void OnSetCursor(wxSetCursorEvent& event); #endif // wxMSW @@ -244,7 +244,15 @@ protected: int ConvertSashPosition(int sashPos) const; // set the real sash position, sashPos here must be positive - void DoSetSashPosition(int sashPos); + // + // returns TRUE if the sash position has been changed, FALSE otherwise + bool DoSetSashPosition(int sashPos); + + // set the sash position and send an event about it having been changed + void SetSashPositionAndNotify(int sashPos); + + // set the cursor appropriate for the current split mode + void SetResizeCursor(); wxSplitMode m_splitMode; bool m_permitUnsplitAlways; @@ -258,11 +266,12 @@ protected: int m_sashSize; // Sash width or height int m_sashPosition; // Number of pixels from left or top int m_requestedSashPosition; + int m_sashPositionCurrent; // while dragging int m_firstX; int m_firstY; int m_minimumPaneSize; - wxCursor* m_sashCursorWE; - wxCursor* m_sashCursorNS; + wxCursor m_sashCursorWE; + wxCursor m_sashCursorNS; wxPen* m_sashTrackerPen; wxPen* m_lightShadowPen; wxPen* m_mediumShadowPen; @@ -276,6 +285,7 @@ private: DECLARE_DYNAMIC_CLASS(wxSplitterWindow) DECLARE_EVENT_TABLE() + DECLARE_NO_COPY_CLASS(wxSplitterWindow) }; // ----------------------------------------------------------------------------