7#include <simgear/math/SGMath.hxx>
8#include <simgear/nasal/cppbind/NasalHash.hxx>
9#include <simgear/nasal/cppbind/NasalObject.hxx>
10#include <simgear/props/propsfwd.hxx>
11#include <simgear/structure/SGBinding.hxx>
12#include <simgear/structure/SGReferenced.hxx>
27 static void setupGhost(nasal::Hash& guiModule);
54 naRef
show(naRef viewParent);
69 const std::string&
type()
const;
71 const std::string&
name()
const
98 return _live != LiveValueMode::OnApply;
104 const std::string& resource = {},
105 const std::string& domain = {})
const;
107 const std::string& resource = {},
108 const std::string& domain = {})
const;
123 enum class LiveValueMode {
133 naRef nasalGetConfigValue(
const nasal::CallContext ctx)
const;
137 void recursiveUpdate(
const std::string& objectName = {});
138 void recursiveUpdateValues(
const std::string& objectName = {});
139 void recursiveApply(
const std::string& objectName = {});
140 void recursiveOnDelete();
144 nasal::Hash gridLocation(
const nasal::CallContext& ctx)
const;
146 SGWeakPtr<PUICompatObject> _parent;
147 SGWeakPtr<FGPUICompatDialog> _dialog;
151 SGPropertyNode_ptr _config;
156 std::string _oldPolledValue;
158 SGPropertyNode_ptr _value;
161 LiveValueMode _live = LiveValueMode::OnApply;
162 bool _valueChanged =
false;
163 bool _visible =
true;
164 bool _enabled =
true;
165 bool _labelChanged =
false;
167 SGConditionRef _visibleCondition;
168 SGConditionRef _enableCondition;
170 SGBindingList _bindings;
SGSharedPtr< PUICompatObject > PUICompatObjectRef
SGSharedPtr< FGPUICompatDialog > PUICompatDialogRef
SGSharedPtr< PUICompatObject > PUICompatObjectRef
std::vector< PUICompatObjectRef > PUICompatObjectVec
An XML-configured dialog box.
std::string radioGroupIdent() const
return the radio group ID associated with this widget (which is presumably a radio-button)
std::string translatePluralString(const std::string &key, int cardinal, const std::string &resource={}, const std::string &domain={}) const
void valueChanged(SGPropertyNode *node) override
virtual void updateGeometry(const SGRectd &newGeom)
std::string translateString(const std::string &key, const std::string &resource={}, const std::string &domain={}) const
void setGeometry(const SGRectd &g)
friend class FGPUICompatDialog
PUICompatObject(naRef impl, const std::string &type)
const std::string & name() const
naRef show(naRef viewParent)
virtual void activateBindings()
friend naRef f_makeCompatObjectPeer(const nasal::CallContext &ctx)
PUICompatObjectRef parent() const
PUICompatDialogRef dialog() const
PUICompatObjectRef widgetByName(const std::string &name) const
find an object (which might be us, or a descendant) with the corresponding name, or nullptr.
virtual ~PUICompatObject()
static void setupGhost(nasal::Hash &guiModule)
static PUICompatObjectRef createForType(const std::string &type, SGPropertyNode_ptr config)
naRef propertyValue(naContext ctx) const
return the actual Nasal value of our property: this avoids the need to create a the property ghost an...
const std::string & type() const
naRef property() const
return the wrapped props,Node corresponding to our property
PUICompatObjectVec children() const
virtual void updateValue()
static bool isNodeAChildObject(const std::string &nm, int uiVersion)