Character mainIndex(mch);
pFastScrollListener->OnMainIndexChanged(control, mainIndex);
}
- else
- {
- Character subIndex(mch);
- pIndexText = __pMainIndex->GetIndexText();
- if (pIndexText != null)
- {
- pIndexText->GetCharAt(0, mch);
- Character mainIndex(mch);
- pFastScrollListener->OnSubIndexChanged(control, mainIndex, subIndex);
- }
- }
}
SetLastResult(E_SUCCESS);
return;
return E_SUCCESS;
}
-result
-_GroupedListImpl::SetFastScrollSubIndex(const String& text, FastScrollIndexDigit indexDigit)
-{
- SysTryReturn(NID_UI_CTRL, (text.GetLength() > 0), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Empty string");
-
- SysTryReturn(NID_UI_CTRL, (indexDigit == SCROLL_INDEX_DIGIT_NUM_1), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. indexDigit is not SCROLL_INDEX_DIGIT_NUM_1");
-
- _FastScroll* pFastScroll = GetCore().GetFastScrollBar();
- SysTryReturn(NID_UI_CTRL, pFastScroll, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. FastScroll doesn't exist.");
-
- SysTryReturn(NID_UI_CTRL, (__mainIndexText.GetLength() > 0), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Main index of the fast scroll isn't set");
-
- _FastScrollIndex* pRootIndex = pFastScroll->GetIndex();
- SysTryReturn(NID_UI_CTRL, pRootIndex, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. RootIndex doesn't exist.");
-
- int subIndexDigit = 1 ;
- String delim(L",");
- StringTokenizer strTok(text, delim);
- String token;
- int i = 0;
-
- while (strTok.HasMoreTokens())
- {
- strTok.GetNextToken(token);
- _FastScrollIndex* pSecondaryIndex = pRootIndex->GetChildIndex(i++);
- if (pSecondaryIndex != null)
- {
- pSecondaryIndex->AddChildTextIndexArray(0, token.GetPointer(), subIndexDigit, token.GetLength());
- }
- }
- pFastScroll->UpdateIndex();
-
- return E_SUCCESS;
-}
-
class _GroupedListMaker
: public _UiBuilderControlMaker
{