]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/wxwindows.h
* modules/gui/wxwindows/*: make sure we re-use the streaming wizard so the user selec...
[vlc] / modules / gui / wxwindows / wxwindows.h
index dacb1debdcdef5cfb3eef9a73e4490594349f2b4..e64cf0013d0e86dfa535c3bf9e7a612cc1317221 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * wxwindows.h: private wxWindows interface description
  *****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.67 2003/11/05 17:57:29 gbazin Exp $
+ * Copyright (C) 1999-2004 VideoLAN
+ * $Id: wxwindows.h,v 1.95 2004/03/01 18:31:13 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
 #include <wx/treectrl.h>
 #include <wx/gauge.h>
 #include <wx/accel.h>
+#include <wx/checkbox.h>
 #include "vlc_keys.h"
 
+/* Hmmm, work-around for newest wxWin */
+#ifdef wxStaticCastEvent
+#   undef wxStaticCastEvent
+#   define wxStaticCastEvent(type, val) ((type)(val))
+#endif
+
 DECLARE_LOCAL_EVENT_TYPE( wxEVT_DIALOG, 0 );
 
 class OpenDialog;
@@ -52,8 +59,7 @@ class FileInfo;
 #define SLIDER_MAX_POS 10000
 
 /* wxU is used to convert ansi/utf8 strings to unicode strings (wchar_t) */
-#if defined( ENABLE_NLS ) && defined( HAVE_GETTEXT ) && \
-    defined( WIN32 ) && !defined( HAVE_INCLUDED_GETTEXT )
+#if defined( ENABLE_NLS ) && defined( ENABLE_UTF8 )
 #if wxUSE_UNICODE
 #   define wxU(utf8) wxString(utf8, wxConvUTF8)
 #else
@@ -61,7 +67,7 @@ class FileInfo;
 #endif
 #define ISUTF8 1
 
-#else // ENABLE_NLS && HAVE_GETTEXT && WIN32 && !HAVE_INCLUDED_GETTEXT
+#else // ENABLE_NLS && ENABLE_UTF8
 #if wxUSE_UNICODE
 #   define wxU(ansi) wxString(ansi, *wxConvCurrent)
 #else
@@ -71,6 +77,14 @@ class FileInfo;
 
 #endif
 
+/* wxL2U (locale to unicode) is used to convert ansi strings to unicode
+ * strings (wchar_t) */
+#if wxUSE_UNICODE
+#   define wxL2U(ansi) wxString(ansi, *wxConvCurrent)
+#else
+#   define wxL2U(ansi) ansi
+#endif
+
 #define WRAPCOUNT 80
 
 #define OPEN_NORMAL 0
@@ -169,6 +183,7 @@ public:
     wxSlider *contrast_slider;
     wxSlider *saturation_slider;
     wxSlider *hue_slider;
+    wxSlider *gamma_slider;
 
     wxStaticBox *other_box;
     wxComboBox *ratio_combo;
@@ -193,7 +208,6 @@ private:
     void OnOpenNet( wxCommandEvent& event );
     void OnOpenSat( wxCommandEvent& event );
     void OnOpenV4L( wxCommandEvent& event );
-    void OnStream( wxCommandEvent& event );
     void OnExtra( wxCommandEvent& event );
     void OnShowDialog( wxCommandEvent& event );
     void OnPlayStream( wxCommandEvent& event );
@@ -209,6 +223,7 @@ private:
     void OnContrastUpdate( wxScrollEvent& event );
     void OnBrightnessUpdate( wxScrollEvent& event );
     void OnSaturationUpdate( wxScrollEvent& event );
+    void OnGammaUpdate( wxScrollEvent& event );
 
     void OnRatio( wxCommandEvent& event );
     void OnEnableVisual( wxCommandEvent& event );
@@ -229,14 +244,14 @@ private:
     int i_old_playing_status;
 
     /* For auto-generated menus */
+    wxMenu *p_settings_menu;
+    vlc_bool_t b_settings_menu;
     wxMenu *p_audio_menu;
     vlc_bool_t b_audio_menu;
     wxMenu *p_video_menu;
     vlc_bool_t b_video_menu;
     wxMenu *p_navig_menu;
     vlc_bool_t b_navig_menu;
-    wxMenu *p_misc_menu;
-    vlc_bool_t b_misc_menu;
 };
 
 class StreamDialog;
@@ -258,7 +273,7 @@ private:
     void OnMessages( wxCommandEvent& event );
     void OnFileInfo( wxCommandEvent& event );
     void OnPreferences( wxCommandEvent& event );
