FlightGear next
|
An XML-configured dialog box. More...
#include <dialog.hxx>
Inherits SGWeakReferenced.
Inherited by FGPUICompatDialog.
Public Types | |
enum | WindowStyle { Window , ModalDialog , MessageBox } |
enum | WindowFlags { Resizable = 1 << 0 , Closeable = 1 << 1 , ButtonBox = 1 << 2 } |
Public Member Functions | |
virtual | ~FGDialog () |
Destructor. | |
virtual void | updateValues (const std::string &objectName="")=0 |
Update the values of all GUI objects with a specific name, or all if an empty name is given (default). | |
virtual void | applyValues (const std::string &objectName="")=0 |
Apply the values of all GUI objects with a specific name, or all if an empty name is given (default) | |
virtual void | update ()=0 |
Update state. | |
virtual const char * | getName () |
virtual void | bringToFront () |
virtual void | close ()=0 |
Close the dialog. | |
WindowStyle | windowStyle () const |
bool | isFlagSet (WindowFlags f) const |
virtual void | runCallback (const std::string &name, SGPropertyNode_ptr args={})=0 |
std::string | translationDomain () const noexcept |
Return the translation domain of the dialog. | |
void | setTranslationDomain (std::string domain) noexcept |
Set the translation domain of the dialog. | |
Protected Member Functions | |
FGDialog (SGPropertyNode *props, std::string translationDomain="core") | |
Construct a new GUI widget configured by a property tree. | |
An XML-configured dialog box.
The GUI manager stores only the property tree for the dialog boxes. This class creates a PUI dialog box on demand from the properties in that tree. The manager recreates the dialog every time it needs to show it.
Definition at line 20 of file dialog.hxx.
Enumerator | |
---|---|
Resizable | |
Closeable | |
ButtonBox |
Definition at line 79 of file dialog.hxx.
Enumerator | |
---|---|
Window | |
ModalDialog | |
MessageBox |
Definition at line 73 of file dialog.hxx.
|
virtualdefault |
Destructor.
|
protected |
Construct a new GUI widget configured by a property tree.
The configuration properties are not part of the main FlightGear property tree; the GUI manager reads them from individual configuration files.
props | A property tree describing the dialog. |
translationDomain | domain used to fetch translations of dialog elements such as labels |
The translationDomain
may be overwridden from props
.
Definition at line 45 of file dialog.cxx.
|
pure virtual |
Apply the values of all GUI objects with a specific name, or all if an empty name is given (default)
This method copies values from the GUI object(s) to the FlightGear property tree.
objectName | The name of the GUI object(s) to update. Use the empty name for all objects. |
Implemented in FGPUICompatDialog.
|
inlinevirtual |
Reimplemented in FGPUICompatDialog.
Definition at line 64 of file dialog.hxx.
|
pure virtual |
Close the dialog.
This should actually close the GUI assets associated, if you want an 'are you sure?' interaction, it needs to be handled in advance of this interaction.
Implemented in FGPUICompatDialog.
|
inlinevirtual |
Reimplemented in FGPUICompatDialog.
Definition at line 63 of file dialog.hxx.
bool FGDialog::isFlagSet | ( | WindowFlags | f | ) | const |
Definition at line 93 of file dialog.cxx.
|
pure virtual |
Implemented in FGPUICompatDialog.
|
noexcept |
Set the translation domain of the dialog.
This is the domain used to fetch translations of dialog elements such as labels.
Definition at line 66 of file dialog.cxx.
|
noexcept |
Return the translation domain of the dialog.
This is the domain used to fetch translations of dialog elements such as labels.
Definition at line 61 of file dialog.cxx.
|
pure virtual |
|
pure virtual |
Update the values of all GUI objects with a specific name, or all if an empty name is given (default).
This method copies values from the FlightGear property tree to the GUI object(s).
objectName | The name of the GUI object(s) to update. Use the empty name for all objects. |
Implemented in FGPUICompatDialog.
FGDialog::WindowStyle FGDialog::windowStyle | ( | ) | const |
Definition at line 88 of file dialog.cxx.