1 /*****************************************************************************
2 * wxwindows.h: private wxWindows interface description
3 *****************************************************************************
4 * Copyright (C) 1999-2005 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>
45 #include <wx/taskbar.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, wxConvLocal)
72 # define wxU(ansi) (ansi)
78 /* wxL2U (locale to unicode) is used to convert ansi strings to unicode
79 * strings (wchar_t) */
80 #define wxL2U(ansi) wxU(ansi)
92 class DialogsProvider;
96 #ifdef wxHAS_TASK_BAR_ICON
100 /*****************************************************************************
101 * intf_sys_t: description and status of wxwindows interface
102 *****************************************************************************/
105 /* the wx parent window */
106 wxWindow *p_wxwindow;
109 /* special actions */
110 vlc_bool_t b_playing;
111 vlc_bool_t b_intf_show; /* interface to be shown */
113 /* The input thread */
114 input_thread_t * p_input;
117 int i_slider_pos; /* slider position */
118 int i_slider_oldpos; /* previous position */
119 vlc_bool_t b_slider_free; /* slider status */
121 /* The messages window */
122 msg_subscription_t* p_sub; /* message bank subscription */
124 /* Playlist management */
125 int i_playing; /* playlist selected item */
127 /* Send an event to show a dialog */
128 void (*pf_show_dialog) ( intf_thread_t *p_intf, int i_dialog, int i_arg,
129 intf_dialog_args_t *p_arg );
132 wxMenu *p_popup_menu;
135 int i_first_hotkey_event;
139 VideoWindow *p_video_window;
140 wxBoxSizer *p_video_sizer;
143 aout_instance_t *p_aout;
146 /*****************************************************************************
148 *****************************************************************************/
149 wxArrayString SeparateEntries( wxString );
150 wxWindow *CreateVideoWindow( intf_thread_t *p_intf, wxWindow *p_parent );
151 wxWindow *BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent );
152 wxWindow *CreateDialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent );
159 class SubsFileDialog;
165 class ItemInfoDialog;
167 class ExportPlaylist;
169 /*****************************************************************************
170 * Classes declarations.
171 *****************************************************************************/
173 class Timer: public wxTimer
177 Timer( intf_thread_t *p_intf, Interface *p_main_interface );
180 virtual void Notify();
183 intf_thread_t *p_intf;
184 Interface *p_main_interface;
186 int i_old_playing_status;
188 vlc_bool_t b_old_seekable;
189 vlc_bool_t b_disc_shown;
194 class ExtraPanel: public wxPanel
198 ExtraPanel( intf_thread_t *p_intf, wxWindow *p_parent );
199 virtual ~ExtraPanel();
201 wxStaticBox *adjust_box;
202 wxButton *restoredefaults_button;
203 wxSlider *brightness_slider;
204 wxSlider *contrast_slider;
205 wxSlider *saturation_slider;
206 wxSlider *hue_slider;
207 wxSlider *gamma_slider;
209 wxStaticBox *other_box;
210 wxComboBox *ratio_combo;
218 wxPanel *VideoPanel( wxWindow * );
219 wxPanel *EqzPanel( wxWindow * );
220 wxPanel *AudioPanel( wxWindow * );
222 wxNotebook *notebook;
224 wxCheckBox *eq_chkbox;
226 wxCheckBox *eq_2p_chkbox;
228 wxSlider *smooth_slider;
230 wxSlider *preamp_slider;
231 wxStaticText * preamp_text;
236 wxSlider *band_sliders[10];
237 wxStaticText *band_texts[10];
243 /* Event handlers (these functions should _not_ be virtual) */
245 void OnEnableAdjust( wxCommandEvent& );
246 void OnEnableEqualizer( wxCommandEvent& );
247 void OnRestoreDefaults( wxCommandEvent& );
248 void OnChangeEqualizer( wxScrollEvent& );
249 void OnAdjustUpdate( wxScrollEvent& );
250 void OnRatio( wxCommandEvent& );
251 void OnFiltersInfo( wxCommandEvent& );
252 void OnSelectFilter( wxCommandEvent& );
254 void OnEqSmooth( wxScrollEvent& );
255 void OnPreamp( wxScrollEvent& );
256 void OnEq2Pass( wxCommandEvent& );
257 void OnEqRestore( wxCommandEvent& );
259 void OnHeadphone( wxCommandEvent& );
260 void OnNormvol( wxCommandEvent& );
261 void OnNormvolSlider( wxScrollEvent& );
263 void OnIdle( wxIdleEvent& );
265 DECLARE_EVENT_TABLE();
267 intf_thread_t *p_intf;
268 vlc_bool_t b_my_update;
272 /* Extended Window */
273 class ExtraWindow: public wxFrame
277 ExtraWindow( intf_thread_t *p_intf, wxWindow *p_parent, wxPanel *panel );
278 virtual ~ExtraWindow();
284 DECLARE_EVENT_TABLE();
286 intf_thread_t *p_intf;
291 class Interface: public wxFrame
295 Interface( intf_thread_t *p_intf, long style = wxDEFAULT_FRAME_STYLE );
296 virtual ~Interface();
298 void TogglePlayButton( int i_playing_status );
305 wxBoxSizer *frame_sizer;
306 wxStatusBar *statusbar;
309 wxWindow *slider_frame;
310 wxBoxSizer *slider_sizer;
311 wxPanel *extra_frame;
314 wxBoxSizer *disc_sizer;
315 wxBitmapButton *disc_menu_button;
316 wxBitmapButton *disc_prev_button;
317 wxBitmapButton *disc_next_button;
319 wxFrame *extra_window;
325 #ifdef wxHAS_TASK_BAR_ICON
331 void CreateOurMenuBar();
332 void CreateOurToolBar();
333 void CreateOurExtendedPanel();
334 void CreateOurSlider();
335 void Open( int i_access_method );
337 /* Event handlers (these functions should _not_ be virtual) */
338 void OnExit( wxCommandEvent& event );
339 void OnAbout( wxCommandEvent& event );
341 void OnOpenFileSimple( wxCommandEvent& event );
342 void OnOpenDir( wxCommandEvent& event );
343 void OnOpenFile( wxCommandEvent& event );
344 void OnOpenDisc( wxCommandEvent& event );
345 void OnOpenNet( wxCommandEvent& event );
346 void OnOpenSat( wxCommandEvent& event );
348 void OnExtended( wxCommandEvent& event );
349 //void OnUndock( wxCommandEvent& event );
351 void OnBookmarks( wxCommandEvent& event );
352 void OnShowDialog( wxCommandEvent& event );
353 void OnPlayStream( wxCommandEvent& event );
354 void OnStopStream( wxCommandEvent& event );
355 void OnSliderUpdate( wxScrollEvent& event );
356 void OnPrevStream( wxCommandEvent& event );
357 void OnNextStream( wxCommandEvent& event );
358 void OnSlowStream( wxCommandEvent& event );
359 void OnFastStream( wxCommandEvent& event );
361 void OnDiscMenu( wxCommandEvent& event );
362 void OnDiscPrev( wxCommandEvent& event );
363 void OnDiscNext( wxCommandEvent& event );
365 void OnMenuOpen( wxMenuEvent& event );
367 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
368 void OnContextMenu2(wxContextMenuEvent& event);
370 void OnContextMenu(wxMouseEvent& event);
372 void OnControlEvent( wxCommandEvent& event );
374 DECLARE_EVENT_TABLE();
377 intf_thread_t *p_intf;
380 int i_old_playing_status;
382 /* For auto-generated menus */
383 wxMenu *p_settings_menu;
384 wxMenu *p_audio_menu;
385 wxMenu *p_video_menu;
386 wxMenu *p_navig_menu;
390 WX_DEFINE_ARRAY(AutoBuiltPanel *, ArrayOfAutoBuiltPanel);
391 class OpenDialog: public wxDialog
395 OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
396 int i_access_method, int i_arg = 0 );
398 /* Extended Contructor */
399 OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
400 int i_access_method, int i_arg = 0 , int _i_method = 0 );
401 virtual ~OpenDialog();
404 int Show( int i_access_method, int i_arg = 0 );
407 void UpdateMRL( int i_access_method );
412 wxPanel *FilePanel( wxWindow* parent );
413 wxPanel *DiscPanel( wxWindow* parent );
414 wxPanel *NetPanel( wxWindow* parent );
416 ArrayOfAutoBuiltPanel input_tab_array;
418 /* Event handlers (these functions should _not_ be virtual) */
419 void OnOk( wxCommandEvent& event );
420 void OnCancel( wxCommandEvent& event );
422 void OnPageChange( wxNotebookEvent& event );
423 void OnMRLChange( wxCommandEvent& event );
425 /* Event handlers for the file page */
426 void OnFilePanelChange( wxCommandEvent& event );
427 void OnFileBrowse( wxCommandEvent& event );
429 /* Event handlers for the disc page */
430 void OnDiscPanelChange( wxCommandEvent& event );
431 void OnDiscTypeChange( wxCommandEvent& event );
432 void OnDiscDeviceChange( wxCommandEvent& event );
434 /* Event handlers for the net page */
435 void OnNetPanelChange( wxCommandEvent& event );
436 void OnNetTypeChange( wxCommandEvent& event );
438 /* Event handlers for the stream output */
439 void OnSubsFileEnable( wxCommandEvent& event );
440 void OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) );
442 /* Event handlers for the stream output */
443 void OnSoutEnable( wxCommandEvent& event );
444 void OnSoutSettings( wxCommandEvent& WXUNUSED(event) );
446 /* Event handlers for the caching option */
447 void OnCachingEnable( wxCommandEvent& event );
448 void OnCachingChange( wxCommandEvent& event );
450 DECLARE_EVENT_TABLE();
452 intf_thread_t *p_intf;
454 int i_current_access_method;
455 int i_disc_type_selection;
457 int i_method; /* Normal or for the stream dialog ? */
460 wxComboBox *mrl_combo;
461 wxNotebook *notebook;
463 /* Controls for the file panel */
464 wxComboBox *file_combo;
465 wxFileDialog *file_dialog;
467 /* Controls for the disc panel */
468 wxRadioBox *disc_type;
469 wxTextCtrl *disc_device;
470 wxSpinCtrl *disc_title; int i_disc_title;
471 wxSpinCtrl *disc_chapter; int i_disc_chapter;
472 wxSpinCtrl *disc_sub; int i_disc_sub;
474 /* The media equivalent name for a DVD names. For example,
475 * "Title", is "Track" for a CD-DA */
476 wxStaticText *disc_title_label;
477 wxStaticText *disc_chapter_label;
478 wxStaticText *disc_sub_label;
480 /* Indicates if the disc device control was modified */
481 bool b_disc_device_changed;
483 /* Controls for the net panel */
484 wxRadioBox *net_type;
486 wxPanel *net_subpanels[4];
487 wxRadioButton *net_radios[4];
488 wxSpinCtrl *net_ports[4];
490 wxTextCtrl *net_addrs[4];
491 wxCheckBox *net_ipv6;
493 /* Controls for the subtitles file */
494 wxButton *subsfile_button;
495 wxCheckBox *subsfile_checkbox;
496 SubsFileDialog *subsfile_dialog;
497 wxArrayString subsfile_mrl;
499 /* Controls for the stream output */
500 wxButton *sout_button;
501 wxCheckBox *sout_checkbox;
502 SoutDialog *sout_dialog;
503 wxArrayString sout_mrl;
505 /* Controls for the caching options */
506 wxCheckBox *caching_checkbox;
507 wxSpinCtrl *caching_value;
517 /* Auto-built panels */
520 #define MAX_ACCESS CAPTURE_ACCESS
522 /* Stream output Dialog */
535 TS_ENCAPSULATION = 0,
554 class SoutDialog: public wxDialog
558 SoutDialog( intf_thread_t *p_intf, wxWindow *p_parent );
559 virtual ~SoutDialog();
561 wxArrayString GetOptions();
565 wxPanel *AccessPanel( wxWindow* parent );
566 wxPanel *MiscPanel( wxWindow* parent );
567 wxPanel *EncapsulationPanel( wxWindow* parent );
568 wxPanel *TranscodingPanel( wxWindow* parent );
571 /* Event handlers (these functions should _not_ be virtual) */
572 void OnOk( wxCommandEvent& event );
573 void OnCancel( wxCommandEvent& event );
574 void OnMRLChange( wxCommandEvent& event );
575 void OnAccessTypeChange( wxCommandEvent& event );
577 /* Event handlers for the file access output */
578 void OnFileChange( wxCommandEvent& event );
579 void OnFileBrowse( wxCommandEvent& event );
580 void OnFileDump( wxCommandEvent& event );
582 /* Event handlers for the net access output */
583 void OnNetChange( wxCommandEvent& event );
585 /* Event specific to the announce address */
586 void OnAnnounceGroupChange( wxCommandEvent& event );
587 void OnAnnounceAddrChange( wxCommandEvent& event );
589 /* Event handlers for the encapsulation panel */
590 void OnEncapsulationChange( wxCommandEvent& event );
592 /* Event handlers for the transcoding panel */
593 void OnTranscodingEnable( wxCommandEvent& event );
594 void OnTranscodingChange( wxCommandEvent& event );
596 /* Event handlers for the misc panel */
597 void OnSAPMiscChange( wxCommandEvent& event );
598 void OnSLPMiscChange( wxCommandEvent& event );
600 DECLARE_EVENT_TABLE();
602 intf_thread_t *p_intf;
605 wxComboBox *mrl_combo;
607 /* Controls for the access outputs */
608 wxPanel *access_panel;
609 wxPanel *access_subpanels[ACCESS_OUT_NUM];
610 wxCheckBox *access_checkboxes[ACCESS_OUT_NUM];
614 wxComboBox *file_combo;
615 wxCheckBox *dump_checkbox;
616 wxSpinCtrl *net_ports[ACCESS_OUT_NUM];
617 wxTextCtrl *net_addrs[ACCESS_OUT_NUM];
619 /* Controls for the SAP announces */
621 wxPanel *misc_subpanels[MISC_SOUT_NUM];
622 wxCheckBox *sap_checkbox;
623 wxCheckBox *slp_checkbox;
624 wxTextCtrl *announce_group;
625 wxTextCtrl *announce_addr;
627 /* Controls for the encapsulation */
628 wxPanel *encapsulation_panel;
629 wxRadioButton *encapsulation_radios[ENCAPS_NUM];
630 int i_encapsulation_type;
632 /* Controls for transcoding */
633 wxPanel *transcoding_panel;
634 wxCheckBox *video_transc_checkbox;
635 wxComboBox *video_codec_combo;
636 wxComboBox *audio_codec_combo;
637 wxCheckBox *audio_transc_checkbox;
638 wxComboBox *video_bitrate_combo;
639 wxComboBox *audio_bitrate_combo;
640 wxComboBox *audio_channels_combo;
641 wxComboBox *video_scale_combo;
644 wxCheckBox *sout_all_checkbox;
647 /* Subtitles File Dialog */
648 class SubsFileDialog: public wxDialog
652 SubsFileDialog( intf_thread_t *p_intf, wxWindow *p_parent );
653 virtual ~SubsFileDialog();
655 wxComboBox *file_combo;
656 wxComboBox *encoding_combo;
657 wxComboBox *size_combo;
658 wxComboBox *align_combo;
659 wxSpinCtrl *fps_spinctrl;
660 wxSpinCtrl *delay_spinctrl;
663 /* Event handlers (these functions should _not_ be virtual) */
664 void OnOk( wxCommandEvent& event );
665 void OnCancel( wxCommandEvent& event );
666 void OnFileBrowse( wxCommandEvent& event );
668 DECLARE_EVENT_TABLE();
670 intf_thread_t *p_intf;
675 class StreamDialog: public wxFrame
679 StreamDialog( intf_thread_t *p_intf, wxWindow *p_parent );
680 virtual ~StreamDialog();
683 void OnClose( wxCommandEvent& event );
684 void OnOpen( wxCommandEvent& event );
685 void OnSout( wxCommandEvent& event );
686 void OnStart( wxCommandEvent& event );
688 DECLARE_EVENT_TABLE();
690 intf_thread_t *p_intf;
692 wxStaticText *step2_label;
693 wxStaticText *step3_label;
694 wxButton *sout_button;
695 wxButton *start_button;
697 wxArrayString sout_mrl;
698 OpenDialog *p_open_dialog;
699 SoutDialog *p_sout_dialog;
703 class WizardDialog : public wxWizard
707 WizardDialog( intf_thread_t *p_intf, wxWindow *p_parent,char *, int, int );
708 virtual ~WizardDialog();
709 void SetTranscode( char *vcodec, int vb, char *acodec,int ab);
710 void SetMrl( const char *mrl );
711 void SetTTL( int i_ttl );
712 void SetPartial( int, int );
713 void SetStream( char *method, char *address );
714 void SetTranscodeOut( const char *address );
715 void SetAction( int i_action );
717 void SetSAP( bool b_enabled, const char *psz_name );
718 void SetMux( char *mux );
725 int i_from, i_to, i_ttl;
726 char *vcodec , *acodec , *address , *mrl , *mux ;
729 DECLARE_EVENT_TABLE();
731 intf_thread_t *p_intf;
735 /* Preferences Dialog */
736 class PrefsDialog: public wxFrame
740 PrefsDialog( intf_thread_t *p_intf, wxWindow *p_parent );
741 virtual ~PrefsDialog();
744 wxPanel *PrefsPanel( wxWindow* parent );
746 /* Event handlers (these functions should _not_ be virtual) */
747 void OnOk( wxCommandEvent& event );
748 void OnCancel( wxCommandEvent& event );
749 void OnSave( wxCommandEvent& event );
750 void OnResetAll( wxCommandEvent& event );
751 void OnAdvanced( wxCommandEvent& event );
753 DECLARE_EVENT_TABLE();
755 intf_thread_t *p_intf;
757 PrefsTreeCtrl *prefs_tree;
761 class Messages: public wxFrame
765 Messages( intf_thread_t *p_intf, wxWindow *p_parent );
767 bool Show( bool show = TRUE );
771 /* Event handlers (these functions should _not_ be virtual) */
772 void OnClose( wxCommandEvent& event );
773 void OnClear( wxCommandEvent& event );
774 void OnSaveLog( wxCommandEvent& event );
776 DECLARE_EVENT_TABLE();
778 intf_thread_t *p_intf;
779 wxTextCtrl *textctrl;
780 wxTextAttr *info_attr;
781 wxTextAttr *err_attr;
782 wxTextAttr *warn_attr;
783 wxTextAttr *dbg_attr;
785 wxFileDialog *save_log_dialog;
787 vlc_bool_t b_verbose;
791 class Playlist: public wxFrame
795 Playlist( intf_thread_t *p_intf, wxWindow *p_parent );
798 void UpdatePlaylist();
799 void ShowPlaylist( bool show );
800 void UpdateItem( int );
801 void AppendItem( wxCommandEvent& );
806 void RemoveItem( int );
807 void DeleteItem( int item );
808 void DeleteNode( playlist_item_t *node );
810 /* Event handlers (these functions should _not_ be virtual) */
813 void OnAddFile( wxCommandEvent& event );
814 void OnAddDir( wxCommandEvent& event );
815 void OnAddMRL( wxCommandEvent& event );
816 void OnClose( wxCommandEvent& event );
818 void OnEnableSelection( wxCommandEvent& event );
819 void OnDisableSelection( wxCommandEvent& event );
820 void OnInvertSelection( wxCommandEvent& event );
821 void OnDeleteSelection( wxCommandEvent& event );
822 void OnSelectAll( wxCommandEvent& event );
824 void OnOpen( wxCommandEvent& event );
825 void OnSave( wxCommandEvent& event );
828 void OnSearch( wxCommandEvent& event );
829 void OnSearchTextChange( wxCommandEvent& event );
830 wxTextCtrl *search_text;
831 wxButton *search_button;
832 wxTreeItemId search_current;
834 void OnEnDis( wxCommandEvent& event );
838 void OnSort( wxCommandEvent& event );
841 int i_duration_sorted;
844 void OnMenuEvent( wxCommandEvent& event );
845 void OnMenuOpen( wxMenuEvent& event );
851 void OnUp( wxCommandEvent& event);
852 void OnDown( wxCommandEvent& event);
854 void OnRandom( wxCommandEvent& event );
855 void OnRepeat( wxCommandEvent& event );
856 void OnLoop ( wxCommandEvent& event );
858 void OnActivateItem( wxTreeEvent& event );
859 void OnKeyDown( wxTreeEvent& event );
860 void OnNewGroup( wxCommandEvent& event );
865 wxTreeItemId i_popup_item;
866 playlist_item_t *p_popup_item;
867 playlist_item_t *p_popup_parent;
868 void OnPopup( wxContextMenuEvent& event );
869 void OnPopupPlay( wxMenuEvent& event );
870 void OnPopupPreparse( wxMenuEvent& event );
871 void OnPopupSort( wxMenuEvent& event );
872 void OnPopupDel( wxMenuEvent& event );
873 void OnPopupEna( wxMenuEvent& event );
874 void OnPopupInfo( wxMenuEvent& event );
875 void Rebuild( vlc_bool_t );
877 void Preparse( playlist_t *p_playlist );
880 void UpdateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
881 void UpdateNodeChildren( playlist_t *, playlist_item_t*, wxTreeItemId );
882 void CreateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
883 void UpdateTreeItem( playlist_t *, wxTreeItemId );
885 /* Search (internal) */
886 int CountItems( wxTreeItemId);
887 wxTreeItemId FindItem( wxTreeItemId, playlist_item_t * );
888 wxTreeItemId FindItem( wxTreeItemId, int );
889 wxTreeItemId FindItemByName( wxTreeItemId, wxString,
890 wxTreeItemId, vlc_bool_t *);
892 wxTreeItemId saved_tree_item;
893 playlist_item_t *p_saved_item;
897 void OnPlaylistEvent( wxCommandEvent& event );
899 DECLARE_EVENT_TABLE();
903 wxStatusBar *statusbar;
904 ItemInfoDialog *iteminfo_dialog;
906 int i_update_counter;
908 intf_thread_t *p_intf;
909 wxTreeCtrl *treectrl;
911 vlc_bool_t b_changed_view;
917 /* ItemInfo Dialog */
918 class ItemInfoDialog: public wxDialog
922 ItemInfoDialog( intf_thread_t *p_intf, playlist_item_t *_p_item,
923 wxWindow *p_parent );
924 virtual ~ItemInfoDialog();
926 wxArrayString GetOptions();
929 wxPanel *InfoPanel( wxWindow* parent );
930 wxPanel *GroupPanel( wxWindow* parent );
932 /* Event handlers (these functions should _not_ be virtual) */
933 void OnOk( wxCommandEvent& event );
934 void OnCancel( wxCommandEvent& event );
938 DECLARE_EVENT_TABLE();
940 intf_thread_t *p_intf;
941 playlist_item_t *p_item;
944 /* Controls for the iteminfo dialog box */
945 wxPanel *info_subpanel;
948 wxPanel *group_subpanel;
949 wxPanel *group_panel;
951 wxTextCtrl *uri_text;
952 wxTextCtrl *name_text;
954 wxTreeCtrl *info_tree;
955 wxTreeItemId info_root;
961 class FileInfo: public wxFrame
965 FileInfo( intf_thread_t *p_intf, wxWindow *p_parent );
967 void UpdateFileInfo();
969 vlc_bool_t b_need_update;
972 void OnClose( wxCommandEvent& event );
974 DECLARE_EVENT_TABLE();
976 intf_thread_t *p_intf;
977 wxTreeCtrl *fileinfo_tree;
978 wxTreeItemId fileinfo_root;
979 wxString fileinfo_root_label;
983 #if wxUSE_DRAG_AND_DROP
984 /* Drag and Drop class */
985 class DragAndDrop: public wxFileDropTarget
988 DragAndDrop( intf_thread_t *_p_intf, vlc_bool_t b_enqueue = VLC_FALSE );
990 virtual bool OnDropFiles( wxCoord x, wxCoord y,
991 const wxArrayString& filenames );
994 intf_thread_t *p_intf;
995 vlc_bool_t b_enqueue;
998 } // end of wxvlc namespace
1001 void PopupMenu( intf_thread_t *, wxWindow *, const wxPoint& );
1002 wxMenu *SettingsMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
1003 wxMenu *AudioMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
1004 wxMenu *VideoMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
1005 wxMenu *NavigMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
1009 class MenuEvtHandler : public wxEvtHandler
1012 MenuEvtHandler( intf_thread_t *p_intf, Interface *p_main_interface );
1013 virtual ~MenuEvtHandler();
1015 void OnMenuEvent( wxCommandEvent& event );
1016 void OnShowDialog( wxCommandEvent& event );
1020 DECLARE_EVENT_TABLE()
1022 intf_thread_t *p_intf;
1023 Interface *p_main_interface;
1026 } // end of wxvlc namespace
1027 using namespace wxvlc;