1/*
2 * Copyright 2010 Stephan A��mus <superstippi@gmx.de>. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef BITMAP_BUTTON_H
6#define BITMAP_BUTTON_H
7
8#include <Button.h>
9#include <Size.h>
10
11
12class BBitmap;
13
14
15namespace BPrivate {
16
17class BBitmapButton : public BButton {
18public:
19	enum {
20		BUTTON_BACKGROUND = 0,
21		MENUBAR_BACKGROUND,
22	};
23
24								BBitmapButton(const char* resourceName,
25									BMessage* message);
26
27								BBitmapButton(const uint8* bits, uint32 width,
28									uint32 height, color_space format,
29									BMessage* message);
30
31	virtual						~BBitmapButton();
32
33	virtual	BSize				MinSize();
34	virtual	BSize				MaxSize();
35	virtual	BSize				PreferredSize();
36
37	virtual	void				Draw(BRect updateRect);
38
39			void				SetBackgroundMode(uint32 mode);
40
41private:
42			BBitmap*			fBitmap;
43			uint32				fBackgroundMode;
44};
45
46};
47
48using BPrivate::BBitmapButton;
49
50
51#endif // BITMAP_BUTTON_H
52