X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3870b2ff595ba4bb4f0397ace77ceeb9628e94d..3a96aa4afa862ff7374aef84f4f1dcd368a07404:/include/wx/univ/slider.h diff --git a/include/wx/univ/slider.h b/include/wx/univ/slider.h index b9a0bf9e9a..8f122cc18f 100644 --- a/include/wx/univ/slider.h +++ b/include/wx/univ/slider.h @@ -9,10 +9,6 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ - #pragma interface "univslider.h" -#endif - #ifndef _WX_UNIV_SLIDER_H_ #define _WX_UNIV_SLIDER_H_ @@ -95,10 +91,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 +110,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 +145,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 @@ -231,15 +231,15 @@ public: } // base class methods - virtual bool HandleKey(wxControl *control, + virtual bool HandleKey(wxInputConsumer *consumer, const wxKeyEvent& event, bool pressed); - virtual bool HandleMouse(wxControl *control, + virtual bool HandleMouse(wxInputConsumer *consumer, const wxMouseEvent& event); - virtual bool HandleMouseMove(wxControl *control, + virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event); - virtual bool HandleFocus(wxControl *control, const wxFocusEvent& event); + virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event); }; #endif // _WX_UNIV_SLIDER_H_