Ejemplo n.º 1
0
// Set currently selected option in this menu item
void MenuItem::SetSelectedOption(int index)
{
	// validate
	char optionText[MAX_OPTIONSTEXT_LEN];
	if (GetOptionText(index, optionText) > 0)
		m_selectedOption = index;
	else
		m_selectedOption = 0;
}
Ejemplo n.º 2
0
long WebListBox::NextIndexStartingWith (WebChar ch)
{
	if (miNumOptions > 0)
	{
		long newSelection = miSelected;
		newSelection = (newSelection + 1) % miNumOptions;
		while (newSelection != miSelected)
		{
			WebChar *str = GetOptionText(newSelection);
			if (str)
			{
				while (IS_WHITESPACE(str[0])) str++;
				if (UPPERCASE(str[0]) == UPPERCASE(ch))
				{
					return newSelection;
				}
			}
			newSelection = (newSelection + 1) % miNumOptions;
		}
	}

	return -1;
}
Ejemplo n.º 3
0
CFX_WideString CPDF_FormField::GetOptionValue(int index) const {
  return GetOptionText(index, 0);
}
Ejemplo n.º 4
0
CFX_WideString CPDF_FormField::GetOptionLabel(int index) const {
  return GetOptionText(index, 1);
}