Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

InterfaceWindow.h

00001 /*****************************************************************************
00002  * InterfaceWindow.h: BeOS interface window class prototype
00003  *****************************************************************************
00004  * Copyright (C) 1999, 2000, 2001 the VideoLAN team
00005  * $Id: InterfaceWindow.h 12687 2005-09-26 15:03:39Z titer $
00006  *
00007  * Authors: Jean-Marc Dressler <[email protected]>
00008  *          Tony Castley <[email protected]>
00009  *          Richard Shepherd <[email protected]>
00010  *          Stephan Aßmus <[email protected]>
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00025  *****************************************************************************/
00026 
00027 #ifndef BEOS_INTERFACE_WINDOW_H
00028 #define BEOS_INTERFACE_WINDOW_H
00029 
00030 #include <Menu.h>
00031 #include <Window.h>
00032 
00033 class BMenuBar;
00034 class MediaControlView;
00035 class PlayListWindow;
00036 class BFilePanel;
00037 class PreferencesWindow;
00038 class MessagesWindow;
00039 
00040 class CDMenu : public BMenu
00041 {
00042  public:
00043                             CDMenu( const char* name );
00044     virtual                 ~CDMenu();
00045 
00046     virtual void            AttachedToWindow();
00047 
00048  private:
00049     int                     GetCD( const char* directory );
00050 };
00051 
00052 class LanguageMenu : public BMenu
00053 {
00054  public:
00055                             LanguageMenu( intf_thread_t * p_intf,
00056                                           const char * psz_name,
00057                                           char * psz_variable );
00058     virtual                 ~LanguageMenu();
00059 
00060     virtual void            AttachedToWindow();
00061 
00062  private:
00063     intf_thread_t         * p_intf;
00064     char                  * psz_variable;
00065 };
00066 
00067 class TitleMenu : public BMenu
00068 {
00069  public:
00070                             TitleMenu( const char* name, intf_thread_t  *p_interface );
00071     virtual                 ~TitleMenu();
00072 
00073     virtual void            AttachedToWindow();
00074 
00075     intf_thread_t  *p_intf;
00076 };
00077 
00078 class ChapterMenu : public BMenu
00079 {
00080  public:
00081                             ChapterMenu( const char* name, intf_thread_t  *p_interface );
00082     virtual                 ~ChapterMenu();
00083 
00084     virtual void            AttachedToWindow();
00085 
00086     intf_thread_t  *p_intf;
00087 };
00088 
00089 
00090 class InterfaceWindow : public BWindow
00091 {
00092  public:
00093                             InterfaceWindow( intf_thread_t * p_intf,
00094                                              BRect frame,
00095                                              const char * name );
00096     virtual                 ~InterfaceWindow();
00097 
00098                             // BWindow
00099     virtual void            FrameResized( float width, float height );
00100     virtual void            MessageReceived( BMessage* message );
00101     virtual bool            QuitRequested();
00102 
00103                             // InterfaceWindow
00104             void            UpdateInterface();
00105             void            UpdatePlaylist();
00106 
00107             bool            IsStopped() const;
00108         
00109     MediaControlView*        p_mediaControl;
00110     MessagesWindow*         fMessagesWindow;
00111 
00112  private:    
00113             void            _SetMenusEnabled( bool hasFile,
00114                                               bool hasChapters = false,
00115                                               bool hasTitles = false );
00116             void            _UpdateSpeedMenu( int rate );
00117             void            _ShowFilePanel( uint32 command,
00118                                             const char* windowTitle );
00119             void            _RestoreSettings();
00120             void            _StoreSettings();
00121 
00122     intf_thread_t         * p_intf;
00123     input_thread_t        * p_input;
00124     playlist_t            * p_playlist;
00125     es_descriptor_t       * p_spu_es;
00126     bool                    b_playlist_update;
00127 
00128     BFilePanel*             fFilePanel;
00129     PlayListWindow*         fPlaylistWindow;
00130     PreferencesWindow*      fPreferencesWindow;
00131     BMenuBar*               fMenuBar;
00132     BMenuItem*              fGotoMenuMI;
00133     BMenuItem*              fNextTitleMI;
00134     BMenuItem*              fPrevTitleMI;
00135     BMenuItem*              fNextChapterMI;
00136     BMenuItem*              fPrevChapterMI;
00137     BMenuItem*              fOnTopMI;
00138     BMenuItem*              fHeighthMI;
00139     BMenuItem*              fQuarterMI;
00140     BMenuItem*              fHalfMI;
00141     BMenuItem*              fNormalMI;
00142     BMenuItem*              fTwiceMI;
00143     BMenuItem*              fFourMI;
00144     BMenuItem*              fHeightMI;
00145     BMenu*                  fAudioMenu;
00146     BMenu*                  fNavigationMenu;
00147     BMenu*                  fTitleMenu;
00148     BMenu*                  fChapterMenu;
00149     BMenu*                  fLanguageMenu;
00150     BMenu*                  fSubtitlesMenu;
00151     BMenu*                  fSpeedMenu;
00152     BMenu*                  fShowMenu;
00153     bigtime_t               fLastUpdateTime;
00154     BMessage*               fSettings;  // we keep the message arround
00155                                         // for forward compatibility
00156 };
00157 
00158 
00159 // some global support functions
00160 status_t load_settings( BMessage* message,
00161                         const char* fileName,
00162                         const char* folder = NULL );
00163 
00164 status_t save_settings( BMessage* message,
00165                         const char* fileName,
00166                         const char* folder = NULL );
00167 
00168 
00169 #endif    // BEOS_INTERFACE_WINDOW_H

Generated on Tue Dec 20 10:14:37 2005 for vlc-0.8.4a by  doxygen 1.4.2