tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / bin / desklink / VolumeControl.h
blobea4e5f79654cea7aa8c721370ada5158be3045d4
1 /*
2 * Copyright 2003-2009, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Jérôme Duval
7 * François Revol
8 * Axel Dörfler, axeld@pinc-software.de.
9 */
10 #ifndef VOLUME_SLIDER_H
11 #define VOLUME_SLIDER_H
14 #include <String.h>
15 #include <Slider.h>
17 class MixerControl;
20 class VolumeControl : public BSlider {
21 public:
22 VolumeControl(int32 volumeWhich, bool beep,
23 BMessage* message);
24 VolumeControl(BMessage* archive);
25 virtual ~VolumeControl();
27 static VolumeControl* Instantiate(BMessage* archive);
28 virtual status_t Archive(BMessage* archive, bool deep = true) const;
30 protected:
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;
45 private:
46 void _DisconnectVolume();
47 void _ConnectVolume();
48 bool _IsReplicant() const;
49 float _PointForValue(int32 value) const;
51 mutable BString fText;
52 MixerControl* fMixerControl;
53 int32 fOriginalValue;
54 bool fBeep;
56 bool fSnapping;
57 float fMinSnap;
58 float fMaxSnap;
60 int32 fConnectRetries;
61 bool fMediaServerRunning;
62 bool fAddOnServerRunning;
65 #endif // VOLUME_SLIDER_H