]> git.saurik.com Git - iphone-api.git/blob - WebCore/RenderThemeIPhone.h
Add support for new WinterBoard Settings features.
[iphone-api.git] / WebCore / RenderThemeIPhone.h
1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 */
4
5 #ifndef RENDER_THEME_IPHONE_H
6 #define RENDER_THEME_IPHONE_H
7
8
9 #include "RenderTheme.h"
10
11 namespace WebCore {
12
13 class RenderStyle;
14 class GraphicsContext;
15
16 class RenderThemeIPhone : public RenderTheme {
17 public:
18
19 virtual int popupInternalPaddingRight(RenderStyle*) const;
20
21 protected:
22
23 virtual int baselinePosition(const RenderObject* o) const;
24
25 virtual bool isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& background, const Color& backgroundColor) const;
26
27 // Methods for each appearance value.
28 virtual void adjustCheckboxStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
29 virtual bool paintCheckboxDecorations(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
30
31 virtual void adjustRadioStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
32 virtual bool paintRadioDecorations(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
33
34 virtual bool paintButtonDecorations(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
35 virtual bool paintPushButtonDecorations(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
36 virtual void setButtonSize(RenderStyle*) const;
37
38 virtual bool paintTextFieldDecorations(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
39
40 virtual bool paintTextAreaDecorations(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
41
42 virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
43 virtual bool paintMenuListButtonDecorations(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
44
45 private:
46
47 typedef enum
48 {
49 InsetGradient,
50 ShineGradient,
51 ShadeGradient,
52 ConvexGradient,
53 ConcaveGradient
54 } IPhoneGradientName;
55
56 Color * shadowColor() const;
57 IPhoneGradientRef gradientWithName(IPhoneGradientName aGradientName) const;
58 FloatRect addRoundedBorderClip(const FloatRect& aRect, const BorderData&, GraphicsContext* aContext);
59 };
60
61 }
62
63
64 #endif // RENDER_THEME_IPHONE_H
65