X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ac5e1c9088dedba495f5af5dbfb23ca89487a78..98978a10b79e95dca76ac6da8192a88023a7a36f:/src/osx/listbox_osx.cpp?ds=sidebyside

diff --git a/src/osx/listbox_osx.cpp b/src/osx/listbox_osx.cpp
index e138470cae..3b74cc851e 100644
--- a/src/osx/listbox_osx.cpp
+++ b/src/osx/listbox_osx.cpp
@@ -370,4 +370,23 @@ void wxListBox::SetString(unsigned int n, const wxString& s)
     GetListPeer()->UpdateLine(n);
 }
 
+//
+// common event handling
+//
+
+void wxListBox::HandleLineEvent( unsigned int n, bool doubleClick )
+{
+    wxCommandEvent event( doubleClick ? wxEVT_COMMAND_LISTBOX_DOUBLECLICKED : 
+        wxEVT_COMMAND_LISTBOX_SELECTED, GetId() );
+    event.SetEventObject( this );
+    if ( HasClientObjectData() )
+        event.SetClientObject( GetClientObject(n) );
+    else if ( HasClientUntypedData() )
+        event.SetClientData( GetClientData(n) );
+    event.SetString( GetString(n) );
+    event.SetInt( n );
+    event.SetExtraLong( 1 );
+    HandleWindowEvent(event);
+}
+
 #endif // wxUSE_LISTBOX