]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/checklstcmn.cpp
Correctly restore the originally used C locale in wxLocale dtor.
[wxWidgets.git] / src / common / checklstcmn.cpp
index 6721038c152c2b6bae033f86b46f4b41c63609f9..09ea30c7b7a8dfefc2c4f7492d713382840cd55a 100644 (file)
@@ -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