X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87152bb53d959eba3f7d6da04ae4dc4a33394079..eeea41abbcda4a2078014dc12f9d48242a21df89:/include/wx/xrc/xmlres.h diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index e48c0728c8..8699dd5d33 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -211,10 +211,13 @@ public: bool AttachUnknownControl(const wxString& name, wxWindow *control, wxWindow *parent = NULL); - // Returns a numeric ID that is equivalent to the string id used in an XML - // resource. To be used in event tables. - // Macro XRCID is provided for convenience - static int GetXRCID(const wxChar *str_id); + // Returns a numeric ID that is equivalent to the string ID used in an XML + // resource. If an unknown str_id is requested (i.e. other than wxID_XXX + // or integer), a new record is created which associates the given string + // with a number. If value_if_not_found == wxID_NONE, the number is obtained via + // wxNewId(). Otherwise value_if_not_found is used. + // Macro XRCID(name) is provided for convenient use in event tables. + static int GetXRCID(const wxChar *str_id, int value_if_not_found = wxID_NONE); // Returns version information (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a). long GetVersion() const { return m_version; } @@ -361,8 +364,7 @@ protected: // Returns true if the node has a property class equal to classname, // e.g. . - bool IsOfClass(wxXmlNode *node, const wxString& classname) - { return node->GetPropVal(wxT("class"), wxEmptyString) == classname; } + bool IsOfClass(wxXmlNode *node, const wxString& classname); // Gets node content from wxXML_ENTITY_NODE // The problem is, content is represented as