1/* 2 * Copyright (c) 2006-2007, Haiku, Inc. 3 * Distributed under the terms of the MIT license. 4 * 5 * Author: 6 * DarkWyrm <bpmagic@columbus.rr.com> 7 */ 8#ifndef _DRAW_BUTTON_H 9#define _DRAW_BUTTON_H 10 11#include <Looper.h> 12#include <Application.h> 13#include <Window.h> 14#include <Button.h> 15#include <Bitmap.h> 16#include <Rect.h> 17 18 19class DrawButton : public BButton 20{ 21public: 22 DrawButton(BRect frame, const char *name, BBitmap *up, 23 BBitmap *down,BMessage *msg, int32 resize, 24 int32 flags); 25 virtual ~DrawButton(void); 26 27 void Draw(BRect update); 28 29 void SetBitmaps(BBitmap *up, BBitmap *down); 30 void ResizeToPreferred(void); 31 void SetDisabled(BBitmap *disabled); 32 33private: 34 35 BBitmap *fUp, 36 *fDown, 37 *fDisabled; 38}; 39 40#endif 41