| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebThemeEngine_h | 31 #ifndef WebThemeEngine_h |
| 32 #define WebThemeEngine_h | 32 #define WebThemeEngine_h |
| 33 | 33 |
| 34 #include "WebCanvas.h" | 34 #include "WebCanvas.h" |
| 35 #include "WebColor.h" | 35 #include "WebColor.h" |
| 36 #include "WebRect.h" |
| 36 #include "WebScrollbarOverlayColorTheme.h" | 37 #include "WebScrollbarOverlayColorTheme.h" |
| 37 #include "WebSize.h" | 38 #include "WebSize.h" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 struct WebRect; | |
| 42 | |
| 43 class WebThemeEngine { | 42 class WebThemeEngine { |
| 44 public: | 43 public: |
| 45 // The current state of the associated Part. | 44 // The current state of the associated Part. |
| 46 enum State { | 45 enum State { |
| 47 StateDisabled, | 46 StateDisabled, |
| 48 StateHover, | 47 StateHover, |
| 49 StateNormal, | 48 StateNormal, |
| 50 StatePressed, | 49 StatePressed, |
| 51 StateFocused, | 50 StateFocused, |
| 52 StateReadonly, | 51 StateReadonly, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 InnerSpinButtonExtraParams innerSpin; | 151 InnerSpinButtonExtraParams innerSpin; |
| 153 ProgressBarExtraParams progressBar; | 152 ProgressBarExtraParams progressBar; |
| 154 ScrollbarThumbExtraParams scrollbarThumb; | 153 ScrollbarThumbExtraParams scrollbarThumb; |
| 155 }; | 154 }; |
| 156 | 155 |
| 157 // Gets the size of the given theme part. For variable sized items | 156 // Gets the size of the given theme part. For variable sized items |
| 158 // like vertical scrollbar thumbs, the width will be the required width of | 157 // like vertical scrollbar thumbs, the width will be the required width of |
| 159 // the track while the height will be the minimum height. | 158 // the track while the height will be the minimum height. |
| 160 virtual WebSize getSize(Part) { return WebSize(); } | 159 virtual WebSize getSize(Part) { return WebSize(); } |
| 161 | 160 |
| 161 virtual bool supportsNinePatch(Part) const { return false; } |
| 162 virtual WebSize ninePatchCanvasSize(Part) const { return WebSize(); } |
| 163 virtual WebRect ninePatchAperture(Part) const { return WebRect(); } |
| 164 |
| 162 struct ScrollbarStyle { | 165 struct ScrollbarStyle { |
| 163 int thumbThickness; | 166 int thumbThickness; |
| 164 int scrollbarMargin; | 167 int scrollbarMargin; |
| 165 WebColor color; | 168 WebColor color; |
| 166 double fadeOutDelaySeconds; | 169 double fadeOutDelaySeconds; |
| 167 double fadeOutDurationSeconds; | 170 double fadeOutDurationSeconds; |
| 168 }; | 171 }; |
| 169 | 172 |
| 170 // Gets the overlay scrollbar style. Not used on Mac. | 173 // Gets the overlay scrollbar style. Not used on Mac. |
| 171 virtual void getOverlayScrollbarStyle(ScrollbarStyle* style) { | 174 virtual void getOverlayScrollbarStyle(ScrollbarStyle* style) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 183 virtual void paint(WebCanvas*, | 186 virtual void paint(WebCanvas*, |
| 184 Part, | 187 Part, |
| 185 State, | 188 State, |
| 186 const WebRect&, | 189 const WebRect&, |
| 187 const ExtraParams*) {} | 190 const ExtraParams*) {} |
| 188 }; | 191 }; |
| 189 | 192 |
| 190 } // namespace blink | 193 } // namespace blink |
| 191 | 194 |
| 192 #endif | 195 #endif |
| OLD | NEW |