| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 * This file is part of the theme implementation for form controls in WebCore. |
| 3 * |
| 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. |
| 5 * |
| 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. |
| 10 * |
| 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. |
| 15 * |
| 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. |
| 20 * |
| 21 */ |
| 22 |
| 23 #ifndef ThemePainter_h |
| 24 #define ThemePainter_h |
| 25 |
| 26 #include "platform/ThemeTypes.h" |
| 27 |
| 28 namespace blink { |
| 29 |
| 30 class IntRect; |
| 31 class LayoutObject; |
| 32 |
| 33 struct PaintInfo; |
| 34 |
| 35 class ThemePainter { |
| 36 public: |
| 37 // This method is called to paint the widget as a background of the LayoutOb
ject. A widget's foreground, e.g., the |
| 38 // text of a button, is always rendered by the engine itself. The boolean r
eturn value indicates |
| 39 // whether the CSS border/background should also be painted. |
| 40 bool paint(LayoutObject*, const PaintInfo&, const IntRect&); |
| 41 bool paintBorderOnly(LayoutObject*, const PaintInfo&, const IntRect&); |
| 42 bool paintDecorations(LayoutObject*, const PaintInfo&, const IntRect&); |
| 43 |
| 44 virtual bool paintCapsLockIndicator(LayoutObject*, const PaintInfo&, const I
ntRect&) { return 0; }; |
| 45 void paintSliderTicks(LayoutObject*, const PaintInfo&, const IntRect&); |
| 46 |
| 47 protected: |
| 48 #if !USE(NEW_THEME) |
| 49 virtual bool paintCheckbox(LayoutObject*, const PaintInfo&, const IntRect&)
{ return true; } |
| 50 virtual bool paintRadio(LayoutObject*, const PaintInfo&, const IntRect&) { r
eturn true; } |
| 51 virtual bool paintButton(LayoutObject*, const PaintInfo&, const IntRect&) {
return true; } |
| 52 virtual bool paintInnerSpinButton(LayoutObject*, const PaintInfo&, const Int
Rect&) { return true; } |
| 53 #endif |
| 54 |
| 55 virtual bool paintTextField(LayoutObject*, const PaintInfo&, const IntRect&)
{ return true; } |
| 56 virtual bool paintTextArea(LayoutObject*, const PaintInfo&, const IntRect&)
{ return true; } |
| 57 virtual bool paintMenuList(LayoutObject*, const PaintInfo&, const IntRect&)
{ return true; } |
| 58 virtual bool paintMenuListButton(LayoutObject*, const PaintInfo&, const IntR
ect&) { return true; } |
| 59 virtual bool paintMeter(LayoutObject*, const PaintInfo&, const IntRect&); |
| 60 virtual bool paintProgressBar(LayoutObject*, const PaintInfo&, const IntRect
&) { return true; } |
| 61 virtual bool paintSliderTrack(LayoutObject*, const PaintInfo&, const IntRect
&) { return true; } |
| 62 virtual bool paintSliderThumb(LayoutObject*, const PaintInfo&, const IntRect
&) { return true; } |
| 63 virtual bool paintSearchField(LayoutObject*, const PaintInfo&, const IntRect
&) { return true; } |
| 64 virtual bool paintSearchFieldCancelButton(LayoutObject*, const PaintInfo&, c
onst IntRect&) { return true; } |
| 65 virtual bool paintSearchFieldDecoration(LayoutObject*, const PaintInfo&, con
st IntRect&) { return true; } |
| 66 virtual bool paintSearchFieldResultsDecoration(LayoutObject*, const PaintInf
o&, const IntRect&) { return true; } |
| 67 |
| 68 virtual bool paintMediaFullscreenButton(LayoutObject*, const PaintInfo&, con
st IntRect&) { return true; } |
| 69 virtual bool paintMediaPlayButton(LayoutObject*, const PaintInfo&, const Int
Rect&) { return true; } |
| 70 virtual bool paintMediaOverlayPlayButton(LayoutObject*, const PaintInfo&, co
nst IntRect&) { return true; } |
| 71 virtual bool paintMediaMuteButton(LayoutObject*, const PaintInfo&, const Int
Rect&) { return true; } |
| 72 virtual bool paintMediaSliderTrack(LayoutObject*, const PaintInfo&, const In
tRect&) { return true; } |
| 73 virtual bool paintMediaSliderThumb(LayoutObject*, const PaintInfo&, const In
tRect&) { return true; } |
| 74 virtual bool paintMediaVolumeSliderContainer(LayoutObject*, const PaintInfo&
, const IntRect&) { return true; } |
| 75 virtual bool paintMediaVolumeSliderTrack(LayoutObject*, const PaintInfo&, co
nst IntRect&) { return true; } |
| 76 virtual bool paintMediaVolumeSliderThumb(LayoutObject*, const PaintInfo&, co
nst IntRect&) { return true; } |
| 77 virtual bool paintMediaToggleClosedCaptionsButton(LayoutObject*, const Paint
Info&, const IntRect&) { return true; } |
| 78 virtual bool paintMediaCastButton(LayoutObject*, const PaintInfo&, const Int
Rect&) { return true; }; |
| 79 virtual bool paintMediaControlsBackground(LayoutObject*, const PaintInfo&, c
onst IntRect&) { return true; } |
| 80 virtual bool paintMediaCurrentTime(LayoutObject*, const PaintInfo&, const In
tRect&) { return true; } |
| 81 virtual bool paintMediaTimeRemaining(LayoutObject*, const PaintInfo&, const
IntRect&) { return true; } |
| 82 virtual bool paintMediaFullScreenVolumeSliderTrack(LayoutObject*, const Pain
tInfo&, const IntRect&) { return true; } |
| 83 virtual bool paintMediaFullScreenVolumeSliderThumb(LayoutObject*, const Pain
tInfo&, const IntRect&) { return true; } |
| 84 |
| 85 bool paintUsingFallbackTheme(LayoutObject*, const PaintInfo&, const IntRect&
); |
| 86 bool paintCheckboxUsingFallbackTheme(LayoutObject*, const PaintInfo&, const
IntRect&); |
| 87 bool paintRadioUsingFallbackTheme(LayoutObject*, const PaintInfo&, const Int
Rect&); |
| 88 }; |
| 89 |
| 90 } // namespace blink |
| 91 |
| 92 #endif // ThemePainter_h |
| OLD | NEW |