2 * Copyright 2003-2009, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
8 * Axel Dörfler, axeld@pinc-software.de.
10 #ifndef VOLUME_SLIDER_H
11 #define VOLUME_SLIDER_H
20 class VolumeControl
: public BSlider
{
22 VolumeControl(int32 volumeWhich
, bool beep
,
24 VolumeControl(BMessage
* archive
);
25 virtual ~VolumeControl();
27 static VolumeControl
* Instantiate(BMessage
* archive
);
28 virtual status_t
Archive(BMessage
* archive
, bool deep
= true) const;
31 virtual void AttachedToWindow();
32 virtual void DetachedFromWindow();
34 virtual void MouseDown(BPoint where
);
35 virtual void MouseUp(BPoint where
);
36 virtual void MouseMoved(BPoint where
, uint32 transit
,
37 const BMessage
* dragMessage
);
39 virtual void MessageReceived(BMessage
* message
);
40 virtual status_t
Invoke(BMessage
* message
= NULL
);
42 virtual void DrawBar();
43 virtual const char* UpdateText() const;
46 void _DisconnectVolume();
47 void _ConnectVolume();
48 bool _IsReplicant() const;
49 float _PointForValue(int32 value
) const;
51 mutable BString fText
;
52 MixerControl
* fMixerControl
;
60 int32 fConnectRetries
;
61 bool fMediaServerRunning
;
62 bool fAddOnServerRunning
;
65 #endif // VOLUME_SLIDER_H