-    void OnStreamDialog( wxCommandEvent& event );
+    void OnStreamWizardDialog( wxCommandEvent& event );
 
     void OnOpenFileGeneric( wxCommandEvent& event );
     void OnOpenFileSimple( wxCommandEvent& event );
@@ -284,12 +299,14 @@ public:
     Playlist            *p_playlist_dialog;
     Messages            *p_messages_dialog;
     FileInfo            *p_fileinfo_dialog;
-    StreamDialog        *p_stream_dialog;
+    StreamDialog        *p_streamwizard_dialog;
     wxFrame             *p_prefs_dialog;
     wxFileDialog        *p_file_generic_dialog;
 };
 
 /* Open Dialog */
+class AutoBuiltPanel;
+WX_DEFINE_ARRAY(AutoBuiltPanel *, ArrayOfAutoBuiltPanel);
 class V4LDialog;
 class SoutDialog;
 class SubsFileDialog;
@@ -308,16 +325,18 @@ public:
     int Show();
     int Show( int i_access_method, int i_arg = 0 );
 
+    void UpdateMRL();
+    void UpdateMRL( int i_access_method );
+
     wxArrayString mrl;
 
 private:
     wxPanel *FilePanel( wxWindow* parent );
     wxPanel *DiscPanel( wxWindow* parent );
     wxPanel *NetPanel( wxWindow* parent );
-    wxPanel *SatPanel( wxWindow* parent );
     wxPanel *V4LPanel( wxWindow* parent );
 
-    void UpdateMRL( int i_access_method );
+    ArrayOfAutoBuiltPanel input_tab_array;
 
     /* Event handlers (these functions should _not_ be virtual) */
     void OnOk( wxCommandEvent& event );
@@ -333,6 +352,7 @@ private:
     /* Event handlers for the disc page */
     void OnDiscPanelChange( wxCommandEvent& event );
     void OnDiscTypeChange( wxCommandEvent& event );
+    void OnDiscDeviceChange( wxCommandEvent& event );
 
     /* Event handlers for the net page */
     void OnNetPanelChange( wxCommandEvent& event );
@@ -356,8 +376,11 @@ private:
     intf_thread_t *p_intf;
     wxWindow *p_parent;
     int i_current_access_method;
+    int i_disc_type_selection;
 
     int i_method; /* Normal or for the stream dialog ? */
+    int i_open_arg;
+
     wxComboBox *mrl_combo;
     wxNotebook *notebook;
 
@@ -369,10 +392,16 @@ private:
     wxRadioBox *disc_type;
     wxTextCtrl *disc_device;
     wxSpinCtrl *disc_title;
-    int        i_disc_title;
     wxSpinCtrl *disc_chapter;
-    int        i_disc_chapter;
 
+    /* The media equivalent name for a DVD names. For example,
+       "Title", is "Track" for a CD-DA */
+    wxStaticText *disc_title_label;
+    wxStaticText *disc_chapter_label;
+    
+    /* Indicates if the disc device control was modified */
+    bool b_disc_device_changed;
+    
     /* Controls for the net panel */
     wxRadioBox *net_type;
     int i_net_type;
@@ -381,6 +410,7 @@ private:
     wxSpinCtrl *net_ports[4];
     int        i_net_ports[4];
     wxTextCtrl *net_addrs[4];
+    wxCheckBox *net_ipv6;
 
     /* Controls for the v4l panel */
     wxRadioBox *video_type;
@@ -408,8 +438,10 @@ enum
     FILE_ACCESS = 0,
     DISC_ACCESS,
     NET_ACCESS,
-    SAT_ACCESS,
+#ifndef WIN32
     V4L_ACCESS,
+#endif
+    MAX_ACCESS,
     FILE_SIMPLE_ACCESS
 };
 
@@ -435,6 +467,7 @@ private:
     void OnCancel( wxCommandEvent& event );
     void OnMRLChange( wxCommandEvent& event );
     void OnAudioEnable( wxCommandEvent& event );
+    void OnAudioChange( wxCommandEvent& event );
     void OnAudioChannel( wxCommandEvent& event );
     void OnSizeEnable( wxCommandEvent& event );
     void OnSize( wxCommandEvent& event );
@@ -499,6 +532,7 @@ enum
     PS_ENCAPSULATION,
     MPEG1_ENCAPSULATION,
     OGG_ENCAPSULATION,
