vfs: check userland buffers before reading them.
[haiku.git] / src / apps / mediaplayer / interface / PlayPauseButton.h
bloba86010e798535a2f6c4d0af6f5294295acfbe960
1 /*
2 * Copyright 2010, Stephan Aßmus <superstippi@gmx.de>.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef PLAY_PAUSE_BUTTON_H
6 #define PLAY_PAUSE_BUTTON_H
9 #include "SymbolButton.h"
12 class PlayPauseButton : public SymbolButton {
13 public:
14 PlayPauseButton(const char* name,
15 BShape* playSymbolShape,
16 BShape* pauseSymbolShape,
17 BMessage* message = NULL,
18 uint32 borders
19 = BControlLook::B_ALL_BORDERS);
21 virtual ~PlayPauseButton();
23 // BButton interface
24 virtual void Draw(BRect updateRect);
25 virtual BSize MinSize();
26 virtual BSize MaxSize();
28 // PlayPauseButton
29 void SetPlaying();
30 void SetPaused();
31 void SetStopped();
33 void SetSymbols(BShape* playSymbolShape,
34 BShape* pauseSymbolShape);
36 private:
37 void _SetPlaybackState(uint32 state);
39 private:
40 BShape* fPlaySymbol;
41 BShape* fPauseSymbol;
42 enum {
43 kStopped = 0,
44 kPaused,
45 kPlaying
47 uint32 fPlaybackState;
51 #endif // PLAY_PAUSE_BUTTON_H