Files
haiku-beta6/headers/private/shared/BitmapButton.h
T

52 lines
918 B
C++
Raw Normal View History

2010-05-04 16:10:39 +00:00
/*
* Copyright 2010 Stephan Aßmus <[email protected]>. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef BITMAP_BUTTON_H
#define BITMAP_BUTTON_H
#include <Button.h>
#include <Size.h>
2010-05-04 16:10:39 +00:00
class BBitmap;
namespace BPrivate {
class BBitmapButton : public BButton {
2010-05-04 16:10:39 +00:00
public:
enum {
BUTTON_BACKGROUND = 0,
MENUBAR_BACKGROUND,
};
BBitmapButton(const char* resourceName,
2010-05-04 16:10:39 +00:00
BMessage* message);
BBitmapButton(const uint8* bits, uint32 width,
2010-05-04 16:10:39 +00:00
uint32 height, color_space format,
BMessage* message);
virtual ~BBitmapButton();
2010-05-04 16:10:39 +00:00
virtual BSize MinSize();
virtual BSize MaxSize();
virtual BSize PreferredSize();
virtual void Draw(BRect updateRect);
void SetBackgroundMode(uint32 mode);
private:
BBitmap* fBitmap;
uint32 fBackgroundMode;
};
};
using BPrivate::BBitmapButton;
2010-05-04 16:10:39 +00:00
#endif // BITMAP_BUTTON_H