#include "wx/tooltip.h"
#endif
-#include "gdk/gdk.h"
-#include "gtk/gtk.h"
-#include "gdk/gdkkeysyms.h"
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
//-----------------------------------------------------------------------------
// idle system
event.m_commandInt = n;
- listbox->GetEventHandler()->ProcessEvent( event );
+ listbox->GetEventHandler()->AddPendingEvent( event );
+// listbox->GetEventHandler()->ProcessEvent( event );
}
//-----------------------------------------------------------------------------
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 );
+ SetSizeOrDefault( size );
if ( style & wxLB_SORT )
{
(GtkSignalFunc)gtk_listbox_key_press_callback,
(gpointer)this );
- gtk_widget_show( list_item );
-
ConnectWidget( list_item );
+ gtk_widget_show( list_item );
+
if (GTK_WIDGET_REALIZED(m_widget))
{
gtk_widget_realize( list_item );
bool wxListBox::IsOwnGtkWindow( GdkWindow *window )
{
- if (wxWindow::IsOwnGtkWindow( window )) return TRUE;
+ if (GTK_WIDGET(m_list)->window == window) return TRUE;
GList *child = m_list->children;
while (child)
UpdateWindowUI();
}
+wxSize wxListBox::DoGetBestSize() const
+{
+ return wxSize(100, 110);
+}
+
#endif