Beispiel #1
0
void ListBox::flipRowSelection (const int row)
{
    if (isRowSelected (row))
        deselectRow (row);
    else
        selectRowInternal (row, false, false, true);
}
Beispiel #2
0
void ModBox::on_off()
{
    for (auto i : display_list) {
        const int x = display_list.indexOf(i);
        selectRow(x);
        deselectRow(x);
    }
}
Beispiel #3
0
void ModBox::select_prev_item()
{
    const bool are_rows_selected = getNumSelectedRows() > 0 ?  true : false;
    const int num_rows = display_list.size();
    const int end_of_list = num_rows - 1;
    
    if (are_rows_selected == true) {
        const int selected_row = getSelectedRow();
        const bool all_good = selected_row != 0 ? true : false;
        if (all_good == true) {
            deselectRow(selected_row);
            selectRow(selected_row - 1);
        } else {
            deselectRow(selected_row);
            selectRow(end_of_list);
        }
    } else {
        selectRow(0);
    }
}