wxwindows.h
来自「VLC媒体播放程序」· C头文件 代码 · 共 1,039 行 · 第 1/2 页
H
1,039 行
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: /* Constructor */ SoutDialog( intf_thread_t *p_intf, wxWindow *p_parent ); virtual ~SoutDialog(); wxArrayString GetOptions();private: void UpdateMRL(); wxPanel *AccessPanel( wxWindow* parent ); wxPanel *MiscPanel( wxWindow* parent ); wxPanel *EncapsulationPanel( wxWindow* parent ); wxPanel *TranscodingPanel( wxWindow* parent ); void ParseMRL(); /* Event handlers (these functions should _not_ be virtual) */ void OnOk( wxCommandEvent& event ); void OnCancel( wxCommandEvent& event ); void OnMRLChange( wxCommandEvent& event ); void OnAccessTypeChange( wxCommandEvent& event ); /* 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 announce address */ void OnAnnounceAddrChange( wxCommandEvent& event ); /* Event handlers for the encapsulation panel */ void OnEncapsulationChange( wxCommandEvent& event ); /* Event handlers for the transcoding panel */ void OnTranscodingEnable( wxCommandEvent& event ); void OnTranscodingChange( wxCommandEvent& event ); /* Event handlers for the misc panel */ void OnSAPMiscChange( wxCommandEvent& event ); void OnSLPMiscChange( wxCommandEvent& event ); DECLARE_EVENT_TABLE(); intf_thread_t *p_intf; wxWindow *p_parent; wxComboBox *mrl_combo; /* Controls for the access outputs */ wxPanel *access_panel; wxPanel *access_subpanels[ACCESS_OUT_NUM]; wxCheckBox *access_checkboxes[ACCESS_OUT_NUM]; int i_access_type; wxComboBox *file_combo; wxCheckBox *dump_checkbox; wxSpinCtrl *net_ports[ACCESS_OUT_NUM]; wxTextCtrl *net_addrs[ACCESS_OUT_NUM]; /* Controls for the SAP announces */ wxPanel *misc_panel; wxPanel *misc_subpanels[MISC_SOUT_NUM]; wxCheckBox *sap_checkbox; wxCheckBox *slp_checkbox; wxTextCtrl *announce_addr; /* Controls for the encapsulation */ 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; wxCheckBox *audio_transc_checkbox; wxComboBox *video_bitrate_combo; wxComboBox *audio_bitrate_combo; wxComboBox *audio_channels_combo; wxComboBox *video_scale_combo;};/* Subtitles File Dialog */class SubsFileDialog: public wxDialog{public: /* Constructor */ SubsFileDialog( intf_thread_t *p_intf, wxWindow *p_parent ); virtual ~SubsFileDialog(); wxComboBox *file_combo; wxComboBox *encoding_combo; wxSpinCtrl *delay_spinctrl; wxSpinCtrl *fps_spinctrl;private: /* Event handlers (these functions should _not_ be virtual) */ void OnOk( wxCommandEvent& event ); void OnCancel( wxCommandEvent& event ); void OnFileBrowse( wxCommandEvent& event ); DECLARE_EVENT_TABLE(); intf_thread_t *p_intf; 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;};/* Preferences Dialog */class PrefsTreeCtrl;class PrefsDialog: public wxFrame{public: /* Constructor */ PrefsDialog( intf_thread_t *p_intf, wxWindow *p_parent ); virtual ~PrefsDialog();private: wxPanel *PrefsPanel( wxWindow* parent ); /* Event handlers (these functions should _not_ be virtual) */ void OnOk( wxCommandEvent& event ); void OnCancel( wxCommandEvent& event ); void OnSave( wxCommandEvent& event ); void OnResetAll( wxCommandEvent& event ); void OnAdvanced( wxCommandEvent& event ); DECLARE_EVENT_TABLE(); intf_thread_t *p_intf; PrefsTreeCtrl *prefs_tree;};/* Messages */class Messages: public wxFrame{public: /* 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 OnClear( wxCommandEvent& event ); void OnSaveLog( wxCommandEvent& event ); DECLARE_EVENT_TABLE(); intf_thread_t *p_intf; wxTextCtrl *textctrl; wxTextAttr *info_attr; wxTextAttr *err_attr; wxTextAttr *warn_attr; wxTextAttr *dbg_attr; wxFileDialog *save_log_dialog; vlc_bool_t b_verbose;};/* Playlist */class ItemInfoDialog;class NewGroup;class ExportPlaylist;class Playlist: public wxFrame{public: /* Constructor */ Playlist( intf_thread_t *p_intf, wxWindow *p_parent ); virtual ~Playlist(); void UpdatePlaylist(); void ShowPlaylist( bool show ); void UpdateItem( int ); bool b_need_update;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{public: /* Constructor */ FileInfo( intf_thread_t *p_intf, wxWindow *p_parent ); virtual ~FileInfo(); void UpdateFileInfo();private: void OnClose( wxCommandEvent& event ); DECLARE_EVENT_TABLE(); intf_thread_t *p_intf; wxTreeCtrl *fileinfo_tree; wxTreeItemId fileinfo_root; wxString fileinfo_root_label;};#if !defined(__WXX11__)/* Drag and Drop class */class DragAndDrop: public wxFileDropTarget{public: 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/* Menus */void PopupMenu( intf_thread_t *_p_intf, wxWindow *p_parent, const wxPoint& pos );wxMenu *SettingsMenu( intf_thread_t *_p_intf, wxWindow *p_parent );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 );class MenuEvtHandler : public wxEvtHandler{public: MenuEvtHandler( intf_thread_t *p_intf, Interface *p_main_interface ); virtual ~MenuEvtHandler(); void OnMenuEvent( wxCommandEvent& event ); void OnShowDialog( wxCommandEvent& event );private: DECLARE_EVENT_TABLE() intf_thread_t *p_intf; 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 *, bool ); DECLARE_EVENT_TABLE(); intf_thread_t *p_intf; int i_item_id;};static inline int ConvertHotkeyModifiers( int i_hotkey ){ int i_accel_flags = 0; if( i_hotkey & KEY_MODIFIER_ALT ) i_accel_flags |= wxACCEL_ALT; if( i_hotkey & KEY_MODIFIER_CTRL ) i_accel_flags |= wxACCEL_CTRL; if( i_hotkey & KEY_MODIFIER_SHIFT ) i_accel_flags |= wxACCEL_SHIFT; return i_accel_flags;}static inline int ConvertHotkey( int i_hotkey ){ int i_key = i_hotkey & ~KEY_MODIFIER; if( i_key & KEY_ASCII ) return i_key & KEY_ASCII; else if( i_key & KEY_SPECIAL ) { switch ( i_key ) { case KEY_LEFT: return WXK_LEFT; case KEY_RIGHT: return WXK_RIGHT; case KEY_UP: return WXK_UP; case KEY_DOWN: return WXK_DOWN; case KEY_SPACE: return WXK_SPACE; case KEY_ENTER: return WXK_RETURN; case KEY_F1: return WXK_F1; case KEY_F2: return WXK_F2; case KEY_F3: return WXK_F3; case KEY_F4: return WXK_F4; case KEY_F5: return WXK_F5; case KEY_F6: return WXK_F6; case KEY_F7: return WXK_F7; case KEY_F8: return WXK_F8; case KEY_F9: return WXK_F9; case KEY_F10: return WXK_F10; case KEY_F11: return WXK_F11; case KEY_F12: return WXK_F12; case KEY_HOME: return WXK_HOME; case KEY_END: return WXK_HOME; case KEY_MENU: return WXK_MENU; case KEY_ESC: return WXK_ESCAPE; case KEY_PAGEUP: return WXK_PRIOR; case KEY_PAGEDOWN: return WXK_NEXT; case KEY_TAB: return WXK_TAB; case KEY_BACKSPACE: return WXK_BACK; } } return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?