OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_VIEWS_PAINTER_H_ | 5 #ifndef UI_VIEWS_PAINTER_H_ |
6 #define UI_VIEWS_PAINTER_H_ | 6 #define UI_VIEWS_PAINTER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "third_party/skia/include/core/SkColor.h" | 11 #include "third_party/skia/include/core/SkColor.h" |
| 12 #include "ui/base/nine_image_painter_factory.h" |
12 #include "ui/views/views_export.h" | 13 #include "ui/views/views_export.h" |
13 | 14 |
14 namespace gfx { | 15 namespace gfx { |
15 class Canvas; | 16 class Canvas; |
16 class ImageSkia; | 17 class ImageSkia; |
17 class Insets; | 18 class Insets; |
18 class Rect; | 19 class Rect; |
19 class Size; | 20 class Size; |
20 } | 21 } |
21 | 22 |
22 // A macro to define arrays of IDR constants used with CreateImageGridPainter. | |
23 #define IMAGE_GRID(x) { x ## _TOP_LEFT, x ## _TOP, x ## _TOP_RIGHT, \ | |
24 x ## _LEFT, x ## _CENTER, x ## _RIGHT, \ | |
25 x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## _BOTTOM_RIGHT, } | |
26 | |
27 namespace views { | 23 namespace views { |
28 | 24 |
29 class View; | 25 class View; |
30 | 26 |
31 // Painter, as the name implies, is responsible for painting in a particular | 27 // Painter, as the name implies, is responsible for painting in a particular |
32 // region. Think of Painter as a Border or Background that can be painted | 28 // region. Think of Painter as a Border or Background that can be painted |
33 // in any region of a View. | 29 // in any region of a View. |
34 class VIEWS_EXPORT Painter { | 30 class VIEWS_EXPORT Painter { |
35 public: | 31 public: |
36 Painter(); | 32 Painter(); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 113 |
118 // NOTE: the images are owned by ResourceBundle. Don't free them. | 114 // NOTE: the images are owned by ResourceBundle. Don't free them. |
119 const gfx::ImageSkia* images_[3]; | 115 const gfx::ImageSkia* images_[3]; |
120 | 116 |
121 DISALLOW_COPY_AND_ASSIGN(HorizontalPainter); | 117 DISALLOW_COPY_AND_ASSIGN(HorizontalPainter); |
122 }; | 118 }; |
123 | 119 |
124 } // namespace views | 120 } // namespace views |
125 | 121 |
126 #endif // UI_VIEWS_PAINTER_H_ | 122 #endif // UI_VIEWS_PAINTER_H_ |
OLD | NEW |