+ GtkScrolledWindow *s_window = GTK_SCROLLED_WINDOW(m_widget);
+
+ debug_focus_in( s_window->hscrollbar, "wxWindow::hsrcollbar", name );
+ debug_focus_in( s_window->vscrollbar, "wxWindow::vsrcollbar", name );
+
+#ifdef NEW_GTK_SCROLL_CODE
+ GtkViewport *viewport = GTK_VIEWPORT(s_window->child);
+#else
+ GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport);
+#endif
+
+ debug_focus_in( GTK_WIDGET(viewport), "wxWindow::viewport", name );
+#endif
+
+ gtk_widget_show( GTK_WIDGET(m_list) );
+
+ wxSize newSize = size;
+ if (newSize.x == -1) newSize.x = 100;
+ if (newSize.y == -1) newSize.y = 110;
+ SetSize( newSize.x, newSize.y );
+
+ for (int i = 0; i < n; i++)
+ {
+ m_clientDataList.Append( (wxObject*) NULL );
+ m_clientObjectList.Append( (wxObject*) NULL );
+
+ GtkWidget *list_item;
+
+ if (m_hasCheckBoxes)
+ {
+ wxString str = "[-] ";
+ str += choices[i];
+ list_item = gtk_list_item_new_with_label( str );
+ }
+ else
+ {
+ list_item = gtk_list_item_new_with_label( choices[i] );
+ }
+
+#ifdef __WXDEBUG__
+ debug_focus_in( list_item, "wxListBox::list_item", name );
+#endif
+
+ gtk_container_add( GTK_CONTAINER(m_list), list_item );
+
+ gtk_signal_connect( GTK_OBJECT(list_item), "select",
+ GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+
+ if (style & wxLB_MULTIPLE)
+ gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
+ GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+
+ gtk_signal_connect( GTK_OBJECT(list_item),
+ "button_press_event",
+ (GtkSignalFunc)gtk_listbox_button_press_callback,
+ (gpointer) this );
+
+ if (m_hasCheckBoxes)
+ {
+ gtk_signal_connect( GTK_OBJECT(list_item),
+ "key_press_event",
+ (GtkSignalFunc)gtk_listbox_key_press_callback,
+ (gpointer)this );
+ }
+
+ ConnectWidget( list_item );
+
+ gtk_widget_show( list_item );
+ }
+
+ m_parent->AddChild( this );
+
+ (m_parent->m_insertCallback)( m_parent, this );
+
+ PostCreation();
+
+ gtk_widget_realize( GTK_WIDGET(m_list) );
+
+ SetBackgroundColour( parent->GetBackgroundColour() );
+ SetForegroundColour( parent->GetForegroundColour() );
+
+ Show( TRUE );
+
+ return TRUE;
+}
+
+wxListBox::~wxListBox()
+{
+ Clear();
+}
+
+void wxListBox::AppendCommon( const wxString &item )
+{
+ wxCHECK_RET( m_list != NULL, "invalid listbox" );