1 /*****************************************************************************
2 * wxwindows.h: private wxWindows interface description
3 *****************************************************************************
4 * Copyright (C) 1999-2004 VideoLAN
7 * Authors: Gildas Bazin <gbazin@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 #ifdef WIN32 /* mingw32 hack */
29 /* Let vlc take care of the i18n stuff */
30 #define WXINTL_NO_GETTEXT_MACRO
32 #include <wx/wxprec.h>
35 #include <wx/listctrl.h>
36 #include <wx/textctrl.h>
37 #include <wx/notebook.h>
38 #include <wx/spinctrl.h>
40 #include <wx/treectrl.h>
43 #include <wx/checkbox.h>
44 #include <wx/wizard.h>
48 /* Hmmm, work-around for newest wxWin */
49 #ifdef wxStaticCastEvent
50 # undef wxStaticCastEvent
51 # define wxStaticCastEvent(type, val) ((type)(val))
54 DECLARE_LOCAL_EVENT_TYPE( wxEVT_DIALOG, 0 );
55 DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
57 #define SLIDER_MAX_POS 10000
59 /* wxU is used to convert ansi/utf8 strings to unicode strings (wchar_t) */
60 #if defined( ENABLE_NLS ) && defined( ENABLE_UTF8 )
62 # define wxU(utf8) wxString(utf8, wxConvUTF8)
64 # define wxU(utf8) wxString(wxConvUTF8.cMB2WC(utf8), *wxConvCurrent)
68 #else // ENABLE_NLS && ENABLE_UTF8
70 # define wxU(ansi) wxString(ansi, *wxConvCurrent)
72 # define wxU(ansi) ansi
78 /* wxL2U (locale to unicode) is used to convert ansi strings to unicode
79 * strings (wchar_t) */
81 # define wxL2U(ansi) wxString(ansi, *wxConvCurrent)
83 # define wxL2U(ansi) ansi
96 class DialogsProvider;
101 /*****************************************************************************
102 * intf_sys_t: description and status of wxwindows interface
103 *****************************************************************************/
106 /* the wx parent window */
107 wxWindow *p_wxwindow;
110 /* special actions */
111 vlc_bool_t b_playing;
112 vlc_bool_t b_intf_show; /* interface to be shown */
114 /* The input thread */
115 input_thread_t * p_input;
118 int i_slider_pos; /* slider position */
119 int i_slider_oldpos; /* previous position */
120 vlc_bool_t b_slider_free; /* slider status */
122 /* The messages window */
123 msg_subscription_t* p_sub; /* message bank subscription */
125 /* Playlist management */
126 int i_playing; /* playlist selected item */
128 /* Send an event to show a dialog */
129 void (*pf_show_dialog) ( intf_thread_t *p_intf, int i_dialog, int i_arg,
130 intf_dialog_args_t *p_arg );
133 wxMenu *p_popup_menu;
136 int i_first_hotkey_event;
140 VideoWindow *p_video_window;
141 wxBoxSizer *p_video_sizer;
144 aout_instance_t *p_aout;
147 /*****************************************************************************
149 *****************************************************************************/
150 wxArrayString SeparateEntries( wxString );
151 wxWindow *VideoWindow( intf_thread_t *p_intf, wxWindow *p_parent );
152 wxWindow *BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent );
153 wxWindow *CreateDialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent );
160 class SubsFileDialog;
166 class ItemInfoDialog;
168 class ExportPlaylist;
170 /*****************************************************************************
171 * Classes declarations.
172 *****************************************************************************/
174 class Timer: public wxTimer
178 Timer( intf_thread_t *p_intf, Interface *p_main_interface );
181 virtual void Notify();
184 intf_thread_t *p_intf;
185 Interface *p_main_interface;
187 int i_old_playing_status;
189 vlc_bool_t b_old_seekable;
190 vlc_bool_t b_disc_shown;
195 class ExtraPanel: public wxPanel
199 ExtraPanel( intf_thread_t *p_intf, wxWindow *p_parent );
200 virtual ~ExtraPanel();
202 wxStaticBox *adjust_box;
203 wxButton *restoredefaults_button;
204 wxSlider *brightness_slider;
205 wxSlider *contrast_slider;
206 wxSlider *saturation_slider;
207 wxSlider *hue_slider;
208 wxSlider *gamma_slider;
210 wxStaticBox *other_box;
211 wxComboBox *ratio_combo;
219 wxPanel *VideoPanel( wxWindow * );
220 wxPanel *EqzPanel( wxWindow * );
221 wxPanel *AudioPanel( wxWindow * );
223 wxNotebook *notebook;
225 wxCheckBox *eq_chkbox;
227 wxCheckBox *eq_2p_chkbox;
229 wxSlider *smooth_slider;
231 wxSlider *preamp_slider;
232 wxStaticText * preamp_text;
237 wxSlider *band_sliders[10];
238 wxStaticText *band_texts[10];
244 /* Event handlers (these functions should _not_ be virtual) */
246 void OnEnableAdjust( wxCommandEvent& );
247 void OnEnableEqualizer( wxCommandEvent& );
248 void OnRestoreDefaults( wxCommandEvent& );
249 void OnChangeEqualizer( wxScrollEvent& );
250 void OnAdjustUpdate( wxScrollEvent& );
251 void OnRatio( wxCommandEvent& );
252 void OnFiltersInfo( wxCommandEvent& );
253 void OnSelectFilter( wxCommandEvent& );
255 void OnEqSmooth( wxScrollEvent& );
256 void OnPreamp( wxScrollEvent& );
257 void OnEq2Pass( wxCommandEvent& );
258 void OnEqRestore( wxCommandEvent& );
260 void OnHeadphone( wxCommandEvent& );
261 void OnNormvol( wxCommandEvent& );
262 void OnNormvolSlider( wxScrollEvent& );
264 void OnIdle( wxIdleEvent& );
266 DECLARE_EVENT_TABLE();
268 intf_thread_t *p_intf;
269 vlc_bool_t b_my_update;
273 /* Extended Window */
274 class ExtraWindow: public wxFrame
278 ExtraWindow( intf_thread_t *p_intf, wxWindow *p_parent, wxPanel *panel );
279 virtual ~ExtraWindow();
285 DECLARE_EVENT_TABLE();
287 intf_thread_t *p_intf;
292 class Interface: public wxFrame
296 Interface( intf_thread_t *p_intf );
297 virtual ~Interface();
299 void TogglePlayButton( int i_playing_status );
302 wxBoxSizer *frame_sizer;
303 wxStatusBar *statusbar;
306 wxWindow *slider_frame;
307 wxBoxSizer *slider_sizer;
308 wxPanel *extra_frame;
311 wxBoxSizer *disc_sizer;
312 wxBitmapButton *disc_menu_button;
313 wxBitmapButton *disc_prev_button;
314 wxBitmapButton *disc_next_button;
316 wxFrame *extra_window;
326 void CreateOurMenuBar();
327 void CreateOurToolBar();
328 void CreateOurExtendedPanel();
329 void CreateOurSlider();
330 void Open( int i_access_method );
332 /* Event handlers (these functions should _not_ be virtual) */
333 void OnExit( wxCommandEvent& event );
334 void OnAbout( wxCommandEvent& event );
336 void OnOpenFileSimple( wxCommandEvent& event );
337 void OnOpenDir( wxCommandEvent& event );
338 void OnOpenFile( wxCommandEvent& event );
339 void OnOpenDisc( wxCommandEvent& event );
340 void OnOpenNet( wxCommandEvent& event );
341 void OnOpenSat( wxCommandEvent& event );
343 void OnExtended( wxCommandEvent& event );
344 //void OnUndock( wxCommandEvent& event );
346 void OnBookmarks( wxCommandEvent& event );
347 void OnShowDialog( wxCommandEvent& event );
348 void OnPlayStream( wxCommandEvent& event );
349 void OnStopStream( wxCommandEvent& event );
350 void OnSliderUpdate( wxScrollEvent& event );
351 void OnPrevStream( wxCommandEvent& event );
352 void OnNextStream( wxCommandEvent& event );
353 void OnSlowStream( wxCommandEvent& event );
354 void OnFastStream( wxCommandEvent& event );
356 void OnDiscMenu( wxCommandEvent& event );
357 void OnDiscPrev( wxCommandEvent& event );
358 void OnDiscNext( wxCommandEvent& event );
360 void OnMenuOpen( wxMenuEvent& event );
362 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
363 void OnContextMenu2(wxContextMenuEvent& event);
365 void OnContextMenu(wxMouseEvent& event);
367 void OnControlEvent( wxCommandEvent& event );
369 DECLARE_EVENT_TABLE();
372 intf_thread_t *p_intf;
375 int i_old_playing_status;
377 /* For auto-generated menus */
378 wxMenu *p_settings_menu;
379 wxMenu *p_audio_menu;
380 wxMenu *p_video_menu;
381 wxMenu *p_navig_menu;
385 WX_DEFINE_ARRAY(AutoBuiltPanel *, ArrayOfAutoBuiltPanel);
386 class OpenDialog: public wxDialog
390 OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
391 int i_access_method, int i_arg = 0 );
393 /* Extended Contructor */
394 OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
395 int i_access_method, int i_arg = 0 , int _i_method = 0 );
396 virtual ~OpenDialog();
399 int Show( int i_access_method, int i_arg = 0 );
402 void UpdateMRL( int i_access_method );
407 wxPanel *FilePanel( wxWindow* parent );
408 wxPanel *DiscPanel( wxWindow* parent );
409 wxPanel *NetPanel( wxWindow* parent );
411 ArrayOfAutoBuiltPanel input_tab_array;
413 /* Event handlers (these functions should _not_ be virtual) */
414 void OnOk( wxCommandEvent& event );
415 void OnCancel( wxCommandEvent& event );
417 void OnPageChange( wxNotebookEvent& event );
418 void OnMRLChange( wxCommandEvent& event );
420 /* Event handlers for the file page */
421 void OnFilePanelChange( wxCommandEvent& event );
422 void OnFileBrowse( wxCommandEvent& event );
424 /* Event handlers for the disc page */
425 void OnDiscPanelChange( wxCommandEvent& event );
426 void OnDiscTypeChange( wxCommandEvent& event );
427 void OnDiscDeviceChange( wxCommandEvent& event );
429 /* Event handlers for the net page */
430 void OnNetPanelChange( wxCommandEvent& event );
431 void OnNetTypeChange( wxCommandEvent& event );
433 /* Event handlers for the stream output */
434 void OnSubsFileEnable( wxCommandEvent& event );
435 void OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) );
437 /* Event handlers for the stream output */
438 void OnSoutEnable( wxCommandEvent& event );
439 void OnSoutSettings( wxCommandEvent& WXUNUSED(event) );
441 /* Event handlers for the caching option */
442 void OnCachingEnable( wxCommandEvent& event );
443 void OnCachingChange( wxCommandEvent& event );
445 DECLARE_EVENT_TABLE();
447 intf_thread_t *p_intf;
449 int i_current_access_method;
450 int i_disc_type_selection;
452 int i_method; /* Normal or for the stream dialog ? */
455 wxComboBox *mrl_combo;
456 wxNotebook *notebook;
458 /* Controls for the file panel */
459 wxComboBox *file_combo;
460 wxFileDialog *file_dialog;
462 /* Controls for the disc panel */
463 wxRadioBox *disc_type;
464 wxTextCtrl *disc_device;
465 wxSpinCtrl *disc_title; int i_disc_title;
466 wxSpinCtrl *disc_chapter; int i_disc_chapter;
467 wxSpinCtrl *disc_sub; int i_disc_sub;
469 /* The media equivalent name for a DVD names. For example,
470 * "Title", is "Track" for a CD-DA */
471 wxStaticText *disc_title_label;
472 wxStaticText *disc_chapter_label;
473 wxStaticText *disc_sub_label;
475 /* Indicates if the disc device control was modified */
476 bool b_disc_device_changed;
478 /* Controls for the net panel */
479 wxRadioBox *net_type;
481 wxPanel *net_subpanels[4];
482 wxRadioButton *net_radios[4];
483 wxSpinCtrl *net_ports[4];
485 wxTextCtrl *net_addrs[4];
486 wxCheckBox *net_ipv6;
488 /* Controls for the subtitles file */
489 wxButton *subsfile_button;
490 wxCheckBox *subsfile_checkbox;
491 SubsFileDialog *subsfile_dialog;
492 wxArrayString subsfile_mrl;
494 /* Controls for the stream output */
495 wxButton *sout_button;
496 wxCheckBox *sout_checkbox;
497 SoutDialog *sout_dialog;
498 wxArrayString sout_mrl;
500 /* Controls for the caching options */
501 wxCheckBox *caching_checkbox;
502 wxSpinCtrl *caching_value;
512 /* Auto-built panels */
515 #define MAX_ACCESS CAPTURE_ACCESS
517 /* Stream output Dialog */
531 TS_ENCAPSULATION = 0,
550 class SoutDialog: public wxDialog
554 SoutDialog( intf_thread_t *p_intf, wxWindow *p_parent );
555 virtual ~SoutDialog();
557 wxArrayString GetOptions();
561 wxPanel *AccessPanel( wxWindow* parent );
562 wxPanel *MiscPanel( wxWindow* parent );
563 wxPanel *EncapsulationPanel( wxWindow* parent );
564 wxPanel *TranscodingPanel( wxWindow* parent );
567 /* Event handlers (these functions should _not_ be virtual) */
568 void OnOk( wxCommandEvent& event );
569 void OnCancel( wxCommandEvent& event );
570 void OnMRLChange( wxCommandEvent& event );
571 void OnAccessTypeChange( wxCommandEvent& event );
573 /* Event handlers for the file access output */
574 void OnFileChange( wxCommandEvent& event );
575 void OnFileBrowse( wxCommandEvent& event );
576 void OnFileDump( wxCommandEvent& event );
578 /* Event handlers for the net access output */
579 void OnNetChange( wxCommandEvent& event );
581 /* Event specific to the announce address */
582 void OnAnnounceGroupChange( wxCommandEvent& event );
583 void OnAnnounceAddrChange( wxCommandEvent& event );
585 /* Event handlers for the encapsulation panel */
586 void OnEncapsulationChange( wxCommandEvent& event );
588 /* Event handlers for the transcoding panel */
589 void OnTranscodingEnable( wxCommandEvent& event );
590 void OnTranscodingChange( wxCommandEvent& event );
592 /* Event handlers for the misc panel */
593 void OnSAPMiscChange( wxCommandEvent& event );
594 void OnSLPMiscChange( wxCommandEvent& event );
596 DECLARE_EVENT_TABLE();
598 intf_thread_t *p_intf;
601 wxComboBox *mrl_combo;
603 /* Controls for the access outputs */
604 wxPanel *access_panel;
605 wxPanel *access_subpanels[ACCESS_OUT_NUM];
606 wxCheckBox *access_checkboxes[ACCESS_OUT_NUM];
610 wxComboBox *file_combo;
611 wxCheckBox *dump_checkbox;
612 wxSpinCtrl *net_ports[ACCESS_OUT_NUM];
613 wxTextCtrl *net_addrs[ACCESS_OUT_NUM];
615 /* Controls for the SAP announces */
617 wxPanel *misc_subpanels[MISC_SOUT_NUM];
618 wxCheckBox *sap_checkbox;
619 wxCheckBox *slp_checkbox;
620 wxTextCtrl *announce_group;
621 wxTextCtrl *announce_addr;
623 /* Controls for the encapsulation */
624 wxPanel *encapsulation_panel;
625 wxRadioButton *encapsulation_radios[ENCAPS_NUM];
626 int i_encapsulation_type;
628 /* Controls for transcoding */
629 wxPanel *transcoding_panel;
630 wxCheckBox *video_transc_checkbox;
631 wxComboBox *video_codec_combo;
632 wxComboBox *audio_codec_combo;
633 wxCheckBox *audio_transc_checkbox;
634 wxComboBox *video_bitrate_combo;
635 wxComboBox *audio_bitrate_combo;
636 wxComboBox *audio_channels_combo;
637 wxComboBox *video_scale_combo;
640 /* Subtitles File Dialog */
641 class SubsFileDialog: public wxDialog
645 SubsFileDialog( intf_thread_t *p_intf, wxWindow *p_parent );
646 virtual ~SubsFileDialog();
648 wxComboBox *file_combo;
649 wxComboBox *encoding_combo;
650 wxComboBox *size_combo;
651 wxComboBox *align_combo;
652 wxSpinCtrl *fps_spinctrl;
653 wxSpinCtrl *delay_spinctrl;
656 /* Event handlers (these functions should _not_ be virtual) */
657 void OnOk( wxCommandEvent& event );
658 void OnCancel( wxCommandEvent& event );
659 void OnFileBrowse( wxCommandEvent& event );
661 DECLARE_EVENT_TABLE();
663 intf_thread_t *p_intf;
668 class StreamDialog: public wxFrame
672 StreamDialog( intf_thread_t *p_intf, wxWindow *p_parent );
673 virtual ~StreamDialog();
676 void OnClose( wxCommandEvent& event );
677 void OnOpen( wxCommandEvent& event );
678 void OnSout( wxCommandEvent& event );
679 void OnStart( wxCommandEvent& event );
681 DECLARE_EVENT_TABLE();
683 intf_thread_t *p_intf;
685 wxStaticText *step2_label;
686 wxStaticText *step3_label;
687 wxButton *sout_button;
688 wxButton *start_button;
690 wxArrayString sout_mrl;
691 OpenDialog *p_open_dialog;
692 SoutDialog *p_sout_dialog;
696 class WizardDialog : public wxWizard
700 WizardDialog( intf_thread_t *p_intf, wxWindow *p_parent,char *, int, int );
701 virtual ~WizardDialog();
702 void SetTranscode( char *vcodec, int vb, char *acodec,int ab);
703 void SetMrl( const char *mrl );
704 void SetTTL( int i_ttl );
705 void SetPartial( int, int );
706 void SetStream( char *method, char *address );
707 void SetTranscodeOut( const char *address );
708 void SetAction( int i_action );
710 void SetSAP( bool b_enabled, const char *psz_name );
711 void SetMux( char *mux );
718 int i_from, i_to, i_ttl;
719 char *vcodec , *acodec , *address , *mrl , *mux ;
722 DECLARE_EVENT_TABLE();
724 intf_thread_t *p_intf;
728 /* Preferences Dialog */
729 class PrefsDialog: public wxFrame
733 PrefsDialog( intf_thread_t *p_intf, wxWindow *p_parent );
734 virtual ~PrefsDialog();
737 wxPanel *PrefsPanel( wxWindow* parent );
739 /* Event handlers (these functions should _not_ be virtual) */
740 void OnOk( wxCommandEvent& event );
741 void OnCancel( wxCommandEvent& event );
742 void OnSave( wxCommandEvent& event );
743 void OnResetAll( wxCommandEvent& event );
744 void OnAdvanced( wxCommandEvent& event );
746 DECLARE_EVENT_TABLE();
748 intf_thread_t *p_intf;
750 PrefsTreeCtrl *prefs_tree;
754 class Messages: public wxFrame
758 Messages( intf_thread_t *p_intf, wxWindow *p_parent );
760 bool Show( bool show = TRUE );
764 /* Event handlers (these functions should _not_ be virtual) */
765 void OnClose( wxCommandEvent& event );
766 void OnClear( wxCommandEvent& event );
767 void OnSaveLog( wxCommandEvent& event );
769 DECLARE_EVENT_TABLE();
771 intf_thread_t *p_intf;
772 wxTextCtrl *textctrl;
773 wxTextAttr *info_attr;
774 wxTextAttr *err_attr;
775 wxTextAttr *warn_attr;
776 wxTextAttr *dbg_attr;
778 wxFileDialog *save_log_dialog;
780 vlc_bool_t b_verbose;
784 class Playlist: public wxFrame
788 Playlist( intf_thread_t *p_intf, wxWindow *p_parent );
791 void UpdatePlaylist();
792 void ShowPlaylist( bool show );
793 void UpdateItem( int );
794 void AppendItem( wxCommandEvent& );
799 void RemoveItem( int );
800 void DeleteItem( int item );
801 void DeleteNode( playlist_item_t *node );
803 /* Event handlers (these functions should _not_ be virtual) */
806 void OnAddFile( wxCommandEvent& event );
807 void OnAddDir( wxCommandEvent& event );
808 void OnAddMRL( wxCommandEvent& event );
809 void OnClose( wxCommandEvent& event );
811 void OnEnableSelection( wxCommandEvent& event );
812 void OnDisableSelection( wxCommandEvent& event );
813 void OnInvertSelection( wxCommandEvent& event );
814 void OnDeleteSelection( wxCommandEvent& event );
815 void OnSelectAll( wxCommandEvent& event );
817 void OnOpen( wxCommandEvent& event );
818 void OnSave( wxCommandEvent& event );
821 void OnSearch( wxCommandEvent& event );
822 void OnSearchTextChange( wxCommandEvent& event );
823 wxTextCtrl *search_text;
824 wxButton *search_button;
825 wxTreeItemId search_current;
827 void OnEnDis( wxCommandEvent& event );
831 void OnSort( wxCommandEvent& event );
834 int i_duration_sorted;
837 void OnMenuEvent( wxCommandEvent& event );
838 void OnMenuOpen( wxMenuEvent& event );
844 void OnUp( wxCommandEvent& event);
845 void OnDown( wxCommandEvent& event);
847 void OnRandom( wxCommandEvent& event );
848 void OnRepeat( wxCommandEvent& event );
849 void OnLoop ( wxCommandEvent& event );
851 void OnActivateItem( wxTreeEvent& event );
852 void OnKeyDown( wxTreeEvent& event );
853 void OnNewGroup( wxCommandEvent& event );
858 wxTreeItemId i_popup_item;
859 playlist_item_t *p_popup_item;
860 playlist_item_t *p_popup_parent;
861 void OnPopup( wxContextMenuEvent& event );
862 void OnPopupPlay( wxMenuEvent& event );
863 void OnPopupPreparse( wxMenuEvent& event );
864 void OnPopupSort( wxMenuEvent& event );
865 void OnPopupDel( wxMenuEvent& event );
866 void OnPopupEna( wxMenuEvent& event );
867 void OnPopupInfo( wxMenuEvent& event );
870 void Preparse( playlist_t *p_playlist );
873 void UpdateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
874 void UpdateNodeChildren( playlist_t *, playlist_item_t*, wxTreeItemId );
875 void CreateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
876 void UpdateTreeItem( playlist_t *, wxTreeItemId );
878 /* Search (internal) */
879 int CountItems( wxTreeItemId);
880 wxTreeItemId FindItem( wxTreeItemId, playlist_item_t * );
881 wxTreeItemId FindItem( wxTreeItemId, int );
882 wxTreeItemId FindItemByName( wxTreeItemId, wxString,
883 wxTreeItemId, vlc_bool_t *);
885 wxTreeItemId saved_tree_item;
886 playlist_item_t *p_saved_item;
890 void OnPlaylistEvent( wxCommandEvent& event );
892 DECLARE_EVENT_TABLE();
896 wxStatusBar *statusbar;
897 ItemInfoDialog *iteminfo_dialog;
899 int i_update_counter;
901 intf_thread_t *p_intf;
902 wxTreeCtrl *treectrl;
904 vlc_bool_t b_changed_view;
910 /* ItemInfo Dialog */
911 class ItemInfoDialog: public wxDialog
915 ItemInfoDialog( intf_thread_t *p_intf, playlist_item_t *_p_item,
916 wxWindow *p_parent );
917 virtual ~ItemInfoDialog();
919 wxArrayString GetOptions();
922 wxPanel *InfoPanel( wxWindow* parent );
923 wxPanel *GroupPanel( wxWindow* parent );
925 /* Event handlers (these functions should _not_ be virtual) */
926 void OnOk( wxCommandEvent& event );
927 void OnCancel( wxCommandEvent& event );
931 DECLARE_EVENT_TABLE();
933 intf_thread_t *p_intf;
934 playlist_item_t *p_item;
937 /* Controls for the iteminfo dialog box */
938 wxPanel *info_subpanel;
941 wxPanel *group_subpanel;
942 wxPanel *group_panel;
944 wxTextCtrl *uri_text;
945 wxTextCtrl *name_text;
947 wxTreeCtrl *info_tree;
948 wxTreeItemId info_root;
954 class FileInfo: public wxFrame
958 FileInfo( intf_thread_t *p_intf, wxWindow *p_parent );
960 void UpdateFileInfo();
962 vlc_bool_t b_need_update;
965 void OnClose( wxCommandEvent& event );
967 DECLARE_EVENT_TABLE();
969 intf_thread_t *p_intf;
970 wxTreeCtrl *fileinfo_tree;
971 wxTreeItemId fileinfo_root;
972 wxString fileinfo_root_label;
977 #if wxUSE_DRAG_AND_DROP
978 /* Drag and Drop class */
979 class DragAndDrop: public wxFileDropTarget
982 DragAndDrop( intf_thread_t *_p_intf, vlc_bool_t b_enqueue = VLC_FALSE );
984 virtual bool OnDropFiles( wxCoord x, wxCoord y,
985 const wxArrayString& filenames );
988 intf_thread_t *p_intf;
989 vlc_bool_t b_enqueue;
992 } // end of wxvlc namespace
995 void PopupMenu( intf_thread_t *, wxWindow *, const wxPoint& );
996 wxMenu *SettingsMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
997 wxMenu *AudioMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
998 wxMenu *VideoMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
999 wxMenu *NavigMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
1003 class MenuEvtHandler : public wxEvtHandler
1006 MenuEvtHandler( intf_thread_t *p_intf, Interface *p_main_interface );
1007 virtual ~MenuEvtHandler();
1009 void OnMenuEvent( wxCommandEvent& event );
1010 void OnShowDialog( wxCommandEvent& event );
1014 DECLARE_EVENT_TABLE()
1016 intf_thread_t *p_intf;
1017 Interface *p_main_interface;
1020 } // end of wxvlc namespace
1021 using namespace wxvlc;