support mnemonics for wxStatic/RadioBox and made it easier to add support for more controls by virtualizing the mnemonics support logic (patch 1448178)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-03-12 14:21:19 +00:00
parent 186344760d
commit 2e1f50128a
11 changed files with 136 additions and 36 deletions

View File

@@ -205,8 +205,8 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
return false;
}
m_widget = gtk_frame_new(NULL);
SetLabel(title);
m_widget = GTKCreateFrame(title);
wxControl::SetLabel(title);
// majorDim may be 0 if all trailing parameters were omitted, so don't
// assert here but just use the correct value for it
@@ -530,8 +530,7 @@ void wxRadioBox::GtkEnableEvents()
void wxRadioBox::DoApplyWidgetStyle(GtkRcStyle *style)
{
gtk_widget_modify_style( m_widget, style );
gtk_widget_modify_style(GTK_FRAME(m_widget)->label_widget, style);
GTKFrameApplyWidgetStyle(GTK_FRAME(m_widget), style);
wxList::compatibility_iterator node = m_boxes.GetFirst();
while (node)
@@ -545,6 +544,16 @@ void wxRadioBox::DoApplyWidgetStyle(GtkRcStyle *style)
}
}
bool wxRadioBox::GTKWidgetNeedsMnemonic() const
{
return true;
}
void wxRadioBox::GTKWidgetDoSetMnemonic(GtkWidget* w)
{
GTKFrameSetMnemonicWidget(GTK_FRAME(m_widget), w);
}
#if wxUSE_TOOLTIPS
void wxRadioBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
{