InterfaceWindow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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 #if 0
00036 class PlayListWindow;
00037 #endif
00038 class BFilePanel;
00039 class PreferencesWindow;
00040 class MessagesWindow;
00041
00042 class CDMenu : public BMenu
00043 {
00044 public:
00045 CDMenu( const char* name );
00046 virtual ~CDMenu();
00047
00048 virtual void AttachedToWindow();
00049
00050 private:
00051 int GetCD( const char* directory );
00052 };
00053
00054 class LanguageMenu : public BMenu
00055 {
00056 public:
00057 LanguageMenu( intf_thread_t * p_intf,
00058 const char * psz_name,
00059 char * psz_variable );
00060 virtual ~LanguageMenu();
00061
00062 virtual void AttachedToWindow();
00063
00064 private:
00065 intf_thread_t * p_intf;
00066 char * psz_variable;
00067 };
00068
00069 class TitleMenu : public BMenu
00070 {
00071 public:
00072 TitleMenu( const char* name, intf_thread_t *p_interface );
00073 virtual ~TitleMenu();
00074
00075 virtual void AttachedToWindow();
00076
00077 intf_thread_t *p_intf;
00078 };
00079
00080 class ChapterMenu : public BMenu
00081 {
00082 public:
00083 ChapterMenu( const char* name, intf_thread_t *p_interface );
00084 virtual ~ChapterMenu();
00085
00086 virtual void AttachedToWindow();
00087
00088 intf_thread_t *p_intf;
00089 };
00090
00091
00092 class InterfaceWindow : public BWindow
00093 {
00094 public:
00095 InterfaceWindow( intf_thread_t * p_intf,
00096 BRect frame,
00097 const char * name );
00098 virtual ~InterfaceWindow();
00099
00100
00101 virtual void FrameResized( float width, float height );
00102 virtual void MessageReceived( BMessage* message );
00103 virtual bool QuitRequested();
00104
00105
00106 void UpdateInterface();
00107 void UpdatePlaylist();
00108
00109 bool IsStopped() const;
00110
00111 MediaControlView* p_mediaControl;
00112 MessagesWindow* fMessagesWindow;
00113
00114 private:
00115 void _SetMenusEnabled( bool hasFile,
00116 bool hasChapters = false,
00117 bool hasTitles = false );
00118 void _UpdateSpeedMenu( int rate );
00119 void _ShowFilePanel( uint32 command,
00120 const char* windowTitle );
00121 void _RestoreSettings();
00122 void _StoreSettings();
00123
00124 intf_thread_t * p_intf;
00125 input_thread_t * p_input;
00126 playlist_t * p_playlist;
00127 es_descriptor_t * p_spu_es;
00128 bool b_playlist_update;
00129
00130 BFilePanel* fFilePanel;
00131 #if 0
00132 PlayListWindow* fPlaylistWindow;
00133 #endif
00134 PreferencesWindow* fPreferencesWindow;
00135 BMenuBar* fMenuBar;
00136 BMenuItem* fGotoMenuMI;
00137 BMenuItem* fNextTitleMI;
00138 BMenuItem* fPrevTitleMI;
00139 BMenuItem* fNextChapterMI;
00140 BMenuItem* fPrevChapterMI;
00141 BMenuItem* fOnTopMI;
00142 BMenuItem* fHeighthMI;
00143 BMenuItem* fQuarterMI;
00144 BMenuItem* fHalfMI;
00145 BMenuItem* fNormalMI;
00146 BMenuItem* fTwiceMI;
00147 BMenuItem* fFourMI;
00148 BMenuItem* fHeightMI;
00149 BMenu* fAudioMenu;
00150 BMenu* fNavigationMenu;
00151 BMenu* fTitleMenu;
00152 BMenu* fChapterMenu;
00153 BMenu* fLanguageMenu;
00154 BMenu* fSubtitlesMenu;
00155 BMenu* fSpeedMenu;
00156 BMenu* fShowMenu;
00157 bigtime_t fLastUpdateTime;
00158 BMessage* fSettings;
00159
00160 };
00161
00162
00163
00164 status_t load_settings( BMessage* message,
00165 const char* fileName,
00166 const char* folder = NULL );
00167
00168 status_t save_settings( BMessage* message,
00169 const char* fileName,
00170 const char* folder = NULL );
00171
00172
00173 #endif // BEOS_INTERFACE_WINDOW_H