- if (g_isIdle) wxapp_install_idle_handler();
-
- if (g_blockEventsOnDrag) return FALSE;
- if (g_blockEventsOnScroll) return FALSE;
-
- if (!listbox->m_hasVMT) return FALSE;
-
- if (!g_hasDoubleClicked) return FALSE;
-
- wxCommandEvent event( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, listbox->GetId() );
- event.SetEventObject( listbox );
-
- wxArrayInt aSelections;
- int n, count = listbox->GetSelections(aSelections);
- if ( count > 0 )
- {
- n = aSelections[0];
- if ( listbox->HasClientObjectData() )
- event.SetClientObject( listbox->GetClientObject(n) );
- else if ( listbox->HasClientUntypedData() )
- event.SetClientData( listbox->GetClientData(n) );
- event.SetString( listbox->GetString(n) );
- }
- else
- {
- n = -1;
- }