Skyscraper 2.0
objectinfo.h
Go to the documentation of this file.
1/*
2 Skyscraper 2.0 Alpha - Object Information Dialog
3 Copyright (C)2003-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 OBJECTINFO_H
24#define OBJECTINFO_H
25
26//(*Headers(ObjectInfo)
27#include <wx/button.h>
28#include <wx/checkbox.h>
29#include <wx/dialog.h>
30#include <wx/sizer.h>
31#include <wx/statline.h>
32#include <wx/stattext.h>
33#include <wx/textctrl.h>
34#include <wx/treectrl.h>
35//*)
36
37namespace Skyscraper {
38
39class ObjectInfo: public wxDialog
40{
41 public:
42
43 ObjectInfo(DebugPanel* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
44 virtual ~ObjectInfo();
45
46 //(*Declarations(ObjectInfo)
47 wxButton* bCreate;
48 wxButton* bDelete;
49 wxButton* bMove;
50 wxButton* bOK;
51 wxButton* bReset;
52 wxButton* bSave;
53 wxButton* bViewScript;
54 wxCheckBox* chkEnabled;
55 wxStaticLine* StaticLine1;
56 wxStaticText* StaticText10;
57 wxStaticText* StaticText11;
58 wxStaticText* StaticText12;
59 wxStaticText* StaticText13;
60 wxStaticText* StaticText1;
61 wxStaticText* StaticText2;
62 wxStaticText* StaticText3;
63 wxStaticText* StaticText4;
64 wxStaticText* StaticText5;
65 wxStaticText* StaticText6;
66 wxStaticText* StaticText7;
67 wxStaticText* StaticText8;
68 wxStaticText* StaticText9;
69 wxTextCtrl* tContext;
70 wxTextCtrl* tIncludeFile;
71 wxTextCtrl* tLineNum;
72 wxTextCtrl* tName;
73 wxTextCtrl* tNumber;
74 wxTextCtrl* tParent;
75 wxTextCtrl* tParentName;
76 wxTextCtrl* tParentType;
77 wxTextCtrl* tPermanent;
78 wxTextCtrl* tScriptCommand2;
79 wxTextCtrl* tScriptCommand;
80 wxTextCtrl* tType;
81 wxTextCtrl* txtMovable;
82 wxTreeCtrl* ObjectTree;
83 //*)
84 void Loop();
85 void PopulateTree();
88 bool deleted;
89
90 protected:
91
92 //(*Identifiers(ObjectInfo)
93 static const long ID_ObjectTree;
94 static const long ID_bDelete;
95 static const long ID_bMove;
96 static const long ID_bCreate;
97 static const long ID_chkEnabled;
98 static const long ID_bViewScript;
99 static const long ID_bReset;
100 static const long ID_bOK;
101 static const long ID_bSave;
102 static const long ID_STATICTEXT1;
103 static const long ID_tNumber;
104 static const long ID_STATICTEXT5;
105 static const long ID_tName;
106 static const long ID_STATICTEXT2;
107 static const long ID_tType;
108 static const long ID_STATICTEXT11;
109 static const long ID_tPermanent;
110 static const long ID_STATICTEXT3;
111 static const long ID_tParent;
112 static const long ID_STATICTEXT6;
113 static const long ID_tParentName;
114 static const long ID_STATICTEXT4;
115 static const long ID_tParentType;
116 static const long ID_STATICTEXT13;
117 static const long ID_txtMovable;
118 static const long ID_STATICLINE1;
119 static const long ID_STATICTEXT7;
120 static const long ID_tLineNum;
121 static const long ID_STATICTEXT12;
122 static const long ID_tIncludeFile;
123 static const long ID_STATICTEXT10;
124 static const long ID_tContext;
125 static const long ID_STATICTEXT8;
126 static const long ID_tScriptCommand;
127 static const long ID_STATICTEXT9;
128 static const long ID_tScriptCommand2;
129 //*)
130 void OnInit();
131
132 private:
133
134 //(*Handlers(ObjectInfo)
135 void On_bOK_Click(wxCommandEvent& event);
136 void On_ObjectTree_SelectionChanged(wxTreeEvent& event);
137 void On_bDelete_Click(wxCommandEvent& event);
138 void On_bCreate_Click(wxCommandEvent& event);
139 void On_bModify_Click(wxCommandEvent& event);
140 void On_bSave_Click(wxCommandEvent& event);
141 void On_bViewScript_Click(wxCommandEvent& event);
142 void On_bMove_Click(wxCommandEvent& event);
143 void On_bReset_Click(wxCommandEvent& event);
144 void On_chkEnabled_Click(wxCommandEvent& event);
145 //*)
146 void AddChildren(SBS::Object *parent, const wxTreeItemId& treeparent);
151
155
156 DECLARE_EVENT_TABLE()
157};
158
159class TreeItemData : public wxTreeItemData
160{
161public:
162 TreeItemData(const wxString& desc) : m_desc(desc) { }
163 const wxChar *GetDesc() const { return m_desc.c_str(); }
164
165private:
166 wxString m_desc;
167};
168
169}
170
171#endif
ParameterViewer * modifyobject
Definition objectinfo.h:153
wxTextCtrl * tIncludeFile
Definition objectinfo.h:70
wxTextCtrl * tNumber
Definition objectinfo.h:73
static const long ID_tType
Definition objectinfo.h:107
static const long ID_bSave
Definition objectinfo.h:101
void On_chkEnabled_Click(wxCommandEvent &event)
static const long ID_STATICTEXT12
Definition objectinfo.h:121
wxTextCtrl * tScriptCommand2
Definition objectinfo.h:78
static const long ID_bViewScript
Definition objectinfo.h:98
static const long ID_bCreate
Definition objectinfo.h:96
static const long ID_STATICLINE1
Definition objectinfo.h:118
static const long ID_tIncludeFile
Definition objectinfo.h:122
static const long ID_bMove
Definition objectinfo.h:95
ObjectInfo(DebugPanel *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
void On_bOK_Click(wxCommandEvent &event)
void On_ObjectTree_SelectionChanged(wxTreeEvent &event)
static const long ID_txtMovable
Definition objectinfo.h:117
wxCheckBox * chkEnabled
Definition objectinfo.h:54
static const long ID_tParentType
Definition objectinfo.h:115
wxStaticText * StaticText1
Definition objectinfo.h:60
static const long ID_STATICTEXT9
Definition objectinfo.h:127
wxStaticText * StaticText4
Definition objectinfo.h:63
static const long ID_tLineNum
Definition objectinfo.h:120
void On_bDelete_Click(wxCommandEvent &event)
wxTextCtrl * tParentType
Definition objectinfo.h:76
static const long ID_tParentName
Definition objectinfo.h:113
static const long ID_STATICTEXT13
Definition objectinfo.h:116
CreateObject * createobject
Definition objectinfo.h:152
wxStaticText * StaticText13
Definition objectinfo.h:59
wxTextCtrl * txtMovable
Definition objectinfo.h:81
static const long ID_STATICTEXT6
Definition objectinfo.h:112
wxStaticText * StaticText7
Definition objectinfo.h:66
void On_bCreate_Click(wxCommandEvent &event)
wxTextCtrl * tParentName
Definition objectinfo.h:75
static const long ID_tNumber
Definition objectinfo.h:103
wxStaticText * StaticText2
Definition objectinfo.h:61
MoveObject * moveobject
Definition objectinfo.h:154
wxStaticLine * StaticLine1
Definition objectinfo.h:55
static const long ID_STATICTEXT11
Definition objectinfo.h:108
void AddChildren(SBS::Object *parent, const wxTreeItemId &treeparent)
static const long ID_bDelete
Definition objectinfo.h:94
wxStaticText * StaticText9
Definition objectinfo.h:68
wxStaticText * StaticText12
Definition objectinfo.h:58
static const long ID_STATICTEXT7
Definition objectinfo.h:119
static const long ID_STATICTEXT10
Definition objectinfo.h:123
void On_bMove_Click(wxCommandEvent &event)
wxStaticText * StaticText5
Definition objectinfo.h:64
static const long ID_tName
Definition objectinfo.h:105
static const long ID_STATICTEXT8
Definition objectinfo.h:125
wxTextCtrl * tLineNum
Definition objectinfo.h:71
wxStaticText * StaticText6
Definition objectinfo.h:65
wxTextCtrl * tContext
Definition objectinfo.h:69
static const long ID_STATICTEXT1
Definition objectinfo.h:102
static const long ID_STATICTEXT4
Definition objectinfo.h:114
static const long ID_ObjectTree
Definition objectinfo.h:93
static const long ID_STATICTEXT5
Definition objectinfo.h:104
static const long ID_bReset
Definition objectinfo.h:99
void On_bModify_Click(wxCommandEvent &event)
static const long ID_bOK
Definition objectinfo.h:100
wxStaticText * StaticText8
Definition objectinfo.h:67
static const long ID_tScriptCommand
Definition objectinfo.h:126
static const long ID_tParent
Definition objectinfo.h:111
static const long ID_tPermanent
Definition objectinfo.h:109
static const long ID_tScriptCommand2
Definition objectinfo.h:128
wxTextCtrl * tScriptCommand
Definition objectinfo.h:79
void On_bReset_Click(wxCommandEvent &event)
static const long ID_chkEnabled
Definition objectinfo.h:97
wxStaticText * StaticText3
Definition objectinfo.h:62
wxTextCtrl * tParent
Definition objectinfo.h:74
wxStaticText * StaticText11
Definition objectinfo.h:57
wxTextCtrl * tPermanent
Definition objectinfo.h:77
wxStaticText * StaticText10
Definition objectinfo.h:56
void On_bViewScript_Click(wxCommandEvent &event)
static const long ID_tContext
Definition objectinfo.h:124
static const long ID_STATICTEXT3
Definition objectinfo.h:110
wxTreeCtrl * ObjectTree
Definition objectinfo.h:82
void On_bSave_Click(wxCommandEvent &event)
static const long ID_STATICTEXT2
Definition objectinfo.h:106
TreeItemData(const wxString &desc)
Definition objectinfo.h:162
const wxChar * GetDesc() const
Definition objectinfo.h:163