+ return (
+ IsOfClass(node, wxT("wxToggleButton")) ||
+ IsOfClass(node, wxT("wxBitmapToggleButton"))
+ );
+}
+
+void wxToggleButtonXmlHandler::DoCreateToggleButton(wxObject *control)
+{
+ wxToggleButton *button = wxDynamicCast(control, wxToggleButton);
+
+ wxString label = GetText(wxT("label"));
+
+ button->Create(m_parentAsWindow,
+ GetID(),
+#if defined(__WXUNIVERSAL__)
+ !label.empty() ? label : GetBitmap(wxT("bitmap"), wxART_BUTTON),
+#else
+ label,
+#endif
+ GetPosition(), GetSize(),
+ GetStyle(),
+ wxDefaultValidator,
+ GetName());
+
+ button->SetValue(GetBool( wxT("checked")));
+}
+
+void wxToggleButtonXmlHandler::DoCreateBitmapToggleButton(wxObject *control)
+{
+ wxBitmapToggleButton *button = wxDynamicCast(control, wxBitmapToggleButton);
+
+ button->Create(m_parentAsWindow,
+ GetID(),
+ GetBitmap(wxT("bitmap"), wxART_BUTTON),
+ GetPosition(), GetSize(),
+ GetStyle(),
+ wxDefaultValidator,
+ GetName());
+
+ button->SetValue(GetBool( wxT("checked")));