xref: /haiku/src/apps/mediaplayer/interface/SeekSlider.h (revision b000c602e305d40003307dcb73fbe3421b117b3d)
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 void				DrawBar();
23 	virtual	void				DrawThumb();
24 	virtual	void				MouseDown(BPoint where);
25 	virtual	void				MouseUp(BPoint where);
26 	virtual	void				GetPreferredSize(float* _width,
27 									float* _height);
28 
29 	// SeekSlider
30 			bool				IsTracking() const;
31 			void				SetDisabledString(const char* string);
32 
33 private:
34 			bool				fTracking;
35 			bigtime_t			fLastTrackTime;
36 
37 			BString				fDisabledString;
38 };
39 
40 
41 #endif	//SEEK_SLIDER_H
42