// ============================================================================
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 );
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;
}
}
}
void wxMacDataBrowserListControl::ItemNotification(
- const wxMacDataItem* itemID,
+ DataBrowserItemID itemID,
DataBrowserItemNotification message,
DataBrowserItemDataRef itemData)
{
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;
}
}
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