btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / mediaplayer / interface / VolumeSlider.h
blob12f3e11ea1b882abbb63e4f49cdbceaf7094c84b
1 /*
2 * Copyright 2006-2010, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stephan Aßmus <superstippi@gmx.de>
7 */
8 #ifndef VOLUME_SLIDER_H
9 #define VOLUME_SLIDER_H
12 #include <Slider.h>
15 class VolumeSlider : public BSlider {
16 public:
17 VolumeSlider(const char* name,
18 int32 minValue, int32 maxValue,
19 int32 snapValue, BMessage* message = NULL);
21 virtual ~VolumeSlider();
23 // BSlider interface
24 virtual void MouseMoved(BPoint where, uint32 transit,
25 const BMessage* dragMessage);
27 virtual BRect ThumbFrame() const;
28 virtual void DrawThumb();
30 virtual BSize MinSize();
32 // VolumeSlider
33 void SetMuted(bool mute);
34 bool IsMuted() const
35 { return fMuted; }
37 float PreferredBarThickness() const;
39 private:
40 float _PointForValue(int32 value) const;
42 private:
43 bool fMuted;
45 int32 fSnapValue;
46 bool fSnapping;
47 float fMinSnap;
48 float fMaxSnap;
51 #endif // VOLUME_SLIDER_H