menu: make Menu::drawn return ConstIterator

This commit is contained in:
Andrzej Rybczak
2012-09-04 23:05:41 +02:00
parent bf3a7a7715
commit 5f637103a6
4 changed files with 15 additions and 19 deletions

View File

@@ -343,12 +343,7 @@ template <typename T> struct Menu : public Window
/// @return currently drawn item. The result is defined only within
/// drawing function that is called by Refresh()
/// @see Refresh()
const Item &drawn() const { return *(*m_options_ptr)[m_drawn_position]; }
/// @return position of currently drawn item. The result is defined
/// only within drawing function that is called by Refresh()
/// @see Refresh()
size_t drawnPosition() const { return m_drawn_position; }
ConstIterator drawn() const { return begin() + m_drawn_position; }
/// @return reference to last item on the list
/// @throw List::InvalidItem if requested item is separator