]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/wxwindows.h
* modules/audio_output/directx.c: 5.1 audio output now works on sblive/audigy as...
[vlc] / modules / gui / wxwindows / wxwindows.h
index 5c800984e939411abf64632eb1503fd1e0e6a636..3d77788a13e45d7077cb40b4838c0b88d50183db 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.h: private wxWindows interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.26 2003/05/15 01:33:53 gbazin Exp $
+ * $Id: wxwindows.h,v 1.40 2003/07/10 11:15:18 adn Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -27,6 +27,7 @@
 #include <wx/spinctrl.h>
 #include <wx/dnd.h>
 #include <wx/treectrl.h>
+#include <wx/gauge.h>
 
 class Playlist;
 class Messages;
@@ -58,21 +59,6 @@ struct intf_sys_t
 
     /* special actions */
     vlc_bool_t          b_playing;
-    vlc_bool_t          b_popup_changed;                   /* display menu ? */
-    vlc_bool_t          b_window_changed;        /* window display toggled ? */
-    vlc_bool_t          b_playlist_changed;    /* playlist display toggled ? */
-    vlc_bool_t          b_slider_free;                      /* slider status */
-
-    /* menus handlers */
-    vlc_bool_t          b_program_update;   /* do we need to update programs
-                                                                        menu */
-    vlc_bool_t          b_title_update;  /* do we need to update title menus */
-    vlc_bool_t          b_chapter_update;            /* do we need to update
-                                                               chapter menus */
-    vlc_bool_t          b_audio_update;  /* do we need to update audio menus */
-    vlc_bool_t          b_spu_update;      /* do we need to update spu menus */
-
-    /* windows and widgets */
 
     /* The input thread */
     input_thread_t *    p_input;
@@ -80,6 +66,7 @@ struct intf_sys_t
     /* The slider */
     int                 i_slider_pos;                     /* slider position */
     int                 i_slider_oldpos;                /* previous position */
+    vlc_bool_t          b_slider_free;                      /* slider status */
 
     /* The messages window */
     msg_subscription_t* p_sub;                  /* message bank subscription */
@@ -87,8 +74,10 @@ struct intf_sys_t
     /* Playlist management */
     int                 i_playing;                 /* playlist selected item */
 
-    /* The window labels for DVD mode */
-    unsigned int        i_part;                           /* current chapter */
+    /* Popup menu */
+    wxMenu              *p_popup_menu;
+    vlc_bool_t          b_popup_change;
+
 };
 #endif /* !defined(MODULE_NAME_IS_skins) */
 
@@ -115,9 +104,11 @@ private:
     intf_thread_t *p_intf;
     Interface *p_main_interface;
     int i_old_playing_status;
+    int i_old_rate;
 };
 
 /* Main Interface */
+class OpenDialog;
 class Interface: public wxFrame
 {
 public:
@@ -133,9 +124,11 @@ public:
     wxWindow    *slider_frame;
     wxStaticBox *slider_box;
 
-    wxMenu      *p_popup_menu;
+    wxGauge     *volctrl;
 
-    wxArrayString mrl_history;
+    /* So we don't recreate the open dialog box each time
+     * (and keep the last settings) */
+    OpenDialog  *p_open_dialog;
 
 private:
     void CreateOurMenuBar();
@@ -162,14 +155,15 @@ private:
     void OnSliderUpdate( wxScrollEvent& event );
     void OnPrevStream( wxCommandEvent& event );
     void OnNextStream( wxCommandEvent& event );
+    void OnSlowStream( wxCommandEvent& event );
+    void OnFastStream( wxCommandEvent& event );
 
     void OnMenuOpen( wxMenuEvent& event );
 
 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
-    void OnContextMenu(wxContextMenuEvent& event);
-#else
-    void OnContextMenu(wxMouseEvent& event);
+    void OnContextMenu2(wxContextMenuEvent& event);
 #endif
+    void OnContextMenu(wxMouseEvent& event);
 
     DECLARE_EVENT_TABLE();
 
@@ -190,6 +184,8 @@ private:
 };
 
 /* Open Dialog */
+class SoutDialog;
+class SubsFileDialog;
 class OpenDialog: public wxDialog
 {
 public:
@@ -198,7 +194,10 @@ public:
                 int i_access_method );
     virtual ~OpenDialog();
 
-    wxString mrl;
+    int ShowModal();
+    int ShowModal( int i_access_method );
+
+    wxArrayString mrl;
 
 private:
     wxPanel *FilePanel( wxWindow* parent );
@@ -207,6 +206,7 @@ private:
     wxPanel *SatPanel( wxWindow* parent );
 
     void UpdateMRL( int i_access_method );
+    wxArrayString SeparateEntries( wxString );
 
     /* Event handlers (these functions should _not_ be virtual) */
     void OnOk( wxCommandEvent& event );
@@ -247,9 +247,11 @@ private:
     int i_current_access_method;
 
     wxComboBox *mrl_combo;
+    wxNotebook *notebook;
 
     /* Controls for the file panel */
     wxComboBox *file_combo;
+    wxFileDialog *file_dialog;
 
     /* Controls for the disc panel */
     wxRadioBox *disc_type;
@@ -268,15 +270,18 @@ private:
     /* Controls for the subtitles file */
     wxButton *subsfile_button;
     wxCheckBox *subsfile_checkbox;
+    SubsFileDialog *subsfile_dialog;
 
     /* Controls for the stream output */
     wxButton *sout_button;
     wxCheckBox *sout_checkbox;
