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;
97 /*****************************************************************************
98 * intf_sys_t: description and status of wxwindows interface
99 *****************************************************************************/
102 /* the wx parent window */
103 wxWindow *p_wxwindow;
106 /* special actions */
107 vlc_bool_t b_playing;
108 vlc_bool_t b_intf_show; /* interface to be shown */
110 /* The input thread */
111 input_thread_t * p_input;
114 int i_slider_pos; /* slider position */
115 int i_slider_oldpos; /* previous position */
116 vlc_bool_t b_slider_free; /* slider status */
118 /* The messages window */
119 msg_subscription_t* p_sub; /* message bank subscription */
121 /* Playlist management */
122 int i_playing; /* playlist selected item */
124 /* Send an event to show a dialog */
125 void (*pf_show_dialog) ( intf_thread_t *p_intf, int i_dialog, int i_arg,
126 intf_dialog_args_t *p_arg );
129 wxMenu *p_popup_menu;
132 int i_first_hotkey_event;
136 VideoWindow *p_video_window;
137 wxBoxSizer *p_video_sizer;
140 aout_instance_t *p_aout;
143 /*****************************************************************************
145 *****************************************************************************/
146 wxArrayString SeparateEntries( wxString );
147 wxWindow *CreateVideoWindow( intf_thread_t *p_intf, wxWindow *p_parent );
148 wxWindow *BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent );
149 wxWindow *CreateDialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent );
156 class SubsFileDialog;
162 class ItemInfoDialog;
164 class ExportPlaylist;
166 /*****************************************************************************
167 * Classes declarations.
168 *****************************************************************************/
170 class Timer: public wxTimer
174 Timer( intf_thread_t *p_intf, Interface *p_main_interface );
177 virtual void Notify();
180 intf_thread_t *p_intf;
181 Interface *p_main_interface;
183 int i_old_playing_status;
185 vlc_bool_t b_old_seekable;
186 vlc_bool_t b_disc_shown;
191 class ExtraPanel: public wxPanel
195 ExtraPanel( intf_thread_t *p_intf, wxWindow *p_parent );
196 virtual ~ExtraPanel();
198 wxStaticBox *adjust_box;
199 wxButton *restoredefaults_button;
200 wxSlider *brightness_slider;
201 wxSlider *contrast_slider;
202 wxSlider *saturation_slider;
203 wxSlider *hue_slider;
204 wxSlider *gamma_slider;
206 wxStaticBox *other_box;
207 wxComboBox *ratio_combo;
215 wxPanel *VideoPanel( wxWindow * );
216 wxPanel *EqzPanel( wxWindow * );
217 wxPanel *AudioPanel( wxWindow * );
219 wxNotebook *notebook;
221 wxCheckBox *eq_chkbox;
223 wxCheckBox *eq_2p_chkbox;
225 wxSlider *smooth_slider;
227 wxSlider *preamp_slider;
228 wxStaticText * preamp_text;
233 wxSlider *band_sliders[10];
234 wxStaticText *band_texts[10];
240 /* Event handlers (these functions should _not_ be virtual) */
242 void OnEnableAdjust( wxCommandEvent& );
243 void OnEnableEqualizer( wxCommandEvent& );
244 void OnRestoreDefaults( wxCommandEvent& );
245 void OnChangeEqualizer( wxScrollEvent& );
246 void OnAdjustUpdate( wxScrollEvent& );
247 void OnRatio( wxCommandEvent& );
248 void OnFiltersInfo( wxCommandEvent& );
249 void OnSelectFilter( wxCommandEvent& );
251 void OnEqSmooth( wxScrollEvent& );
252 void OnPreamp( wxScrollEvent& );
253 void OnEq2Pass( wxCommandEvent& );
254 void OnEqRestore( wxCommandEvent& );
256 void OnHeadphone( wxCommandEvent& );
257 void OnNormvol( wxCommandEvent& );
258 void OnNormvolSlider( wxScrollEvent& );
260 void OnIdle( wxIdleEvent& );
262 DECLARE_EVENT_TABLE();
264 intf_thread_t *p_intf;
265 vlc_bool_t b_my_update;
269 /* Extended Window */
270 class ExtraWindow: public wxFrame
274 ExtraWindow( intf_thread_t *p_intf, wxWindow *p_parent, wxPanel *panel );
275 virtual ~ExtraWindow();
281 DECLARE_EVENT_TABLE();
283 intf_thread_t *p_intf;
287 /* Systray integration */
288 #ifdef wxHAS_TASK_BAR_ICON
289 class Systray: public wxTaskBarIcon
292 Systray( Interface* p_main_interface );
293 virtual ~Systray() {};
294 wxMenu* CreatePopupMenu();
295 void UpdateTooltip( const wxChar* tooltip );
298 void OnLeftClick( wxTaskBarIconEvent& event );
299 void OnPlayStream ( wxCommandEvent& event );
300 void OnStopStream ( wxCommandEvent& event );
301 void OnPrevStream ( wxCommandEvent& event );
302 void OnNextStream ( wxCommandEvent& event );
303 void OnExit( wxCommandEvent& event );
304 Interface* p_main_interface;
305 DECLARE_EVENT_TABLE()
310 class Interface: public wxFrame
314 Interface( intf_thread_t *p_intf, long style = wxDEFAULT_FRAME_STYLE );
315 virtual ~Interface();
317 void TogglePlayButton( int i_playing_status );
324 wxBoxSizer *frame_sizer;
325 wxStatusBar *statusbar;
328 wxWindow *slider_frame;
329 wxBoxSizer *slider_sizer;
330 wxPanel *extra_frame;
333 wxBoxSizer *disc_sizer;
334 wxBitmapButton *disc_menu_button;
335 wxBitmapButton *disc_prev_button;
336 wxBitmapButton *disc_next_button;
338 wxFrame *extra_window;
344 #ifdef wxHAS_TASK_BAR_ICON
350 void CreateOurMenuBar();
351 void CreateOurToolBar();
352 void CreateOurExtendedPanel();
353 void CreateOurSlider();
354 void Open( int i_access_method );
356 /* Event handlers (these functions should _not_ be virtual) */
357 void OnExit( wxCommandEvent& event );
358 void OnAbout( wxCommandEvent& event );
360 void OnOpenFileSimple( wxCommandEvent& event );
361 void OnOpenDir( wxCommandEvent& event );
362 void OnOpenFile( wxCommandEvent& event );
363 void OnOpenDisc( wxCommandEvent& event );
364 void OnOpenNet( wxCommandEvent& event );
365 void OnOpenSat( wxCommandEvent& event );
367 void OnExtended( wxCommandEvent& event );
368 //void OnUndock( wxCommandEvent& event );
370 void OnBookmarks( wxCommandEvent& event );
371 void OnShowDialog( wxCommandEvent& event );
372 void OnPlayStream( wxCommandEvent& event );
373 void OnStopStream( wxCommandEvent& event );
374 void OnSliderUpdate( wxScrollEvent& event );
375 void OnPrevStream( wxCommandEvent& event );
376 void OnNextStream( wxCommandEvent& event );
377 void OnSlowStream( wxCommandEvent& event );
378 void OnFastStream( wxCommandEvent& event );
379 void OnMute( wxCommandEvent& event );
381 void OnDiscMenu( wxCommandEvent& event );
382 void OnDiscPrev( wxCommandEvent& event );
383 void OnDiscNext( wxCommandEvent& event );
385 void OnMenuOpen( wxMenuEvent& event );
387 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
388 void OnContextMenu2(wxContextMenuEvent& event);
390 void OnContextMenu(wxMouseEvent& event);
392 void OnControlEvent( wxCommandEvent& event );
394 DECLARE_EVENT_TABLE();
397 intf_thread_t *p_intf;
400 int i_old_playing_status;
402 /* For auto-generated menus */
403 wxMenu *p_settings_menu;
404 wxMenu *p_audio_menu;
405 wxMenu *p_video_menu;
406 wxMenu *p_navig_menu;
410 WX_DEFINE_ARRAY(AutoBuiltPanel *, ArrayOfAutoBuiltPanel);
411 class OpenDialog: public wxDialog
415 OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
416 int i_access_method, int i_arg = 0 );
418 /* Extended Contructor */
419 OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
420 int i_access_method, int i_arg = 0 , int _i_method = 0 );
421 virtual ~OpenDialog();
424 int Show( int i_access_method, int i_arg = 0 );
427 void UpdateMRL( int i_access_method );
432 wxPanel *FilePanel( wxWindow* parent );
433 wxPanel *DiscPanel( wxWindow* parent );
434 wxPanel *NetPanel( wxWindow* parent );
436 ArrayOfAutoBuiltPanel input_tab_array;
438 /* Event handlers (these functions should _not_ be virtual) */
439 void OnOk( wxCommandEvent& event );
440 void OnCancel( wxCommandEvent& event );
442 void OnPageChange( wxNotebookEvent& event );
443 void OnMRLChange( wxCommandEvent& event );
445 /* Event handlers for the file page */
446 void OnFilePanelChange( wxCommandEvent& event );
447 void OnFileBrowse( wxCommandEvent& event );
449 /* Event handlers for the disc page */
450 void OnDiscPanelChange( wxCommandEvent& event );
451 void OnDiscTypeChange( wxCommandEvent& event );
452 void OnDiscDeviceChange( wxCommandEvent& event );
454 /* Event handlers for the net page */
455 void OnNetPanelChange( wxCommandEvent& event );
456 void OnNetTypeChange( wxCommandEvent& event );
458 /* Event handlers for the stream output */
459 void OnSubsFileEnable( wxCommandEvent& event );
460 void OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) );
462 /* Event handlers for the stream output */
463 void OnSoutEnable( wxCommandEvent& event );
464 void OnSoutSettings( wxCommandEvent& WXUNUSED(event) );
466 /* Event handlers for the caching option */
467 void OnCachingEnable( wxCommandEvent& event );
468 void OnCachingChange( wxCommandEvent& event );
470 DECLARE_EVENT_TABLE();
472 intf_thread_t *p_intf;
474 int i_current_access_method;
475 int i_disc_type_selection;
477 int i_method; /* Normal or for the stream dialog ? */
480 wxComboBox *mrl_combo;
481 wxNotebook *notebook;
483 /* Controls for the file panel */
484 wxComboBox *file_combo;
485 wxFileDialog *file_dialog;
487 /* Controls for the disc panel */
488 wxRadioBox *disc_type;
489 wxTextCtrl *disc_device;
490 wxSpinCtrl *disc_title; int i_disc_title;
491 wxSpinCtrl *disc_chapter; int i_disc_chapter;
492 wxSpinCtrl *disc_sub; int i_disc_sub;
494 /* The media equivalent name for a DVD names. For example,
495 * "Title", is "Track" for a CD-DA */
496 wxStaticText *disc_title_label;
497 wxStaticText *disc_chapter_label;
498 wxStaticText *disc_sub_label;
500 /* Indicates if the disc device control was modified */
501 bool b_disc_device_changed;
503 /* Controls for the net panel */
504 wxRadioBox *net_type;
506 wxPanel *net_subpanels[4];
507 wxRadioButton *net_radios[4];
508 wxSpinCtrl *net_ports[4];
510 wxTextCtrl *net_addrs[4];
511 wxCheckBox *net_ipv6;
513 /* Controls for the subtitles file */
514 wxButton *subsfile_button;
515 wxCheckBox *subsfile_checkbox;
516 SubsFileDialog *subsfile_dialog;
517 wxArrayString subsfile_mrl;
519 /* Controls for the stream output */
520 wxButton *sout_button;
521 wxCheckBox *sout_checkbox;
522 SoutDialog *sout_dialog;
523 wxArrayString sout_mrl;
525 /* Controls for the caching options */
526 wxCheckBox *caching_checkbox;
527 wxSpinCtrl *caching_value;
537 /* Auto-built panels */
540 #define MAX_ACCESS CAPTURE_ACCESS
542 /* Stream output Dialog */
555 TS_ENCAPSULATION = 0,
574 class SoutDialog: public wxDialog
578 SoutDialog( intf_thread_t *p_intf, wxWindow *p_parent );
579 virtual ~SoutDialog();
581 wxArrayString GetOptions();
585 wxPanel *AccessPanel( wxWindow* parent );
586 wxPanel *MiscPanel( wxWindow* parent );
587 wxPanel *EncapsulationPanel( wxWindow* parent );
588 wxPanel *TranscodingPanel( wxWindow* parent );
591 /* Event handlers (these functions should _not_ be virtual) */
592 void OnOk( wxCommandEvent& event );
593 void OnCancel( wxCommandEvent& event );
594 void OnMRLChange( wxCommandEvent& event );
595 void OnAccessTypeChange( wxCommandEvent& event );
597 /* Event handlers for the file access output */
598 void OnFileChange( wxCommandEvent& event );
599 void OnFileBrowse( wxCommandEvent& event );
600 void OnFileDump( wxCommandEvent& event );
602 /* Event handlers for the net access output */
603 void OnNetChange( wxCommandEvent& event );
605 /* Event specific to the announce address */
606 void OnAnnounceGroupChange( wxCommandEvent& event );
607 void OnAnnounceAddrChange( wxCommandEvent& event );
609 /* Event handlers for the encapsulation panel */
610 void OnEncapsulationChange( wxCommandEvent& event );
612 /* Event handlers for the transcoding panel */
613 void OnTranscodingEnable( wxCommandEvent& event );
614 void OnTranscodingChange( wxCommandEvent& event );
616 /* Event handlers for the misc panel */
617 void OnSAPMiscChange( wxCommandEvent& event );
618 void OnSLPMiscChange( wxCommandEvent& event );
620 DECLARE_EVENT_TABLE();
622 intf_thread_t *p_intf;
625 wxComboBox *mrl_combo;
627 /* Controls for the access outputs */
628 wxPanel *access_panel;
629 wxPanel *access_subpanels[ACCESS_OUT_NUM];
630 wxCheckBox *access_checkboxes[ACCESS_OUT_NUM];
634 wxComboBox *file_combo;
635 wxCheckBox *dump_checkbox;
636 wxSpinCtrl *net_ports[ACCESS_OUT_NUM];
637 wxTextCtrl *net_addrs[ACCESS_OUT_NUM];
639 /* Controls for the SAP announces */
641 wxPanel *misc_subpanels[MISC_SOUT_NUM];
642 wxCheckBox *sap_checkbox;
643 wxCheckBox *slp_checkbox;
644 wxTextCtrl *announce_group;
645 wxTextCtrl *announce_addr;
647 /* Controls for the encapsulation */
648 wxPanel *encapsulation_panel;
649 wxRadioButton *encapsulation_radios[ENCAPS_NUM];
650 int i_encapsulation_type;
652 /* Controls for transcoding */
653 wxPanel *transcoding_panel;
654 wxCheckBox *video_transc_checkbox;
655 wxComboBox *video_codec_combo;
656 wxComboBox *audio_codec_combo;
657 wxCheckBox *audio_transc_checkbox;
658 wxComboBox *video_bitrate_combo;
659 wxComboBox *audio_bitrate_combo;
660 wxComboBox *audio_channels_combo;
661 wxComboBox *video_scale_combo;
664 wxCheckBox *sout_all_checkbox;
667 /* Subtitles File Dialog */
668 class SubsFileDialog: public wxDialog
672 SubsFileDialog( intf_thread_t *p_intf, wxWindow *p_parent );
673 virtual ~SubsFileDialog();
675 wxComboBox *file_combo;
676 wxComboBox *encoding_combo;
677 wxComboBox *size_combo;
678 wxComboBox *align_combo;
679 wxSpinCtrl *fps_spinctrl;
680 wxSpinCtrl *delay_spinctrl;
683 /* Event handlers (these functions should _not_ be virtual) */
684 void OnOk( wxCommandEvent& event );
685 void OnCancel( wxCommandEvent& event );
686 void OnFileBrowse( wxCommandEvent& event );
688 DECLARE_EVENT_TABLE();
690 intf_thread_t *p_intf;
695 class StreamDialog: public wxFrame
699 StreamDialog( intf_thread_t *p_intf, wxWindow *p_parent );
700 virtual ~StreamDialog();
703 void OnClose( wxCommandEvent& event );
704 void OnOpen( wxCommandEvent& event );
705 void OnSout( wxCommandEvent& event );
706 void OnStart( wxCommandEvent& event );
708 DECLARE_EVENT_TABLE();
710 intf_thread_t *p_intf;
712 wxStaticText *step2_label;
713 wxStaticText *step3_label;
714 wxButton *sout_button;
715 wxButton *start_button;
717 wxArrayString sout_mrl;
718 OpenDialog *p_open_dialog;
719 SoutDialog *p_sout_dialog;
723 class WizardDialog : public wxWizard
727 WizardDialog( intf_thread_t *p_intf, wxWindow *p_parent,char *, int, int );
728 virtual ~WizardDialog();
729 void SetTranscode( char *vcodec, int vb, char *acodec,int ab);
730 void SetMrl( const char *mrl );
731 void SetTTL( int i_ttl );
732 void SetPartial( int, int );
733 void SetStream( char *method, char *address );
734 void SetTranscodeOut( const char *address );
735 void SetAction( int i_action );
737 void SetSAP( bool b_enabled, const char *psz_name );
738 void SetMux( char *mux );
745 int i_from, i_to, i_ttl;
746 char *vcodec , *acodec , *address , *mrl , *mux ;
749 DECLARE_EVENT_TABLE();
751 intf_thread_t *p_intf;
755 /* Preferences Dialog */
756 class PrefsDialog: public wxFrame
760 PrefsDialog( intf_thread_t *p_intf, wxWindow *p_parent );
761 virtual ~PrefsDialog();
764 wxPanel *PrefsPanel( wxWindow* parent );
766 /* Event handlers (these functions should _not_ be virtual) */
767 void OnOk( wxCommandEvent& event );
768 void OnCancel( wxCommandEvent& event );
769 void OnSave( wxCommandEvent& event );
770 void OnResetAll( wxCommandEvent& event );
771 void OnAdvanced( wxCommandEvent& event );
773 DECLARE_EVENT_TABLE();
775 intf_thread_t *p_intf;
777 PrefsTreeCtrl *prefs_tree;
781 class Messages: public wxFrame
785 Messages( intf_thread_t *p_intf, wxWindow *p_parent );
787 bool Show( bool show = TRUE );
791 /* Event handlers (these functions should _not_ be virtual) */
792 void OnClose( wxCommandEvent& event );
793 void OnClear( wxCommandEvent& event );
794 void OnSaveLog( wxCommandEvent& event );
796 DECLARE_EVENT_TABLE();
798 intf_thread_t *p_intf;
799 wxTextCtrl *textctrl;
800 wxTextAttr *info_attr;
801 wxTextAttr *err_attr;
802 wxTextAttr *warn_attr;
803 wxTextAttr *dbg_attr;
805 wxFileDialog *save_log_dialog;
807 vlc_bool_t b_verbose;
811 class Playlist: public wxFrame
815 Playlist( intf_thread_t *p_intf, wxWindow *p_parent );
818 void UpdatePlaylist();
819 void ShowPlaylist( bool show );
820 void UpdateItem( int );
821 void AppendItem( wxCommandEvent& );
826 void RemoveItem( int );
827 void DeleteItem( int item );
828 void DeleteNode( playlist_item_t *node );
830 /* Event handlers (these functions should _not_ be virtual) */
833 void OnAddFile( wxCommandEvent& event );
834 void OnAddDir( wxCommandEvent& event );
835 void OnAddMRL( wxCommandEvent& event );
836 void OnClose( wxCommandEvent& event );
838 void OnEnableSelection( wxCommandEvent& event );
839 void OnDisableSelection( wxCommandEvent& event );
840 void OnInvertSelection( wxCommandEvent& event );
841 void OnDeleteSelection( wxCommandEvent& event );
842 void OnSelectAll( wxCommandEvent& event );
844 void OnOpen( wxCommandEvent& event );
845 void OnSave( wxCommandEvent& event );
848 void OnSearch( wxCommandEvent& event );
849 void OnSearchTextChange( wxCommandEvent& event );
850 wxTextCtrl *search_text;
851 wxButton *search_button;
852 wxTreeItemId search_current;
854 void OnEnDis( wxCommandEvent& event );
858 void OnSort( wxCommandEvent& event );
861 int i_duration_sorted;
864 void OnMenuEvent( wxCommandEvent& event );
865 void OnMenuOpen( wxMenuEvent& event );
871 void OnUp( wxCommandEvent& event);
872 void OnDown( wxCommandEvent& event);
874 void OnRandom( wxCommandEvent& event );
875 void OnRepeat( wxCommandEvent& event );
876 void OnLoop ( wxCommandEvent& event );
878 void OnActivateItem( wxTreeEvent& event );
879 void OnKeyDown( wxTreeEvent& event );
880 void OnNewGroup( wxCommandEvent& event );
885 wxTreeItemId i_popup_item;
886 playlist_item_t *p_popup_item;
887 playlist_item_t *p_popup_parent;
888 void OnPopup( wxContextMenuEvent& event );
889 void OnPopupPlay( wxMenuEvent& event );
890 void OnPopupPreparse( wxMenuEvent& event );
891 void OnPopupSort( wxMenuEvent& event );
892 void OnPopupDel( wxMenuEvent& event );
893 void OnPopupEna( wxMenuEvent& event );
894 void OnPopupInfo( wxMenuEvent& event );
895 void Rebuild( vlc_bool_t );
897 void Preparse( playlist_t *p_playlist );
900 void UpdateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
901 void UpdateNodeChildren( playlist_t *, playlist_item_t*, wxTreeItemId );
902 void CreateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
903 void UpdateTreeItem( playlist_t *, wxTreeItemId );
905 /* Search (internal) */
906 int CountItems( wxTreeItemId);
907 wxTreeItemId FindItem( wxTreeItemId, playlist_item_t * );
908 wxTreeItemId FindItem( wxTreeItemId, int );
909 wxTreeItemId FindItemByName( wxTreeItemId, wxString,
910 wxTreeItemId, vlc_bool_t *);
912 wxTreeItemId saved_tree_item;
913 playlist_item_t *p_saved_item;
917 void OnPlaylistEvent( wxCommandEvent& event );
919 DECLARE_EVENT_TABLE();
923 wxStatusBar *statusbar;
924 ItemInfoDialog *iteminfo_dialog;
926 int i_update_counter;
928 intf_thread_t *p_intf;
929 wxTreeCtrl *treectrl;
931 vlc_bool_t b_changed_view;
937 /* ItemInfo Dialog */
938 class ItemInfoDialog: public wxDialog
942 ItemInfoDialog( intf_thread_t *p_intf, playlist_item_t *_p_item,
943 wxWindow *p_parent );
944 virtual ~ItemInfoDialog();
946 wxArrayString GetOptions();
949 wxPanel *InfoPanel( wxWindow* parent );
950 wxPanel *GroupPanel( wxWindow* parent );
952 /* Event handlers (these functions should _not_ be virtual) */
953 void OnOk( wxCommandEvent& event );
954 void OnCancel( wxCommandEvent& event );
958 DECLARE_EVENT_TABLE();
960 intf_thread_t *p_intf;
961 playlist_item_t *p_item;
964 /* Controls for the iteminfo dialog box */
965 wxPanel *info_subpanel;
968 wxPanel *group_subpanel;
969 wxPanel *group_panel;
971 wxTextCtrl *uri_text;
972 wxTextCtrl *name_text;
974 wxTreeCtrl *info_tree;
975 wxTreeItemId info_root;
981 class FileInfo: public wxFrame
985 FileInfo( intf_thread_t *p_intf, wxWindow *p_parent );
987 void UpdateFileInfo();
989 vlc_bool_t b_need_update;
992 void OnClose( wxCommandEvent& event );
994 DECLARE_EVENT_TABLE();
996 intf_thread_t *p_intf;
997 wxTreeCtrl *fileinfo_tree;
998 wxTreeItemId fileinfo_root;
999 wxString fileinfo_root_label;
1003 #if wxUSE_DRAG_AND_DROP
1004 /* Drag and Drop class */
1005 class DragAndDrop: public wxFileDropTarget
1008 DragAndDrop( intf_thread_t *_p_intf, vlc_bool_t b_enqueue = VLC_FALSE );
1010 virtual bool OnDropFiles( wxCoord x, wxCoord y,
1011 const wxArrayString& filenames );
1014 intf_thread_t *p_intf;
1015 vlc_bool_t b_enqueue;
1018 } // end of wxvlc namespace
1021 void PopupMenu( intf_thread_t *, wxWindow *, const wxPoint& );
1022 wxMenu *SettingsMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
1023 wxMenu *AudioMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
1024 wxMenu *VideoMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
1025 wxMenu *NavigMenu( intf_thread_t *, wxWindow *, wxMenu * = NULL );
1029 class MenuEvtHandler : public wxEvtHandler
1032 MenuEvtHandler( intf_thread_t *p_intf, Interface *p_main_interface );
1033 virtual ~MenuEvtHandler();
1035 void OnMenuEvent( wxCommandEvent& event );
1036 void OnShowDialog( wxCommandEvent& event );
1040 DECLARE_EVENT_TABLE()
1042 intf_thread_t *p_intf;
1043 Interface *p_main_interface;
1046 } // end of wxvlc namespace
1047 using namespace wxvlc;