Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-03-10 14:04:08 +0000
committerStijn Buys <ingar@osirion.org>2013-03-10 14:04:08 +0000
commit57563d06e9947380a2cf4a7f97ca5835c4bd8b2b (patch)
tree1654f83f0a909ac05ab7f8e288055766403d186d /src/ui/listview.h
parent025a4defa7cc1ad42c86fe9e1b49d1cb6fa45737 (diff)
Improved ui::ListView::sort().
Diffstat (limited to 'src/ui/listview.h')
-rw-r--r--src/ui/listview.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/ui/listview.h b/src/ui/listview.h
index b4c00dc..7678b8b 100644
--- a/src/ui/listview.h
+++ b/src/ui/listview.h
@@ -41,6 +41,11 @@ public:
}
/* -- mutators --------------------------------------------- */
+
+ /**
+ * @brief add a new item
+ * */
+ ListItem *add_item(const std::string & text);
/// set scroll
void set_scroll(float scroll);
@@ -51,7 +56,7 @@ public:
/// scroll up
void dec_scroll(float scroll);
- /// clear all listitems
+ /// delete all listitems
void clear();
/// set selection to specified ListItem
@@ -61,18 +66,9 @@ public:
void deselect();
/**
- * @brief sort child ListItems according to their sortkey
- * Sort will fail with an assert error if the ListView
- * contains any non-ListItem child widgets
- * */
- void sort();
-
- /**
- * @brief reverse sort child ListItems according to their sortkey
- * Sort will fail with an assert error if the ListView
- * contains any non-ListItem child widgets
+ * @brief sort listitems according to their sortkey
* */
- void sort_reverse();
+ void sort(bool ascending = true);
protected:
virtual void resize();