]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/listbox.cpp
mouse and cursor additions for cocoa, see #10361
[wxWidgets.git] / src / osx / carbon / listbox.cpp
index 23f6443ba019112b2bbdd348a25b5fe72cec1c52..148167afc03a93d5f598d0e5a144bea3ebe7368e 100644 (file)
@@ -250,16 +250,7 @@ void wxMacListBoxItem::Notification(wxMacDataItemBrowserControl *owner ,
     if (message == kDataBrowserItemDoubleClicked)
     {
         unsigned int n = owner->GetLineFromItem( this );
-        wxCommandEvent event( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, list->GetId() );
-        event.SetEventObject( list );
-        if ( list->HasClientObjectData() )
-            event.SetClientObject( list->GetClientObject(n) );
-        else if ( list->HasClientUntypedData() )
-            event.SetClientData( list->GetClientData(n) );
-        event.SetString( list->GetString(n) );
-        event.SetInt( n );
-        event.SetExtraLong( 1 );
-        list->HandleWindowEvent(event);
+        list->HandleLineEvent( n, true );
         return;
     }
 }
@@ -374,15 +365,7 @@ void wxMacDataBrowserListControl::ItemNotification(
         int sel = list->GetSelection();
         if ((sel < 0) || (sel > (int) list->GetCount()))  // OS X can select an item below the last item (why?)
            return;
-        event.SetEventObject( list );
-        if ( list->HasClientObjectData() )
-            event.SetClientObject( list->GetClientObject( sel ) );
-        else if ( list->HasClientUntypedData() )
-            event.SetClientData( list->GetClientData( sel ) );
-        event.SetString( list->GetString( sel ) );
-        event.SetInt( sel );
-        event.SetExtraLong( 1 );
-        list->HandleWindowEvent(event);
+        list->HandleLineEvent( sel, false );
         return;
     }