• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright 2016 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 Slide_DEFINED
9 #define Slide_DEFINED
10 
11 #include "SkRefCnt.h"
12 #include "SkSize.h"
13 #include "SkString.h"
14 
15 class SkCanvas;
16 class SkAnimTimer;
17 
18 class Slide : public SkRefCnt {
19 public:
~Slide()20     virtual ~Slide() {}
21 
getDimensions()22     virtual SkISize getDimensions() const {
23         return SkISize::Make(0, 0);
24     }
25 
26     virtual void draw(SkCanvas* canvas) = 0;
animate(const SkAnimTimer &)27     virtual bool animate(const SkAnimTimer&) { return false;  }
load(SkScalar winWidth,SkScalar winHeight)28     virtual void load(SkScalar winWidth, SkScalar winHeight) {}
unload()29     virtual void unload() {}
30 
onChar(SkUnichar c)31     virtual bool onChar(SkUnichar c) { return false; }
32 
getName()33     SkString getName() { return fName; }
34 
35 protected:
36     SkString    fName;
37 };
38 
39 
40 #endif
41