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 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * version 2 as published by the Free Software Foundation. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef __CONTROLLER_VIEW_H 24 #define __CONTROLLER_VIEW_H 25 26 #include "TransportControlGroup.h" 27 28 29 class Controller; 30 class Playlist; 31 class PlaylistObserver; 32 33 class ControllerView : public TransportControlGroup 34 { 35 public: 36 ControllerView(BRect frame, Controller* controller, 37 Playlist* playlist); 38 ~ControllerView(); 39 40 // TransportControlGroup interface 41 virtual uint32 EnabledButtons(); 42 virtual void TogglePlaying(); 43 virtual void Stop(); 44 virtual void Rewind(); 45 virtual void Forward(); 46 virtual void SkipBackward(); 47 virtual void SkipForward(); 48 virtual void VolumeChanged(float value); 49 virtual void ToggleMute(); 50 virtual void PositionChanged(float value); 51 52 private: 53 void AttachedToWindow(); 54 void MessageReceived(BMessage* message); 55 void Draw(BRect updateRect); 56 57 // ControllerView 58 void _CheckSkippable(); 59 60 private: 61 Controller* fController; 62 Playlist* fPlaylist; 63 PlaylistObserver* fPlaylistObserver; 64 }; 65 66 #endif 67