Skyscraper 2.0
gui.h
Go to the documentation of this file.
1/*
2 Skyscraper 2.1 - GUI Manager
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 GUI_H
24
25#include <string>
26#include "vm.h"
27
28//wxWidgets definitions
29class wxCmdLineParser;
30class wxProgressDialog;
31
32namespace Skyscraper {
33
34class EngineContext;
35class Console;
36class LoadDialog;
37class ScriptProcessor;
38class VM;
39class HAL;
40class DebugPanel;
41
43{
44public:
45 GUI(VM *parent);
46 ~GUI();
47 void UnregisterDebugPanel() { dpanel = 0; }
48 void Unload();
49 void ShowProgress();
50 std::string SelectBuilding(const std::string &data_path);
51 std::string SelectBuildingNative(const std::string &data_path);
52 void Resize();
53 void CreateDebugPanel();
54 void EnableConsole(bool value);
55 void RaiseWindow();
56 void EnableTimer(bool value);
57 void ShowConsole(bool send_button = true);
58 void ShowProgressDialog();
59 void CreateProgressDialog(const std::string &message);
60 void CloseProgressDialog();
61 bool UpdateProgress(int percent);
62 bool ProgressCancelled();
63 void ShowError(const std::string &message);
64 void ShowMessage(const std::string &message);
65 void RefreshConsole();
66 void ShowDebugPanel();
67 void ShowControlReference();
68 void ShowLoadDialog();
69 void WriteToConsole(const std::string &message, const std::string &color = "white");
70 bool ReportMissingFiles(std::vector<std::string> &missing_files);
71 bool IsConsoleVisible();
72
73private:
74
75 wxProgressDialog *progdialog;
76
77 //control panel
79
80 //console window
82
83 //load dialog window
85
86 //progress dialog initial data
88 std::string prog_text;
89
91};
92
93}
94
95#endif
96
std::string prog_text
Definition gui.h:88
wxProgressDialog * progdialog
Definition gui.h:75
VM * vm
Definition gui.h:90
Console * console
Definition gui.h:81
bool show_progress
Definition gui.h:87
LoadDialog * loaddialog
Definition gui.h:84
DebugPanel * dpanel
Definition gui.h:78
void UnregisterDebugPanel()
Definition gui.h:47
#define VMIMPEXP
Definition vm.h:49