X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23645bfa01b6450257f140a30c87565225b1ef4a..c3c1a9a9ccca787181efe0fe49e147d18d239e7f:/include/wx/univ/slider.h diff --git a/include/wx/univ/slider.h b/include/wx/univ/slider.h index a5e51055f0..634085cf51 100644 --- a/include/wx/univ/slider.h +++ b/include/wx/univ/slider.h @@ -9,7 +9,7 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "univslider.h" #endif @@ -95,10 +95,14 @@ public: { return IsVert() ? wxVERTICAL : wxHORIZONTAL; } // do we have labels? - bool HasLabels() const { return (GetWindowStyle() & wxSL_LABELS) != 0; } + bool HasLabels() const + { return ((GetWindowStyle() & wxSL_LABELS) != 0) & + ((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT)) != 0); } // do we have ticks? - bool HasTicks() const { return (GetWindowStyle() & wxSL_TICKS) != 0; } + bool HasTicks() const + { return ((GetWindowStyle() & wxSL_TICKS) != 0) & + ((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT|wxSL_BOTH)) != 0); } // implement wxControlWithThumb interface virtual wxWindow *GetWindow() { return this; } @@ -110,7 +114,7 @@ public: virtual void SetShaftPartState(wxScrollThumb::Shaft shaftPart, int flag, - bool set = TRUE); + bool set = true); virtual void OnThumbDragStart(int pos); virtual void OnThumbDrag(int pos); @@ -145,7 +149,7 @@ protected: // normalize the value to fit in the range int NormalizeValue(int value) const; - // change the value by the given increment, return TRUE if really changed + // change the value by the given increment, return true if really changed bool ChangeValueBy(int inc); // change the value to the given one