1*65723d80SStephan Aßmus /* 2*65723d80SStephan Aßmus * Copyright 2010, Stephan Aßmus <superstippi@gmx.de>. 3*65723d80SStephan Aßmus * Distributed under the terms of the MIT License. 4*65723d80SStephan Aßmus */ 5*65723d80SStephan Aßmus #ifndef SYMBOL_BUTTON_H 6*65723d80SStephan Aßmus #define SYMBOL_BUTTON_H 7*65723d80SStephan Aßmus 8*65723d80SStephan Aßmus 9*65723d80SStephan Aßmus #include <Button.h> 10*65723d80SStephan Aßmus #include <ControlLook.h> 11*65723d80SStephan Aßmus 12*65723d80SStephan Aßmus class BShape; 13*65723d80SStephan Aßmus 14*65723d80SStephan Aßmus 15*65723d80SStephan Aßmus class SymbolButton : public BButton { 16*65723d80SStephan Aßmus public: 17*65723d80SStephan Aßmus SymbolButton(const char* name, 18*65723d80SStephan Aßmus BShape* symbolShape, 19*65723d80SStephan Aßmus BMessage* message = NULL, 20*65723d80SStephan Aßmus uint32 borders 21*65723d80SStephan Aßmus = BControlLook::B_ALL_BORDERS); 22*65723d80SStephan Aßmus 23*65723d80SStephan Aßmus virtual ~SymbolButton(); 24*65723d80SStephan Aßmus 25*65723d80SStephan Aßmus // BButton interface 26*65723d80SStephan Aßmus virtual void Draw(BRect updateRect); 27*65723d80SStephan Aßmus virtual BSize MinSize(); 28*65723d80SStephan Aßmus virtual BSize MaxSize(); 29*65723d80SStephan Aßmus 30*65723d80SStephan Aßmus // SymbolButton 31*65723d80SStephan Aßmus void SetSymbol(BShape* symbolShape); 32*65723d80SStephan Aßmus 33*65723d80SStephan Aßmus private: 34*65723d80SStephan Aßmus BShape* fSymbol; 35*65723d80SStephan Aßmus uint32 fBorders; 36*65723d80SStephan Aßmus }; 37*65723d80SStephan Aßmus 38*65723d80SStephan Aßmus 39*65723d80SStephan Aßmus #endif // SYMBOL_BUTTON_H 40