Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Side by Side Diff: samplecode/SampleCode.h

Issue 108513006: Add SkTileGridPicture SampleApp playback support. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated per review. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SamplePictFile.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SampleCode_DEFINED 10 #ifndef SampleCode_DEFINED
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 /** 123 /**
124 * Call this to request menu items from a SampleView. 124 * Call this to request menu items from a SampleView.
125 * Subclassing notes: A subclass of SampleView can overwrite this method 125 * Subclassing notes: A subclass of SampleView can overwrite this method
126 * to add new items of various types to the menu and change its title. 126 * to add new items of various types to the menu and change its title.
127 * The events attached to any new menu items must be handled in its onEvent 127 * The events attached to any new menu items must be handled in its onEvent
128 * method. See SkOSMenu.h for helper functions. 128 * method. See SkOSMenu.h for helper functions.
129 */ 129 */
130 virtual void requestMenu(SkOSMenu* menu) {} 130 virtual void requestMenu(SkOSMenu* menu) {}
131 131
132 virtual void onTileSizeChanged(const SkSize& tileSize) {}
133
132 protected: 134 protected:
133 virtual void onDrawBackground(SkCanvas*); 135 virtual void onDrawBackground(SkCanvas*);
134 virtual void onDrawContent(SkCanvas*) = 0; 136 virtual void onDrawContent(SkCanvas*) = 0;
135 137
136 // overrides 138 // overrides
137 virtual bool onEvent(const SkEvent& evt); 139 virtual bool onEvent(const SkEvent& evt);
138 virtual bool onQuery(SkEvent* evt); 140 virtual bool onQuery(SkEvent* evt);
139 virtual void draw(SkCanvas*); 141 virtual void draw(SkCanvas*);
140 virtual void onDraw(SkCanvas*); 142 virtual void onDraw(SkCanvas*);
141 143
142 SkOSMenu::TriState fPipeState; 144 SkOSMenu::TriState fPipeState;
143 SkColor fBGColor; 145 SkColor fBGColor;
144 146
145 private: 147 private:
146 int fRepeatCount; 148 int fRepeatCount;
147 149
148 bool fDebugHitTest; 150 bool fDebugHitTest;
149 SkIPoint fDebugHitTestLoc; 151 SkIPoint fDebugHitTestLoc;
150 152
151 typedef SkView INHERITED; 153 typedef SkView INHERITED;
152 }; 154 };
153 155
154 #endif 156 #endif
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SamplePictFile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698