Cafu Engine
DialogConsole.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_DIALOG_CONSOLE_HPP_INCLUDED
8 #define CAFU_DIALOG_CONSOLE_HPP_INCLUDED
9 
10 
11 class ConsoleDialogT : public wxPanel
12 {
13  public:
14 
15  /// Constructor.
16  ConsoleDialogT(wxWindow* Parent);
17 
18  /// Adds the text s to the console output.
19  void Print(const wxString& s, const wxColour* Colour=wxGREEN);
20 
21 
22  private:
23 
24  wxTextCtrl* ConsoleOutput;
25  wxTextCtrl* CommandInput;
26  wxString SavedOutputForNextPrint;
27 
28  // Event handlers.
29  void OnCommandInput(wxCommandEvent& Event);
30  void OnClear (wxCommandEvent& Event);
31 
32  // IDs for the controls whose events we are interested in.
33  enum
34  {
35  ID_TEXTCTRL_INPUT=wxID_HIGHEST+1,
36  ID_BUTTON_CLEAR
37  };
38 
39  DECLARE_EVENT_TABLE()
40 };
41 
42 #endif
ConsoleDialogT(wxWindow *Parent)
Constructor.
Definition: DialogConsole.cpp:17
void Print(const wxString &s, const wxColour *Colour=wxGREEN)
Adds the text s to the console output.
Definition: DialogConsole.cpp:53
Definition: DialogConsole.hpp:11