]> git.sesse.net Git - vlc/blob - modules/gui/beos/InterfaceWindow.h
Added a window to see vlc messages.
[vlc] / modules / gui / beos / InterfaceWindow.h
1 /*****************************************************************************
2  * InterfaceWindow.h: BeOS interface window class prototype
3  *****************************************************************************
4  * Copyright (C) 1999, 2000, 2001 VideoLAN
5  * $Id: InterfaceWindow.h,v 1.10 2003/01/25 20:15:41 titer Exp $
6  *
7  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
8  *          Tony Castley <tcastley@mail.powerup.com.au>
9  *          Richard Shepherd <richard@rshepherd.demon.co.uk>
10  *          Stephan Aßmus <stippi@yellowbites.com>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
25  *****************************************************************************/
26
27 #ifndef BEOS_INTERFACE_WINDOW_H
28 #define BEOS_INTERFACE_WINDOW_H
29
30 #include <Menu.h>
31 #include <Window.h>
32
33 class BMenuBar;
34 class MediaControlView;
35 class PlayListWindow;
36 class BFilePanel;
37 class PreferencesWindow;
38 class MessagesWindow;
39
40 class CDMenu : public BMenu
41 {
42  public:
43                             CDMenu( const char* name );
44     virtual                 ~CDMenu();
45
46     virtual void            AttachedToWindow();
47
48  private:
49     int                     GetCD( const char* directory );
50 };
51
52 class LanguageMenu : public BMenu
53 {
54  public:
55                             LanguageMenu( const char* name,
56                                           int menu_kind,
57                                           VlcWrapper *p_wrapper );
58     virtual                 ~LanguageMenu();
59
60     virtual void            AttachedToWindow();
61
62  private:
63             void            _GetChannels();
64
65     VlcWrapper *            p_wrapper;
66     int                     kind;
67 };
68
69 class TitleMenu : public BMenu
70 {
71  public:
72                             TitleMenu( const char* name, intf_thread_t  *p_interface );
73     virtual                 ~TitleMenu();
74
75     virtual void            AttachedToWindow();
76     
77     intf_thread_t  *p_intf;
78 };
79
80 class ChapterMenu : public BMenu
81 {
82  public:
83                             ChapterMenu( const char* name, intf_thread_t  *p_interface );
84     virtual                 ~ChapterMenu();
85
86     virtual void            AttachedToWindow();
87
88     intf_thread_t  *p_intf;
89 };
90
91
92 class InterfaceWindow : public BWindow
93 {
94  public:
95                             InterfaceWindow( BRect frame,
96                                              const char* name,
97                                              intf_thread_t* p_interface );
98     virtual                 ~InterfaceWindow();
99
100                             // BWindow
101     virtual void            FrameResized( float width, float height );
102     virtual void            MessageReceived( BMessage* message );
103     virtual bool            QuitRequested();
104
105                             // InterfaceWindow
106             void            UpdateInterface();
107             bool            IsStopped() const;
108         
109     MediaControlView*        p_mediaControl;
110
111  private:    
112             void            _UpdatePlaylist();
113             void            _SetMenusEnabled( bool hasFile,
114                                               bool hasChapters = false,
115                                               bool hasTitles = false );
116             void            _UpdateSpeedMenu( int rate );
117             void            _InputStreamChanged();
118
119     intf_thread_t*          p_intf;
120     es_descriptor_t*        p_spu_es;
121
122     bool                    fPlaylistIsEmpty;
123     BFilePanel*             fFilePanel;
124     BFilePanel*             fSubtitlesPanel;
125     PlayListWindow*         fPlaylistWindow;
126     PreferencesWindow*      fPreferencesWindow;
127     MessagesWindow*         fMessagesWindow;
128     BMenuBar*               fMenuBar;
129     BMenuItem*              fNextTitleMI;
130     BMenuItem*              fPrevTitleMI;
131     BMenuItem*              fNextChapterMI;
132     BMenuItem*              fPrevChapterMI;
133     BMenuItem*              fOnTopMI;
134     BMenuItem*              fSlowerMI;
135     BMenuItem*              fNormalMI;
136     BMenuItem*              fFasterMI;
137     BMenu*                  fAudioMenu;
138     BMenu*                  fNavigationMenu;
139     BMenu*                  fTitleMenu;
140     BMenu*                  fChapterMenu;
141     BMenu*                  fLanguageMenu;
142     BMenu*                  fSubtitlesMenu;
143     BMenu*                  fSpeedMenu;
144     BMenu*                  fShowMenu;
145     bigtime_t               fLastUpdateTime;
146     
147     VlcWrapper * p_wrapper;
148 };
149
150 #endif    // BEOS_INTERFACE_WINDOW_H