menu: get rid of RealChoice

This commit is contained in:
Andrzej Rybczak
2012-08-31 06:05:29 +02:00
parent 970727fab2
commit 04bbdc53fc
2 changed files with 13 additions and 27 deletions

View File

@@ -337,11 +337,6 @@ template <typename T> struct Menu : public Window, public List
///
size_t Choice() const;
/// @return real current positions, i.e it doesn't
/// count positions that are static or separators
///
size_t RealChoice() const;
/// Searches the list for a given contraint. It uses ItemStringifier to convert stored items
/// into strings and then performs pattern matching. Note that this supports regular expressions.
/// @param constraint a search constraint to be used
@@ -931,15 +926,6 @@ template <typename T> size_t Menu<T>::Choice() const
return m_highlight;
}
template <typename T> size_t Menu<T>::RealChoice() const
{
size_t result = 0;
for (auto it = m_options_ptr->begin(); it != m_options_ptr->begin()+m_highlight; ++it)
if (!(*it)->isInactive())
result++;
return result;
}
template <typename T> void Menu<T>::ReverseSelection(size_t beginning)
{
auto it = m_options_ptr->begin()+beginning;