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 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
00099 virtual void FrameResized( float width, float height );
00100 virtual void MessageReceived( BMessage* message );
00101 virtual bool QuitRequested();
00102
00103
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;
00155
00156 };
00157
00158
00159
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