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>2010-09-18 18:50:55 +0000
committerStijn Buys <ingar@osirion.org>2010-09-18 18:50:55 +0000
commit9c91a9767b570fdc3c3e19e1f452f9a8257f9999 (patch)
tree9ac10114a3378134ea19dac3d7f7639532c3bf5a /src/ui/listview.h
parentfc4809e41bc5694231046eb2fd4c324c4daba13f (diff)
trade updates
Diffstat (limited to 'src/ui/listview.h')
-rw-r--r--src/ui/listview.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/ui/listview.h b/src/ui/listview.h
index 25fd07c..a650348 100644
--- a/src/ui/listview.h
+++ b/src/ui/listview.h
@@ -12,6 +12,13 @@
namespace ui
{
+class ListView;
+}
+
+#include "ui/listitem.h"
+
+namespace ui
+{
/**
* @brief a list of selectable items
@@ -27,6 +34,11 @@ public:
return listview_scroll;
}
+ /// return last selected listitem
+ inline ListItem *selected() const {
+ return listview_selecteditem;
+ }
+
/* -- mutators --------------------------------------------- */
/// set scroll
@@ -38,11 +50,21 @@ public:
/// scroll up
void dec_scroll(float scroll);
+ /// clear all listitems
+ void clear();
+
+ /// set selection to nothing
+ void deselect();
+
protected:
virtual void resize();
+ /// emit event handler
+ virtual bool on_emit(Widget *sender, const Event event, void *data);
+
private:
- float listview_scroll;
+ float listview_scroll;
+ ListItem *listview_selecteditem;
};
} // namespacd ui