X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/223d09f6b523aac674ef9b72a883dfa8d37c5d4e..57c4d796c56bd48ce370240107f3e4c07e142985:/src/gtk1/radiobox.cpp?ds=inline diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index 43b4ae7803..9d5d677395 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -20,6 +20,7 @@ #include "gdk/gdk.h" #include "gtk/gtk.h" +#include "gdk/gdkkeysyms.h" #include "wx/gtk/win_gtk.h" //----------------------------------------------------------------------------- @@ -67,10 +68,6 @@ static void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRad IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl) -BEGIN_EVENT_TABLE(wxRadioBox, wxControl) - EVT_SIZE(wxRadioBox::OnSize) -END_EVENT_TABLE() - wxRadioBox::wxRadioBox() { } @@ -121,9 +118,9 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, if (!i) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_radio), TRUE ); gtk_signal_connect( GTK_OBJECT(m_radio), "clicked", - GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); + GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); - gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow), + gtk_pizza_put( GTK_PIZZA(m_parent->m_wxwindow), GTK_WIDGET(m_radio), m_x+10, m_y+10+(i*24), 10, 10 ); } @@ -161,11 +158,11 @@ wxRadioBox::~wxRadioBox() } } -void wxRadioBox::OnSize( wxSizeEvent &event ) +void wxRadioBox::DoSetSize( int x, int y, int width, int height, int sizeFlags ) { + wxWindow::DoSetSize( x, y, width, height, sizeFlags ); + LayoutItems(); - - event.Skip(); } wxSize wxRadioBox::LayoutItems() @@ -215,7 +212,7 @@ wxSize wxRadioBox::LayoutItems() int len = 22+gdk_string_measure( font, label->label ); if (len > max_len) max_len = len; - gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, m_x+x, m_y+y ); + gtk_pizza_move( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y ); y += 22; node = node->Next(); @@ -229,7 +226,7 @@ wxSize wxRadioBox::LayoutItems() { GtkWidget *button = GTK_WIDGET( node->Data() ); - gtk_myfixed_resize( GTK_MYFIXED(m_parent->m_wxwindow), button, max_len, 20 ); + gtk_pizza_resize( GTK_PIZZA(m_parent->m_wxwindow), button, max_len, 20 ); node = node->Next(); if (!node) break; @@ -265,7 +262,7 @@ wxSize wxRadioBox::LayoutItems() { GtkWidget *button = GTK_WIDGET( node->Data() ); - gtk_myfixed_set_size( GTK_MYFIXED(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, 20 ); + gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, 20 ); x += max; node = node->Next(); @@ -281,7 +278,11 @@ bool wxRadioBox::Show( bool show ) { wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid radiobox") ); - wxWindow::Show( show ); + if (!wxControl::Show(show)) + { + // nothing to do + return FALSE; + } if ((m_windowStyle & wxNO_BORDER) != 0) gtk_widget_hide( m_widget );