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 13:25:37 +0000
committerStijn Buys <ingar@osirion.org>2010-09-18 13:25:37 +0000
commitfc4809e41bc5694231046eb2fd4c324c4daba13f (patch)
tree02f183a0779aa0457e13f42037f3631ea28b7b65 /src/ui/scrollpane.h
parent8c6a1a404ac8d1589a37d54b3b7ce0d776fe4751 (diff)
cosmetic updates in engine list functions, trade menu updates
Diffstat (limited to 'src/ui/scrollpane.h')
-rw-r--r--src/ui/scrollpane.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/ui/scrollpane.h b/src/ui/scrollpane.h
index 82c74c9..8fe8395 100644
--- a/src/ui/scrollpane.h
+++ b/src/ui/scrollpane.h
@@ -26,33 +26,45 @@ public:
inline int scroll() const {
return scrollpane_scroll;
}
+
+ /// current scroll offset
+ inline int offset() const {
+ return scrollpane_offset;
+ }
/// text alignment
inline unsigned int alignment() const {
return scrollpane_alignment;
}
- /// set text alignment
- void set_alignment(const unsigned int alignment);
-
/* -- mutators --------------------------------------------- */
/// set scroll
- void set_scroll(int scroll);
+ void set_scroll(const int scroll);
+
+ /// set scroll offset
+ void set_offset(const int offset);
/// increase scroll
- void inc_scroll(int scroll);
+ void inc_scroll(const int scroll);
/// decrease scroll
- void dec_scroll(int scroll);
+ void dec_scroll(const int scroll);
+
+ /// set text alignment
+ void set_alignment(const unsigned int alignment);
protected:
/// draw the scroll pane
virtual void draw();
+
+ /// key event handler provides mouse scrolling
+ virtual bool on_keypress(const int key, const unsigned int modifier);
private:
ui::Text &scrollpane_text;
int scrollpane_scroll;
+ int scrollpane_offset;
unsigned int scrollpane_alignment;
};