Emergency 20 Dokumentation  4.2.0
em5::MessageBox Class Reference

Message box GUI element class. More...

#include <MessageBox.h>

Inheritance diagram for em5::MessageBox:
em5::GuiHotReloadSupport qsf::GuiDocument

Public Member Functions

 MessageBox (qsf::GuiContext &guiContext)
 Constructor. More...
 
void setup (const std::string &title, const std::string &text, const std::string &buttonTrueText, const std::string &buttonFalseText, const boost::function< void(bool)> &callback)
 Setup the text and the callback function. More...
 
void setup (const std::string &title, const std::string &text, const std::string &buttonTrueText, const std::string &buttonFalseText, float autoFalseTime, const boost::function< void(bool)> &callback)
 
void setup (const std::string &title, const std::string &text, const std::string &buttonText, const boost::function< void(bool)> &callback)
 
void setup (const std::string &title, const std::string &text, const std::string &buttonText)
 
void abort ()
 
virtual void processEvent (const std::string &eventKey, Rocket::Core::Event &event) override
 Process the button events. More...
 
virtual void onPostShow () override
 Called after show. More...
 
- Public Member Functions inherited from em5::GuiHotReloadSupport
 GuiHotReloadSupport (qsf::GuiContext &guiContext)
 Default constructor. More...
 
virtual ~GuiHotReloadSupport ()
 Destructor. More...
 
- Public Member Functions inherited from qsf::GuiDocument
 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 processViewportDimensionsChanged (int width, int height)
 

Protected Member Functions

virtual void onReloadGui () override
 Gets called when the GUI should be reloaded. More...
 
- Protected Member Functions inherited from em5::GuiHotReloadSupport
virtual bool onDocumentPreShow ()
 
virtual void onDocumentPreHide ()
 
- Protected Member Functions inherited from qsf::GuiDocument
void createEmptyDocument ()
 

Additional Inherited Members

- Static Public Member Functions inherited from qsf::GuiDocument
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...
 

Detailed Description

Message box GUI element class.

Constructor & Destructor Documentation

em5::MessageBox::MessageBox ( qsf::GuiContext guiContext)
explicit

Constructor.

Member Function Documentation

void em5::MessageBox::abort ( )
virtual void em5::MessageBox::onPostShow ( )
overridevirtual

Called after show.

Note
  • This method gives you the opportunity to manipulate the document after it was shown
  • The default implementation is empty

Reimplemented from qsf::GuiDocument.

virtual void em5::MessageBox::onReloadGui ( )
overrideprotectedvirtual

Gets called when the GUI should be reloaded.

Reimplemented from em5::GuiHotReloadSupport.

virtual void em5::MessageBox::processEvent ( const std::string &  eventKey,
Rocket::Core::Event &  event 
)
overridevirtual

Process the button events.

Reimplemented from qsf::GuiDocument.

void em5::MessageBox::setup ( const std::string &  title,
const std::string &  text,
const std::string &  buttonTrueText,
const std::string &  buttonFalseText,
const boost::function< void(bool)> &  callback 
)

Setup the text and the callback function.

void em5::MessageBox::setup ( const std::string &  title,
const std::string &  text,
const std::string &  buttonTrueText,
const std::string &  buttonFalseText,
float  autoFalseTime,
const boost::function< void(bool)> &  callback 
)
void em5::MessageBox::setup ( const std::string &  title,
const std::string &  text,
const std::string &  buttonText,
const boost::function< void(bool)> &  callback 
)
void em5::MessageBox::setup ( const std::string &  title,
const std::string &  text,
const std::string &  buttonText 
)

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