aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/GMSampleView.h
blob: 6424b43d25d9c4c46bc653e2a9bfec7d98fac0a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Copyright 2011 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef GMSampleView_DEFINED
#define GMSampleView_DEFINED

#include "SampleCode.h"
#include "gm.h"

class GMSampleView : public SampleView {
private:
    bool fShowSize;
    typedef skiagm::GM GM;

public:
    GMSampleView(GM*);
    ~GMSampleView() override;

    static SkEvent* NewShowSizeEvt(bool doShowSize);

protected:
    bool onQuery(SkEvent*) override;
    bool onEvent(const SkEvent&) override;
    void onDrawContent(SkCanvas*) override;
    void onDrawBackground(SkCanvas*) override;
    bool onAnimate(const SkAnimTimer&) override;

private:
    GM* fGM;
    typedef SampleView INHERITED;
};

#endif