FlightGear next
|
An XML-configured dialog box. More...
#include <FGPUICompatDialog.hxx>
Inherits FGDialog.
Classes | |
class | DialogPeer |
Public Member Functions | |
FGPUICompatDialog (SGPropertyNode *props, std::string translationDomain="core") | |
Construct a new GUI widget configured by a property tree. | |
virtual | ~FGPUICompatDialog () |
Destructor. | |
virtual void | updateValues (const std::string &objectName="") |
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="") |
Apply the values of all GUI objects with a specific name, or all if an empty name is given (default). | |
bool | init () |
void | update () override |
Update state. | |
void | relayout () |
Recompute the dialog's layout. | |
void | setNeedsLayout () |
virtual const char * | getName () |
virtual void | bringToFront () |
std::string | nameString () const |
std::string | nasalModule () const |
SGRectd | geometry () const |
double | getX () const |
double | getY () const |
double | width () const |
double | height () const |
void | close () override |
Close the dialog. | |
std::string | title () const |
void | setTitle (const std::string &s) |
const std::string & | windowType () const |
uint32_t | uiVersion () const |
return the UI XML syntax version used by this dialog. | |
PUICompatObjectRef | widgetByName (const std::string &name) const |
find the dialog widget with the specified name, or nullptr. | |
void | runCallback (const std::string &name, SGPropertyNode_ptr args) override |
![]() | |
virtual | ~FGDialog () |
Destructor. | |
WindowStyle | windowStyle () const |
bool | isFlagSet (WindowFlags f) const |
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. | |
Static Public Member Functions | |
static void | setupGhost (nasal::Hash &compatModule) |
Friends | |
naRef | f_makeDialogPeer (const nasal::CallContext &ctx) |
naRef | f_dialogRootObject (FGPUICompatDialog &dialog, naContext c) |
Additional Inherited Members | |
![]() | |
enum | WindowStyle { Window , ModalDialog , MessageBox } |
enum | WindowFlags { Resizable = 1 << 0 , Closeable = 1 << 1 , ButtonBox = 1 << 2 } |
![]() | |
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 35 of file FGPUICompatDialog.hxx.
FGPUICompatDialog::FGPUICompatDialog | ( | SGPropertyNode * | props, |
std::string | translationDomain = "core" ) |
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 115 of file FGPUICompatDialog.cxx.
|
virtual |
Destructor.
Definition at line 125 of file FGPUICompatDialog.cxx.
|
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. |
Implements FGDialog.
Definition at line 237 of file FGPUICompatDialog.cxx.
|
virtual |
Reimplemented from FGDialog.
Definition at line 201 of file FGPUICompatDialog.cxx.
|
overridevirtual |
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.
Implements FGDialog.
Definition at line 130 of file FGPUICompatDialog.cxx.
SGRectd FGPUICompatDialog::geometry | ( | ) | const |
Definition at line 317 of file FGPUICompatDialog.cxx.
|
virtual |
Reimplemented from FGDialog.
Definition at line 227 of file FGPUICompatDialog.cxx.
double FGPUICompatDialog::getX | ( | ) | const |
Definition at line 297 of file FGPUICompatDialog.cxx.
double FGPUICompatDialog::getY | ( | ) | const |
Definition at line 302 of file FGPUICompatDialog.cxx.
double FGPUICompatDialog::height | ( | ) | const |
Definition at line 312 of file FGPUICompatDialog.cxx.
bool FGPUICompatDialog::init | ( | ) |
Definition at line 154 of file FGPUICompatDialog.cxx.
std::string FGPUICompatDialog::nameString | ( | ) | const |
Definition at line 322 of file FGPUICompatDialog.cxx.
std::string FGPUICompatDialog::nasalModule | ( | ) | const |
Definition at line 327 of file FGPUICompatDialog.cxx.
void FGPUICompatDialog::relayout | ( | ) |
Recompute the dialog's layout.
Definition at line 260 of file FGPUICompatDialog.cxx.
|
overridevirtual |
Implements FGDialog.
Definition at line 206 of file FGPUICompatDialog.cxx.
|
inline |
Definition at line 101 of file FGPUICompatDialog.hxx.
void FGPUICompatDialog::setTitle | ( | const std::string & | s | ) |
Definition at line 349 of file FGPUICompatDialog.cxx.
|
static |
Definition at line 87 of file FGPUICompatDialog.cxx.
std::string FGPUICompatDialog::title | ( | ) | const |
Definition at line 338 of file FGPUICompatDialog.cxx.
|
inline |
return the UI XML syntax version used by this dialog.
0 = no version specified explicitly, 1 = compatible with PUI dialogs in older versions of FlightGear. Higher numbers indicate features than only work with the updated XML UI.
Definition at line 136 of file FGPUICompatDialog.hxx.
|
overridevirtual |
Update state.
Called on active dialogs before rendering.
Implements FGDialog.
Definition at line 242 of file FGPUICompatDialog.cxx.
|
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. |
Implements FGDialog.
Definition at line 232 of file FGPUICompatDialog.cxx.
PUICompatObjectRef FGPUICompatDialog::widgetByName | ( | const std::string & | name | ) | const |
find the dialog widget with the specified name, or nullptr.
Definition at line 355 of file FGPUICompatDialog.cxx.
double FGPUICompatDialog::width | ( | ) | const |
Definition at line 307 of file FGPUICompatDialog.cxx.
|
inline |
Definition at line 124 of file FGPUICompatDialog.hxx.
|
friend |
Definition at line 69 of file FGPUICompatDialog.cxx.
|
friend |
Definition at line 76 of file FGPUICompatDialog.cxx.