#include "wx/osx/private.h"
-IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
-
BEGIN_EVENT_TABLE(wxCheckListBox, wxListBox)
END_EVENT_TABLE()
-
+
void wxCheckListBox::Init()
{
}
long style,
const wxValidator& validator,
const wxString& name )
-{
- m_macIsUserPane = false;
-
+{
+
wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED),
wxT("only one of listbox selection modes can be specified") );
bool wxCheckListBox::IsChecked(unsigned int n) const
{
wxCHECK_MSG( IsValid(n), false,
- _T("invalid index in wxCheckListBox::IsChecked") );
+ wxT("invalid index in wxCheckListBox::IsChecked") );
return m_checks[n] != 0;
}
void wxCheckListBox::Check(unsigned int n, bool check)
{
wxCHECK_RET( IsValid(n),
- _T("invalid index in wxCheckListBox::Check") );
+ wxT("invalid index in wxCheckListBox::Check") );
// intermediate var is needed to avoid compiler warning with VC++
bool isChecked = m_checks[n] != 0;
void wxCheckListBox::GetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value )
{
if ( col == m_checkColumn )
- value.Set( IsChecked( n ) );
+ value.Check( IsChecked( n ) );
else
wxListBox::GetValueCallback( n, col, value );
}
{
if ( col == m_checkColumn )
{
- Check( n, value.GetIntValue() );
-
- wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, GetId() );
+ Check( n, value.IsChecked() );
+
+ wxCommandEvent event( wxEVT_CHECKLISTBOX, GetId() );
event.SetInt( n );
+ event.SetString( GetString( n ) );
event.SetEventObject( this );
HandleWindowEvent( event );
}