X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1d3601acaecd1c69c453b60610ba98f619bd383..a0bb0df5d7926faf934d139968928e96bbcba7ef:/src/common/checklstcmn.cpp diff --git a/src/common/checklstcmn.cpp b/src/common/checklstcmn.cpp index 6721038c15..09ea30c7b7 100644 --- a/src/common/checklstcmn.cpp +++ b/src/common/checklstcmn.cpp @@ -87,7 +87,7 @@ wxEND_FLAGS( wxCheckListBoxStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckListBox, wxListBox, "wx/checklst.h") wxBEGIN_PROPERTIES_TABLE(wxCheckListBox) - wxEVENT_PROPERTY( Toggle, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEvent ) + wxEVENT_PROPERTY( Toggle, wxEVT_CHECKLISTBOX, wxCommandEvent ) wxPROPERTY_FLAGS( WindowStyle, wxCheckListBoxStyle, long, SetWindowStyleFlag, \ GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, wxLB_OWNERDRAW /*flags*/, \ wxT("Helpstring"), wxT("group")) // style @@ -99,4 +99,22 @@ wxCONSTRUCTOR_4( wxCheckListBox, wxWindow*, Parent, wxWindowID, Id, \ wxPoint, Position, wxSize, Size ) +// ============================================================================ +// implementation +// ============================================================================ + +unsigned int wxCheckListBoxBase::GetCheckedItems(wxArrayInt& checkedItems) const +{ + unsigned int const numberOfItems = GetCount(); + + checkedItems.clear(); + for ( unsigned int i = 0; i < numberOfItems; ++i ) + { + if ( IsChecked(i) ) + checkedItems.push_back(i); + } + + return checkedItems.size(); +} + #endif