1/* 2 * Copyright 2005, J��r��me Duval. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Inspired by SoundCapture from Be newsletter (Media Kit Basics: Consumers and Producers) 6 */ 7#ifndef UPDOWNBUTTON_H 8#define UPDOWNBUTTON_H 9 10#include <Bitmap.h> 11#include <Control.h> 12 13#define DRAG_ITEM 'dndi' 14 15class UpDownButton : public BControl 16{ 17public: 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); 24 25private: 26 BBitmap *fBitmapUp, *fBitmapDown, *fBitmapMiddle; 27 float fTrackingY; 28 int32 fLastValue; 29}; 30 31#endif 32