OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 SampleCode_DEFINED | 8 #ifndef SampleCode_DEFINED |
9 #define SampleCode_DEFINED | 9 #define SampleCode_DEFINED |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 protected: | 131 protected: |
132 virtual void onDrawBackground(SkCanvas*); | 132 virtual void onDrawBackground(SkCanvas*); |
133 virtual void onDrawContent(SkCanvas*) = 0; | 133 virtual void onDrawContent(SkCanvas*) = 0; |
134 virtual bool onAnimate(const SkAnimTimer&) { return false; } | 134 virtual bool onAnimate(const SkAnimTimer&) { return false; } |
135 virtual void onOnceBeforeDraw() {} | 135 virtual void onOnceBeforeDraw() {} |
136 | 136 |
137 // overrides | 137 // overrides |
138 virtual bool onEvent(const SkEvent& evt); | 138 virtual bool onEvent(const SkEvent& evt); |
139 virtual bool onQuery(SkEvent* evt); | 139 virtual bool onQuery(SkEvent* evt); |
140 virtual void draw(SkCanvas*); | |
141 virtual void onDraw(SkCanvas*); | 140 virtual void onDraw(SkCanvas*); |
142 | 141 |
143 SkOSMenu::TriState fPipeState; | 142 SkOSMenu::TriState fPipeState; |
144 SkColor fBGColor; | 143 SkColor fBGColor; |
145 | 144 |
146 private: | 145 private: |
147 int fRepeatCount; | 146 int fRepeatCount; |
148 bool fHaveCalledOnceBeforeDraw; | 147 bool fHaveCalledOnceBeforeDraw; |
149 typedef SkView INHERITED; | 148 typedef SkView INHERITED; |
150 }; | 149 }; |
151 | 150 |
152 #endif | 151 #endif |
OLD | NEW |