aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/views/SkView.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-08 16:17:50 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-08 16:17:50 +0000
commit4d5c26de0a24f86c37c1da8b0e30d11a550ea67b (patch)
treeae6412d266668e9f7ca91e9ef56d65ddb3b6e9ac /include/views/SkView.h
parent9aaf36de60c2a2e7a6b441bb7db9521a4fd59e08 (diff)
pass modifier keys to click events (e.g. control | shift etc.)
Review URL: https://codereview.appspot.com/7062054 git-svn-id: http://skia.googlecode.com/svn/trunk@7082 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/views/SkView.h')
-rw-r--r--include/views/SkView.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/views/SkView.h b/include/views/SkView.h
index 00c135690b..698c8c79f3 100644
--- a/include/views/SkView.h
+++ b/include/views/SkView.h
@@ -156,6 +156,7 @@ public:
SkIPoint fIOrig, fIPrev, fICurr;
State fState;
void* fOwner;
+ unsigned fModifierKeys;
SkMetaData fMeta;
private:
@@ -167,11 +168,11 @@ public:
friend class SkView;
};
- Click* findClickHandler(SkScalar x, SkScalar y);
+ Click* findClickHandler(SkScalar x, SkScalar y, unsigned modifierKeys);
- static void DoClickDown(Click*, int x, int y);
- static void DoClickMoved(Click*, int x, int y);
- static void DoClickUp(Click*, int x, int y);
+ static void DoClickDown(Click*, int x, int y, unsigned modi);
+ static void DoClickMoved(Click*, int x, int y, unsigned modi);
+ static void DoClickUp(Click*, int x, int y, unsigned modi);
/** Send the event to the view's parent, and its parent etc. until one of them
returns true from its onEvent call. This view is returned. If no parent handles
@@ -345,13 +346,13 @@ protected:
/** Override this if you might handle the click
*/
- virtual Click* onFindClickHandler(SkScalar x, SkScalar y);
+ virtual Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi);
/** Override this to decide if your children are targets for a click.
The default returns true, in which case your children views will be
candidates for onFindClickHandler. Returning false wil skip the children
and just call your onFindClickHandler.
*/
- virtual bool onSendClickToChildren(SkScalar x, SkScalar y);
+ virtual bool onSendClickToChildren(SkScalar x, SkScalar y, unsigned modi);
/** Override this to track clicks, returning true as long as you want to track
the pen/mouse.
*/