]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/listbox.cpp
The check column needs more space
[wxWidgets.git] / src / gtk1 / listbox.cpp
index 2af807102d5045e38cdad66681ca0308f6d2f6b2..3c2090064787fb737344adc55a1cf81d50bc57d8 100644 (file)
@@ -110,12 +110,12 @@ static gint gtk_listitem_focus_in_callback( GtkWidget *WXUNUSED(widget),
         win->m_hasFocus = true;
 
         wxChildFocusEvent eventChildFocus(win);
-        (void)win->GetEventHandler()->ProcessEvent(eventChildFocus);
+        (void)win->HandleWindowEvent(eventChildFocus);
 
         wxFocusEvent eventFocus(wxEVT_SET_FOCUS, win->GetId());
         eventFocus.SetEventObject(win);
 
-        (void)win->GetEventHandler()->ProcessEvent(eventFocus);
+        (void)win->HandleWindowEvent(eventFocus);
     }
 
     return FALSE;
@@ -134,7 +134,7 @@ static gint gtk_listitem_focus_out_callback( GtkWidget *WXUNUSED(widget),
     if (g_isIdle)
         wxapp_install_idle_handler();
 
-    g_focusWindow = (wxWindowGTK *)NULL;
+    g_focusWindow = NULL;
 
     // don't send the window a kill focus event if it thinks that it doesn't
     // have focus already
@@ -149,7 +149,7 @@ static gint gtk_listitem_focus_out_callback( GtkWidget *WXUNUSED(widget),
         // process it too as otherwise bad things happen, especially in GTK2
         // where the text control simply aborts the program if it doesn't get
         // the matching focus out event
-        (void)win->GetEventHandler()->ProcessEvent( event );
+        (void)win->HandleWindowEvent( event );
     }
 
     return FALSE;
@@ -202,7 +202,7 @@ gtk_listbox_button_release_callback( GtkWidget * WXUNUSED(widget),
 
     event.SetInt(n);
 
-    listbox->GetEventHandler()->ProcessEvent( event );
+    listbox->HandleWindowEvent( event );
 
     return FALSE;
 }
@@ -237,7 +237,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget,
         wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
         event.SetEventObject( listbox );
         event.SetInt( sel );
-        listbox->GetEventHandler()->ProcessEvent( event );
+        listbox->HandleWindowEvent( event );
     }
 #endif // wxUSE_CHECKLISTBOX
 
@@ -288,7 +288,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
         /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
         new_event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
         new_event.SetCurrentFocus( listbox );
-        ret = listbox->GetEventHandler()->ProcessEvent( new_event );
+        ret = listbox->HandleWindowEvent( new_event );
     }
 
     if ((gdk_event->keyval == GDK_Return) && (!ret))
@@ -309,7 +309,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
         wxCommandEvent new_event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
         new_event.SetEventObject( listbox );
         new_event.SetInt( sel );
-        ret = listbox->GetEventHandler()->ProcessEvent( new_event );
+        ret = listbox->HandleWindowEvent( new_event );
     }
 #endif // wxUSE_CHECKLISTBOX
 
@@ -347,7 +347,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
                 n = -1;
             }
             new_event.SetInt(n);
-            listbox->GetEventHandler()->ProcessEvent( new_event );
+            listbox->HandleWindowEvent( new_event );
         }
     }
 
@@ -412,7 +412,7 @@ static void gtk_listitem_select_cb( GtkWidget *widget,
 
 //    No longer required with new code in wxLB_SINGLE
 //    listbox->GetEventHandler()->AddPendingEvent( event );
-    listbox->GetEventHandler()->ProcessEvent( event );
+    listbox->HandleWindowEvent( event );
 }
 
 extern "C" {
@@ -460,7 +460,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems)
 
 wxListBox::wxListBox()
 {
-    m_list = (GtkList *) NULL;
+    m_list = NULL;
 #if wxUSE_CHECKLISTBOX
     m_hasCheckBoxes = false;
 #endif // wxUSE_CHECKLISTBOX
@@ -496,7 +496,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
         return false;
     }
 
-    m_widget = gtk_scrolled_window_new( (GtkAdjustment*) NULL, (GtkAdjustment*) NULL );
+    m_widget = gtk_scrolled_window_new( NULL, NULL );
     if (style & wxLB_ALWAYS_SB)
     {
       gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget),
@@ -548,7 +548,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
     }
     else
     {
-        m_strings = (wxSortedArrayString *)NULL;
+        m_strings = NULL;
     }
 
     Append(n, choices);
@@ -722,7 +722,7 @@ void wxListBox::DoDeleteOneItem(unsigned int n)
 
     wxCHECK_RET( child, wxT("wrong listbox index") );
 
-    GList *list = g_list_append( (GList*) NULL, child->data );
+    GList *list = g_list_append( NULL, child->data );
     gtk_list_remove_items( m_list, list );
     g_list_free( list );
 
@@ -994,7 +994,7 @@ void wxListBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
     GList *child = m_list->children;
     while (child)
     {
-        gtk_tooltips_set_tip( tips, GTK_WIDGET( child->data ), wxConvCurrent->cWX2MB(tip), (gchar*) NULL );
+        gtk_tooltips_set_tip( tips, GTK_WIDGET( child->data ), wxConvCurrent->cWX2MB(tip), NULL );
         child = child->next;
     }
 }