Version: 0.6.0
keycodedlg.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: key code input dialog class.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009-2010,2014 Dmitry Baryshnikov
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 
22 #pragma once
23 
24 #include "wxgis/framework/framework.h"
25 #include "../../../art/character_map.xpm"
26 
27 #include <wx/intl.h>
28 
29 #include <wx/string.h>
30 #include <wx/textctrl.h>
31 #include <wx/gdicmn.h>
32 #include <wx/font.h>
33 #include <wx/colour.h>
34 #include <wx/settings.h>
35 #include <wx/button.h>
36 #include <wx/sizer.h>
37 #include <wx/dialog.h>
38 #include <wx/valtext.h>
39 
47 class wxKeyCodeCtrl : public wxTextCtrl
48 {
49 public:
50  wxKeyCodeCtrl(wxWindow* parent, wxWindowID id, const wxString& value = wxT(""), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr);
51  virtual ~wxKeyCodeCtrl(void);
52  //event
53  void OnChar(wxKeyEvent& event);
54 
55  int m_Flags;
56  int m_Key;
57 
58  DECLARE_EVENT_TABLE()
59 };
60 
68 class WXDLLIMPEXP_GIS_FRW wxKeyCodeDlg : public wxDialog
69 {
70 private:
71 
72 protected:
73  wxKeyCodeCtrl* m_textCtrl1;
74  wxButton* m_button;
75 
76 public:
77  wxKeyCodeDlg(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Enter key code"), const wxPoint& pos = wxPoint(-1, -1), const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
78  ~wxKeyCodeDlg();
79  static wxBitmap GetBitmap(){return wxBitmap(character_map_xpm);};
80  //events
81  void OnUpdateUI(wxUpdateUIEvent& event);
82  virtual bool TransferDataFromWindow();
83 
84  int m_Flags;
85  int m_Key;
86  wxString m_sKeyCode;
87 
88  DECLARE_EVENT_TABLE()
89 };
90 
Definition: keycodedlg.h:47
wxKeyCodeCtrl(wxWindow *parent, wxWindowID id, const wxString &value=wxT(""), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxTextCtrlNameStr)
Class wxKeyCodeCtrl.
Definition: keycodedlg.cpp:32
Definition: keycodedlg.h:68