Emergency 20 Dokumentation  4.2.0
qsf::GuiDocument Class Reference

Graphical User Interface (GUI) document base class. More...

#include <GuiDocument.h>

Inheritance diagram for qsf::GuiDocument:
em5::AchievementUnlockedWindow em5::AppStoreWindow em5::BaseHudLayer em5::BaseLayer em5::BuyUpgradeWindow em5::ChatWindow em5::CloudSynchronisationWindow em5::CommandWindow em5::ContentAuthenticationWindow em5::DebugEquipmentBox em5::DebugEventDetailBox em5::DebugEventFunctionWindow em5::DebugGuiWindow em5::DebugLogBox em5::DebugOrderBox em5::DebugSelectionInfoWindow em5::DebugTriggerWindow em5::DebugUpgradeBox em5::DebugWeatherBox em5::FireSpreadSimulationWindow em5::ForcePatchDialog em5::FullscreenVideoWindow em5::GenericDebugBox em5::GuiHotReloadSupport em5::HelpWindow em5::HqExtendedMessage em5::IngameEventFailedWindow em5::IngameExitDialogWindow em5::IngameMainMenuWindow em5::IngameMultiplayerCOOPEndWindow em5::IngameMultiplayerPvPEndWindow em5::IngamePromotionWindow em5::LicenseTextDialog em5::LoadingScreen em5::LogoScreen em5::MaterialCacheHeatingDialog em5::MedievalPreludeScreen em5::MenuBar em5::MessageWindow em5::MiniMapWindow em5::ModificationWindow em5::MultiplayerPlayerLeftMessage em5::MultiplayerScoreOverview em5::MultiplayerVoteFailedWindow em5::MultiplayerVoteWindow em5::ObjectiveWindow em5::OverlayWindow em5::PatchUpdateProgressDialog em5::SEKDroneScanWindow em5::SelectionWindowCommandable em5::SelectionWindowMulti em5::SelectionWindowVehicle em5::StartMenuBaseLayer em5::StartMenuInstalled em5::SupervisorWindow em5::ToolTipWindow em5::UnitOverviewWindow em5::VehicleOrderBar em5::VehicleOrderWindow em5::VehicleSelectionWindow em5::VideoPlayerWindow em5::WarblerFeedWindow qsf::DebugOverlay

Public Member Functions

 GuiDocument (GuiContext &guiContext)
 Constructor. More...
 
 GuiDocument (GuiContext &guiContext, Rocket::Core::ElementDocument &rocketCoreElementDocument)
 Constructor. More...
 
virtual ~GuiDocument ()
 Destructor. More...
 
GuiContextgetGuiContext () const
 Return the document's owning GUI context. More...
 
Rocket::Core::ElementDocument * getRocketCoreElementDocument () const
 Return the document's libRocket document. More...
 
bool loadByFilename (const std::string &filename)
 Load the document from an RML file. More...
 
void unload ()
 Use this method if you want to change a documents .rml file at runtime. More...
 
void show ()
 Show the document. More...
 
void showFocused ()
 Show the document focused. More...
 
void showModal ()
 Show the document modal. More...
 
void hide ()
 Hide the document. More...
 
bool isVisible () const
 Check if the document is currently visible. More...
 
void setVisible (bool visible)
 Show/hide the document. More...
 
void pullToFront ()
 Pull the document to the front. More...
 
Rocket::Core::Element * findElementById (const std::string &elementId) const
 Find an element inside the document by its case-sensitive ID. More...
 
void registerNewButton (const std::string &buttonId, const std::string &event, const std::string &eventKey)
 Register a new button. More...
 
virtual void toggleVisibility ()
 Toggle visibility. More...
 
virtual void processEvent (const std::string &eventKey, Rocket::Core::Event &event)
 
virtual void processViewportDimensionsChanged (int width, int height)
 

Static Public Member Functions

static Rocket::Core::EventListener * createEventListener (const std::string &eventKey)
 Create an event listener. More...
 
static GuiDocumentgetGuiDocumentByRocketCoreElement (Rocket::Core::Element *element)
 Return a QSF GUI document instance by using a given libRocket element instance. More...
 

Protected Member Functions

void createEmptyDocument ()
 

Detailed Description

Graphical User Interface (GUI) document base class.

Constructor & Destructor Documentation

qsf::GuiDocument::GuiDocument ( GuiContext guiContext)
explicit

Constructor.

Parameters
[in]guiContextQSF GUI context to create the document in
qsf::GuiDocument::GuiDocument ( GuiContext guiContext,
Rocket::Core::ElementDocument &  rocketCoreElementDocument 
)

Constructor.

Parameters
[in]guiContextQSF GUI context to create the document in
[in]rocketCoreElementDocumentRocket element document which have to copy
virtual qsf::GuiDocument::~GuiDocument ( )
virtual

Destructor.

Member Function Documentation

void qsf::GuiDocument::createEmptyDocument ( )
protected
static Rocket::Core::EventListener* qsf::GuiDocument::createEventListener ( const std::string &  eventKey)
static

Create an event listener.

Note
  • Ease-of-use method (redirecting internally to "qsf::GuiSystem::createEventListener()")
Rocket::Core::Element* qsf::GuiDocument::findElementById ( const std::string &  elementId) const

