OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GFX_NATIVE_THEME_H_ | 5 #ifndef UI_GFX_NATIVE_THEME_H_ |
6 #define UI_GFX_NATIVE_THEME_H_ | 6 #define UI_GFX_NATIVE_THEME_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "skia/ext/platform_canvas.h" | 9 #include "skia/ext/platform_canvas.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| 11 #include "ui/ui_api.h" |
11 | 12 |
12 namespace gfx { | 13 namespace gfx { |
13 | 14 |
14 class Rect; | 15 class Rect; |
15 class Size; | 16 class Size; |
16 | 17 |
17 // This class supports drawing UI controls (like buttons, text fields, lists, | 18 // This class supports drawing UI controls (like buttons, text fields, lists, |
18 // comboboxes, etc) that look like the native UI controls of the underlying | 19 // comboboxes, etc) that look like the native UI controls of the underlying |
19 // platform, such as Windows or Linux. | 20 // platform, such as Windows or Linux. |
20 // | 21 // |
21 // The supported control types are listed in the Part enum. These parts can be | 22 // The supported control types are listed in the Part enum. These parts can be |
22 // in any state given by the State enum, where the actual definititon of the | 23 // in any state given by the State enum, where the actual definititon of the |
23 // state is part-specific. | 24 // state is part-specific. |
24 // | 25 // |
25 // Some parts require more information than simply the state in order to be | 26 // Some parts require more information than simply the state in order to be |
26 // drawn correctly, and this information is given to the Paint() method via the | 27 // drawn correctly, and this information is given to the Paint() method via the |
27 // ExtraParams union. Each part that requires more information has its own | 28 // ExtraParams union. Each part that requires more information has its own |
28 // field in the union. | 29 // field in the union. |
29 // | 30 // |
30 // NativeTheme also supports getting the default size of a given part with | 31 // NativeTheme also supports getting the default size of a given part with |
31 // the GetPartSize() method. | 32 // the GetPartSize() method. |
32 class NativeTheme { | 33 class UI_API NativeTheme { |
33 public: | 34 public: |
34 // The part to be painted / sized. | 35 // The part to be painted / sized. |
35 enum Part { | 36 enum Part { |
36 kCheckbox, | 37 kCheckbox, |
37 kInnerSpinButton, | 38 kInnerSpinButton, |
38 kMenuList, | 39 kMenuList, |
39 kMenuCheck, | 40 kMenuCheck, |
40 kMenuCheckBackground, | 41 kMenuCheckBackground, |
41 kMenuPopupArrow, | 42 kMenuPopupArrow, |
42 kMenuPopupBackground, | 43 kMenuPopupBackground, |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 static unsigned int thumb_inactive_color_; | 221 static unsigned int thumb_inactive_color_; |
221 static unsigned int thumb_active_color_; | 222 static unsigned int thumb_active_color_; |
222 static unsigned int track_color_; | 223 static unsigned int track_color_; |
223 | 224 |
224 DISALLOW_COPY_AND_ASSIGN(NativeTheme); | 225 DISALLOW_COPY_AND_ASSIGN(NativeTheme); |
225 }; | 226 }; |
226 | 227 |
227 } // namespace gfx | 228 } // namespace gfx |
228 | 229 |
229 #endif // UI_GFX_NATIVE_THEME_H_ | 230 #endif // UI_GFX_NATIVE_THEME_H_ |
OLD | NEW |