]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/radiobox.cpp
VTK wrapper of vtkRenderWindow for wxPython. Tested on MSW so far.
[wxWidgets.git] / src / gtk / radiobox.cpp
index d96aff1a1d099c852379498aafaf74a091a9887e..05dde830a4ada99020184e6ba00449441c9c5ac2 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "gdk/gdk.h"
 #include "gtk/gtk.h"
 
 #include "gdk/gdk.h"
 #include "gtk/gtk.h"
+#include "gdk/gdkkeysyms.h"
 #include "wx/gtk/win_gtk.h"
 
 //-----------------------------------------------------------------------------
 #include "wx/gtk/win_gtk.h"
 
 //-----------------------------------------------------------------------------
@@ -33,7 +34,7 @@ extern bool g_isIdle;
 // data
 //-----------------------------------------------------------------------------
 
 // data
 //-----------------------------------------------------------------------------
 
-extern bool   g_blockEventsOnDrag;
+extern bool       g_blockEventsOnDrag;
 
 //-----------------------------------------------------------------------------
 // "clicked"
 
 //-----------------------------------------------------------------------------
 // "clicked"
@@ -117,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",
         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 );
     }
                          GTK_WIDGET(m_radio),
                          m_x+10, m_y+10+(i*24), 10, 10 );
     }
@@ -211,7 +212,7 @@ wxSize wxRadioBox::LayoutItems()
                 int len = 22+gdk_string_measure( font, label->label );
                 if (len > max_len) max_len = len;
 
                 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();
                 y += 22;
 
                 node = node->Next();
@@ -225,7 +226,7 @@ wxSize wxRadioBox::LayoutItems()
             {
                 GtkWidget *button = GTK_WIDGET( node->Data() );
 
             {
                 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;
 
                 node = node->Next();
                 if (!node) break;
@@ -261,7 +262,7 @@ wxSize wxRadioBox::LayoutItems()
         {
             GtkWidget *button = GTK_WIDGET( node->Data() );
 
         {
             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();
             x += max;
 
             node = node->Next();
@@ -277,7 +278,11 @@ bool wxRadioBox::Show( bool show )
 {
     wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid radiobox") );
 
 {
     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 );
 
     if ((m_windowStyle & wxNO_BORDER) != 0)
         gtk_widget_hide( m_widget );
@@ -329,7 +334,6 @@ void wxRadioBox::SetFocus()
         if (button->active)
         {
             gtk_widget_grab_focus( GTK_WIDGET(button) );
         if (button->active)
         {
             gtk_widget_grab_focus( GTK_WIDGET(button) );
-
             return;
         }
         node = node->Next();
             return;
         }
         node = node->Next();