#if wxUSE_CHECKLISTBOX
#include "wx/checklst.h"
-#include "wx/arrstr.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/arrstr.h"
+#endif
#include "wx/mac/uma.h"
{
public:
wxMacDataBrowserCheckListControl( wxListBox *peer, const wxPoint& pos, const wxSize& size, long style );
- ~wxMacDataBrowserCheckListControl();
+ virtual ~wxMacDataBrowserCheckListControl();
virtual wxMacListBoxItem* CreateItem();
-
+
virtual bool MacIsChecked(unsigned int n) const;
virtual void MacCheck(unsigned int n, bool bCheck = true);
};
MacPostControlCreate(pos,size);
- InsertItems( n , choices , 0 );
+ InsertItems( n , choices , 0 );
// Needed because it is a wxControlWithItems
SetBestSize( size );
}
}
-wxMacCheckListControl* wxCheckListBox::GetPeer() const
-{
- return dynamic_cast<wxMacCheckListControl*>(m_peer);
+wxMacCheckListControl* wxCheckListBox::GetPeer() const
+{
+ return dynamic_cast<wxMacCheckListControl*>(m_peer);
}
const short kCheckboxColumnId = 1026;
kDataBrowserPropertyIsMutable
| kDataBrowserTableViewSelectionColumn
| kDataBrowserDefaultPropertyFlags;
-
+
err = AddColumn( &columnDesc, 0 );
verify_noerr( err );
}
wxMacDataBrowserCheckListControl::~wxMacDataBrowserCheckListControl()
{
-
+
}
class wxMacCheckListBoxItem : public wxMacListBoxItem
{
m_isChecked = false;
}
-
- ~wxMacCheckListBoxItem()
+
+ virtual ~wxMacCheckListBoxItem()
{
}
-
+
virtual OSStatus GetSetData( wxMacDataItemBrowserControl *owner ,
DataBrowserPropertyID property,
DataBrowserItemDataRef itemData,
- bool changeValue )
+ bool changeValue )
{
OSStatus err = errDataBrowserPropertyNotSupported;
wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, checklist->GetId() );
event.SetInt( owner->GetLineFromItem( this ) );
event.SetEventObject( checklist );
- checklist->GetEventHandler()->ProcessEvent( event );
+ checklist->GetEventHandler()->ProcessEvent( event );
}
break;
return err;
}
- void Check( bool check )
+ void Check( bool check )
{
m_isChecked = check;
}
- bool IsChecked() const
+ bool IsChecked() const
{
- return m_isChecked;
+ return m_isChecked;
}
protected :
bool m_isChecked;
};
-wxMacListBoxItem* wxMacDataBrowserCheckListControl::CreateItem()
+wxMacListBoxItem* wxMacDataBrowserCheckListControl::CreateItem()
{
return new wxMacCheckListBoxItem();
}
-void wxMacDataBrowserCheckListControl::MacCheck( unsigned int n, bool bCheck)
+void wxMacDataBrowserCheckListControl::MacCheck( unsigned int n, bool bCheck)
{
wxMacCheckListBoxItem* item = dynamic_cast<wxMacCheckListBoxItem*>( GetItemFromLine( n) );
item->Check( bCheck);
UpdateItem(wxMacDataBrowserRootContainer, item , kCheckboxColumnId);
}
-bool wxMacDataBrowserCheckListControl::MacIsChecked( unsigned int n) const
+bool wxMacDataBrowserCheckListControl::MacIsChecked( unsigned int n) const
{
wxMacCheckListBoxItem * item = dynamic_cast<wxMacCheckListBoxItem*>( GetItemFromLine( n ) );
- return item->IsChecked();
+ return item->IsChecked();
}