repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / haikudepot / ui_generic / BitmapButton.h
blobee951fec00ae5852328796a8a9db73aa457acc5d
1 /*
2 * Copyright 2013, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5 #ifndef BITMAP_BUTTON_H
6 #define BITMAP_BUTTON_H
9 #include <Invoker.h>
11 #include "BitmapView.h"
14 class BitmapButton : public BitmapView, public BInvoker {
15 public:
16 BitmapButton(const char* name,
17 BMessage* message = NULL);
18 virtual ~BitmapButton();
20 virtual void AttachedToWindow();
22 virtual void MouseMoved(BPoint where, uint32 transit,
23 const BMessage* dragMessage);
24 virtual void MouseDown(BPoint where);
25 virtual void MouseUp(BPoint where);
27 virtual BSize MinSize();
28 virtual BSize PreferredSize();
29 virtual BSize MaxSize();
31 protected:
32 virtual void DrawBackground(BRect& bounds,
33 BRect updateRect);
35 private:
36 void _SetMouseInside(bool inside);
37 void _SetMouseDown(bool down);
39 private:
40 bool fMouseInside;
41 bool fMouseDown;
44 #endif // BITMAP_VIEW_H