Exemplo n.º 1
0
/**
 * AdvanceSelection in the list of text items - simple!
 */
int16_t ListWidget::advanceSelection(int16_t iAdv /*= 1*/)
{
  //DEBUG_PRINT("ListWidget::advanceSelection "); DEBUG_PRINTDEC(iAdv); DEBUG_PRINTLN();
  if(m_selectionMode != smSingleSelection)
    return LB_ERR;
  setCurSel(sanitize(getCurSel() + iAdv));
  return 0;
}
Exemplo n.º 2
0
void ReplayWindow::setTab(int tab)
{
  if (frametab[tab] >= 0)
  {
    setCurSel(frametab[tab]);
    if (viewItem)
      viewItem->setTab(tab);
  }
}
Exemplo n.º 3
0
/**
 * advance selection ignoring non-adjustable items 
 */
int16_t KeyValueListWidget::advanceSelection(int16_t iAdv /*= 1*/)
{
  if(m_selectionMode != smSingleSelection)
    return LB_ERR;
  for(int16_t iSel = m_iCurSel + iAdv; (0 <= iSel) && (iSel < (int16_t)m_items.size()) ; (iAdv > 0) ? iSel++ : iSel--)
  {
    //if(m_values[iSel].getSelectionMode() == smNoSelection) continue;
    setCurSel(iSel);
    return 0;
  }
  return LB_ERR;
}