+
+// wxControl-specific processing after processing the update event
+void wxControlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
+{
+ // call inherited
+ wxWindowBase::DoUpdateWindowUI(event);
+
+ // update label
+ if ( event.GetSetText() )
+ {
+ if ( event.GetText() != GetLabel() )
+ SetLabel(event.GetText());
+ }
+
+ // Unfortunately we don't yet have common base class for
+ // wxRadioButton, so we handle updates of radiobuttons here.
+ // TODO: If once wxRadioButtonBase will exist, move this code there.
+#if wxUSE_RADIOBTN
+ if ( event.GetSetChecked() )
+ {
+ wxRadioButton *radiobtn = wxDynamicCastThis(wxRadioButton);
+ if ( radiobtn )
+ radiobtn->SetValue(event.GetChecked());
+ }
+#endif // wxUSE_RADIOBTN
+}
+
+/* static */
+wxString wxControlBase::RemoveMnemonics(const wxString& str)
+{
+ return wxStripMenuCodes(str, wxStrip_Mnemonics);
+}
+
+wxBorder wxControlBase::GetDefaultBorder() const
+{
+ return wxBORDER_THEME;
+}
+
+
+// ----------------------------------------------------------------------------
+// wxStaticBitmap
+// ----------------------------------------------------------------------------
+
+#if wxUSE_STATBMP
+
+wxStaticBitmapBase::~wxStaticBitmapBase()
+{
+ // this destructor is required for Darwin
+}
+
+wxSize wxStaticBitmapBase::DoGetBestSize() const
+{
+ wxSize best;
+ wxBitmap bmp = GetBitmap();
+ if ( bmp.Ok() )
+ best = wxSize(bmp.GetWidth(), bmp.GetHeight());
+ else
+ // this is completely arbitrary
+ best = wxSize(16, 16);
+ CacheBestSize(best);
+ return best;
+}
+
+#endif // wxUSE_STATBMP
+
+#endif // wxUSE_CONTROLS