Home | History | Annotate | Download | only in samplecode
      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 
      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:
     16     bool fShowSize;
     17     typedef skiagm::GM GM;
     18 
     19 public:
     20     GMSampleView(GM*);
     21     ~GMSampleView() override;
     22 
     23     static SkEvent* NewShowSizeEvt(bool doShowSize);
     24 
     25 protected:
     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;
     31 
     32 private:
     33     GM* fGM;
     34     typedef SampleView INHERITED;
     35 };
     36 
     37 #endif
     38