]> git.sesse.net Git - vlc/blob - plugins/beos/InterfaceWindow.h
f2dc8e773ad57153c45fb8dc600d17039b6e5cda
[vlc] / plugins / 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.12.2.3 2002/09/03 12:00:25 tcastley 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
38 class CDMenu : public BMenu
39 {
40  public:
41                                                         CDMenu(const char* name);
42         virtual                                 ~CDMenu();
43
44         virtual void                    AttachedToWindow(void);
45
46  private:
47         int                                             GetCD(const char* directory);
48 };
49
50 class LanguageMenu : public BMenu
51 {
52  public:
53                                                         LanguageMenu(const char* name,
54                                                                                  int menu_kind,
55                                                                                  intf_thread_t* p_interface);
56         virtual                                 ~LanguageMenu();
57
58         virtual void                    AttachedToWindow(void);
59
60  private:
61         intf_thread_t*                  p_intf;
62         int                                             kind;
63         int                                             GetChannels();
64 };
65
66 class InterfaceWindow : public BWindow
67 {
68  public:
69                                                         InterfaceWindow(BRect frame,
70                                                                                         const char* name,
71                                                                                         intf_thread_t* p_interface);
72         virtual                                 ~InterfaceWindow();
73
74                                                         // standard window member
75         virtual void                    FrameResized(float width, float height);
76         virtual void                    MessageReceived(BMessage* message);
77         virtual bool                    QuitRequested();
78
79                                                         // InterfaceWindow
80                         void                    updateInterface();
81                         bool                    IsStopped() const;
82             
83         MediaControlView*               p_mediaControl;
84
85  private:       
86         void                                    _SetMenusEnabled(bool hasFile,
87                                                                                          bool hasChapters = false,
88                                                                                          bool hasTitles = false);
89
90         intf_thread_t*                  p_intf;
91         bool                                    b_empty_playlist;
92         BFilePanel*                             file_panel;
93         PlayListWindow*                 playlist_window;
94         BMenuItem*                              miOnTop;
95         es_descriptor_t*                p_audio_es;
96         es_descriptor_t*                p_spu_es;
97         BMenuBar*                               fMenuBar;
98         BMenuItem*                              fNextTitleMI;
99         BMenuItem*                              fPrevTitleMI;
100         BMenuItem*                              fNextChapterMI;
101         BMenuItem*                              fPrevChapterMI;
102         BMenu*                                  fAudioMenu;
103         BMenu*                                  fNavigationMenu;
104         BMenu*                                  fLanguageMenu;
105         BMenu*                                  fSubtitlesMenu;
106         BMenu*                                  fSpeedMenu;
107         bigtime_t                               fLastUpdateTime;
108 };
109
110 #endif  // BEOS_INTERFACE_WINDOW_H