19 #include <ubit/unumber.hpp> 109 virtual int getDisplayType()
const {
return ATTRIBUTE;}
172 void addAttr(
UAttr&);
173 void addAttr(
const UStr& name,
const UStr& value);
175 UStr* getAttr(
const UStr&,
bool ignore_case =
true);
177 template <
class AttrClass>
178 AttrClass*
getAttr()
const {AttrClass* a; _attributes.findClass(a);
return a;}
183 template <
class AttrClass>
184 AttrClass&
obtainAttr()
const {AttrClass* a; _attributes.findClass(a);
return a ? *a : *
new AttrClass;}
201 UTip(
const char* label = null);
224 virtual UTip&
set(
const char* label);
236 inline UTip& utip(
const char* label = null) {
return *
new UTip(label);}
239 inline UTip& utip(
const UArgs& args) {
return *
new UTip(args);}
260 UStr& value() {
return *pstring;}
277 inline UTitle& utitle(
const char*_s) {
return *
new UTitle(_s);}
Base class for attributes.
Definition: uattr.hpp:97
virtual void removingFrom(UChild &, UElem &parent)
called when this object is removed from a parent (SEE DETAILS IF YOU REDEFINE THIS METHOD)...
Definition: unode.hpp:222
virtual UStr getNodeValue() const
returns the value of this attribute (calls getValue()).
Definition: uattr.cpp:39
Definition: uobject.hpp:282
Box container.
Definition: ubox.hpp:64
Box tool tip.
Definition: uattr.hpp:197
Base class of objects that can be added to the UBIT scene graph (SEE DETAILS!).
Definition: unode.hpp:38
const UStr & getClassName() const
returns getClass().getName().
Definition: uobject.cpp:53
virtual UAttr * toAttr()
dynamic cast: returns this object if it derives from UAttr and null otherwise.
Definition: uattr.hpp:106
Window Title.
Definition: uattr.hpp:246
virtual void initNode(UDoc *, UElem *parent)
called when the document is created.
Definition: uattr.hpp:132
virtual bool getValue(UStr &value) const
gets the value of this attribute.
Definition: uattr.cpp:43
UObject & setConst()
specifies that the content of this object cannot be modified.
Definition: uobject.cpp:161
Attribute list.
Definition: uattr.hpp:167
virtual int getNodeType() const
returns the XML node type.
Definition: uattr.hpp:110
Generic Document.
Definition: udoc.hpp:122
AttrClass * getAttr() const
returns the attribute that derives from AttrClass.
Definition: uattr.hpp:178
virtual void addingTo(UChild &, UElem &parent)
called when this object is added to a parent.
Definition: unode.hpp:219
lightweight general purpose container.
Definition: uelem.hpp:44
Smart Pointer for UObject instances (.
Definition: uobject.hpp:365
base class of callback objects for firing functions or methods.
Definition: ucall.hpp:144
Argument list (for passing arguments to constructor or add functions).
Definition: uargs.hpp:43
AttrClass & obtainAttr() const
returns the attribute that derives from AttrClass.
Definition: uattr.hpp:184
virtual void putProp(UUpdateContext *, UElem &)
[impl] changes corresponding value in the UUpdateContext
Definition: uattr.hpp:155
virtual void changed(bool update=true)
[impl] called when object's content is changed.
Definition: uattr.cpp:53
virtual const UStr & getNodeName() const
returns the name of this attribute (calls getName()).
Definition: uattr.hpp:112
Definition: uupdatecontext.hpp:32
Definition: uhardfont.hpp:31
virtual UAttr & onChange(UCall &)
adds a callback that is fired when the value of the property is modified.
Definition: uattr.cpp:48
virtual const UStr & getName() const
returns the name of this attribute.
Definition: uattr.hpp:118
virtual void setValue(const UStr &value)
changes the value of this attribute does nothing if not applicable for a given subclass.
Definition: uattr.hpp:127
virtual const UAttr * toAttr() const
dynamic cast: returns this object if it derives from UAttr and null otherwise.
Definition: uattr.hpp:107
virtual void update()
updates parents graphics.
Definition: uattr.hpp:144
Ubit String.
Definition: ustr.hpp:72
[impl] Internal implementation of a child node.
Definition: uchild.hpp:23