OSDN Git Service

Handling key and mouse events in listctrl is improved
[molby/Molby.git] / wxSources / MyTextCtrl.h
1 /*
2  *  MyTextCtrl.h
3  *
4  *  Created by Toshi Nagata on 2014/09/21.
5  *  Copyright 2014 Toshi Nagata. All rights reserved.
6
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation version 2 of the License.
10  
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  GNU General Public License for more details.
15
16  */
17
18 #ifndef __MyTextCtrl_h__
19 #define __MyTextCtrl_h__
20
21 #include "wx/textctrl.h"
22
23 #define MyTextCtrl_Process_Escape    0x10000000
24
25 extern const wxEventType myTextCtrl_EVT_PROCESS_ESCAPE;
26
27 class MyTextCtrl: public wxTextCtrl {
28
29 public:
30         MyTextCtrl();
31         MyTextCtrl(wxWindow *parent, wxWindowID id, const wxString &value=wxEmptyString,
32                            const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize,
33                            long style=0, const wxValidator &validator=wxDefaultValidator,
34                            const wxString &name=wxTextCtrlNameStr);
35         virtual ~MyTextCtrl();
36         bool processEscape;
37         void OnKeyUp(wxKeyEvent& event);
38
39 private:
40         DECLARE_DYNAMIC_CLASS(MyTextCtrl)
41         DECLARE_EVENT_TABLE()
42 };
43
44 #endif /* __MyListCtrl_h__ */