void WadListBox::GetSelections(wxArrayInt& selection) const {
            selection.clear();

            unsigned long cookie;
            int index = GetFirstSelected(cookie);
            while (index != wxNOT_FOUND) {
                selection.push_back(index);
                index = GetNextSelected(cookie);
            }
        }
Example #2
0
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();
}
Example #3
0
size_t wxGetMultipleChoices(wxArrayInt& selections,
                            const wxString& message,
                            const wxString& caption,
                            const wxArrayString& aChoices,
                            wxWindow *parent,
                            int x, int y,
                            bool centre,
                            int width, int height)
{
    int rc = wxGetSelectedChoices(selections, message, caption,
                                  aChoices,
                                  parent, x, y, centre, width, height);
    if ( rc == -1 )
    {
        selections.clear();
        return 0;
    }

    return rc;
}