repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / soundrecorder / UpDownButton.h
blob00c534d0f3cbdbfb1a9a23f9e1d7f4796f5684e0
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 UPDOWNBUTTON_H
8 #define UPDOWNBUTTON_H
10 #include <Bitmap.h>
11 #include <Control.h>
13 #define DRAG_ITEM 'dndi'
15 class UpDownButton : public BControl
17 public:
18 UpDownButton(BRect rect, BMessage *msg, uint32 resizeFlags = 0);
19 ~UpDownButton();
20 virtual void Draw(BRect);
21 virtual void MouseDown(BPoint point);
22 virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
23 virtual void MouseUp(BPoint point);
25 private:
26 BBitmap *fBitmapUp, *fBitmapDown, *fBitmapMiddle;
27 float fTrackingY;
28 int32 fLastValue;
31 #endif