bsalomon@google.com | 48dd1a2 | 2011-10-31 14:18:20 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2011 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
bsalomon@google.com | 48dd1a2 | 2011-10-31 14:18:20 +0000 | [diff] [blame] | 8 | #ifndef GMSampleView_DEFINED |
| 9 | #define GMSampleView_DEFINED |
| 10 | |
| 11 | #include "SampleCode.h" |
| 12 | #include "gm.h" |
| 13 | |
| 14 | class GMSampleView : public SampleView { |
| 15 | private: |
reed@google.com | a4f8137 | 2012-11-15 15:56:38 +0000 | [diff] [blame] | 16 | bool fShowSize; |
bsalomon@google.com | 48dd1a2 | 2011-10-31 14:18:20 +0000 | [diff] [blame] | 17 | typedef skiagm::GM GM; |
| 18 | |
| 19 | public: |
reed | 0ab326f | 2015-02-21 09:36:50 -0800 | [diff] [blame] | 20 | GMSampleView(GM*); |
| 21 | virtual ~GMSampleView(); |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 22 | |
reed | 0ab326f | 2015-02-21 09:36:50 -0800 | [diff] [blame] | 23 | static SkEvent* NewShowSizeEvt(bool doShowSize); |
reed@google.com | a4f8137 | 2012-11-15 15:56:38 +0000 | [diff] [blame] | 24 | |
bsalomon@google.com | 48dd1a2 | 2011-10-31 14:18:20 +0000 | [diff] [blame] | 25 | protected: |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 26 | bool onQuery(SkEvent*) override; |
| 27 | bool onEvent(const SkEvent&) override; |
| 28 | void onDrawContent(SkCanvas*) override; |
| 29 | void onDrawBackground(SkCanvas*) override; |
| 30 | bool onAnimate(const SkAnimTimer&) override; |
reed | d9adfe6 | 2015-02-01 19:01:04 -0800 | [diff] [blame] | 31 | |
bsalomon@google.com | 48dd1a2 | 2011-10-31 14:18:20 +0000 | [diff] [blame] | 32 | private: |
| 33 | GM* fGM; |
| 34 | typedef SampleView INHERITED; |
| 35 | }; |
| 36 | |
| 37 | #endif |