Skyscraper
2.0
src
gui
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
35
namespace
Skyscraper
{
36
37
class
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
74
SBS::SBS
*
Simcore
;
75
VM
*
vm
;
76
77
DECLARE_EVENT_TABLE()
78
};
79
80
}
81
82
#endif
SBS::SBS
Definition
sbs.h:131
Skyscraper::Console
Definition
console.h:38
Skyscraper::Console::chkEcho
wxCheckBox * chkEcho
Definition
console.h:47
Skyscraper::Console::Console
Console(VM *root, wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
Definition
console.cpp:56
Skyscraper::Console::On_bClear_Click
void On_bClear_Click(wxCommandEvent &event)
Definition
console.cpp:159
Skyscraper::Console::Simcore
SBS::SBS * Simcore
Definition
console.h:74
Skyscraper::Console::bSend
wxButton * bSend
Definition
console.h:46
Skyscraper::Console::ID_tCommand
static const long ID_tCommand
Definition
console.h:58
Skyscraper::Console::ID_tConsole
static const long ID_tConsole
Definition
console.h:57
Skyscraper::Console::On_bSend_Click
void On_bSend_Click(wxCommandEvent &event)
Definition
console.cpp:112
Skyscraper::Console::ID_chkEcho
static const long ID_chkEcho
Definition
console.h:61
Skyscraper::Console::bClear
wxButton * bClear
Definition
console.h:45
Skyscraper::Console::ID_bSend
static const long ID_bSend
Definition
console.h:59
Skyscraper::Console::vm
VM * vm
Definition
console.h:75
Skyscraper::Console::On_Close
void On_Close(wxCloseEvent &event)
Definition
console.cpp:123
Skyscraper::Console::ID_bClear
static const long ID_bClear
Definition
console.h:60
Skyscraper::Console::~Console
virtual ~Console()
Definition
console.cpp:106
Skyscraper::Console::tConsole
wxTextCtrl * tConsole
Definition
console.h:50
Skyscraper::Console::tCommand
wxTextCtrl * tCommand
Definition
console.h:49
Skyscraper::Console::Write
void Write(const std::string &message, const std::string &color)
Definition
console.cpp:128
Skyscraper::Console::ID_PANEL1
static const long ID_PANEL1
Definition
console.h:62
Skyscraper::Console::On_bClose_Click
void On_bClose_Click(wxCommandEvent &event)
Definition
console.cpp:118
Skyscraper::Console::Panel1
wxPanel * Panel1
Definition
console.h:48
Skyscraper::VM
Definition
vm.h:71
Skyscraper
Definition
native.cpp:50
Generated by
1.11.0