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 PLAY_PAUSE_BUTTON_H 6*65723d80SStephan Aßmus #define PLAY_PAUSE_BUTTON_H 7*65723d80SStephan Aßmus 8*65723d80SStephan Aßmus 9*65723d80SStephan Aßmus #include "SymbolButton.h" 10*65723d80SStephan Aßmus 11*65723d80SStephan Aßmus 12*65723d80SStephan Aßmus class PlayPauseButton : public SymbolButton { 13*65723d80SStephan Aßmus public: 14*65723d80SStephan Aßmus PlayPauseButton(const char* name, 15*65723d80SStephan Aßmus BShape* playSymbolShape, 16*65723d80SStephan Aßmus BShape* pauseSymbolShape, 17*65723d80SStephan Aßmus BMessage* message = NULL, 18*65723d80SStephan Aßmus uint32 borders 19*65723d80SStephan Aßmus = BControlLook::B_ALL_BORDERS); 20*65723d80SStephan Aßmus 21*65723d80SStephan Aßmus virtual ~PlayPauseButton(); 22*65723d80SStephan Aßmus 23*65723d80SStephan Aßmus // BButton interface 24*65723d80SStephan Aßmus virtual void Draw(BRect updateRect); 25*65723d80SStephan Aßmus virtual BSize MinSize(); 26*65723d80SStephan Aßmus virtual BSize MaxSize(); 27*65723d80SStephan Aßmus 28*65723d80SStephan Aßmus // PlayPauseButton 29*65723d80SStephan Aßmus void SetPlaying(); 30*65723d80SStephan Aßmus void SetPaused(); 31*65723d80SStephan Aßmus void SetStopped(); 32*65723d80SStephan Aßmus 33*65723d80SStephan Aßmus void SetSymbols(BShape* playSymbolShape, 34*65723d80SStephan Aßmus BShape* pauseSymbolShape); 35*65723d80SStephan Aßmus 36*65723d80SStephan Aßmus private: 37*65723d80SStephan Aßmus void _SetPlaybackState(uint32 state); 38*65723d80SStephan Aßmus 39*65723d80SStephan Aßmus private: 40*65723d80SStephan Aßmus BShape* fPlaySymbol; 41*65723d80SStephan Aßmus BShape* fPauseSymbol; 42*65723d80SStephan Aßmus enum { 43*65723d80SStephan Aßmus kStopped = 0, 44*65723d80SStephan Aßmus kPaused, 45*65723d80SStephan Aßmus kPlaying 46*65723d80SStephan Aßmus }; 47*65723d80SStephan Aßmus uint32 fPlaybackState; 48*65723d80SStephan Aßmus }; 49*65723d80SStephan Aßmus 50*65723d80SStephan Aßmus 51*65723d80SStephan Aßmus #endif // PLAY_PAUSE_BUTTON_H 52