1 /*****************************************************************************
2 * wxwindows.h: private wxWindows interface description
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
5 * $Id: wxwindows.h,v 1.64 2003/10/08 19:40:42 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;
230 /* Dialogs Provider */
231 class DialogsProvider: public wxFrame
235 DialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent );
236 virtual ~DialogsProvider();
239 void Open( int i_access_method, int i_arg );
241 /* Event handlers (these functions should _not_ be virtual) */
242 void OnExit( wxCommandEvent& event );
243 void OnPlaylist( wxCommandEvent& event );
244 void OnMessages( wxCommandEvent& event );
245 void OnFileInfo( wxCommandEvent& event );
246 void OnPreferences( wxCommandEvent& event );
248 void OnOpenFileGeneric( wxCommandEvent& event );
249 void OnOpenFileSimple( wxCommandEvent& event );
250 void OnOpenFile( wxCommandEvent& event );
251 void OnOpenDisc( wxCommandEvent& event );
252 void OnOpenNet( wxCommandEvent& event );
253 void OnOpenSat( wxCommandEvent& event );
255 void OnPopupMenu( wxCommandEvent& event );
257 void OnIdle( wxIdleEvent& event );
259 void OnExitThread( wxCommandEvent& event );
261 DECLARE_EVENT_TABLE();
263 intf_thread_t *p_intf;
266 /* Secondary windows */
267 OpenDialog *p_open_dialog;
268 wxFileDialog *p_file_dialog;
269 Playlist *p_playlist_dialog;
270 Messages *p_messages_dialog;
271 FileInfo *p_fileinfo_dialog;
272 wxFrame *p_prefs_dialog;
273 wxFileDialog *p_file_generic_dialog;
279 class SubsFileDialog;
280 class OpenDialog: public wxFrame
284 OpenDialog( intf_thread_t *p_intf, wxWindow *p_parent,
285 int i_access_method, int i_arg = 0 );
286 virtual ~OpenDialog();
289 int Show( int i_access_method, int i_arg = 0 );
294 wxPanel *FilePanel( wxWindow* parent );
295 wxPanel *DiscPanel( wxWindow* parent );
296 wxPanel *NetPanel( wxWindow* parent );
297 wxPanel *SatPanel( wxWindow* parent );
298 wxPanel *V4LPanel( wxWindow* parent );
300 void UpdateMRL( int i_access_method );
302 /* Event handlers (these functions should _not_ be virtual) */
303 void OnOk( wxCommandEvent& event );
304 void OnCancel( wxCommandEvent& event );
306 void OnPageChange( wxNotebookEvent& event );
307 void OnMRLChange( wxCommandEvent& event );
309 /* Event handlers for the file page */
310 void OnFilePanelChange( wxCommandEvent& event );
311 void OnFileBrowse( wxCommandEvent& event );
313 /* Event handlers for the disc page */
314 void OnDiscPanelChange( wxCommandEvent& event );
315 void OnDiscTypeChange( wxCommandEvent& event );
317 /* Event handlers for the net page */
318 void OnNetPanelChange( wxCommandEvent& event );
319 void OnNetTypeChange( wxCommandEvent& event );
321 /* Event handlers for the v4l page */
322 void OnV4LPanelChange( wxCommandEvent& event );
323 void OnV4LTypeChange( wxCommandEvent& event );
324 void OnV4LSettingsChange( wxCommandEvent& event );
326 /* Event handlers for the stream output */
327 void OnSubsFileEnable( wxCommandEvent& event );
328 void OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) );
330 /* Event handlers for the stream output */
331 void OnSoutEnable( wxCommandEvent& event );
332 void OnSoutSettings( wxCommandEvent& WXUNUSED(event) );
334 /* Event handlers for the demux dump */
335 void OnDemuxDumpEnable( wxCommandEvent& event );
336 void OnDemuxDumpBrowse( wxCommandEvent& event );
337 void OnDemuxDumpChange( wxCommandEvent& event );
339 DECLARE_EVENT_TABLE();
341 intf_thread_t *p_intf;
343 int i_current_access_method;
345 wxComboBox *mrl_combo;
346 wxNotebook *notebook;
348 /* Controls for the file panel */
349 wxComboBox *file_combo;
350 wxFileDialog *file_dialog;
352 /* Controls for the disc panel */
353 wxRadioBox *disc_type;
354 wxTextCtrl *disc_device;
355 wxSpinCtrl *disc_title;
357 wxSpinCtrl *disc_chapter;
360 /* Controls for the net panel */
361 wxRadioBox *net_type;
363 wxPanel *net_subpanels[4];
364 wxRadioButton *net_radios[4];
365 wxSpinCtrl *net_ports[4];
367 wxTextCtrl *net_addrs[4];
369 /* Controls for the v4l panel */
370 wxRadioBox *video_type;
371 wxTextCtrl *video_device;
372 wxSpinCtrl *video_channel;
373 wxButton *v4l_button;
374 V4LDialog *v4l_dialog;
375 wxArrayString v4l_mrl;
377 /* Controls for the subtitles file */
378 wxButton *subsfile_button;
379 wxCheckBox *subsfile_checkbox;
380 SubsFileDialog *subsfile_dialog;
381 wxArrayString subsfile_mrl;
383 /* Controls for the stream output */
384 wxButton *sout_button;
385 wxCheckBox *sout_checkbox;
386 SoutDialog *sout_dialog;
387 wxArrayString sout_mrl;
389 /* Controls for the demux dump */
390 wxTextCtrl *demuxdump_textctrl;
391 wxButton *demuxdump_button;
392 wxCheckBox *demuxdump_checkbox;
393 wxFileDialog *demuxdump_dialog;
407 class V4LDialog: public wxDialog
411 V4LDialog( intf_thread_t *p_intf, wxWindow *p_parent );
412 virtual ~V4LDialog();
414 wxArrayString GetOptions();
418 wxPanel *AudioPanel( wxWindow* parent );
419 wxPanel *CommonPanel( wxWindow* parent );
420 wxPanel *BitratePanel( wxWindow* parent );
423 /* Event handlers (these functions should _not_ be virtual) */
424 void OnOk( wxCommandEvent& event );
425 void OnCancel( wxCommandEvent& event );
426 void OnMRLChange( wxCommandEvent& event );
427 void OnAudioEnable( wxCommandEvent& event );
428 void OnAudioChannel( wxCommandEvent& event );
429 void OnSizeEnable( wxCommandEvent& event );
430 void OnSize( wxCommandEvent& event );
431 void OnNormEnable( wxCommandEvent& event );
432 void OnNorm( wxCommandEvent& event );
433 void OnFrequencyEnable( wxCommandEvent& event );
434 void OnFrequency( wxCommandEvent& event );
435 void OnBitrateEnable( wxCommandEvent& event );
436 void OnBitrate( wxCommandEvent& event );
437 void OnMaxBitrateEnable( wxCommandEvent& event );
438 void OnMaxBitrate( wxCommandEvent& event );
440 DECLARE_EVENT_TABLE();
442 intf_thread_t *p_intf;
445 wxComboBox *mrl_combo;
449 /* Controls for the v4l advanced options */
450 wxPanel *common_subpanel;
451 wxPanel *common_panel;
452 wxCheckBox *size_checkbox;
453 wxComboBox *size_combo;
454 wxCheckBox *norm_checkbox;
455 wxComboBox *norm_combo;
456 wxCheckBox *frequency_checkbox;
457 wxSpinCtrl *frequency;
459 wxPanel *audio_subpanel;
460 wxPanel *audio_panel;
461 wxCheckBox *audio_checkbox;
462 wxTextCtrl *audio_device;
463 wxSpinCtrl *audio_channel;
465 wxPanel *bitrate_subpanel;
466 wxPanel *bitrate_panel;
467 wxCheckBox *bitrate_checkbox;
469 wxCheckBox *maxbitrate_checkbox;
470 wxSpinCtrl *maxbitrate;
474 /* Stream output Dialog */
488 TS_ENCAPSULATION = 0,
505 class SoutDialog: public wxDialog
509 SoutDialog( intf_thread_t *p_intf, wxWindow *p_parent );
510 virtual ~SoutDialog();
512 wxArrayString GetOptions();
516 wxPanel *AccessPanel( wxWindow* parent );
517 wxPanel *MiscPanel( wxWindow* parent );
518 wxPanel *EncapsulationPanel( wxWindow* parent );
519 wxPanel *TranscodingPanel( wxWindow* parent );
522 /* Event handlers (these functions should _not_ be virtual) */
523 void OnOk( wxCommandEvent& event );
524 void OnCancel( wxCommandEvent& event );
525 void OnMRLChange( wxCommandEvent& event );
526 void OnAccessTypeChange( wxCommandEvent& event );
528 /* Event handlers for the file access output */
529 void OnFileChange( wxCommandEvent& event );
530 void OnFileBrowse( wxCommandEvent& event );
532 /* Event handlers for the net access output */
533 void OnNetChange( wxCommandEvent& event );
535 /* Event specific to the announce address */
536 void OnAnnounceAddrChange( wxCommandEvent& event );
538 /* Event handlers for the encapsulation panel */
539 void OnEncapsulationChange( wxCommandEvent& event );
541 /* Event handlers for the transcoding panel */
542 void OnTranscodingEnable( wxCommandEvent& event );
543 void OnTranscodingChange( wxCommandEvent& event );
545 /* Event handlers for the misc panel */
546 void OnSAPMiscChange( wxCommandEvent& event );
547 void OnSLPMiscChange( wxCommandEvent& event );
549 DECLARE_EVENT_TABLE();
551 intf_thread_t *p_intf;
554 wxComboBox *mrl_combo;
556 /* Controls for the access outputs */
557 wxPanel *access_subpanels[ACCESS_OUT_NUM];
558 wxCheckBox *access_checkboxes[ACCESS_OUT_NUM];
562 wxComboBox *file_combo;
563 wxSpinCtrl *net_ports[ACCESS_OUT_NUM];
564 wxTextCtrl *net_addrs[ACCESS_OUT_NUM];
566 /* Controls for the SAP announces */
567 wxPanel *misc_subpanels[MISC_SOUT_NUM];
568 wxCheckBox *sap_checkbox;
569 wxCheckBox *slp_checkbox;
570 wxTextCtrl *announce_addr;
572 /* Controls for the encapsulation */
573 wxRadioButton *encapsulation_radios[ENCAPS_NUM];
574 int i_encapsulation_type;
576 /* Controls for transcoding */
577 wxCheckBox *video_transc_checkbox;
578 wxComboBox *video_codec_combo;
579 wxComboBox *audio_codec_combo;
580 wxCheckBox *audio_transc_checkbox;
581 wxComboBox *video_bitrate_combo;
582 wxComboBox *audio_bitrate_combo;
583 wxComboBox *audio_channels_combo;
586 /* Subtitles File Dialog */
587 class SubsFileDialog: public wxDialog
591 SubsFileDialog( intf_thread_t *p_intf, wxWindow *p_parent );
592 virtual ~SubsFileDialog();
594 wxComboBox *file_combo;
595 wxComboBox *encoding_combo;
596 wxSpinCtrl *delay_spinctrl;
597 wxSpinCtrl *fps_spinctrl;
600 /* Event handlers (these functions should _not_ be virtual) */
601 void OnOk( wxCommandEvent& event );
602 void OnCancel( wxCommandEvent& event );
603 void OnFileBrowse( wxCommandEvent& event );
605 DECLARE_EVENT_TABLE();
607 intf_thread_t *p_intf;
611 /* Preferences Dialog */
613 class PrefsDialog: public wxFrame
617 PrefsDialog( intf_thread_t *p_intf, wxWindow *p_parent );
618 virtual ~PrefsDialog();
621 wxPanel *PrefsPanel( wxWindow* parent );
623 /* Event handlers (these functions should _not_ be virtual) */
624 void OnOk( wxCommandEvent& event );
625 void OnCancel( wxCommandEvent& event );
626 void OnSave( wxCommandEvent& event );
627 void OnResetAll( wxCommandEvent& event );
628 void OnAdvanced( wxCommandEvent& event );
630 DECLARE_EVENT_TABLE();
632 intf_thread_t *p_intf;
634 PrefsTreeCtrl *prefs_tree;
638 class Messages: public wxFrame
642 Messages( intf_thread_t *p_intf, wxWindow *p_parent );
644 bool Show( bool show = TRUE );
648 /* Event handlers (these functions should _not_ be virtual) */
649 void OnClose( wxCommandEvent& event );
650 void OnClear( wxCommandEvent& event );
651 void OnSaveLog( wxCommandEvent& event );
653 DECLARE_EVENT_TABLE();
655 intf_thread_t *p_intf;
656 wxTextCtrl *textctrl;
657 wxTextAttr *info_attr;
658 wxTextAttr *err_attr;
659 wxTextAttr *warn_attr;
660 wxTextAttr *dbg_attr;
662 wxFileDialog *save_log_dialog;
664 vlc_bool_t b_verbose;
668 class ItemInfoDialog;
669 class Playlist: public wxFrame
673 Playlist( intf_thread_t *p_intf, wxWindow *p_parent );
676 void UpdatePlaylist();
677 void ShowPlaylist( bool show );
683 void DeleteItem( int item );
685 /* Event handlers (these functions should _not_ be virtual) */
686 void OnAddFile( wxCommandEvent& event );
687 void OnAddMRL( wxCommandEvent& event );
688 void OnSort( wxCommandEvent& event );
689 void OnRSort( wxCommandEvent& event );
690 void OnClose( wxCommandEvent& event );
691 void OnSearch( wxCommandEvent& event );
692 void OnEnDis( wxCommandEvent& event );
693 void OnInfos( wxCommandEvent& event );
694 void OnSearchTextChange( wxCommandEvent& event );
695 void OnOpen( wxCommandEvent& event );
696 void OnSave( wxCommandEvent& event );
697 void OnEnableSelection( wxCommandEvent& event );
698 void OnDisableSelection( wxCommandEvent& event );
699 void OnInvertSelection( wxCommandEvent& event );
700 void OnDeleteSelection( wxCommandEvent& event );
701 void OnSelectAll( wxCommandEvent& event );
702 void OnRandom( wxCommandEvent& event );
703 void OnRepeat( wxCommandEvent& event );
704 void OnLoop ( wxCommandEvent& event );
705 void OnActivateItem( wxListEvent& event );
706 void OnKeyDown( wxListEvent& event );
709 wxTextCtrl *search_text;
710 wxButton *search_button;
711 DECLARE_EVENT_TABLE();
714 ItemInfoDialog *iteminfo_dialog;
716 intf_thread_t *p_intf;
717 wxListView *listview;
718 int i_update_counter;
722 /* ItemInfo Dialog */
723 class ItemInfoDialog: public wxDialog
727 ItemInfoDialog( intf_thread_t *p_intf, playlist_item_t *_p_item,
728 wxWindow *p_parent );
729 virtual ~ItemInfoDialog();
731 wxArrayString GetOptions();
734 wxPanel *InfoPanel( wxWindow* parent );
735 wxPanel *GroupPanel( wxWindow* parent );
737 /* Event handlers (these functions should _not_ be virtual) */
738 void OnOk( wxCommandEvent& event );
739 void OnCancel( wxCommandEvent& event );
741 DECLARE_EVENT_TABLE();
743 intf_thread_t *p_intf;
744 playlist_item_t *p_item;
747 /* Controls for the iteminfo dialog box */
748 wxPanel *info_subpanel;
751 wxPanel *group_subpanel;
752 wxPanel *group_panel;
754 wxTextCtrl *uri_text;
755 wxTextCtrl *name_text;
756 wxTextCtrl *author_text;
758 wxCheckBox *enabled_checkbox;
759 wxSpinCtrl *group_spin;
764 class FileInfo: public wxFrame
768 FileInfo( intf_thread_t *p_intf, wxWindow *p_parent );
770 void UpdateFileInfo();
773 void OnClose( wxCommandEvent& event );
775 DECLARE_EVENT_TABLE();
777 intf_thread_t *p_intf;
778 wxTreeCtrl *fileinfo_tree;
779 wxTreeItemId fileinfo_root;
780 wxString fileinfo_root_label;
784 #if !defined(__WXX11__)
785 /* Drag and Drop class */
786 class DragAndDrop: public wxFileDropTarget
789 DragAndDrop( intf_thread_t *_p_intf );
791 virtual bool OnDropFiles( wxCoord x, wxCoord y,
792 const wxArrayString& filenames );
795 intf_thread_t *p_intf;
800 void PopupMenu( intf_thread_t *_p_intf, wxWindow *p_parent,
801 const wxPoint& pos );
802 wxMenu *AudioMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
803 wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
804 wxMenu *NavigMenu( intf_thread_t *_p_intf, wxWindow *p_parent );
806 class MenuEvtHandler : public wxEvtHandler
809 MenuEvtHandler( intf_thread_t *p_intf, Interface *p_main_interface );
810 virtual ~MenuEvtHandler();
812 void OnMenuEvent( wxCommandEvent& event );
813 void OnShowDialog( wxCommandEvent& event );
817 DECLARE_EVENT_TABLE()
819 intf_thread_t *p_intf;
820 Interface *p_main_interface;
823 class Menu: public wxMenu
827 Menu( intf_thread_t *p_intf, wxWindow *p_parent, int i_count,
828 char **ppsz_names, int *pi_objects, int i_start_id );
832 /* Event handlers (these functions should _not_ be virtual) */
833 void OnClose( wxCommandEvent& event );
834 void OnShowDialog( wxCommandEvent& event );
835 void OnEntrySelected( wxCommandEvent& event );
837 wxMenu *Menu::CreateDummyMenu();
838 void Menu::CreateMenuItem( wxMenu *, char *, vlc_object_t * );
839 wxMenu *Menu::CreateChoicesMenu( char *, vlc_object_t * );
841 DECLARE_EVENT_TABLE();
843 intf_thread_t *p_intf;
848 static inline int ConvertHotkeyModifiers( int i_hotkey )
850 int i_accel_flags = 0;
851 if( i_hotkey & KEY_MODIFIER_ALT ) i_accel_flags |= wxACCEL_ALT;
852 if( i_hotkey & KEY_MODIFIER_CTRL ) i_accel_flags |= wxACCEL_CTRL;
853 if( i_hotkey & KEY_MODIFIER_SHIFT ) i_accel_flags |= wxACCEL_SHIFT;
854 return i_accel_flags;
857 static inline int ConvertHotkey( int i_hotkey )
859 int i_key = i_hotkey & ~KEY_MODIFIER;
860 if( i_key & KEY_ASCII ) return i_key & KEY_ASCII;
861 else if( i_key & KEY_SPECIAL )
865 case KEY_LEFT: return WXK_LEFT;
866 case KEY_RIGHT: return WXK_RIGHT;
867 case KEY_UP: return WXK_UP;
868 case KEY_DOWN: return WXK_DOWN;
869 case KEY_SPACE: return WXK_SPACE;
870 case KEY_ENTER: return WXK_RETURN;
871 case KEY_F1: return WXK_F1;
872 case KEY_F2: return WXK_F2;
873 case KEY_F3: return WXK_F3;
874 case KEY_F4: return WXK_F4;
875 case KEY_F5: return WXK_F5;
876 case KEY_F6: return WXK_F6;
877 case KEY_F7: return WXK_F7;
878 case KEY_F8: return WXK_F8;
879 case KEY_F9: return WXK_F9;
880 case KEY_F10: return WXK_F10;
881 case KEY_F11: return WXK_F11;
882 case KEY_F12: return WXK_F12;
883 case KEY_HOME: return WXK_HOME;
884 case KEY_END: return WXK_HOME;
885 case KEY_MENU: return WXK_MENU;
886 case KEY_ESC: return WXK_ESCAPE;
887 case KEY_PAGEUP: return WXK_PRIOR;
888 case KEY_PAGEDOWN: return WXK_NEXT;
889 case KEY_TAB: return WXK_TAB;
890 case KEY_BACKSPACE: return WXK_BACK;