]>
git.saurik.com Git - iphone-api.git/blob - WebCore/RenderThemeChromiumGtk.h
2 * This file is part of the WebKit project.
4 * Copyright (C) 2006 Apple Computer, Inc.
5 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
6 * Copyright (C) 2007 Holger Hans Peter Freyther
7 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
8 * Copyright (C) 2008, 2009 Google, Inc.
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public License
22 * along with this library; see the file COPYING.LIB. If not, write to
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
28 #ifndef RenderThemeChromiumGtk_h
29 #define RenderThemeChromiumGtk_h
31 #include "RenderTheme.h"
37 class RenderThemeChromiumGtk
: public RenderTheme
{
39 RenderThemeChromiumGtk();
40 ~RenderThemeChromiumGtk() { }
42 virtual String
extraDefaultStyleSheet();
43 virtual String
extraQuirksStyleSheet();
45 // A method asking if the theme's controls actually care about redrawing when hovered.
46 virtual bool supportsHover(const RenderStyle
*) const { return true; }
48 // A method asking if the theme is able to draw the focus ring.
49 virtual bool supportsFocusRing(const RenderStyle
*) const;
51 // The platform selection color.
52 virtual Color
platformActiveSelectionBackgroundColor() const;
53 virtual Color
platformInactiveSelectionBackgroundColor() const;
54 virtual Color
platformActiveSelectionForegroundColor() const;
55 virtual Color
platformInactiveSelectionForegroundColor() const;
56 virtual Color
platformTextSearchHighlightColor() const;
58 virtual double caretBlinkInterval() const;
61 virtual void systemFont(int propId
, Document
*, FontDescription
&) const;
63 virtual int minimumMenuListSize(RenderStyle
*) const;
65 virtual bool paintCheckbox(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
66 virtual void setCheckboxSize(RenderStyle
*) const;
68 virtual bool paintRadio(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
69 virtual void setRadioSize(RenderStyle
*) const;
71 virtual bool paintButton(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
73 virtual bool paintTextField(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
75 virtual bool paintTextArea(RenderObject
* o
, const RenderObject::PaintInfo
& i
, const IntRect
& r
) { return paintTextField(o
, i
, r
); }
77 virtual bool paintSearchField(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
79 virtual bool paintSearchFieldResultsDecoration(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
80 virtual bool paintSearchFieldResultsButton(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
81 virtual bool paintSearchFieldCancelButton(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
83 // MenuList refers to an unstyled menulist (meaning a menulist without
84 // background-color or border set) and MenuListButton refers to a styled
85 // menulist (a menulist with background-color or border set). They have
86 // this distinction to support showing aqua style themes whenever they
87 // possibly can, which is something we don't want to replicate.
89 // In short, we either go down the MenuList code path or the MenuListButton
90 // codepath. We never go down both. And in both cases, they render the
92 virtual void adjustMenuListStyle(CSSStyleSelector
*, RenderStyle
*, Element
*) const;
93 virtual bool paintMenuList(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
94 virtual void adjustMenuListButtonStyle(CSSStyleSelector
*, RenderStyle
*, Element
*) const;
95 virtual bool paintMenuListButton(RenderObject
*, const RenderObject::PaintInfo
&, const IntRect
&);
97 // These methods define the padding for the MenuList's inner block.
98 virtual int popupInternalPaddingLeft(RenderStyle
*) const;
99 virtual int popupInternalPaddingRight(RenderStyle
*) const;
100 virtual int popupInternalPaddingTop(RenderStyle
*) const;
101 virtual int popupInternalPaddingBottom(RenderStyle
*) const;
103 virtual void adjustButtonInnerStyle(RenderStyle
* style
) const;
105 // A method asking if the control changes its tint when the window has focus or not.
106 virtual bool controlSupportsTints(const RenderObject
*) const;
108 // A general method asking if any control tinting is supported at all.
109 virtual bool supportsControlTints() const { return true; }
111 // List Box selection color
112 virtual Color
activeListBoxSelectionBackgroundColor() const;
113 virtual Color
activeListBoxSelectionForegroundColor() const;
114 virtual Color
inactiveListBoxSelectionBackgroundColor() const;
115 virtual Color
inactiveListBoxSelectionForegroundColor() const;
119 GtkWidget
* gtkEntry() const;
120 GtkWidget
* gtkTreeView() const;
122 // Unmapped GdkWindow having a container. This is holding all our fake widgets
123 GtkContainer
* gtkContainer() const;
126 int menuListInternalPadding(RenderStyle
*, int paddingType
) const;
128 mutable GtkWidget
* m_gtkWindow
;
129 mutable GtkContainer
* m_gtkContainer
;
130 mutable GtkWidget
* m_gtkEntry
;
131 mutable GtkWidget
* m_gtkTreeView
;
134 } // namespace WebCore