#include "wx/settings.h"
#endif
+#include "wx/private/markupparser.h"
+
const char wxControlNameStr[] = "control";
// ============================================================================
return attrs;
}
+// ----------------------------------------------------------------------------
+// wxControl markup support
+// ----------------------------------------------------------------------------
+
+#if wxUSE_MARKUP
+
+/* static */
+wxString wxControlBase::RemoveMarkup(const wxString& markup)
+{
+ return wxMarkupParser::Strip(markup);
+}
+
+bool wxControlBase::DoSetLabelMarkup(const wxString& markup)
+{
+ const wxString label = RemoveMarkup(markup);
+ if ( label.empty() && !markup.empty() )
+ return false;
+
+ SetLabel(label);
+
+ return true;
+}
+
+#endif // wxUSE_MARKUP
+
// ----------------------------------------------------------------------------
// wxControlBase - ellipsization code
// ----------------------------------------------------------------------------
{
wxSize best;
wxBitmap bmp = GetBitmap();
- if ( bmp.Ok() )
+ if ( bmp.IsOk() )
best = wxSize(bmp.GetWidth(), bmp.GetHeight());
else
// this is completely arbitrary