Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: tools/viewer/Viewer.h

Issue 1955293002: Add flexible keybinding/command system to sk_app (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/viewer/Viewer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef Viewer_DEFINED 8 #ifndef Viewer_DEFINED
9 #define Viewer_DEFINED 9 #define Viewer_DEFINED
10 10
11 #include "sk_app/Application.h" 11 #include "sk_app/Application.h"
12 #include "sk_app/CommandSet.h"
12 #include "sk_app/Window.h" 13 #include "sk_app/Window.h"
13 #include "gm.h" 14 #include "gm.h"
14 #include "SkAnimTimer.h" 15 #include "SkAnimTimer.h"
15 #include "Slide.h" 16 #include "Slide.h"
16 17
17 class SkCanvas; 18 class SkCanvas;
18 19
19 class Viewer : public sk_app::Application { 20 class Viewer : public sk_app::Application {
20 public: 21 public:
21 Viewer(int argc, char** argv, void* platformData); 22 Viewer(int argc, char** argv, void* platformData);
22 ~Viewer() override; 23 ~Viewer() override;
23 24
24 bool onKey(sk_app::Window::Key key, sk_app::Window::InputState state, uint32 _t modifiers);
25 bool onChar(SkUnichar, uint32_t modifiers);
26 void onPaint(SkCanvas* canvas); 25 void onPaint(SkCanvas* canvas);
27 void onIdle(double ms) override; 26 void onIdle(double ms) override;
28 27
29 private: 28 private:
30 void initSlides(); 29 void initSlides();
31 void updateTitle(); 30 void updateTitle();
32 void setupCurrentSlide(int previousSlide); 31 void setupCurrentSlide(int previousSlide);
33 32
34 void drawStats(SkCanvas* canvas); 33 void drawStats(SkCanvas* canvas);
35 34
(...skipping 12 matching lines...) Expand all
48 47
49 bool fDisplayStats; 48 bool fDisplayStats;
50 49
51 // transform data 50 // transform data
52 SkMatrix fLocalMatrix; 51 SkMatrix fLocalMatrix;
53 SkScalar fZoomCenterX; 52 SkScalar fZoomCenterX;
54 SkScalar fZoomCenterY; 53 SkScalar fZoomCenterY;
55 SkScalar fZoomLevel; 54 SkScalar fZoomLevel;
56 SkScalar fZoomScale; 55 SkScalar fZoomScale;
57 56
57 sk_app::CommandSet fCommands;
58 }; 58 };
59 59
60 60
61 #endif 61 #endif
OLDNEW
« no previous file with comments | « no previous file | tools/viewer/Viewer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698