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