2 * This file is part of the theme implementation for form controls in WebCore.
4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc.
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.
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.
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.
23 #ifndef ThemePainter_h
24 #define ThemePainter_h
26 #include "platform/ThemeTypes.h"
27 #include "wtf/Allocator.h"
37 DISALLOW_ALLOCATION();
39 // This method is called to paint the widget as a background of the LayoutObject. A widget's foreground, e.g., the
40 // text of a button, is always rendered by the engine itself. The boolean return value indicates
41 // whether the CSS border/background should also be painted.
42 bool paint(LayoutObject
*, const PaintInfo
&, const IntRect
&);
43 bool paintBorderOnly(LayoutObject
*, const PaintInfo
&, const IntRect
&);
44 bool paintDecorations(LayoutObject
*, const PaintInfo
&, const IntRect
&);
46 virtual bool paintCapsLockIndicator(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return 0; }
47 void paintSliderTicks(LayoutObject
*, const PaintInfo
&, const IntRect
&);
51 virtual bool paintCheckbox(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
52 virtual bool paintRadio(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
53 virtual bool paintButton(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
54 virtual bool paintInnerSpinButton(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
57 virtual bool paintTextField(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
58 virtual bool paintTextArea(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
59 virtual bool paintMenuList(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
60 virtual bool paintMenuListButton(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
61 virtual bool paintMeter(LayoutObject
*, const PaintInfo
&, const IntRect
&);
62 virtual bool paintProgressBar(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
63 virtual bool paintSliderTrack(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
64 virtual bool paintSliderThumb(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
65 virtual bool paintSearchField(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
66 virtual bool paintSearchFieldCancelButton(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
67 virtual bool paintSearchFieldDecoration(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
68 virtual bool paintSearchFieldResultsDecoration(LayoutObject
*, const PaintInfo
&, const IntRect
&) { return true; }
70 bool paintUsingFallbackTheme(LayoutObject
*, const PaintInfo
&, const IntRect
&);
71 bool paintCheckboxUsingFallbackTheme(LayoutObject
*, const PaintInfo
&, const IntRect
&);
72 bool paintRadioUsingFallbackTheme(LayoutObject
*, const PaintInfo
&, const IntRect
&);
77 #endif // ThemePainter_h