Skyscraper 2.0
console.h
Go to the documentation of this file.
1/*
2 Skyscraper 2.0 Alpha - Script Console
3 Copyright (C)2004-2024 Ryan Thoryk
4 https://www.skyscrapersim.net
5 https://sourceforge.net/projects/skyscraper/
6 Contact - ryan@skyscrapersim.net
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (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, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21*/
22
23#ifndef CONSOLE_H
24#define CONSOLE_H
25
26//(*Headers(Console)
27#include <wx/button.h>
28#include <wx/checkbox.h>
29#include <wx/frame.h>
30#include <wx/panel.h>
31#include <wx/sizer.h>
32#include <wx/textctrl.h>
33//*)
34
35namespace Skyscraper {
36
37class Console: public wxFrame
38{
39 public:
40
41 Console(VM *root, wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
42 virtual ~Console();
43
44 //(*Declarations(Console)
45 wxButton* bClear;
46 wxButton* bSend;
47 wxCheckBox* chkEcho;
48 wxPanel* Panel1;
49 wxTextCtrl* tCommand;
50 wxTextCtrl* tConsole;
51 //*)
52 void Write(const std::string &message, const std::string &color);
53
54 protected:
55
56 //(*Identifiers(Console)
57 static const long ID_tConsole;
58 static const long ID_tCommand;
59 static const long ID_bSend;
60 static const long ID_bClear;
61 static const long ID_chkEcho;
62 static const long ID_PANEL1;
63 //*)
64
65 private:
66
67 //(*Handlers(Console)
68 void On_bSend_Click(wxCommandEvent& event);
69 void On_bClose_Click(wxCommandEvent& event);
70 void On_Close(wxCloseEvent& event);
71 void On_bClear_Click(wxCommandEvent& event);
72 //*)
73
76
77 DECLARE_EVENT_TABLE()
78};
79
80}
81
82#endif
wxCheckBox * chkEcho
Definition console.h:47
Console(VM *root, wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
Definition console.cpp:56
void On_bClear_Click(wxCommandEvent &event)
Definition console.cpp:159
SBS::SBS * Simcore
Definition console.h:74
wxButton * bSend
Definition console.h:46
static const long ID_tCommand
Definition console.h:58
static const long ID_tConsole
Definition console.h:57
void On_bSend_Click(wxCommandEvent &event)
Definition console.cpp:112
static const long ID_chkEcho
Definition console.h:61
wxButton * bClear
Definition console.h:45
static const long ID_bSend
Definition console.h:59
void On_Close(wxCloseEvent &event)
Definition console.cpp:123
static const long ID_bClear
Definition console.h:60
wxTextCtrl * tConsole
Definition console.h:50
wxTextCtrl * tCommand
Definition console.h:49
void Write(const std::string &message, const std::string &color)
Definition console.cpp:128
static const long ID_PANEL1
Definition console.h:62
void On_bClose_Click(wxCommandEvent &event)
Definition console.cpp:118
wxPanel * Panel1
Definition console.h:48