// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma interface "univslider.h"
-#endif
-
#ifndef _WX_UNIV_SLIDER_H_
#define _WX_UNIV_SLIDER_H_
{ 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 void OnPageScrollStart();
virtual bool OnPageScroll(int pageInc);
- // for wxStdSliderButtonInputHandler
+ // for wxStdSliderInputHandler
wxScrollThumb& GetThumb() { return m_thumb; }
+ virtual bool PerformAction(const wxControlAction& action,
+ long numArg = 0,
+ const wxString& strArg = wxEmptyString);
+
+ static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef);
+ virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef)
+ {
+ return GetStdInputHandler(handlerDef);
+ }
+
protected:
enum
{
virtual void DoDraw(wxControlRenderer *renderer);
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
- virtual bool PerformAction(const wxControlAction& action,
- long numArg = 0,
- const wxString& strArg = wxEmptyString);
-
// event handlers
void OnSize(wxSizeEvent& event);
DECLARE_DYNAMIC_CLASS(wxSlider)
};
-// ----------------------------------------------------------------------------
-// wxStdSliderButtonInputHandler: default slider input handling
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxStdSliderButtonInputHandler : public wxStdInputHandler
-{
-public:
- // default ctor
- wxStdSliderButtonInputHandler(wxInputHandler *inphand)
- : wxStdInputHandler(inphand)
- {
- }
-
- // base class methods
- virtual bool HandleKey(wxInputConsumer *consumer,
- const wxKeyEvent& event,
- bool pressed);
- virtual bool HandleMouse(wxInputConsumer *consumer,
- const wxMouseEvent& event);
- virtual bool HandleMouseMove(wxInputConsumer *consumer,
- const wxMouseEvent& event);
-
- virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event);
-};
-
#endif // _WX_UNIV_SLIDER_H_