+    SoutDialog *sout_dialog;
 
     /* Controls for the demux dump */
     wxTextCtrl *demuxdump_textctrl;
     wxButton *demuxdump_button;
     wxCheckBox *demuxdump_checkbox;
+    wxFileDialog *demuxdump_dialog;
 };
 
 enum
@@ -300,6 +305,7 @@ public:
 private:
     void UpdateMRL();
     wxPanel *AccessPanel( wxWindow* parent );
+    wxPanel *MiscPanel( wxWindow* parent );
     wxPanel *EncapsulationPanel( wxWindow* parent );
     wxPanel *TranscodingPanel( wxWindow* parent );
     void    ParseMRL();
@@ -317,6 +323,9 @@ private:
     /* Event handlers for the net access output */
     void OnNetChange( wxCommandEvent& event );
 
+    /* Event specific to the sap address */
+    void OnSAPAddrChange( wxCommandEvent& event );
+    
     /* Event handlers for the encapsulation panel */
     void OnEncapsulationChange( wxCommandEvent& event );
 
@@ -324,6 +333,9 @@ private:
     void OnTranscodingEnable( wxCommandEvent& event );
     void OnTranscodingChange( wxCommandEvent& event );
 
+    /* Event handlers for the misc panel */
+    void OnSAPMiscChange( wxCommandEvent& event );
+
     DECLARE_EVENT_TABLE();
 
     intf_thread_t *p_intf;
@@ -338,9 +350,14 @@ private:
     int i_access_type;
 
     wxComboBox *file_combo;
-    wxSpinCtrl *net_port;
-    wxTextCtrl *net_addr;
-
+    wxSpinCtrl *net_ports[5];
+    wxTextCtrl *net_addrs[5];
+
+    /* Controls for the SAP announces */
+    wxPanel *misc_subpanels[1];
+    wxCheckBox *sap_checkbox;
+    wxTextCtrl *sap_addr;
+                            
     /* Controls for the encapsulation */
     wxRadioButton *encapsulation_radios[5];
     int i_encapsulation_type;
@@ -384,7 +401,7 @@ class PrefsDialog: public wxFrame
 {
 public:
     /* Constructor */
-    PrefsDialog( intf_thread_t *p_intf, Interface *p_main_interface );
+    PrefsDialog( intf_thread_t *p_intf, wxWindow *p_parent );
     virtual ~PrefsDialog();
 
 private:
@@ -399,7 +416,6 @@ private:
     DECLARE_EVENT_TABLE();
 
     intf_thread_t *p_intf;
-    Interface *p_main_interface;
 
     PrefsTreeCtrl *prefs_tree;
 };
@@ -409,7 +425,7 @@ class Messages: public wxFrame
 {
 public:
     /* Constructor */
-    Messages( intf_thread_t *p_intf, Interface *_p_main_interface );
+    Messages( intf_thread_t *p_intf, wxWindow *p_parent );
     virtual ~Messages();
     void UpdateLog();
 
@@ -417,17 +433,20 @@ private:
     /* Event handlers (these functions should _not_ be virtual) */
     void OnClose( wxCommandEvent& event );
     void OnVerbose( wxCommandEvent& event );
+    void OnClear( wxCommandEvent& event );
+    void OnSaveLog( wxCommandEvent& event );
 
     DECLARE_EVENT_TABLE();
 
     intf_thread_t *p_intf;
-    Interface *p_main_interface;
     wxTextCtrl *textctrl;
     wxTextAttr *info_attr;
     wxTextAttr *err_attr;
     wxTextAttr *warn_attr;
     wxTextAttr *dbg_attr;
 
+    wxFileDialog *save_log_dialog;
+    
     vlc_bool_t b_verbose;
 };
 
@@ -473,7 +492,7 @@ class FileInfo: public wxFrame
 {
 public:
     /* Constructor */
-    FileInfo( intf_thread_t *p_intf, Interface *p_main_interface );
+    FileInfo( intf_thread_t *p_intf, wxWindow *p_parent );
     virtual ~FileInfo();
     void UpdateFileInfo();
 
@@ -505,11 +524,11 @@ private:
 #endif
 
 /* Menus */
-void PopupMenu( intf_thread_t *_p_intf, Interface *_p_main_interface,
+void PopupMenu( intf_thread_t *_p_intf, wxWindow *p_parent,
                 const wxPoint& pos );
-wxMenu *AudioMenu( intf_thread_t *_p_intf, Interface *_p_main_interface );
-wxMenu *VideoMenu( intf_thread_t *_p_intf, Interface *_p_main_interface );
-wxMenu *NavigMenu( intf_thread_t *_p_intf, Interface *_p_main_interface );
+wxMenu *AudioMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
+wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
+wxMenu *NavigMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
 
 class MenuEvtHandler : public wxEvtHandler
 {
@@ -531,7 +550,7 @@ class Menu: public wxMenu
 {
 public:
     /* Constructor */
-    Menu( intf_thread_t *p_intf, Interface *p_main_interface, int i_count,
+    Menu( intf_thread_t *p_intf, wxWindow *p_parent, int i_count,
           char **ppsz_names, int *pi_objects, int i_start_id );
     virtual ~Menu();
 
@@ -547,7 +566,6 @@ private:
     DECLARE_EVENT_TABLE();
 
     intf_thread_t *p_intf;
-    Interface *p_main_interface;
 
     int  i_item_id;
 };