#include <wx/wizard.h>
#include "vlc_keys.h"
+
/* Hmmm, work-around for newest wxWin */
#ifdef wxStaticCastEvent
# undef wxStaticCastEvent
/* special actions */
vlc_bool_t b_playing;
+ vlc_bool_t b_intf_show; /* interface to be shown */
/* The input thread */
input_thread_t * p_input;
private:
intf_thread_t *p_intf;
Interface *p_main_interface;
+ vlc_bool_t b_init;
int i_old_playing_status;
int i_old_rate;
vlc_bool_t b_old_seekable;
+ vlc_bool_t b_disc_shown;
};
/* Constructor */
Interface( intf_thread_t *p_intf );
virtual ~Interface();
+ void Init();
void TogglePlayButton( int i_playing_status );
void Update();
wxSlider *slider;
wxWindow *slider_frame;
+ wxBoxSizer *slider_sizer;
wxPanel *extra_frame;
+ wxPanel *disc_frame;
+ wxBoxSizer *disc_sizer;
+ wxBitmapButton *disc_menu_button;
+ wxBitmapButton *disc_prev_button;
+ wxBitmapButton *disc_next_button;
+
wxFrame *extra_window;
vlc_bool_t b_extra;
void OnAbout( wxCommandEvent& event );
void OnOpenFileSimple( wxCommandEvent& event );
+ void OnOpenDir( wxCommandEvent& event );
void OnOpenFile( wxCommandEvent& event );
void OnOpenDisc( wxCommandEvent& event );
void OnOpenNet( wxCommandEvent& event );
void OnSlowStream( wxCommandEvent& event );
void OnFastStream( wxCommandEvent& event );
+ void OnDiscMenu( wxCommandEvent& event );
+ void OnDiscPrev( wxCommandEvent& event );
+ void OnDiscNext( wxCommandEvent& event );
+
void OnMenuOpen( wxMenuEvent& event );
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
void OnSoutEnable( wxCommandEvent& event );
void OnSoutSettings( wxCommandEvent& WXUNUSED(event) );
+ /* Event handlers for the caching option */
+ void OnCachingEnable( wxCommandEvent& event );
+ void OnCachingChange( wxCommandEvent& event );
+
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
wxCheckBox *sout_checkbox;
SoutDialog *sout_dialog;
wxArrayString sout_mrl;
+
+ /* Controls for the caching options */
+ wxCheckBox *caching_checkbox;
+ wxSpinCtrl *caching_value;
+ int i_caching;
};
enum
PS_ENCAPSULATION,
MPEG1_ENCAPSULATION,
OGG_ENCAPSULATION,
- RAW_ENCAPSULATION,
ASF_ENCAPSULATION,
- AVI_ENCAPSULATION,
MP4_ENCAPSULATION,
MOV_ENCAPSULATION,
+ WAV_ENCAPSULATION,
+ RAW_ENCAPSULATION,
+ AVI_ENCAPSULATION,
ENCAPS_NUM
};
void OnNetChange( wxCommandEvent& event );
/* Event specific to the announce address */
+ void OnAnnounceGroupChange( wxCommandEvent& event );
void OnAnnounceAddrChange( wxCommandEvent& event );
-
+
/* Event handlers for the encapsulation panel */
void OnEncapsulationChange( wxCommandEvent& event );
wxPanel *misc_subpanels[MISC_SOUT_NUM];
wxCheckBox *sap_checkbox;
wxCheckBox *slp_checkbox;
+ wxTextCtrl *announce_group;
wxTextCtrl *announce_addr;
/* Controls for the encapsulation */
wxComboBox *file_combo;
wxComboBox *encoding_combo;
- wxSpinCtrl *delay_spinctrl;
+ wxComboBox *size_combo;
+ wxComboBox *align_combo;
wxSpinCtrl *fps_spinctrl;
+ wxSpinCtrl *delay_spinctrl;
private:
/* Event handlers (these functions should _not_ be virtual) */
void UpdatePlaylist();
void ShowPlaylist( bool show );
void UpdateItem( int );
+ void AppendItem( wxCommandEvent& );
bool b_need_update;
private:
+ void RemoveItem( int );
void DeleteItem( int item );
- void ShowInfos( int item );
+ void DeleteNode( playlist_item_t *node );
/* Event handlers (these functions should _not_ be virtual) */
- void OnSize( wxSizeEvent &event );
-
+ /* Menu Handlers */
void OnAddFile( wxCommandEvent& event );
+ void OnAddDir( 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 OnEnableSelection( wxCommandEvent& event );
+ void OnDisableSelection( wxCommandEvent& event );
+ void OnInvertSelection( wxCommandEvent& event );
+ void OnDeleteSelection( wxCommandEvent& event );
+ void OnSelectAll( wxCommandEvent& event );
+
void OnOpen( wxCommandEvent& event );
void OnSave( wxCommandEvent& event );
+ /* Search (user) */
+ void OnSearch( wxCommandEvent& event );
+ void OnSearchTextChange( wxCommandEvent& event );
+ wxTextCtrl *search_text;
+ wxButton *search_button;
+ wxTreeItemId search_current;
+
+ void OnEnDis( wxCommandEvent& event );
+
+ /* Sort */
+ int i_sort_mode;
void OnSort( wxCommandEvent& event );
- void OnColSelect( wxListEvent& event );
+ int i_title_sorted;
+ int i_group_sorted;
+ int i_duration_sorted;
+
+ /* Dynamic menus */
+ void OnMenuEvent( wxCommandEvent& event );
+ void OnMenuOpen( wxMenuEvent& event );
+ wxMenu *p_view_menu;
+ wxMenu *p_sd_menu;
+ wxMenu *ViewMenu();
+ wxMenu *SDMenu();
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 OnActivateItem( wxTreeEvent& event );
+ void OnKeyDown( wxTreeEvent& event );
void OnNewGroup( wxCommandEvent& event );
- /* Popup functions */
- void OnPopup( wxListEvent& event );
+ /* Popup */
+ wxMenu *item_popup;
+ wxMenu *node_popup;
+ wxTreeItemId i_popup_item;
+ playlist_item_t *p_popup_item;
+ playlist_item_t *p_popup_parent;
+ void OnPopup( wxContextMenuEvent& event );
void OnPopupPlay( wxMenuEvent& event );
+ void OnPopupPreparse( wxMenuEvent& event );
+ void OnPopupSort( wxMenuEvent& event );
void OnPopupDel( wxMenuEvent& event );
void OnPopupEna( wxMenuEvent& event );
void OnPopupInfo( wxMenuEvent& event );
void Rebuild();
+ void Preparse( playlist_t *p_playlist );
+
+ /* Update */
+ void UpdateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
+ void UpdateNodeChildren( playlist_t *, playlist_item_t*, wxTreeItemId );
+ void CreateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
+ void UpdateTreeItem( playlist_t *, wxTreeItemId );
+ void SetCurrentItem( wxTreeItemId );
+
+ /* Search (internal) */
+ int CountItems( wxTreeItemId);
+ wxTreeItemId FindItem( wxTreeItemId, playlist_item_t * );
+ wxTreeItemId FindItem( wxTreeItemId, int );
+ wxTreeItemId FindItemByName( wxTreeItemId, wxString,
+ wxTreeItemId, vlc_bool_t *);
+
/* Custom events */
void OnPlaylistEvent( wxCommandEvent& event );
- wxTextCtrl *search_text;
- wxButton *search_button;
DECLARE_EVENT_TABLE();
- wxMenu *popup_menu;
+ /* Global widgets */
+ wxStatusBar *statusbar;
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;
+ wxTreeCtrl *treectrl;
+ int i_current_view;
+ vlc_bool_t b_changed_view;
+ char **pp_sds;
+
-protected:
- friend class Playlist;
- friend class ItemInfoDialog;
- char *psz_name;
};
/* ItemInfo Dialog */
/* Event handlers (these functions should _not_ be virtual) */
void OnOk( wxCommandEvent& event );
void OnCancel( wxCommandEvent& event );
- void OnNewGroup( wxCommandEvent& event );
void UpdateInfo();
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];
};
virtual ~FileInfo();
void UpdateFileInfo();
+ vlc_bool_t b_need_update;
+
private:
void OnClose( wxCommandEvent& event );
wxTreeItemId fileinfo_root;
wxString fileinfo_root_label;
+
};
#if wxUSE_DRAG_AND_DROP