source: eviacam/trunk/fuentes/src/wgetkey.h

Last change on this file was 5324, checked in by Juanma, 3 years ago

Updated to version 2.1.0

  • Property svn:executable set to *
File size: 3.3 KB
Line 
1/////////////////////////////////////////////////////////////////////////////
2// Name:        wgetkey.h
3// Purpose: 
4// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
5// Modified by:
6// Created:     01/07/2010
7// Copyright:   (C) 2008 Cesar Mauri Loba - CREA Software Systems
8//
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 3 of the License, or
12//  (at your option) any later version.
13//
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.
18//
19//  You should have received a copy of the GNU General Public License
20//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21/////////////////////////////////////////////////////////////////////////////
22#ifndef _WGETKEY_H_
23#define _WGETKEY_H_
24
25
26/*!
27 * Includes
28 */
29
30//#include <wx/timer.h>
31#include <wx/dialog.h>
32
33#include "keyboardcode.h"
34
35////@begin includes
36////@end includes
37
38/*!
39 * Forward declarations
40 */
41
42////@begin forward declarations
43////@end forward declarations
44
45/*!
46 * Control identifiers
47 */
48
49////@begin control identifiers
50#define ID_ACTIVATIONKEY 10070
51#define ID_TEXTCTRL 10041
52#define SYMBOL_WGETKEY_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxWANTS_CHARS|wxTAB_TRAVERSAL
53#define SYMBOL_WGETKEY_TITLE _("Get key")
54#define SYMBOL_WGETKEY_IDNAME ID_ACTIVATIONKEY
55#define SYMBOL_WGETKEY_SIZE wxDefaultSize
56#define SYMBOL_WGETKEY_POSITION wxDefaultPosition
57////@end control identifiers
58
59/*!
60 * WGetKey class declaration
61 */
62
63class WGetKey: public wxDialog
64{   
65    DECLARE_DYNAMIC_CLASS( WGetKey )
66    DECLARE_EVENT_TABLE()
67
68public:
69    /// Constructors 
70    WGetKey();
71    WGetKey( wxWindow* parent, wxWindowID id = SYMBOL_WGETKEY_IDNAME, const wxString& caption = SYMBOL_WGETKEY_TITLE, const wxPoint& pos = SYMBOL_WGETKEY_POSITION, const wxSize& size = SYMBOL_WGETKEY_SIZE, long style = SYMBOL_WGETKEY_STYLE );
72
73    /// Creation
74    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WGETKEY_IDNAME, const wxString& caption = SYMBOL_WGETKEY_TITLE, const wxPoint& pos = SYMBOL_WGETKEY_POSITION, const wxSize& size = SYMBOL_WGETKEY_SIZE, long style = SYMBOL_WGETKEY_STYLE );
75
76    /// Destructor
77    ~WGetKey();
78
79        KeyboardCode GetKeyCode();
80
81private:
82    /// Initialises member variables
83    void Init();
84
85    /// Creates the controls and sizers
86    void CreateControls();
87
88////@begin WGetKey event handler declarations
89
90    /// wxEVT_LEFT_DOWN event handler for ID_ACTIVATIONKEY
91    void OnLeftDown( wxMouseEvent& event );
92
93    /// wxEVT_KEY_UP event handler for ID_TEXTCTRL
94    void OnKeyUp( wxKeyEvent& event );
95
96////@end WGetKey event handler declarations
97
98////@begin WGetKey member function declarations
99
100    /// Retrieves bitmap resources
101    wxBitmap GetBitmapResource( const wxString& name );
102
103    /// Retrieves icon resources
104    wxIcon GetIconResource( const wxString& name );
105////@end WGetKey member function declarations
106
107    /// Should we show tooltips?
108    static bool ShowToolTips();
109
110////@begin WGetKey member variables
111    wxTextCtrl* m_txtKey;
112////@end WGetKey member variables
113
114        KeyboardCode m_keyCode;
115};
116
117#endif
118    // _ACTIVATIONKEY_H_
Note: See TracBrowser for help on using the repository browser.