X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1d3601acaecd1c69c453b60610ba98f619bd383..cc4d5638c66a409e421420ed7110917755a66788:/src/common/checklstcmn.cpp diff --git a/src/common/checklstcmn.cpp b/src/common/checklstcmn.cpp index 6721038c15..be56ca3e17 100644 --- a/src/common/checklstcmn.cpp +++ b/src/common/checklstcmn.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 16.11.97 -// RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -87,7 +86,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 +98,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