]> git.saurik.com Git - wxWidgets.git/commitdiff
Deprecate not working wxSplitterWindow::SetSashSize().
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 22 Nov 2010 01:23:16 +0000 (01:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 22 Nov 2010 01:23:16 +0000 (01:23 +0000)
Setting sash size to non default value didn't work correctly and didn't make
much sense anyhow as the sash appearance is platform-dependent and current
code for drawing it doesn't work for arbitrary sizes.

Simply remove the possibility to set the sash size.

Closes #12412.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/splitter.h
interface/wx/splitter.h
src/generic/splitter.cpp

index 7244535737869a24c98dc79ba4d2612f4d94a5b7..39df924f0c5fbd95af67e5f622e5a3de502f9af0 100644 (file)
@@ -133,9 +133,6 @@ public:
     // Is the window split?
     bool IsSplit() const { return (m_windowTwo != NULL); }
 
-    // Sets the sash size
-    void SetSashSize(int width) { m_sashSize = width; }
-
     // Sets the border size
     void SetBorderSize(int WXUNUSED(width)) { }
 
@@ -221,6 +218,10 @@ public:
     virtual bool MacClipGrandChildren() const { return true ; }
 #endif
 
+    // Sets the sash size: this doesn't do anything and shouldn't be used at
+    // all any more.
+    wxDEPRECATED_INLINE( void SetSashSize(int WXUNUSED(width)), return; )
+
 protected:
     // event handlers
 #if defined(__WXMSW__) || defined(__WXMAC__)
@@ -282,7 +283,6 @@ protected:
     int         m_oldY;         // current tracker position if not live mode
     int         m_sashPosition; // Number of pixels from left or top
     double      m_sashGravity;
-    int         m_sashSize;
     wxSize      m_lastSize;
     int         m_requestedSashPosition;
     int         m_sashPositionCurrent; // while dragging
index bda303b58dc16b8fcc7c7400d2fbf62df4d62789..6a9de45dc203fc33a386b019e5c38ecc56b74ec2 100644 (file)
@@ -136,6 +136,18 @@ public:
     */
     int GetSashPosition() const;
 
+    /**
+        Returns the 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.
+     */
+    int GetSashSize() const;
+
     /**
         Gets the split mode.
 
@@ -285,15 +297,6 @@ public:
     */
     void SetSashPosition(int position, bool redraw = true);
 
-    /**
-        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 @a size is more -1,
-        the custom sash size will be used.
-    */
-    void SetSashSize(int size);
-
     /**
         Sets the split mode.
 
index fedb025defb51615d9dda87db035f824ac3f8795..3cffee36f053f86bc4cfd93069c2131448873638 100644 (file)
@@ -129,7 +129,6 @@ void wxSplitterWindow::Init()
     m_sashStart = 0;
     m_sashPosition = m_requestedSashPosition = 0;
     m_sashGravity = 0.0;
-    m_sashSize = -1; // -1 means use the native sash size
     m_lastSize = wxSize(0,0);
     m_checkRequestedSashPosition = false;
     m_minimumPaneSize = 0;
@@ -491,7 +490,7 @@ bool wxSplitterWindow::SashHitTest(int x, int y, int tolerance)
 
 int wxSplitterWindow::GetSashSize() const
 {
-    return m_sashSize > -1 ? m_sashSize : wxRendererNative::Get().GetSplitterParams(this).widthSash;
+    return wxRendererNative::Get().GetSplitterParams(this).widthSash;
 }
 
 int wxSplitterWindow::GetBorderSize() const