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
17class Controller;
18class Playlist;
19class PlaylistObserver;
20
21
22class ControllerView : public TransportControlGroup {
23public:
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
39private:
40	void				AttachedToWindow();
41	void				MessageReceived(BMessage* message);
42	void				Draw(BRect updateRect);
43
44	// ControllerView
45			void		_CheckSkippable();
46
47private:
48	Controller*			fController;
49	Playlist*			fPlaylist;
50	PlaylistObserver*	fPlaylistObserver;
51};
52
53#endif	// __CONTROLLER_VIEW_H
54