libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / apps / soundrecorder / VolumeSlider.h
blobea3237b97d989e32bad659c3658526fc17c8a45c
1 /*
2 * Copyright 2005, Jérôme Duval. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Inspired by SoundCapture from Be newsletter (Media Kit Basics: Consumers and Producers)
6 */
7 #ifndef VOLUMESLIDER_H
8 #define VOLUMESLIDER_H
10 #include <Control.h>
11 #include <Bitmap.h>
12 #include <Box.h>
13 #include <SoundPlayer.h>
15 class VolumeSlider : public BControl
17 public:
18 VolumeSlider(BRect rect, const char* title, uint32 resizeFlags);
19 ~VolumeSlider();
20 virtual void Draw(BRect);
21 virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
22 virtual void MouseUp(BPoint point);
23 virtual void MouseDown(BPoint point);
24 void SetSoundPlayer(BSoundPlayer *player);
25 private:
26 void _UpdateVolume(BPoint point);
28 BBitmap fLeftBitmap, fRightBitmap, fButtonBitmap;
29 float fRight;
30 float fVolume;
31 BSoundPlayer *fSoundPlayer;
34 class SpeakerView : public BBox
36 public:
37 SpeakerView(BRect rect, uint32 resizeFlags);
38 ~SpeakerView();
39 void Draw(BRect updateRect);
41 private:
42 BBitmap fSpeakerBitmap;
45 #endif