void ListBox::flipRowSelection (const int row) { if (isRowSelected (row)) deselectRow (row); else selectRowInternal (row, false, false, true); }
void ModBox::on_off() { for (auto i : display_list) { const int x = display_list.indexOf(i); selectRow(x); deselectRow(x); } }
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); } }