/*****************************************************************************
* wxwindows.h: private wxWindows interface description
*****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.47 2003/07/20 10:38:49 gbazin Exp $
+ * Copyright (C) 1999-2004 VideoLAN
+ * $Id$
*
- * Authors: Gildas Bazin <gbazin@netcourrier.com>
+ * Authors: Gildas Bazin <gbazin@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
+#ifdef WIN32 /* mingw32 hack */
+#undef Yield
+#undef CreateDialog
+#endif
+
+/* Let vlc take care of the i18n stuff */
+#define WXINTL_NO_GETTEXT_MACRO
+
+#include <wx/wxprec.h>
+#include <wx/wx.h>
+
#include <wx/listctrl.h>
#include <wx/textctrl.h>
#include <wx/notebook.h>
#include <wx/dnd.h>
#include <wx/treectrl.h>
#include <wx/gauge.h>
+#include <wx/accel.h>
+#include <wx/checkbox.h>
+#include <wx/wizard.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 );
-
-enum
-{
- FILE_ACCESS,
- DISC_ACCESS,
- NET_ACCESS,
- SAT_ACCESS,
- FILE_SIMPLE_ACCESS
-};
-
-class OpenDialog;
-class Playlist;
-class Messages;
-class FileInfo;
+DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
#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
# define wxU(utf8) wxString(wxConvUTF8.cMB2WC(utf8), *wxConvCurrent)
#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
# define wxU(ansi) ansi
#endif
+#define ISUTF8 0
#endif
-#if !defined(MODULE_NAME_IS_skins)
+/* 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
+#define OPEN_STREAM 1
+
+#define MODE_NONE 0
+#define MODE_GROUP 1
+#define MODE_AUTHOR 2
+#define MODE_TITLE 3
+
+class DialogsProvider;
+class PrefsTreeCtrl;
+class AutoBuiltPanel;
+class VideoWindow;
+
/*****************************************************************************
* intf_sys_t: description and status of wxwindows interface
*****************************************************************************/
/* Popup menu */
wxMenu *p_popup_menu;
+ /* Hotkeys */
+ int i_first_hotkey_event;
+ int i_hotkeys;
+
+ /* Embedded vout */
+ VideoWindow *p_video_window;
+ wxBoxSizer *p_video_sizer;
};
-#endif /* !defined(MODULE_NAME_IS_skins) */
/*****************************************************************************
* Prototypes
*****************************************************************************/
+wxArrayString SeparateEntries( wxString );
+wxWindow *VideoWindow( intf_thread_t *p_intf, wxWindow *p_parent );
+wxWindow *BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent );
+wxWindow *CreateDialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent );
+
+namespace wxvlc
+{
+class Interface;
+class OpenDialog;
+class SoutDialog;
+class SubsFileDialog;
+class Playlist;
+class Messages;
+class FileInfo;
+class StreamDialog;
+class WizardDialog;
+class ItemInfoDialog;
+class NewGroup;
+class ExportPlaylist;
/*****************************************************************************
* Classes declarations.
*****************************************************************************/
-class Interface;
-
/* Timer */
class Timer: public wxTimer
{
Interface *p_main_interface;
int i_old_playing_status;
int i_old_rate;
+ vlc_bool_t b_old_seekable;
};
/* Main Interface */
Interface( intf_thread_t *p_intf );
virtual ~Interface();
void TogglePlayButton( int i_playing_status );
+ void Update();
wxBoxSizer *frame_sizer;
wxStatusBar *statusbar;
wxSlider *slider;
wxWindow *slider_frame;
- wxStaticBox *slider_box;
+ wxWindow *extra_frame;
+
+ vlc_bool_t b_extra;
+
+ wxStaticBox *adjust_box;
+ wxButton *restoredefaults_button;
+ wxSlider *brightness_slider;
+ wxSlider *contrast_slider;
+ wxSlider *saturation_slider;
+ wxSlider *hue_slider;
+ wxSlider *gamma_slider;
+
+ wxStaticBox *other_box;
+ wxComboBox *ratio_combo;
wxGauge *volctrl;
private:
+ void SetupHotkeys();
void CreateOurMenuBar();
void CreateOurToolBar();
+ void CreateOurExtendedPanel();
void CreateOurSlider();
void Open( int i_access_method );
void OnExit( wxCommandEvent& event );
void OnAbout( wxCommandEvent& event );
+ void OnOpenFileSimple( wxCommandEvent& event );
+ void OnOpenFile( wxCommandEvent& event );
+ void OnOpenDisc( wxCommandEvent& event );
+ void OnOpenNet( wxCommandEvent& event );
+ void OnOpenSat( wxCommandEvent& event );
+ void OnExtended( wxCommandEvent& event );
+ void OnBookmarks( wxCommandEvent& event );
void OnShowDialog( wxCommandEvent& event );
-
void OnPlayStream( wxCommandEvent& event );
void OnStopStream( wxCommandEvent& event );
void OnSliderUpdate( wxScrollEvent& event );
void OnSlowStream( wxCommandEvent& event );
void OnFastStream( wxCommandEvent& event );
+ void OnEnableAdjust( wxCommandEvent& event );
+ void OnRestoreDefaults( wxCommandEvent& event);
+ void OnAdjustUpdate( wxScrollEvent& event );
+
+ void OnRatio( wxCommandEvent& event );
+ void OnEnableVisual( wxCommandEvent& event );
+
void OnMenuOpen( wxMenuEvent& event );
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
#endif
void OnContextMenu(wxMouseEvent& event);
+ void OnControlEvent( wxCommandEvent& event );
+
DECLARE_EVENT_TABLE();
Timer *timer;
int i_old_playing_status;
/* For auto-generated menus */
+ wxMenu *p_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;
-};
-
-/* Dialogs Provider */
-class DialogsProvider: public wxFrame
-{
-public:
- /* Constructor */
- DialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent );
- virtual ~DialogsProvider();
-
-private:
- void Open( int i_access_method, int i_arg );
-
- /* Event handlers (these functions should _not_ be virtual) */
- void OnExit( wxCommandEvent& event );
- void OnPlaylist( wxCommandEvent& event );
- void OnMessages( wxCommandEvent& event );
- void OnFileInfo( wxCommandEvent& event );
- void OnPreferences( wxCommandEvent& event );
-
- void OnOpenFileGeneric( wxCommandEvent& event );
- void OnOpenFileSimple( wxCommandEvent& event );
- void OnOpenFile( wxCommandEvent& event );
- void OnOpenDisc( wxCommandEvent& event );
- void OnOpenNet( wxCommandEvent& event );
- void OnOpenSat( wxCommandEvent& event );
-
- void OnPopupMenu( wxCommandEvent& event );
-
- void OnIdle( wxIdleEvent& event );
-
- void OnExitThread( wxCommandEvent& event );
-
- DECLARE_EVENT_TABLE();
-
- intf_thread_t *p_intf;
-
-public:
- /* Secondary windows */
- OpenDialog *p_open_dialog;
- wxFileDialog *p_file_dialog;
- Playlist *p_playlist_dialog;
- Messages *p_messages_dialog;
- FileInfo *p_fileinfo_dialog;
- wxFrame *p_prefs_dialog;
- wxFileDialog *p_file_generic_dialog;
};
/* Open Dialog */
-class SoutDialog;
-class SubsFileDialog;
-class OpenDialog: public wxFrame
+WX_DEFINE_ARRAY(AutoBuiltPanel *, ArrayOfAutoBuiltPanel);
+class OpenDialog: public wxDialog
{
public:
/* Constructor */
OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
- int i_access_method, int i_arg = 0 );
+ int i_access_method, int i_arg = 0 );
+
+ /* Extended Contructor */
+ OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
+ int i_access_method, int i_arg = 0 , int _i_method = 0 );
virtual ~OpenDialog();
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 );
- void UpdateMRL( int i_access_method );
- wxArrayString SeparateEntries( wxString );
+ ArrayOfAutoBuiltPanel input_tab_array;
/* Event handlers (these functions should _not_ be virtual) */
void OnOk( wxCommandEvent& event );
/* 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 );
void OnSoutEnable( wxCommandEvent& event );
void OnSoutSettings( wxCommandEvent& WXUNUSED(event) );
- /* Event handlers for the demux dump */
- void OnDemuxDumpEnable( wxCommandEvent& event );
- void OnDemuxDumpBrowse( wxCommandEvent& event );
- void OnDemuxDumpChange( wxCommandEvent& event );
-
DECLARE_EVENT_TABLE();
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;
wxSpinCtrl *disc_title;
wxSpinCtrl *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;
wxPanel *net_subpanels[4];
wxRadioButton *net_radios[4];
wxSpinCtrl *net_ports[4];
+ int i_net_ports[4];
wxTextCtrl *net_addrs[4];
+ wxCheckBox *net_ipv6;
/* Controls for the subtitles file */
wxButton *subsfile_button;
wxCheckBox *subsfile_checkbox;
SubsFileDialog *subsfile_dialog;
+ wxArrayString subsfile_mrl;
/* Controls for the stream output */
wxButton *sout_button;
wxCheckBox *sout_checkbox;
SoutDialog *sout_dialog;
+ wxArrayString sout_mrl;
+};
- /* Controls for the demux dump */
- wxTextCtrl *demuxdump_textctrl;
- wxButton *demuxdump_button;
- wxCheckBox *demuxdump_checkbox;
- wxFileDialog *demuxdump_dialog;
+enum
+{
+ FILE_ACCESS = 0,
+ DISC_ACCESS,
+ NET_ACCESS,
+
+ /* Auto-built panels */
+ CAPTURE_ACCESS
};
+#define MAX_ACCESS CAPTURE_ACCESS
/* Stream output Dialog */
+enum
+{
+ PLAY_ACCESS_OUT = 0,
+ FILE_ACCESS_OUT,
+ HTTP_ACCESS_OUT,
+ MMSH_ACCESS_OUT,
+ UDP_ACCESS_OUT,
+ RTP_ACCESS_OUT,
+ ACCESS_OUT_NUM
+};
+
+enum
+{
+ TS_ENCAPSULATION = 0,
+ PS_ENCAPSULATION,
+ MPEG1_ENCAPSULATION,
+ OGG_ENCAPSULATION,
+ RAW_ENCAPSULATION,
+ ASF_ENCAPSULATION,
+ AVI_ENCAPSULATION,
+ MP4_ENCAPSULATION,
+ MOV_ENCAPSULATION,
+ ENCAPS_NUM
+};
+
+enum
+{
+ ANN_MISC_SOUT = 0,
+ MISC_SOUT_NUM
+};
+
class SoutDialog: public wxDialog
{
public:
SoutDialog( intf_thread_t *p_intf, wxWindow *p_parent );
virtual ~SoutDialog();
- wxString mrl;
+ wxArrayString GetOptions();
private:
void UpdateMRL();
/* Event handlers for the file access output */
void OnFileChange( wxCommandEvent& event );
void OnFileBrowse( wxCommandEvent& event );
+ void OnFileDump( wxCommandEvent& event );
/* Event handlers for the net access output */
void OnNetChange( wxCommandEvent& event );
- /* Event specific to the sap address */
- void OnSAPAddrChange( wxCommandEvent& event );
-
+ /* Event specific to the announce address */
+ void OnAnnounceAddrChange( wxCommandEvent& event );
+
/* Event handlers for the encapsulation panel */
void OnEncapsulationChange( wxCommandEvent& event );
/* Event handlers for the misc panel */
void OnSAPMiscChange( wxCommandEvent& event );
+ void OnSLPMiscChange( wxCommandEvent& event );
DECLARE_EVENT_TABLE();
wxComboBox *mrl_combo;
/* Controls for the access outputs */
- wxPanel *access_subpanels[5];
- wxCheckBox *access_checkboxes[5];
+ wxPanel *access_panel;
+ wxPanel *access_subpanels[ACCESS_OUT_NUM];
+ wxCheckBox *access_checkboxes[ACCESS_OUT_NUM];
int i_access_type;
wxComboBox *file_combo;
- wxSpinCtrl *net_ports[5];
- wxTextCtrl *net_addrs[5];
+ wxCheckBox *dump_checkbox;
+ wxSpinCtrl *net_ports[ACCESS_OUT_NUM];
+ wxTextCtrl *net_addrs[ACCESS_OUT_NUM];
/* Controls for the SAP announces */
- wxPanel *misc_subpanels[1];
+ wxPanel *misc_panel;
+ wxPanel *misc_subpanels[MISC_SOUT_NUM];
wxCheckBox *sap_checkbox;
- wxTextCtrl *sap_addr;
-
+ wxCheckBox *slp_checkbox;
+ wxTextCtrl *announce_addr;
+
/* Controls for the encapsulation */
- wxRadioButton *encapsulation_radios[5];
+ wxPanel *encapsulation_panel;
+ wxRadioButton *encapsulation_radios[ENCAPS_NUM];
int i_encapsulation_type;
/* Controls for transcoding */
+ wxPanel *transcoding_panel;
wxCheckBox *video_transc_checkbox;
wxComboBox *video_codec_combo;
wxComboBox *audio_codec_combo;
wxComboBox *video_bitrate_combo;
wxComboBox *audio_bitrate_combo;
wxComboBox *audio_channels_combo;
+ wxComboBox *video_scale_combo;
};
/* Subtitles File Dialog */
virtual ~SubsFileDialog();
wxComboBox *file_combo;
+ wxComboBox *encoding_combo;
wxSpinCtrl *delay_spinctrl;
wxSpinCtrl *fps_spinctrl;
wxWindow *p_parent;
};
+/* Stream */
+class StreamDialog: public wxFrame
+{
+public:
+ /* Constructor */
+ StreamDialog( intf_thread_t *p_intf, wxWindow *p_parent );
+ virtual ~StreamDialog();
+
+private:
+ void OnClose( wxCommandEvent& event );
+ void OnOpen( wxCommandEvent& event );
+ void OnSout( wxCommandEvent& event );
+ void OnStart( wxCommandEvent& event );
+
+ DECLARE_EVENT_TABLE();
+
+ intf_thread_t *p_intf;
+
+ wxStaticText *step2_label;
+ wxStaticText *step3_label;
+ wxButton *sout_button;
+ wxButton *start_button;
+ wxArrayString mrl;
+ wxArrayString sout_mrl;
+ OpenDialog *p_open_dialog;
+ SoutDialog *p_sout_dialog;
+};
+
+/* Wizard */
+class WizardDialog : public wxWizard
+{
+public:
+ /* Constructor */
+ WizardDialog( intf_thread_t *p_intf, wxWindow *p_parent );
+ virtual ~WizardDialog();
+ void SetTranscode( char *vcodec, int vb, char *acodec,int ab);
+ void SetMrl( const char *mrl );
+ void SetPartial( int, int );
+ void SetStream( char *method, char *address );
+ void SetTranscodeOut( char *address );
+ void SetAction( int i_action );
+ int GetAction();
+ void SetMux( char *mux );
+ void Run();
+ int i_action;
+
+private:
+ int vb,ab;
+ int i_from, i_to;
+ char *vcodec,*acodec,*method,*address,*mrl,*mux;
+ DECLARE_EVENT_TABLE();
+
+ intf_thread_t *p_intf;
+};
+
+
/* Preferences Dialog */
-class PrefsTreeCtrl;
class PrefsDialog: public wxFrame
{
public:
void OnCancel( wxCommandEvent& event );
void OnSave( wxCommandEvent& event );
void OnResetAll( wxCommandEvent& event );
+ void OnAdvanced( wxCommandEvent& event );
DECLARE_EVENT_TABLE();
/* Constructor */
Messages( intf_thread_t *p_intf, wxWindow *p_parent );
virtual ~Messages();
+ bool Show( bool show = TRUE );
void UpdateLog();
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 );
wxTextAttr *dbg_attr;
wxFileDialog *save_log_dialog;
-
+
vlc_bool_t b_verbose;
};
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 );
void OnAddMRL( wxCommandEvent& event );
void OnClose( wxCommandEvent& event );
+ void OnSearch( wxCommandEvent& event );
+ void OnEnDis( wxCommandEvent& event );
+ void OnInfos( wxCommandEvent& event );
+ void OnSearchTextChange( wxCommandEvent& event );
void OnOpen( wxCommandEvent& event );
void OnSave( wxCommandEvent& event );
+
+ void OnSort( wxCommandEvent& event );
+ void OnColSelect( wxListEvent& event );
+
+ void OnUp( wxCommandEvent& event);
+ void OnDown( wxCommandEvent& event);
+
+ void OnEnableSelection( wxCommandEvent& event );
+ void OnDisableSelection( wxCommandEvent& event );
void OnInvertSelection( wxCommandEvent& event );
void OnDeleteSelection( wxCommandEvent& event );
void OnSelectAll( wxCommandEvent& event );
+ void OnRandom( wxCommandEvent& event );
+ void OnRepeat( wxCommandEvent& event );
+ void OnLoop ( wxCommandEvent& event );
void OnActivateItem( wxListEvent& event );
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;
+
intf_thread_t *p_intf;
wxListView *listview;
+ 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;
};
+class NewGroup: public wxDialog
+{
+public:
+ /* Constructor */
+ NewGroup( intf_thread_t *p_intf, wxWindow *p_parent );
+ virtual ~NewGroup();
+
+private:
+
+ /* Event handlers (these functions should _not_ be virtual) */
+ void OnOk( wxCommandEvent& event );
+ void OnCancel( wxCommandEvent& event );
+
+ DECLARE_EVENT_TABLE();
+
+ intf_thread_t *p_intf;
+ wxTextCtrl *groupname;
+
+protected:
+ friend class Playlist;
+ friend class ItemInfoDialog;
+ char *psz_name;
+};
+
+/* ItemInfo Dialog */
+class ItemInfoDialog: public wxDialog
+{
+public:
+ /* Constructor */
+ ItemInfoDialog( intf_thread_t *p_intf, playlist_item_t *_p_item,
+ wxWindow *p_parent );
+ virtual ~ItemInfoDialog();
+
+ wxArrayString GetOptions();
+
+private:
+ wxPanel *InfoPanel( wxWindow* parent );
+ wxPanel *GroupPanel( wxWindow* parent );
+
+ /* Event handlers (these functions should _not_ be virtual) */
+ void OnOk( wxCommandEvent& event );
+ void OnCancel( wxCommandEvent& event );
+ void OnNewGroup( wxCommandEvent& event );
+
+ void UpdateInfo();
+
+ DECLARE_EVENT_TABLE();
+
+ intf_thread_t *p_intf;
+ playlist_item_t *p_item;
+ wxWindow *p_parent;
+
+ /* Controls for the iteminfo dialog box */
+ wxPanel *info_subpanel;
+ wxPanel *info_panel;
+
+ wxPanel *group_subpanel;
+ wxPanel *group_panel;
+
+ wxTextCtrl *uri_text;
+ wxTextCtrl *name_text;
+ wxTextCtrl *author_text;
+
+ wxTreeCtrl *info_tree;
+ wxTreeItemId info_root;
+
+ wxCheckBox *enabled_checkbox;
+ wxComboBox *group_combo;
+ int ids_array[100];
+};
+
+
/* File Info */
class FileInfo: public wxFrame
{
void OnClose( wxCommandEvent& event );
DECLARE_EVENT_TABLE();
-
+
intf_thread_t *p_intf;
wxTreeCtrl *fileinfo_tree;
wxTreeItemId fileinfo_root;
};
-#if !defined(__WXX11__)
+#if wxUSE_DRAG_AND_DROP
/* Drag and Drop class */
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
+} // end of wxvlc namespace
/* Menus */
-void PopupMenu( intf_thread_t *_p_intf, wxWindow *p_parent,
- const wxPoint& pos );
-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 );
+void PopupMenu( intf_thread_t *, wxWindow *, const wxPoint& );
+wxMenu *SettingsMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
+wxMenu *AudioMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
+wxMenu *VideoMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
+wxMenu *NavigMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
+namespace wxvlc
+{
class MenuEvtHandler : public wxEvtHandler
{
public:
Interface *p_main_interface;
};
-class Menu: public wxMenu
-{
-public:
- /* Constructor */
- Menu( intf_thread_t *p_intf, wxWindow *p_parent, int i_count,
- char **ppsz_names, int *pi_objects, int i_start_id );
- virtual ~Menu();
-
-private:
- /* Event handlers (these functions should _not_ be virtual) */
- void OnClose( wxCommandEvent& event );
- void OnShowDialog( wxCommandEvent& event );
- void OnEntrySelected( wxCommandEvent& event );
-
- wxMenu *Menu::CreateDummyMenu();
- void Menu::CreateMenuItem( wxMenu *, char *, vlc_object_t * );
- wxMenu *Menu::CreateChoicesMenu( char *, vlc_object_t * );
-
- DECLARE_EVENT_TABLE();
-
- intf_thread_t *p_intf;
-
- int i_item_id;
-};
+} // end of wxvlc namespace
+using namespace wxvlc;