vfs: check userland buffers before reading them.
[haiku.git] / src / apps / soundrecorder / DrawButton.h
blob92778c72623f2fc642de732eb342db874fb442b8
1 /*
2 * Copyright 2005, Jérôme Duval. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Reworked from DarkWyrm version in CDPlayer
6 */
8 #ifndef _DRAW_BUTTON_H
9 #define _DRAW_BUTTON_H
11 #include <Control.h>
12 #include <Bitmap.h>
14 class DrawButton : public BControl
16 public:
17 DrawButton(BRect frame, const char *name, const unsigned char *on,
18 const unsigned char *off, BMessage *msg, int32 resize = 0,
19 int32 flags = 0);
20 ~DrawButton(void);
22 void Draw(BRect update);
23 void AttachedToWindow();
24 void MouseUp(BPoint pt);
25 bool ButtonState() { return fButtonState; };
26 private:
28 BBitmap fOn;
29 BBitmap fOff;
30 bool fButtonState;
33 #endif