- bool LoadObject(wxObject *instance, wxWindow *parent, const wxString& name,
- const wxString& classname);
+ bool LoadObject(wxObject *instance,
+ wxWindow *parent,
+ const wxString& name,
+ const wxString& classname)
+ {
+ return DoLoadObject(instance, parent, name, classname, false);
+ }
+
+ // These versions of LoadObject() look for the object with the given name
+ // recursively (breadth first) and can be used to instantiate an individual
+ // control defined anywhere in an XRC file. No check is done that the name
+ // is unique, it's up to the caller to ensure this.
+ wxObject *LoadObjectRecursively(wxWindow *parent,
+ const wxString& name,
+ const wxString& classname)
+ {
+ return DoLoadObject(parent, name, classname, true /* recursive */);
+ }
+
+ bool LoadObjectRecursively(wxObject *instance,
+ wxWindow *parent,
+ const wxString& name,
+ const wxString& classname)
+ {
+ return DoLoadObject(instance, parent, name, classname, true);
+ }