3 * Text control with an history of commands typed
5 * Nicolas Boichat, July 2004
9 Copyright (C) 2004 Kern Sibbald and John Walker
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License
13 as published by the Free Software Foundation; either version 2
14 of the License, or (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #ifndef WXBHISTORYTEXTCTRL
27 #define WXBHISTORYTEXTCTRL
29 #include "wx/wxprec.h"
35 #include <wx/treectrl.h>
37 class wxbHistoryTextCtrl: public wxTextCtrl {
39 wxbHistoryTextCtrl(wxWindow* parent, wxWindowID id,
40 const wxString& value = "", const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxTextCtrlNameStr);
45 void HistoryAdd(wxString cmd);
47 wxArrayString history;
50 void OnKeyUp(wxKeyEvent& event);
52 DECLARE_EVENT_TABLE();
55 #endif //WXBHISTORYTEXTCTRL