+ // did we find one?
+ if (n)
+ {
+ wxObject *item = CreateResFromNode(n, m_parent, NULL);
+ wxButton *button = wxDynamicCast(item, wxButton);
+
+ if (button)
+ m_parentSizer->AddButton(button);
+ else
+ wxLogError(wxT("Error in resource - expected button."));
+
+ return item;
+ }
+ else /*n == NULL*/
+ {
+ wxLogError(wxT("Error in resource: no button within wxStdDialogButtonSizer."));
+ return NULL;
+ }
+ }
+}
+
+bool wxStdDialogButtonSizerXmlHandler::CanHandle(wxXmlNode *node)
+{
+ return (!m_isInside && IsOfClass(node, wxT("wxStdDialogButtonSizer"))) ||
+ (m_isInside && IsOfClass(node, wxT("button")));
+}