1 /*****************************************************************************
2 * wxwindows.h: private wxWindows interface description
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
5 * $Id: wxwindows.h,v 1.65 2003/10/14 22:41:41 gbazin Exp $
7 * Authors: Gildas Bazin <gbazin@netcourrier.com>
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>
45 DECLARE_LOCAL_EVENT_TYPE( wxEVT_DIALOG, 0 );
52 #define SLIDER_MAX_POS 10000
54 /* wxU is used to convert ansi/utf8 strings to unicode strings (wchar_t) */
55 #if defined( ENABLE_NLS ) && defined( HAVE_GETTEXT ) && \
56 defined( WIN32 ) && !defined( HAVE_INCLUDED_GETTEXT )
58 # define wxU(utf8) wxString(utf8, wxConvUTF8)
60 # define wxU(utf8) wxString(wxConvUTF8.cMB2WC(utf8), *wxConvCurrent)
64 #else // ENABLE_NLS && HAVE_GETTEXT && WIN32 && !HAVE_INCLUDED_GETTEXT
66 # define wxU(ansi) wxString(ansi, *wxConvCurrent)
68 # define wxU(ansi) ansi
76 wxArrayString SeparateEntries( wxString );
78 /*****************************************************************************
79 * intf_sys_t: description and status of wxwindows interface
80 *****************************************************************************/
83 /* the wx parent window */
90 /* The input thread */
91 input_thread_t * p_input;
94 int i_slider_pos; /* slider position */
95 int i_slider_oldpos; /* previous position */
96 vlc_bool_t b_slider_free; /* slider status */
98 /* The messages window */
99 msg_subscription_t* p_sub; /* message bank subscription */
101 /* Playlist management */
102 int i_playing; /* playlist selected item */
104 /* Send an event to show a dialog */
105 void (*pf_show_dialog) ( intf_thread_t *p_intf, int i_dialog, int i_arg,
106 intf_dialog_args_t *p_arg );
109 wxMenu *p_popup_menu;
113 /*****************************************************************************
115 *****************************************************************************/
117 /*****************************************************************************
118 * Classes declarations.
119 *****************************************************************************/
123 class Timer: public wxTimer
127 Timer( intf_thread_t *p_intf, Interface *p_main_interface );
130 virtual void Notify();
133 intf_thread_t *p_intf;
134 Interface *p_main_interface;
135 int i_old_playing_status;
140 class Interface: public wxFrame
144 Interface( intf_thread_t *p_intf );
145 virtual ~Interface();
146 void TogglePlayButton( int i_playing_status );
148 // wxFlexGridSizer *frame_sizer;
149 wxBoxSizer *frame_sizer;
150 wxStatusBar *statusbar;
153 wxWindow *slider_frame;
154 wxWindow *extra_frame;
155 wxStaticBox *slider_box;
159 wxStaticBox *adjust_box;
160 wxSlider *brightness_slider;
161 wxSlider *contrast_slider;
162 wxSlider *saturation_slider;
163 wxSlider *hue_slider;
165 wxStaticBox *other_box;
166 wxComboBox *ratio_combo;
171 void UpdateAcceleratorTable();
172 void CreateOurMenuBar();
173 void CreateOurToolBar();
174 void CreateOurExtraPanel();
175 void CreateOurSlider();
176 void Open( int i_access_method );
178 /* Event handlers (these functions should _not_ be virtual) */
179 void OnExit( wxCommandEvent& event );
180 void OnAbout( wxCommandEvent& event );
182 void OnOpenFileSimple( wxCommandEvent& event );
183 void OnOpenFile( wxCommandEvent& event );
184 void OnOpenDisc( wxCommandEvent& event );
185 void OnOpenNet( wxCommandEvent& event );
186 void OnOpenSat( wxCommandEvent& event );
187 void OnOpenV4L( wxCommandEvent& event );
188 void OnExtra( wxCommandEvent& event );
189 void OnShowDialog( wxCommandEvent& event );
190 void OnPlayStream( wxCommandEvent& event );
191 void OnStopStream( wxCommandEvent& event );
192 void OnSliderUpdate( wxScrollEvent& event );
193 void OnPrevStream( wxCommandEvent& event );
194 void OnNextStream( wxCommandEvent& event );
195 void OnSlowStream( wxCommandEvent& event );
196 void OnFastStream( wxCommandEvent& event );
198 void OnEnableAdjust( wxCommandEvent& event );
199 void OnHueUpdate( wxScrollEvent& event );
200 void OnContrastUpdate( wxScrollEvent& event );
201 void OnBrightnessUpdate( wxScrollEvent& event );
202 void OnSaturationUpdate( wxScrollEvent& event );
204 void OnRatio( wxCommandEvent& event );
206 void OnMenuOpen( wxMenuEvent& event );
208 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
209 void OnContextMenu2(wxContextMenuEvent& event);
211 void OnContextMenu(wxMouseEvent& event);
213 DECLARE_EVENT_TABLE();
216 intf_thread_t *p_intf;
219 int i_old_playing_status;
221 /* For auto-generated menus */
222 wxMenu *p_audio_menu;
223 vlc_bool_t b_audio_menu;
224 wxMenu *p_video_menu;
225 vlc_bool_t b_video_menu;
226 wxMenu *p_navig_menu;
227 vlc_bool_t b_navig_menu;
229 vlc_bool_t b_misc_menu;
232 /* Dialogs Provider */
233 class DialogsProvider: public wxFrame
237 DialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent );
238 virtual ~DialogsProvider();
241 void Open( int i_access_method, int i_arg );
243 /* Event handlers (these functions should _not_ be virtual) */
244 void OnExit( wxCommandEvent& event );
245 void OnPlaylist( wxCommandEvent& event );
246 void OnMessages( wxCommandEvent& event );
247 void OnFileInfo( wxCommandEvent& event );
248 void OnPreferences( wxCommandEvent& event );
250 void OnOpenFileGeneric( wxCommandEvent& event );
251 void OnOpenFileSimple( wxCommandEvent& event );
252 void OnOpenFile( wxCommandEvent& event );
253 void OnOpenDisc( wxCommandEvent& event );
254 void OnOpenNet( wxCommandEvent& event );
255 void OnOpenSat( wxCommandEvent& event );
257 void OnPopupMenu( wxCommandEvent& event );
259 void OnIdle( wxIdleEvent& event );
261 void OnExitThread( wxCommandEvent& event );
263 DECLARE_EVENT_TABLE();
265 intf_thread_t *p_intf;
268 /* Secondary windows */
269 OpenDialog *p_open_dialog;
270 wxFileDialog *p_file_dialog;
271 Playlist *p_playlist_dialog;
272 Messages *p_messages_dialog;
273 FileInfo *p_fileinfo_dialog;
274 wxFrame *p_prefs_dialog;
275 wxFileDialog *p_file_generic_dialog;
281 class SubsFileDialog;
282 class OpenDialog: public wxFrame
286 OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
287 int i_access_method, int i_arg = 0 );
288 virtual ~OpenDialog();
291 int Show( int i_access_method, int i_arg = 0 );
296 wxPanel *FilePanel( wxWindow* parent );
297 wxPanel *DiscPanel( wxWindow* parent );
298 wxPanel *NetPanel( wxWindow* parent );
299 wxPanel *SatPanel( wxWindow* parent );
300 wxPanel *V4LPanel( wxWindow* parent );
302 void UpdateMRL( int i_access_method );
304 /* Event handlers (these functions should _not_ be virtual) */
305 void OnOk( wxCommandEvent& event );
306 void OnCancel( wxCommandEvent& event );
308 void OnPageChange( wxNotebookEvent& event );
309 void OnMRLChange( wxCommandEvent& event );
311 /* Event handlers for the file page */
312 void OnFilePanelChange( wxCommandEvent& event );
313 void OnFileBrowse( wxCommandEvent& event );
315 /* Event handlers for the disc page */
316 void OnDiscPanelChange( wxCommandEvent& event );
317 void OnDiscTypeChange( wxCommandEvent& event );
319 /* Event handlers for the net page */
320 void OnNetPanelChange( wxCommandEvent& event );
321 void OnNetTypeChange( wxCommandEvent& event );
323 /* Event handlers for the v4l page */
324 void OnV4LPanelChange( wxCommandEvent& event );
325 void OnV4LTypeChange( wxCommandEvent& event );
326 void OnV4LSettingsChange( wxCommandEvent& event );
328 /* Event handlers for the stream output */
329 void OnSubsFileEnable( wxCommandEvent& event );
330 void OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) );
332 /* Event handlers for the stream output */
333 void OnSoutEnable( wxCommandEvent& event );
334 void OnSoutSettings( wxCommandEvent& WXUNUSED(event) );
336 /* Event handlers for the demux dump */
337 void OnDemuxDumpEnable( wxCommandEvent& event );
338 void OnDemuxDumpBrowse( wxCommandEvent& event );
339 void OnDemuxDumpChange( wxCommandEvent& event );
341 DECLARE_EVENT_TABLE();
343 intf_thread_t *p_intf;
345 int i_current_access_method;
347 wxComboBox *mrl_combo;
348 wxNotebook *notebook;
350 /* Controls for the file panel */
351 wxComboBox *file_combo;
352 wxFileDialog *file_dialog;
354 /* Controls for the disc panel */
355 wxRadioBox *disc_type;
356 wxTextCtrl *disc_device;
357 wxSpinCtrl *disc_title;
359 wxSpinCtrl *disc_chapter;
362 /* Controls for the net panel */
363 wxRadioBox *net_type;
365 wxPanel *net_subpanels[4];
366 wxRadioButton *net_radios[4];
367 wxSpinCtrl *net_ports[4];
369 wxTextCtrl *net_addrs[4];
371 /* Controls for the v4l panel */
372 wxRadioBox *video_type;
373 wxTextCtrl *video_device;
374 wxSpinCtrl *video_channel;
375 wxButton *v4l_button;
376 V4LDialog *v4l_dialog;
377 wxArrayString v4l_mrl;
379 /* Controls for the subtitles file */
380 wxButton *subsfile_button;
381 wxCheckBox *subsfile_checkbox;
382 SubsFileDialog *subsfile_dialog;
383 wxArrayString subsfile_mrl;
385 /* Controls for the stream output */
386 wxButton *sout_button;
387 wxCheckBox *sout_checkbox;
388 SoutDialog *sout_dialog;
389 wxArrayString sout_mrl;
391 /* Controls for the demux dump */
392 wxTextCtrl *demuxdump_textctrl;
393 wxButton *demuxdump_button;
394 wxCheckBox *demuxdump_checkbox;
395 wxFileDialog *demuxdump_dialog;
409 class V4LDialog: public wxDialog
413 V4LDialog( intf_thread_t *p_intf, wxWindow *p_parent );
414 virtual ~V4LDialog();
416 wxArrayString GetOptions();
420 wxPanel *AudioPanel( wxWindow* parent );
421 wxPanel *CommonPanel( wxWindow* parent );
422 wxPanel *BitratePanel( wxWindow* parent );
425 /* Event handlers (these functions should _not_ be virtual) */
426 void OnOk( wxCommandEvent& event );
427 void OnCancel( wxCommandEvent& event );
428 void OnMRLChange( wxCommandEvent& event );
429 void OnAudioEnable( wxCommandEvent& event );
430 void OnAudioChannel( wxCommandEvent& event );
431 void OnSizeEnable( wxCommandEvent& event );
432 void OnSize( wxCommandEvent& event );
433 void OnNormEnable( wxCommandEvent& event );
434 void OnNorm( wxCommandEvent& event );
435 void OnFrequencyEnable( wxCommandEvent& event );
436 void OnFrequency( wxCommandEvent& event );
437 void OnBitrateEnable( wxCommandEvent& event );
438 void OnBitrate( wxCommandEvent& event );
439 void OnMaxBitrateEnable( wxCommandEvent& event );
440 void OnMaxBitrate( wxCommandEvent& event );
442 DECLARE_EVENT_TABLE();
444 intf_thread_t *p_intf;
447 wxComboBox *mrl_combo;
451 /* Controls for the v4l advanced options */
452 wxPanel *common_subpanel;
453 wxPanel *common_panel;
454 wxCheckBox *size_checkbox;
455 wxComboBox *size_combo;
456 wxCheckBox *norm_checkbox;
457 wxComboBox *norm_combo;
458 wxCheckBox *frequency_checkbox;
459 wxSpinCtrl *frequency;
461 wxPanel *audio_subpanel;
462 wxPanel *audio_panel;
463 wxCheckBox *audio_checkbox;
464 wxTextCtrl *audio_device;
465 wxSpinCtrl *audio_channel;
467 wxPanel *bitrate_subpanel;
468 wxPanel *bitrate_panel;
469 wxCheckBox *bitrate_checkbox;
471 wxCheckBox *maxbitrate_checkbox;
472 wxSpinCtrl *maxbitrate;
476 /* Stream output Dialog */
490 TS_ENCAPSULATION = 0,
507 class SoutDialog: public wxDialog
511 SoutDialog( intf_thread_t *p_intf, wxWindow *p_parent );
512 virtual ~SoutDialog();
514 wxArrayString GetOptions();
518 wxPanel *AccessPanel( wxWindow* parent );
519 wxPanel *MiscPanel( wxWindow* parent );
520 wxPanel *EncapsulationPanel( wxWindow* parent );
521 wxPanel *TranscodingPanel( wxWindow* parent );
524 /* Event handlers (these functions should _not_ be virtual) */
525 void OnOk( wxCommandEvent& event );
526 void OnCancel( wxCommandEvent& event );
527 void OnMRLChange( wxCommandEvent& event );
528 void OnAccessTypeChange( wxCommandEvent& event );
530 /* Event handlers for the file access output */
531 void OnFileChange( wxCommandEvent& event );
532 void OnFileBrowse( wxCommandEvent& event );
534 /* Event handlers for the net access output */
535 void OnNetChange( wxCommandEvent& event );
537 /* Event specific to the announce address */
538 void OnAnnounceAddrChange( wxCommandEvent& event );
540 /* Event handlers for the encapsulation panel */
541 void OnEncapsulationChange( wxCommandEvent& event );
543 /* Event handlers for the transcoding panel */
544 void OnTranscodingEnable( wxCommandEvent& event );
545 void OnTranscodingChange( wxCommandEvent& event );
547 /* Event handlers for the misc panel */
548 void OnSAPMiscChange( wxCommandEvent& event );
549 void OnSLPMiscChange( wxCommandEvent& event );
551 DECLARE_EVENT_TABLE();
553 intf_thread_t *p_intf;
556 wxComboBox *mrl_combo;
558 /* Controls for the access outputs */
559 wxPanel *access_subpanels[ACCESS_OUT_NUM];
560 wxCheckBox *access_checkboxes[ACCESS_OUT_NUM];
564 wxComboBox *file_combo;
565 wxSpinCtrl *net_ports[ACCESS_OUT_NUM];
566 wxTextCtrl *net_addrs[ACCESS_OUT_NUM];
568 /* Controls for the SAP announces */
569 wxPanel *misc_subpanels[MISC_SOUT_NUM];
570 wxCheckBox *sap_checkbox;
571 wxCheckBox *slp_checkbox;
572 wxTextCtrl *announce_addr;
574 /* Controls for the encapsulation */
575 wxRadioButton *encapsulation_radios[ENCAPS_NUM];
576 int i_encapsulation_type;
578 /* Controls for transcoding */
579 wxCheckBox *video_transc_checkbox;
580 wxComboBox *video_codec_combo;
581 wxComboBox *audio_codec_combo;
582 wxCheckBox *audio_transc_checkbox;
583 wxComboBox *video_bitrate_combo;
584 wxComboBox *audio_bitrate_combo;
585 wxComboBox *audio_channels_combo;
588 /* Subtitles File Dialog */
589 class SubsFileDialog: public wxDialog
593 SubsFileDialog( intf_thread_t *p_intf, wxWindow *p_parent );
594 virtual ~SubsFileDialog();
596 wxComboBox *file_combo;
597 wxComboBox *encoding_combo;
598 wxSpinCtrl *delay_spinctrl;
599 wxSpinCtrl *fps_spinctrl;
602 /* Event handlers (these functions should _not_ be virtual) */
603 void OnOk( wxCommandEvent& event );
604 void OnCancel( wxCommandEvent& event );
605 void OnFileBrowse( wxCommandEvent& event );
607 DECLARE_EVENT_TABLE();
609 intf_thread_t *p_intf;
613 /* Preferences Dialog */
615 class PrefsDialog: public wxFrame
619 PrefsDialog( intf_thread_t *p_intf, wxWindow *p_parent );
620 virtual ~PrefsDialog();
623 wxPanel *PrefsPanel( wxWindow* parent );
625 /* Event handlers (these functions should _not_ be virtual) */
626 void OnOk( wxCommandEvent& event );
627 void OnCancel( wxCommandEvent& event );
628 void OnSave( wxCommandEvent& event );
629 void OnResetAll( wxCommandEvent& event );
630 void OnAdvanced( wxCommandEvent& event );
632 DECLARE_EVENT_TABLE();
634 intf_thread_t *p_intf;
636 PrefsTreeCtrl *prefs_tree;
640 class Messages: public wxFrame
644 Messages( intf_thread_t *p_intf, wxWindow *p_parent );
646 bool Show( bool show = TRUE );
650 /* Event handlers (these functions should _not_ be virtual) */
651 void OnClose( wxCommandEvent& event );
652 void OnClear( wxCommandEvent& event );
653 void OnSaveLog( wxCommandEvent& event );
655 DECLARE_EVENT_TABLE();
657 intf_thread_t *p_intf;
658 wxTextCtrl *textctrl;
659 wxTextAttr *info_attr;
660 wxTextAttr *err_attr;
661 wxTextAttr *warn_attr;
662 wxTextAttr *dbg_attr;
664 wxFileDialog *save_log_dialog;
666 vlc_bool_t b_verbose;
670 class ItemInfoDialog;
671 class Playlist: public wxFrame
675 Playlist( intf_thread_t *p_intf, wxWindow *p_parent );
678 void UpdatePlaylist();
679 void ShowPlaylist( bool show );
685 void DeleteItem( int item );
687 /* Event handlers (these functions should _not_ be virtual) */
688 void OnAddFile( wxCommandEvent& event );
689 void OnAddMRL( wxCommandEvent& event );
690 void OnSort( wxCommandEvent& event );
691 void OnRSort( wxCommandEvent& event );
692 void OnClose( wxCommandEvent& event );
693 void OnSearch( wxCommandEvent& event );
694 void OnEnDis( wxCommandEvent& event );
695 void OnInfos( wxCommandEvent& event );
696 void OnSearchTextChange( wxCommandEvent& event );
697 void OnOpen( wxCommandEvent& event );
698 void OnSave( wxCommandEvent& event );
699 void OnEnableSelection( wxCommandEvent& event );
700 void OnDisableSelection( wxCommandEvent& event );
701 void OnInvertSelection( wxCommandEvent& event );
702 void OnDeleteSelection( wxCommandEvent& event );
703 void OnSelectAll( wxCommandEvent& event );
704 void OnRandom( wxCommandEvent& event );
705 void OnRepeat( wxCommandEvent& event );
706 void OnLoop ( wxCommandEvent& event );
707 void OnActivateItem( wxListEvent& event );
708 void OnKeyDown( wxListEvent& event );
711 wxTextCtrl *search_text;
712 wxButton *search_button;
713 DECLARE_EVENT_TABLE();
716 ItemInfoDialog *iteminfo_dialog;
718 intf_thread_t *p_intf;
719 wxListView *listview;
720 int i_update_counter;
724 /* ItemInfo Dialog */
725 class ItemInfoDialog: public wxDialog
729 ItemInfoDialog( intf_thread_t *p_intf, playlist_item_t *_p_item,
730 wxWindow *p_parent );
731 virtual ~ItemInfoDialog();
733 wxArrayString GetOptions();
736 wxPanel *InfoPanel( wxWindow* parent );
737 wxPanel *GroupPanel( wxWindow* parent );
739 /* Event handlers (these functions should _not_ be virtual) */
740 void OnOk( wxCommandEvent& event );
741 void OnCancel( wxCommandEvent& event );
743 DECLARE_EVENT_TABLE();
745 intf_thread_t *p_intf;
746 playlist_item_t *p_item;
749 /* Controls for the iteminfo dialog box */
750 wxPanel *info_subpanel;
753 wxPanel *group_subpanel;
754 wxPanel *group_panel;
756 wxTextCtrl *uri_text;
757 wxTextCtrl *name_text;
758 wxTextCtrl *author_text;
760 wxCheckBox *enabled_checkbox;
761 wxSpinCtrl *group_spin;
766 class FileInfo: public wxFrame
770 FileInfo( intf_thread_t *p_intf, wxWindow *p_parent );
772 void UpdateFileInfo();
775 void OnClose( wxCommandEvent& event );
777 DECLARE_EVENT_TABLE();
779 intf_thread_t *p_intf;
780 wxTreeCtrl *fileinfo_tree;
781 wxTreeItemId fileinfo_root;
782 wxString fileinfo_root_label;
786 #if !defined(__WXX11__)
787 /* Drag and Drop class */
788 class DragAndDrop: public wxFileDropTarget
791 DragAndDrop( intf_thread_t *_p_intf );
793 virtual bool OnDropFiles( wxCoord x, wxCoord y,
794 const wxArrayString& filenames );
797 intf_thread_t *p_intf;
802 void PopupMenu( intf_thread_t *_p_intf, wxWindow *p_parent,
803 const wxPoint& pos );
804 wxMenu *AudioMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
805 wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
806 wxMenu *NavigMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
807 wxMenu *MiscMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
809 class MenuEvtHandler : public wxEvtHandler
812 MenuEvtHandler( intf_thread_t *p_intf, Interface *p_main_interface );
813 virtual ~MenuEvtHandler();
815 void OnMenuEvent( wxCommandEvent& event );
816 void OnShowDialog( wxCommandEvent& event );
820 DECLARE_EVENT_TABLE()
822 intf_thread_t *p_intf;
823 Interface *p_main_interface;
826 class Menu: public wxMenu
830 Menu( intf_thread_t *p_intf, wxWindow *p_parent, int i_count,
831 char **ppsz_names, int *pi_objects, int i_start_id );
835 /* Event handlers (these functions should _not_ be virtual) */
836 void OnClose( wxCommandEvent& event );
837 void OnShowDialog( wxCommandEvent& event );
838 void OnEntrySelected( wxCommandEvent& event );
840 wxMenu *Menu::CreateDummyMenu();
841 void Menu::CreateMenuItem( wxMenu *, char *, vlc_object_t * );
842 wxMenu *Menu::CreateChoicesMenu( char *, vlc_object_t * );
844 DECLARE_EVENT_TABLE();
846 intf_thread_t *p_intf;
851 static inline int ConvertHotkeyModifiers( int i_hotkey )
853 int i_accel_flags = 0;
854 if( i_hotkey & KEY_MODIFIER_ALT ) i_accel_flags |= wxACCEL_ALT;
855 if( i_hotkey & KEY_MODIFIER_CTRL ) i_accel_flags |= wxACCEL_CTRL;
856 if( i_hotkey & KEY_MODIFIER_SHIFT ) i_accel_flags |= wxACCEL_SHIFT;
857 return i_accel_flags;
860 static inline int ConvertHotkey( int i_hotkey )
862 int i_key = i_hotkey & ~KEY_MODIFIER;
863 if( i_key & KEY_ASCII ) return i_key & KEY_ASCII;
864 else if( i_key & KEY_SPECIAL )
868 case KEY_LEFT: return WXK_LEFT;
869 case KEY_RIGHT: return WXK_RIGHT;
870 case KEY_UP: return WXK_UP;
871 case KEY_DOWN: return WXK_DOWN;
872 case KEY_SPACE: return WXK_SPACE;
873 case KEY_ENTER: return WXK_RETURN;
874 case KEY_F1: return WXK_F1;
875 case KEY_F2: return WXK_F2;
876 case KEY_F3: return WXK_F3;
877 case KEY_F4: return WXK_F4;
878 case KEY_F5: return WXK_F5;
879 case KEY_F6: return WXK_F6;
880 case KEY_F7: return WXK_F7;
881 case KEY_F8: return WXK_F8;
882 case KEY_F9: return WXK_F9;
883 case KEY_F10: return WXK_F10;
884 case KEY_F11: return WXK_F11;
885 case KEY_F12: return WXK_F12;
886 case KEY_HOME: return WXK_HOME;
887 case KEY_END: return WXK_HOME;
888 case KEY_MENU: return WXK_MENU;
889 case KEY_ESC: return WXK_ESCAPE;
890 case KEY_PAGEUP: return WXK_PRIOR;
891 case KEY_PAGEDOWN: return WXK_NEXT;
892 case KEY_TAB: return WXK_TAB;
893 case KEY_BACKSPACE: return WXK_BACK;