Skyscraper 2.0
Skyscraper::GUI Class Reference

#include <gui.h>

Collaboration diagram for Skyscraper::GUI:

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
 
DebugPaneldpanel
 
Consoleconsole
 
LoadDialogloaddialog
 
bool show_progress
 
std::string prog_text
 
VMvm
 

Detailed Description

Definition at line 42 of file gui.h.

Constructor & Destructor Documentation

◆ GUI()

Skyscraper::GUI::GUI ( VM * parent)

Definition at line 43 of file gui.cpp.

References console, dpanel, loaddialog, progdialog, show_progress, and vm.

◆ ~GUI()

Skyscraper::GUI::~GUI ( )

Definition at line 54 of file gui.cpp.

References CloseProgressDialog(), console, loaddialog, progdialog, and Unload().

Here is the call graph for this function:

Member Function Documentation

◆ CloseProgressDialog()

void Skyscraper::GUI::CloseProgressDialog ( )

Definition at line 253 of file gui.cpp.

References EnableTimer(), and progdialog.

Referenced by Skyscraper::EngineContext::Run(), and ~GUI().

Here is the call graph for this function:

◆ CreateDebugPanel()

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.

Here is the call graph for this function:

◆ CreateProgressDialog()

void Skyscraper::GUI::CreateProgressDialog ( const std::string & message)

◆ EnableConsole()

void Skyscraper::GUI::EnableConsole ( bool value)

Definition at line 202 of file gui.cpp.

References Skyscraper::Console::bSend, and console.

◆ EnableTimer()

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().

Here is the call graph for this function:

◆ IsConsoleVisible()

bool Skyscraper::GUI::IsConsoleVisible ( )

◆ ProgressCancelled()

bool Skyscraper::GUI::ProgressCancelled ( )

Definition at line 283 of file gui.cpp.

References progdialog.

Referenced by Skyscraper::EngineContext::Run().

◆ RaiseWindow()

void Skyscraper::GUI::RaiseWindow ( )

Definition at line 300 of file gui.cpp.

References Skyscraper::VM::GetParent(), and vm.

Referenced by Skyscraper::EngineContext::Run().

Here is the call graph for this function:

◆ RefreshConsole()

void Skyscraper::GUI::RefreshConsole ( )

Definition at line 291 of file gui.cpp.

References console.

Referenced by Skyscraper::EngineContext::StartSim().

◆ ReportMissingFiles()

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().

Here is the call graph for this function:

◆ Resize()

void Skyscraper::GUI::Resize ( )

◆ SelectBuilding()

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().

◆ SelectBuildingNative()

std::string Skyscraper::GUI::SelectBuildingNative ( const std::string & data_path)

Definition at line 161 of file gui.cpp.

◆ ShowConsole()

void Skyscraper::GUI::ShowConsole ( bool send_button = true)

◆ ShowControlReference()

void Skyscraper::GUI::ShowControlReference ( )

Definition at line 317 of file gui.cpp.

References dpanel, and Skyscraper::DebugPanel::ShowControlReference().

Here is the call graph for this function:

◆ ShowDebugPanel()

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.

Here is the call graph for this function:

◆ ShowError()

void Skyscraper::GUI::ShowError ( const std::string & message)

◆ ShowLoadDialog()

void Skyscraper::GUI::ShowLoadDialog ( )

Definition at line 322 of file gui.cpp.

References dpanel, Skyscraper::VM::GetParent(), loaddialog, and vm.

Here is the call graph for this function:

◆ ShowMessage()

void Skyscraper::GUI::ShowMessage ( const std::string & message)

Definition at line 91 of file gui.cpp.

◆ ShowProgress()

void Skyscraper::GUI::ShowProgress ( )

Definition at line 98 of file gui.cpp.

References show_progress, and ShowProgressDialog().

Here is the call graph for this function:

◆ 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().

Here is the call graph for this function:

◆ Unload()

void Skyscraper::GUI::Unload ( )

Definition at line 76 of file gui.cpp.

References dpanel.

Referenced by ~GUI().

◆ UnregisterDebugPanel()

void Skyscraper::GUI::UnregisterDebugPanel ( )
inline

Definition at line 47 of file gui.h.

Referenced by Skyscraper::DebugPanel::~DebugPanel().

◆ UpdateProgress()

bool Skyscraper::GUI::UpdateProgress ( int percent)

Definition at line 272 of file gui.cpp.

References progdialog.

Referenced by Skyscraper::VM::UpdateProgress().

◆ WriteToConsole()

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().

Here is the call graph for this function:

Member Data Documentation

◆ console

Console* Skyscraper::GUI::console
private

◆ dpanel

DebugPanel* Skyscraper::GUI::dpanel
private

◆ loaddialog

LoadDialog* Skyscraper::GUI::loaddialog
private

Definition at line 84 of file gui.h.

Referenced by GUI(), ShowLoadDialog(), and ~GUI().

◆ prog_text

std::string Skyscraper::GUI::prog_text
private

Definition at line 88 of file gui.h.

Referenced by CreateProgressDialog(), and ShowProgressDialog().

◆ progdialog

wxProgressDialog* Skyscraper::GUI::progdialog
private

◆ show_progress

bool Skyscraper::GUI::show_progress
private

Definition at line 87 of file gui.h.

Referenced by CreateProgressDialog(), GUI(), ShowProgress(), and ShowProgressDialog().

◆ vm


The documentation for this class was generated from the following files: