xref: /haiku/src/apps/mediaplayer/ControllerView.h (revision b31cb92f29fe89eaca84d173d0f70d38bf0c6a3d)
1 /*
2  * Controller.cpp - Media Player for the Haiku Operating System
3  *
4  * Copyright (C) 2006 Marcus Overhagen <marcus@overhagen.de>
5  * Copyright (C) 2007 Stephan Aßmus <superstippi@gmx.de>
6  * Copyright (C) 2008-2009 Fredrik Modéen 	<[FirstName]@[LastName].se> (MIT ok)
7  *
8  * Released under the terms of the MIT license.
9  */
10 #ifndef __CONTROLLER_VIEW_H
11 #define __CONTROLLER_VIEW_H
12 
13 
14 #include "TransportControlGroup.h"
15 
16 
17 class Controller;
18 class Playlist;
19 class PlaylistObserver;
20 
21 
22 class ControllerView : public TransportControlGroup {
23 public:
24 						ControllerView(BRect frame, Controller* controller,
25 							Playlist* playlist);
26 						~ControllerView();
27 
28 	// TransportControlGroup interface
29 	virtual	void		TogglePlaying();
30 	virtual	void		Stop();
31 	virtual	void		Rewind();
32 	virtual	void		Forward();
33 	virtual	void		SkipBackward();
34 	virtual	void		SkipForward();
35 	virtual	void		VolumeChanged(float value);
36 	virtual	void		ToggleMute();
37 	virtual	void		PositionChanged(float value);
38 
39 private:
40 	void				AttachedToWindow();
41 	void				MessageReceived(BMessage* message);
42 	void				Draw(BRect updateRect);
43 
44 	// ControllerView
45 			void		_CheckSkippable();
46 
47 private:
48 	Controller*			fController;
49 	Playlist*			fPlaylist;
50 	PlaylistObserver*	fPlaylistObserver;
51 };
52 
53 #endif	// __CONTROLLER_VIEW_H
54