summaryrefslogtreecommitdiff
path: root/src/stamps
diff options
context:
space:
mode:
Diffstat (limited to 'src/stamps')
-rw-r--r--src/stamps/StampsView.cpp15
-rw-r--r--src/stamps/StampsView.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/src/stamps/StampsView.cpp b/src/stamps/StampsView.cpp
index bddfb4f..c0d5981 100644
--- a/src/stamps/StampsView.cpp
+++ b/src/stamps/StampsView.cpp
@@ -133,6 +133,21 @@ void StampsView::NotifyStampsListChanged(StampsModel * sender)
}
}
+void StampsView::OnMouseWheel(int x, int y, int d)
+{
+ if(!d)
+ return;
+ if(d<0)
+ c->NextPage();
+ else
+ c->PrevPage();
+}
+void StampsView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt)
+{
+ if(key==KEY_ESCAPE)
+ c->Exit();
+}
+
StampsView::~StampsView() {
// TODO Auto-generated destructor stub
}
diff --git a/src/stamps/StampsView.h b/src/stamps/StampsView.h
index a906cdc..02e5569 100644
--- a/src/stamps/StampsView.h
+++ b/src/stamps/StampsView.h
@@ -29,6 +29,8 @@ public:
void AttachController(StampsController * c_) { c = c_; };
void NotifyPageChanged(StampsModel * sender);
void NotifyStampsListChanged(StampsModel * sender);
+ virtual void OnMouseWheel(int x, int y, int d);
+ virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
virtual ~StampsView();
};