Find an element inside the document by its case-sensitive ID.

GuiContext & qsf::GuiDocument::getGuiContext ( ) const
inline

Return the document's owning GUI context.

static GuiDocument* qsf::GuiDocument::getGuiDocumentByRocketCoreElement ( Rocket::Core::Element *  element)
static

Return a QSF GUI document instance by using a given libRocket element instance.

Returns
QSF GUI document instance, can be a null pointer, do not destroy the instance
Rocket::Core::ElementDocument * qsf::GuiDocument::getRocketCoreElementDocument ( ) const
inline

Return the document's libRocket document.

void qsf::GuiDocument::hide ( )

Hide the document.

bool qsf::GuiDocument::isVisible ( ) const

Check if the document is currently visible.

bool qsf::GuiDocument::loadByFilename ( const std::string &  filename)

Load the document from an RML file.

Parameters
[in]filenameRelative UTF-8 filename in platform-independent notation of the document file to save
Returns
"true" on success, "false" if the file could not be found or loaded
void qsf::GuiDocument::processEvent ( const std::string &  eventKey,
Rocket::Core::Event &  event 
)
inlinevirtual

Reimplemented in em5::WarblerFeedWindow, em5::VehicleOrderWindow, em5::CommandWindow, em5::SupervisorWindow, em5::VehicleSelectionWindow, em5::PatchUpdateProgressDialog, em5::ObjectiveWindow, em5::ExtendedPreferencesGraphicWindow, em5::LoadingScreen, em5::MenuBar, em5::SelectionWindowVehicle, em5::MiniMapWindow, em5::IngameOnlineHighscoreWindow, em5::UnitOverviewWindow, em5::VehicleOrderBar, em5::IngameMainEventSuccessWindow, em5::MaterialCacheHeatingDialog, em5::SEKDroneScanWindow, em5::MessageBox, em5::DebugLogBox, em5::DebugSelectionInfoWindow, em5::FullscreenVideoWindow, em5::IngameMultiplayerCOOPEndWindow, em5::MultiplayerLobbyWindow, em5::VideoPlayerWindow, em5::IngameMultiplayerPvPEndWindow, em5::MainMenu, em5::SelectionWindowCommandable, em5::ForcePatchDialog, em5::AchievementUnlockedWindow, em5::CreditsWindow, em5::StartMenuInstalled, em5::HelpWindow, em5::SelectionWindowMulti, em5::IngameMainMenuWindow, em5::MultiplayerDirectConnectWindow, em5::StartGame, em5::DebugEventDetailBox, em5::MainMenuWindowBase, em5::MultiplayerHelpWindow, em5::MultiplayerCreateServerWindow, em5::MultiplayerWindow, em5::PreferencesGameWindow, em5::DebugGuiWindow, em5::MessageWindow, em5::PreferencesGraphicWindow, em5::DebugEventFunctionWindow, em5::ChatWindow, em5::LogoScreen, em5::DebugEquipmentBox, em5::BuyUpgradeWindow, em5::IngameFreeplayEndWindow, em5::IngameLoadSaveWindow, em5::IngameMainEventFailedWindow, em5::ModificationWindow, em5::LicenseTextDialog, em5::AchievementsWindow, em5::IngameEventFailedWindow, em5::AccountStatus, em5::MainEventWindow, em5::HqExtendedMessage, em5::MultiplayerVoteFailedWindow, em5::FreeplayWindow, em5::IngamePromotionWindow, em5::PreferencesAudioWindow, em5::SelectDifficultyWindow, em5::StartCampaign, em5::MultiplayerPlayerLeftMessage, em5::FreeplayFailedWindow, em5::SelectCampaign, em5::MultiplayerVoteWindow, em5::InputWindow, em5::AiNavigationDebugBox, em5::DebugEventBox, em5::DebugOrderBox, em5::DebugTriggerWindow, em5::DebugUpgradeBox, em5::DebugWeatherBox, em5::BaseHudLayer, em5::FireSpreadSimulationWindow, em5::IngameExitDialogWindow, em5::AccountStatusTitle, em5::BaseLayer, em5::AppStoreWindow, em5::StartMenuBaseLayer, and em5::GenericDebugBox.

void qsf::GuiDocument::processViewportDimensionsChanged ( int  width,
int  height 
)
inlinevirtual
void qsf::GuiDocument::pullToFront ( )

Pull the document to the front.

void qsf::GuiDocument::registerNewButton ( const std::string &  buttonId,
const std::string &  event,
const std::string &  eventKey 
)

Register a new button.

Note
  • Don't use this method if you can avoid it
void qsf::GuiDocument::setVisible ( bool  visible)

Show/hide the document.

Note
  • Has the same effect as "qsf::GuiDocument::show()"/"qsf::GuiDocument::hide()" but is more compact to write in certain use-cases
void qsf::GuiDocument::show ( )

Show the document.

void qsf::GuiDocument::showFocused ( )

Show the document focused.

void qsf::GuiDocument::showModal ( )

Show the document modal.

virtual void qsf::GuiDocument::toggleVisibility ( )
virtual

Toggle visibility.

void qsf::GuiDocument::unload ( )

Use this method if you want to change a documents .rml file at runtime.


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