OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 SkView_DEFINED | 10 #ifndef SkView_DEFINED |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 }; | 251 }; |
252 | 252 |
253 /** \class Artist | 253 /** \class Artist |
254 | 254 |
255 Install a subclass of this in a view (calling setArtist()), and then the | 255 Install a subclass of this in a view (calling setArtist()), and then the |
256 default implementation of that view's onDraw() will invoke this object | 256 default implementation of that view's onDraw() will invoke this object |
257 automatically. | 257 automatically. |
258 */ | 258 */ |
259 class Artist : public SkRefCnt { | 259 class Artist : public SkRefCnt { |
260 public: | 260 public: |
261 SK_DECLARE_INST_COUNT(Artist) | 261 |
262 | 262 |
263 void draw(SkView*, SkCanvas*); | 263 void draw(SkView*, SkCanvas*); |
264 void inflate(const SkDOM&, const SkDOM::Node*); | 264 void inflate(const SkDOM&, const SkDOM::Node*); |
265 protected: | 265 protected: |
266 virtual void onDraw(SkView*, SkCanvas*) = 0; | 266 virtual void onDraw(SkView*, SkCanvas*) = 0; |
267 virtual void onInflate(const SkDOM&, const SkDOM::Node*); | 267 virtual void onInflate(const SkDOM&, const SkDOM::Node*); |
268 private: | 268 private: |
269 typedef SkRefCnt INHERITED; | 269 typedef SkRefCnt INHERITED; |
270 }; | 270 }; |
271 /** Return the artist attached to this view (or null). The artist's referenc
e | 271 /** Return the artist attached to this view (or null). The artist's referenc
e |
272 count is not affected. | 272 count is not affected. |
273 */ | 273 */ |
274 Artist* getArtist() const; | 274 Artist* getArtist() const; |
275 /** Attach the specified artist (or null) to the view, replacing any existin
g | 275 /** Attach the specified artist (or null) to the view, replacing any existin
g |
276 artist. If the new artist is not null, its reference count is incremente
d. | 276 artist. If the new artist is not null, its reference count is incremente
d. |
277 The artist parameter is returned. | 277 The artist parameter is returned. |
278 */ | 278 */ |
279 Artist* setArtist(Artist* artist); | 279 Artist* setArtist(Artist* artist); |
280 | 280 |
281 /** \class Layout | 281 /** \class Layout |
282 | 282 |
283 Install a subclass of this in a view (calling setLayout()), and then the | 283 Install a subclass of this in a view (calling setLayout()), and then the |
284 default implementation of that view's onLayoutChildren() will invoke | 284 default implementation of that view's onLayoutChildren() will invoke |
285 this object automatically. | 285 this object automatically. |
286 */ | 286 */ |
287 class Layout : public SkRefCnt { | 287 class Layout : public SkRefCnt { |
288 public: | 288 public: |
289 SK_DECLARE_INST_COUNT(Layout) | 289 |
290 | 290 |
291 void layoutChildren(SkView* parent); | 291 void layoutChildren(SkView* parent); |
292 void inflate(const SkDOM&, const SkDOM::Node*); | 292 void inflate(const SkDOM&, const SkDOM::Node*); |
293 protected: | 293 protected: |
294 virtual void onLayoutChildren(SkView* parent) = 0; | 294 virtual void onLayoutChildren(SkView* parent) = 0; |
295 virtual void onInflate(const SkDOM&, const SkDOM::Node*); | 295 virtual void onInflate(const SkDOM&, const SkDOM::Node*); |
296 private: | 296 private: |
297 typedef SkRefCnt INHERITED; | 297 typedef SkRefCnt INHERITED; |
298 }; | 298 }; |
299 | 299 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 friend class SkLayerView; | 396 friend class SkLayerView; |
397 | 397 |
398 bool setFocusView(SkView* fvOrNull); | 398 bool setFocusView(SkView* fvOrNull); |
399 SkView* acceptFocus(FocusDirection); | 399 SkView* acceptFocus(FocusDirection); |
400 void detachFromParent_NoLayout(); | 400 void detachFromParent_NoLayout(); |
401 /** Compute the matrix to transform view-local coordinates into global ones
*/ | 401 /** Compute the matrix to transform view-local coordinates into global ones
*/ |
402 void localToGlobal(SkMatrix* matrix) const; | 402 void localToGlobal(SkMatrix* matrix) const; |
403 }; | 403 }; |
404 | 404 |
405 #endif | 405 #endif |
OLD | NEW |