11#include "simgear/math/SGRect.hxx"
14#include <simgear/misc/sg_path.hxx>
15#include <simgear/nasal/cppbind/NasalHash.hxx>
16#include <simgear/nasal/cppbind/NasalObject.hxx>
17#include <simgear/props/condition.hxx>
18#include <simgear/props/props.hxx>
38 static void setupGhost(nasal::Hash& compatModule);
73 virtual void updateValues(
const std::string& objectName =
"");
86 virtual void applyValues(
const std::string& objectName =
"");
103 _needsRelayout =
true;
116 double width()
const;
119 void close()
override;
121 std::string
title()
const;
122 void setTitle(
const std::string& s);
147 void runCallback(
const std::string&
name, SGPropertyNode_ptr args)
override;
154 void display(SGPropertyNode* props);
159 int getKeyCode(
const char* keystring);
163 SGPropertyNode_ptr _props;
166 SGRectd _geometry = SGRectd{0.0, 0.0, 0.0, 0.0};
170 SGPropertyNode_ptr _nasal_close;
174 SGSharedPtr<DialogPeer> _peer;
176 std::string _windowType;
180 uint32_t _uiVersion = 0;
SGSharedPtr< PUICompatObject > PUICompatObjectRef
FGDialog(SGPropertyNode *props, std::string translationDomain="core")
Construct a new GUI widget configured by a property tree.
std::string translationDomain() const noexcept
Return the translation domain of the dialog.
An XML-configured dialog box.
std::string nasalModule() const
void runCallback(const std::string &name, SGPropertyNode_ptr args) override
virtual const char * getName()
std::string nameString() const
friend naRef f_dialogRootObject(FGPUICompatDialog &dialog, naContext c)
const std::string & windowType() const
void update() override
Update state.
static void setupGhost(nasal::Hash &compatModule)
std::string title() const
void setTitle(const std::string &s)
virtual void bringToFront()
FGPUICompatDialog(SGPropertyNode *props, std::string translationDomain="core")
Construct a new GUI widget configured by a property tree.
void relayout()
Recompute the dialog's layout.
friend naRef f_makeDialogPeer(const nasal::CallContext &ctx)
void close() override
Close the dialog.
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.
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).
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)...
XML-configured GUI subsystem.