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