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