+    RAW_ENCAPSULATION,
     ASF_ENCAPSULATION,
     AVI_ENCAPSULATION,
     MP4_ENCAPSULATION,
@@ -597,6 +631,7 @@ private:
     wxComboBox *video_bitrate_combo;
     wxComboBox *audio_bitrate_combo;
     wxComboBox *audio_channels_combo;
+    wxComboBox *video_scale_combo;
 };
 
 /* Subtitles File Dialog */
@@ -713,6 +748,7 @@ private:
 /* Playlist */
 class ItemInfoDialog;
 class NewGroup;
+class ExportPlaylist;
 class Playlist: public wxFrame
 {
 public:
@@ -722,12 +758,13 @@ public:
 
     void UpdatePlaylist();
     void ShowPlaylist( bool show );
+    void UpdateItem( int );
 
     bool b_need_update;
-    vlc_mutex_t lock;
 
 private:
     void DeleteItem( int item );
+    void ShowInfos( int item );
 
     /* Event handlers (these functions should _not_ be virtual) */
     void OnAddFile( wxCommandEvent& event );
@@ -741,6 +778,7 @@ private:
     void OnSave( wxCommandEvent& event );
 
     void OnSort( wxCommandEvent& event );
+    void OnColSelect( wxListEvent& event );
 
     void OnUp( wxCommandEvent& event);
     void OnDown( wxCommandEvent& event);
@@ -757,12 +795,22 @@ private:
     void OnKeyDown( wxListEvent& event );
     void OnNewGroup( wxCommandEvent& event );
 
+    /* Popup functions */
+    void OnPopup( wxListEvent& event );
+    void OnPopupPlay( wxMenuEvent& event );
+    void OnPopupDel( wxMenuEvent& event );
+    void OnPopupEna( wxMenuEvent& event );
+    void OnPopupInfo( wxMenuEvent& event );
     void Rebuild();
 
+    /* Custom events */
+    void OnPlaylistEvent( wxCommandEvent& event );
+
     wxTextCtrl *search_text;
     wxButton *search_button;
     DECLARE_EVENT_TABLE();
 
+    wxMenu *popup_menu;
 
     ItemInfoDialog *iteminfo_dialog;
 
@@ -771,6 +819,13 @@ private:
     wxTreeCtrl *treeview;
     int i_update_counter;
     int i_sort_mode;
+
+    int i_popup_item;
+
+    int i_title_sorted;
+    int i_author_sorted;
+    int i_group_sorted;
+    int i_duration_sorted;
 };
 
 
@@ -798,7 +853,6 @@ protected:
     char *psz_name;
 };
 
-
 /* ItemInfo Dialog */
 class ItemInfoDialog: public wxDialog
 {
@@ -819,6 +873,8 @@ private:
     void OnCancel( wxCommandEvent& event );
     void OnNewGroup( wxCommandEvent& event );
 
+    void UpdateInfo();
+
     DECLARE_EVENT_TABLE();
 
     intf_thread_t *p_intf;
@@ -836,6 +892,9 @@ private:
     wxTextCtrl *name_text;
     wxTextCtrl *author_text;
 
+    wxTreeCtrl *info_tree;
+    wxTreeItemId info_root;
+
     wxCheckBox *enabled_checkbox;
     wxComboBox *group_combo;
     int ids_array[100];
@@ -869,23 +928,24 @@ private:
 class DragAndDrop: public wxFileDropTarget
 {
 public:
-    DragAndDrop( intf_thread_t *_p_intf );
+    DragAndDrop( intf_thread_t *_p_intf, vlc_bool_t b_enqueue = VLC_FALSE );
 
     virtual bool OnDropFiles( wxCoord x, wxCoord y,
                               const wxArrayString& filenames );
 
 private:
     intf_thread_t *p_intf;
+    vlc_bool_t b_enqueue;
 };
 #endif
 
 /* Menus */
 void PopupMenu( intf_thread_t *_p_intf, wxWindow *p_parent,
                 const wxPoint& pos );
+wxMenu *SettingsMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
 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 );
-wxMenu *MiscMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
 
 class MenuEvtHandler : public wxEvtHandler
 {
@@ -920,7 +980,7 @@ private:
 
     wxMenu *Menu::CreateDummyMenu();
     void   Menu::CreateMenuItem( wxMenu *, char *, vlc_object_t * );
-    wxMenu *Menu::CreateChoicesMenu( char *, vlc_object_t * );
+    wxMenu *Menu::CreateChoicesMenu( char *, vlc_object_t *, bool );
 
     DECLARE_EVENT_TABLE();