return FALSE;
}
- m_widget = gtk_frame_new(NULL);
- SetLabel(label);
+ m_widget = GTKCreateFrame(label);
+ wxControl::SetLabel(label);
m_parent->DoAddChild( this );
void wxStaticBox::DoApplyWidgetStyle(GtkRcStyle *style)
{
- gtk_widget_modify_style(m_widget, style);
-#ifdef __WXGTK20__
- gtk_widget_modify_style(GTK_FRAME(m_widget)->label_widget, style);
-#endif
+ GTKFrameApplyWidgetStyle(GTK_FRAME(m_widget), style);
+}
+
+bool wxStaticBox::GTKWidgetNeedsMnemonic() const
+{
+ return true;
+}
+
+void wxStaticBox::GTKWidgetDoSetMnemonic(GtkWidget* w)
+{
+ GTKFrameSetMnemonicWidget(GTK_FRAME(m_widget), w);
}
// static
return GetDefaultAttributesFromGTKWidget(gtk_frame_new);
}
+
+void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
+{
+ const int BORDER = 5; // FIXME: hardcoded value
+
+ *borderTop = GetLabel().empty() ? 2*BORDER : GetCharHeight();
+ *borderOther = BORDER;
+}
+
#endif // wxUSE_STATBOX