1/*
2 * Copyright 2006-2010, Haiku.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Stephan A��mus <superstippi@gmx.de>
7 */
8#ifndef VOLUME_SLIDER_H
9#define VOLUME_SLIDER_H
10
11
12#include <Slider.h>
13
14
15class VolumeSlider : public BSlider {
16public:
17								VolumeSlider(const char* name,
18									int32 minValue, int32 maxValue,
19									int32 snapValue, BMessage* message = NULL);
20
21	virtual						~VolumeSlider();
22
23	// BSlider interface
24	virtual	void				MouseMoved(BPoint where, uint32 transit,
25									const BMessage* dragMessage);
26
27	virtual BRect				ThumbFrame() const;
28	virtual	void				DrawThumb();
29
30	virtual	BSize				MinSize();
31
32	// VolumeSlider
33			void				SetMuted(bool mute);
34			bool				IsMuted() const
35									{ return fMuted; }
36
37			float				PreferredBarThickness() const;
38
39private:
40			float				_PointForValue(int32 value) const;
41
42private:
43			bool				fMuted;
44
45			int32				fSnapValue;
46			bool				fSnapping;
47			float				fMinSnap;
48			float				fMaxSnap;
49};
50
51#endif	// VOLUME_SLIDER_H
52