1 /* 2 * Copyright 2006-2009 Stephan Aßmus <superstippi@gmx.de> 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef SEEK_SLIDER_H 6 #define SEEK_SLIDER_H 7 8 9 #include <Slider.h> 10 #include <String.h> 11 12 13 class SeekSlider : public BSlider { 14 public: 15 SeekSlider(const char* name, BMessage* message, 16 int32 minValue, int32 maxValue); 17 18 virtual ~SeekSlider(); 19 20 // BSlider interface 21 virtual status_t Invoke(BMessage* message); 22 virtual BRect ThumbFrame() const; 23 virtual void DrawBar(); 24 virtual void DrawThumb(); 25 virtual void MouseDown(BPoint where); 26 virtual void MouseUp(BPoint where); 27 virtual void GetPreferredSize(float* _width, 28 float* _height); 29 virtual BSize MinSize(); 30 virtual BSize MaxSize(); 31 32 // SeekSlider 33 bool IsTracking() const; 34 void SetDisabledString(const char* string); 35 36 void SetSymbolScale(float scale); 37 38 private: 39 bool fTracking; 40 bigtime_t fLastTrackTime; 41 42 BString fDisabledString; 43 float fScale; 44 }; 45 46 47 #endif //SEEK_SLIDER_H 48