wxxmlresourcehandlerwxxmlresourcehandler is an abstract base class for resource handlers capable of creating a control from an xml node. see xml-based resource system overview for details. derived from include files <wx/xrc/xmlres.h> members
wxxmlresourcehandler::wxxmlresourcehandler
wxxmlresourcehandler::wxxmlresourcehandlerwxxmlresourcehandler() default constructor.
wxxmlresourcehandler::~wxxmlresourcehandler~wxxmlresourcehandler() destructor.
wxxmlresourcehandler::addstylevoid addstyle(const wxstring& name, int value) add a style flag (e.g. wxmb_dockable) to the list of flags understood by this handler.
wxxmlresourcehandler::addwindowstylesvoid addwindowstyles() add styles common to all wxwindow-derived classes.
wxxmlresourcehandler::canhandlebool canhandle(wxxmlnode* node) returns true if it understands this node and can create a resource from it, false otherwise. note you must not call any wxxmlresourcehandler methods except isofclass from this method! the instance is not yet initialized with node data at the time canhandle is called and it is only safe to operate on node directly or to call isofclass.
wxxmlresourcehandler::createchildrenvoid createchildren(wxobject* parent, bool this_hnd_only = false) creates children.
wxxmlresourcehandler::createchildrenprivatelyvoid createchildrenprivately(wxobject* parent, wxxmlnode* rootnode = null) helper function.
wxxmlresourcehandler::createresfromnodewxobject* createresfromnode(wxxmlnode* node, wxobject* parent, wxobject* instance = null) creates a resource from a node.
wxxmlresourcehandler::createresourcewxobject* createresource(wxxmlnode* node, wxobject* parent, wxobject* instance) creates an object (menu, dialog, control, ...) from an xml node. should check for validity. parent is a higher-level object (usually window, dialog or panel) that is often necessary to create the resource. if instance is non-null it should not create a new instance via 'new' but should rather use this one, and call its create method.
wxxmlresourcehandler::docreateresourcewxobject* docreateresource() called from createresource after variables were filled.
wxxmlresourcehandler::getbitmapwxbitmap getbitmap(const wxstring& param = wxt("bitmap"), wxsize size = wxdefaultsize) gets a bitmap.
wxxmlresourcehandler::getboolbool getbool(const wxstring& param, bool defaultv = false) gets a bool flag (1, t, yes, on, true are true, everything else is false).
wxxmlresourcehandler::getcolourwxcolour getcolour(const wxstring& param, const wxcolour& default = wxnullcolour) gets colour in html syntax (#rrggbb).
wxxmlresourcehandler::getcurfilesystemwxfilesystem& getcurfilesystem() returns the current file system.
wxxmlresourcehandler::getdimensionwxcoord getdimension(const wxstring& param, wxcoord defaultv = 0) gets a dimension (may be in dialog units).
wxxmlresourcehandler::getfontwxfont getfont(const wxstring& param = wxt("font")) gets a font.
wxxmlresourcehandler::getidint getid() returns the xrcid.
wxxmlresourcehandler::geticonwxicon geticon(const wxstring& param = wxt("icon"), wxsize size = wxdefaultsize) returns an icon.
wxxmlresourcehandler::getlonglong getlong(const wxstring& param, long defaultv = 0) gets the integer value from the parameter.
wxxmlresourcehandler::getnamewxstring getname() returns the resource name.
wxxmlresourcehandler::getnodecontentwxstring getnodecontent(wxxmlnode* node) gets node content from wxxml_entity_node.
wxxmlresourcehandler::getparamnodewxxmlnode* getparamnode(const wxstring& param) finds the node or returns null.
wxxmlresourcehandler::getparamvaluewxstring getparamvalue(const wxstring& param) finds the parameter value or returns the empty string.
wxxmlresourcehandler::getpositionwxpoint getposition(const wxstring& param = wxt("pos")) gets the position (may be in dialog units).
wxxmlresourcehandler::getsizewxsize getsize(const wxstring& param = wxt("size")) gets the size (may be in dialog units).
wxxmlresourcehandler::getstyleint getstyle(const wxstring& param = wxt("style"), int defaults = 0) gets style flags from text in form "flag | flag2| flag3 |..." only understands flags added with addstyle.
wxxmlresourcehandler::gettextwxstring gettext(const wxstring& param) gets text from param and does some conversions:
wxxmlresourcehandler::hasparambool hasparam(const wxstring& param) check to see if a parameter exists.
wxxmlresourcehandler::isofclassbool isofclass(wxxmlnode* node, const wxstring& classname) convenience function. returns true if the node has a property class equal to classname, e.g. <object class="wxdialog">.
wxxmlresourcehandler::setparentresourcevoid setparentresource(wxxmlresource* res) sets the parent resource.
wxxmlresourcehandler::setupwindowvoid setupwindow(wxwindow* wnd) sets common window options.
|