]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/listbox.cpp
Allow setting long version field in About dialog.
[wxWidgets.git] / src / osx / carbon / listbox.cpp
index 23f6443ba019112b2bbdd348a25b5fe72cec1c52..f688c91dd1a83406c9b472c3307718d4e6a084cc 100644 (file)
 // ============================================================================
 
 wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer, 
-                                    wxWindowMac* parent
-                                    wxWindowID id
+                                    wxWindowMac* WXUNUSED(parent)
+                                    wxWindowID WXUNUSED(id)
                                     const wxPoint& pos, 
                                     const wxSize& size,
                                     long style, 
-                                    long extraStyle)
+                                    long WXUNUSED(extraStyle))
 {
     wxMacDataBrowserListControl* control = new wxMacDataBrowserListControl( wxpeer, pos, size, style );
     // TODO CHECK control->SetClientDataType( m_clientDataItemsType );
@@ -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;
     }
 }
@@ -354,7 +345,7 @@ wxMacDataBrowserListControl::~wxMacDataBrowserListControl()
 }
 
 void wxMacDataBrowserListControl::ItemNotification(
-                        const wxMacDataItem* itemID,
+                        DataBrowserItemID itemID,
                         DataBrowserItemNotification message,
                         DataBrowserItemDataRef itemData)
 {
@@ -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;
     }
     
@@ -625,9 +608,13 @@ void wxMacDataBrowserCellValue::Set( const wxString& value )
 }
 
 void wxMacDataBrowserCellValue::Set( int value ) 
-{
+{  
     SetDataBrowserItemDataValue( m_data, value );
-    // SetDataBrowserItemDataButtonValue( m_data, value ? kThemeButtonOn : kThemeButtonOff);
+}
+
+void wxMacDataBrowserCellValue::Check( bool check )
+{
+    SetDataBrowserItemDataButtonValue( m_data, check ? kThemeButtonOn : kThemeButtonOff);
 }
     
 int wxMacDataBrowserCellValue::GetIntValue() const