Skyscraper 2.0
|
#include <gui.h>
Public Member Functions | |
GUI (VM *parent) | |
~GUI () | |
void | UnregisterDebugPanel () |
void | Unload () |
void | ShowProgress () |
std::string | SelectBuilding (const std::string &data_path) |
std::string | SelectBuildingNative (const std::string &data_path) |
void | Resize () |
void | CreateDebugPanel () |
void | EnableConsole (bool value) |
void | RaiseWindow () |
void | EnableTimer (bool value) |
void | ShowConsole (bool send_button=true) |
void | ShowProgressDialog () |
void | CreateProgressDialog (const std::string &message) |
void | CloseProgressDialog () |
bool | UpdateProgress (int percent) |
bool | ProgressCancelled () |
void | ShowError (const std::string &message) |
void | ShowMessage (const std::string &message) |
void | RefreshConsole () |
void | ShowDebugPanel () |
void | ShowControlReference () |
void | ShowLoadDialog () |
void | WriteToConsole (const std::string &message, const std::string &color="white") |
bool | ReportMissingFiles (std::vector< std::string > &missing_files) |
bool | IsConsoleVisible () |
Private Attributes | |
wxProgressDialog * | progdialog |
DebugPanel * | dpanel |
Console * | console |
LoadDialog * | loaddialog |
bool | show_progress |
std::string | prog_text |
VM * | vm |
Skyscraper::GUI::GUI | ( | VM * | parent | ) |
Definition at line 43 of file gui.cpp.
References console, dpanel, loaddialog, progdialog, show_progress, and vm.
Skyscraper::GUI::~GUI | ( | ) |
Definition at line 54 of file gui.cpp.
References CloseProgressDialog(), console, loaddialog, progdialog, and Unload().
void Skyscraper::GUI::CloseProgressDialog | ( | ) |
Definition at line 253 of file gui.cpp.
References EnableTimer(), and progdialog.
Referenced by Skyscraper::EngineContext::Run(), and ~GUI().
void Skyscraper::GUI::CreateDebugPanel | ( | ) |
Definition at line 193 of file gui.cpp.
References Skyscraper::HAL::configfile, dpanel, Skyscraper::HAL::GetConfigInt(), Skyscraper::VM::GetHAL(), Skyscraper::VM::GetParent(), and vm.
void Skyscraper::GUI::CreateProgressDialog | ( | const std::string & | message | ) |
Definition at line 225 of file gui.cpp.
References Skyscraper::VM::ConcurrentLoads, EnableTimer(), Skyscraper::VM::GetEngineCount(), Skyscraper::VM::GetFirstValidEngine(), Skyscraper::EngineContext::IsRunning(), prog_text, progdialog, show_progress, and vm.
Referenced by Skyscraper::EngineContext::Load().
void Skyscraper::GUI::EnableConsole | ( | bool | value | ) |
Definition at line 202 of file gui.cpp.
References Skyscraper::Console::bSend, and console.
void Skyscraper::GUI::EnableTimer | ( | bool | value | ) |
Definition at line 208 of file gui.cpp.
References dpanel, and Skyscraper::DebugPanel::EnableTimer().
Referenced by CloseProgressDialog(), and CreateProgressDialog().
bool Skyscraper::GUI::IsConsoleVisible | ( | ) |
Definition at line 374 of file gui.cpp.
References console.
Referenced by Skyscraper::VMConsole::Process(), Skyscraper::VMConsole::Report(), and Skyscraper::VMConsole::VMConsole().
bool Skyscraper::GUI::ProgressCancelled | ( | ) |
Definition at line 283 of file gui.cpp.
References progdialog.
Referenced by Skyscraper::EngineContext::Run().
void Skyscraper::GUI::RaiseWindow | ( | ) |
Definition at line 300 of file gui.cpp.
References Skyscraper::VM::GetParent(), and vm.
Referenced by Skyscraper::EngineContext::Run().
void Skyscraper::GUI::RefreshConsole | ( | ) |
Definition at line 291 of file gui.cpp.
References console.
Referenced by Skyscraper::EngineContext::StartSim().
bool Skyscraper::GUI::ReportMissingFiles | ( | std::vector< std::string > & | missing_files | ) |
Definition at line 339 of file gui.cpp.
References Skyscraper::VM::GetHAL(), Skyscraper::HAL::Report(), Skyscraper::TextWindow::tMain, Skyscraper::twindow, and vm.
Referenced by Skyscraper::VM::ReportMissingFiles().
void Skyscraper::GUI::Resize | ( | ) |
std::string Skyscraper::GUI::SelectBuilding | ( | const std::string & | data_path | ) |
Definition at line 105 of file gui.cpp.
Referenced by Skyscraper::LoadDialog::On_bSelect_Click().
std::string Skyscraper::GUI::SelectBuildingNative | ( | const std::string & | data_path | ) |
void Skyscraper::GUI::ShowConsole | ( | bool | send_button = true | ) |
Definition at line 214 of file gui.cpp.
References Skyscraper::Console::bSend, Skyscraper::HAL::configfile, console, Skyscraper::HAL::GetConfigInt(), Skyscraper::VM::GetHAL(), Skyscraper::VM::GetParent(), and vm.
Referenced by Skyscraper::HAL::LoadConfiguration(), and Skyscraper::DebugPanel::On_bConsole_Click().
void Skyscraper::GUI::ShowControlReference | ( | ) |
Definition at line 317 of file gui.cpp.
References dpanel, and Skyscraper::DebugPanel::ShowControlReference().
void Skyscraper::GUI::ShowDebugPanel | ( | ) |
Definition at line 306 of file gui.cpp.
References Skyscraper::HAL::configfile, dpanel, Skyscraper::HAL::GetConfigInt(), Skyscraper::VM::GetHAL(), Skyscraper::VM::GetParent(), and vm.
void Skyscraper::GUI::ShowError | ( | const std::string & | message | ) |
Definition at line 84 of file gui.cpp.
Referenced by Skyscraper::HAL::Report(), Skyscraper::HAL::ReportError(), Skyscraper::EngineContext::ReportFatalError(), and Skyscraper::HAL::ReportFatalError().
void Skyscraper::GUI::ShowLoadDialog | ( | ) |
Definition at line 322 of file gui.cpp.
References dpanel, Skyscraper::VM::GetParent(), loaddialog, and vm.
void Skyscraper::GUI::ShowMessage | ( | const std::string & | message | ) |
void Skyscraper::GUI::ShowProgress | ( | ) |
Definition at line 98 of file gui.cpp.
References show_progress, and ShowProgressDialog().
void Skyscraper::GUI::ShowProgressDialog | ( | ) |
Definition at line 264 of file gui.cpp.
References Skyscraper::VM::GetParent(), prog_text, progdialog, show_progress, and vm.
Referenced by ShowProgress().
void Skyscraper::GUI::Unload | ( | ) |
|
inline |
Definition at line 47 of file gui.h.
Referenced by Skyscraper::DebugPanel::~DebugPanel().
bool Skyscraper::GUI::UpdateProgress | ( | int | percent | ) |
Definition at line 272 of file gui.cpp.
References progdialog.
Referenced by Skyscraper::VM::UpdateProgress().
void Skyscraper::GUI::WriteToConsole | ( | const std::string & | message, |
const std::string & | color = "white" ) |
Definition at line 330 of file gui.cpp.
References console, and Skyscraper::Console::Write().
Referenced by Skyscraper::HAL::messageLogged(), and Skyscraper::VMConsole::Report().
|
private |
Definition at line 81 of file gui.h.
Referenced by EnableConsole(), GUI(), IsConsoleVisible(), RefreshConsole(), ShowConsole(), WriteToConsole(), and ~GUI().
|
private |
Definition at line 78 of file gui.h.
Referenced by CreateDebugPanel(), EnableTimer(), GUI(), ShowControlReference(), ShowDebugPanel(), ShowLoadDialog(), and Unload().
|
private |
Definition at line 84 of file gui.h.
Referenced by GUI(), ShowLoadDialog(), and ~GUI().
|
private |
Definition at line 88 of file gui.h.
Referenced by CreateProgressDialog(), and ShowProgressDialog().
|
private |
Definition at line 75 of file gui.h.
Referenced by CloseProgressDialog(), CreateProgressDialog(), GUI(), ProgressCancelled(), ShowProgressDialog(), UpdateProgress(), and ~GUI().
|
private |
Definition at line 87 of file gui.h.
Referenced by CreateProgressDialog(), GUI(), ShowProgress(), and ShowProgressDialog().
|
private |
Definition at line 90 of file gui.h.
Referenced by CreateDebugPanel(), CreateProgressDialog(), GUI(), RaiseWindow(), ReportMissingFiles(), ShowConsole(), ShowDebugPanel(), ShowLoadDialog(), and ShowProgressDialog().