+ if (oldsel == m_selected)
+ /* emit */ selectionChanged();
+}
+
+bool eListbox::atBegin()
+{
+ if (m_content && !m_selected)
+ return true;
+ return false;
+}
+
+bool eListbox::atEnd()
+{
+ if (m_content && m_content->size() == m_selected+1)
+ return true;
+ return false;
+}
+
+void eListbox::moveToEnd()
+{
+ /* move to last existing one ("end" is already invalid) */
+ m_content->cursorEnd(); m_content->cursorMove(-1);
+ /* current selection invisible? */
+ if (m_top + m_items_per_page <= m_content->cursorGet())
+ {
+ int rest = m_content->size() % m_items_per_page;
+ if (rest)
+ m_top = m_content->cursorGet() - rest + 1;
+ else
+ m_top = m_content->cursorGet() - m_items_per_page + 1;
+ if (m_top < 0)
+ m_top = 0;
+ }