author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 03 May 2010 13:32:15 +0300 | |
changeset 68 | 92a765b5b3e7 |
parent 13 | 10e98eab6f85 |
child 94 | 919f36ff910f |
permissions | -rw-r--r-- |
13 | 1 |
/* |
2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: |
|
15 |
* |
|
16 |
*/ |
|
17 |
#ifndef __RENDERTHEMESYMBIAN_H__ |
|
18 |
#define __RENDERTHEMESYMBIAN_H__ |
|
19 |
||
20 |
#include "config.h" |
|
21 |
||
22 |
#include "RenderTheme.h" |
|
23 |
#include "Event.h" |
|
24 |
#include "Document.h" |
|
25 |
#include "Image.h" |
|
26 |
#include "GraphicsContext.h" |
|
27 |
#include <../bidi.h> |
|
28 |
#include <eikenv.h> |
|
29 |
#include "RenderBox.h" |
|
68
92a765b5b3e7
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
30 |
#include <bitmaptransforms.h> |
13 | 31 |
#include "WebCoreGraphicsContext.h" |
32 |
#include "MaskedBitmap.h" |
|
33 |
#include "BitmapImage.h" |
|
34 |
#include "WebCoreWidget.h" |
|
35 |
||
36 |
// implement Symbian theme here |
|
37 |
||
38 |
namespace WebCore { |
|
39 |
||
40 |
enum { |
|
41 |
ECheckBoxOn, |
|
42 |
ECheckBoxOff, |
|
43 |
ERadioOn, |
|
44 |
ERadioOff, |
|
45 |
ESelectArrow |
|
46 |
}; |
|
47 |
||
48 |
class RenderThemeSymbian : public RenderTheme |
|
49 |
{ |
|
50 |
public: |
|
51 |
RenderThemeSymbian(); |
|
52 |
virtual ~RenderThemeSymbian(); |
|
53 |
// A method asking if the theme's controls actually care about redrawing when hovered. |
|
54 |
bool supportsHover(const RenderStyle*) const { return true; } |
|
55 |
||
56 |
void setCheckboxSize(RenderStyle*) const; |
|
57 |
void setRadioSize(RenderStyle*) const; |
|
58 |
||
59 |
void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; |
|
60 |
void adjustTextFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const; |
|
61 |
void adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const; |
|
62 |
void adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const; |
|
63 |
||
64 |
bool paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r); |
|
65 |
bool paintButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); |
|
66 |
bool paintMenuListButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r); |
|
67 |
bool paintMenuList(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r); |
|
68 |
bool paintRadio(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r); |
|
69 |
bool paintTextField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); |
|
70 |
bool paintTextArea(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); |
|
71 |
||
72 |
||
73 |
bool isControlStyled(const RenderStyle*, const BorderData&, |
|
74 |
const BackgroundLayer&, const Color&) const; |
|
75 |
bool controlSupportsTints(const RenderObject*) const; |
|
76 |
void systemFont(int propId, FontDescription&) const; |
|
77 |
||
78 |
Color platformActiveSelectionBackgroundColor() const; |
|
79 |
Color platformInactiveSelectionBackgroundColor() const; |
|
80 |
Color platformActiveSelectionForegroundColor() const; |
|
81 |
Color platformInactiveSelectionForegroundColor() const; |
|
82 |
||
83 |
void addIntrinsicMargins(RenderStyle*) const; |
|
84 |
void close(); |
|
85 |
bool supportsFocus(EAppearance) const; |
|
86 |
void paintButtonDecorations(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r); |
|
87 |
||
88 |
bool supportsFocusRing(const RenderStyle*) const; |
|
89 |
void scaleImage(int type, int scalingFactor); |
|
90 |
void scaleImageL(int type, int scalingFactor); |
|
91 |
||
92 |
void cancel(); |
|
93 |
void run(); |
|
94 |
||
95 |
Image* m_checkBoxOn; |
|
96 |
Image* m_checkBoxOff; |
|
97 |
Image* m_scaledCheckBoxOn; |
|
98 |
Image* m_scaledCheckBoxOff; |
|
99 |
int m_scalingForCheckBoxOn; |
|
100 |
int m_scalingForCheckBoxOff; |
|
101 |
||
102 |
Image* m_radioButtonOn; |
|
103 |
Image* m_radioButtonOff; |
|
104 |
Image* m_scaledRadioOn; |
|
105 |
Image* m_scaledRadioOff; |
|
106 |
int m_scalingForRadioOn; |
|
107 |
int m_scalingForRadioOff; |
|
108 |
||
109 |
Image* m_selectArrow; |
|
110 |
Image* m_scaledSelectArrow; |
|
111 |
int m_scalingForSelectArrow; |
|
112 |
||
113 |
CBitmapScaler* m_bitmapScaler; |
|
114 |
CActiveSchedulerWait* m_asw; |
|
115 |
}; |
|
116 |
||
117 |
||
118 |
class SyncScaler : public CActive |
|
119 |
{ |
|
120 |
public: |
|
121 |
SyncScaler(); |
|
122 |
~SyncScaler(); |
|
123 |
void init(); |
|
124 |
void RunL(); |
|
125 |
void DoCancel(); |
|
126 |
TInt RunError(TInt aError); |
|
127 |
int m_error; |
|
128 |
}; |
|
129 |
||
130 |
} |
|
131 |
#endif// !__RENDERTHEMESYMBIAN_H__ |