String ComboBox::getItemText (const int index) const { if (const ItemInfo* const item = getItemForIndex (index)) return item->name; return String::empty; }
int ComboBox::getItemId (const int index) const noexcept { if (const ItemInfo* const item = getItemForIndex (index)) return item->itemId; return 0; }
const String ComboBox::getItemText (const int index) const throw() { const ItemInfo* const item = getItemForIndex (index); if (item != 0) return item->name; return String::empty; }
bool ComboBox::selectIfEnabled (const int index) { const ItemInfo* const item = getItemForIndex (index); if (item != nullptr && item->isEnabled) { setSelectedItemIndex (index); return true; } return false; }
int ComboBox::getItemId (const int index) const noexcept { const ItemInfo* const item = getItemForIndex (index); return item != nullptr ? item->itemId : 0; }
String ComboBox::getItemText (const int index) const { const ItemInfo* const item = getItemForIndex (index); return item != nullptr ? item->name : String::empty; }
int ComboBox::getItemId (const int index) const throw() { const ItemInfo* const item = getItemForIndex (index); return (item != 0) ? item->itemId : 0; }