|
1 /* |
|
2 * Copyright (c) 2003 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 "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: SVG Implementation header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _INC_CSVGFOREIGNOBJECTELEMENTIMPL_ |
|
20 #define _INC_CSVGFOREIGNOBJECTELEMENTIMPL_ |
|
21 |
|
22 #include "SVGElementImpl.h" |
|
23 #include "GfxFloatFixPt.h" |
|
24 |
|
25 class CSvgDocumentImpl; |
|
26 |
|
27 /** |
|
28 * Class description goes here. |
|
29 * |
|
30 * @lib SVGEngine.lib |
|
31 * @since 1.0 |
|
32 */ |
|
33 class CSvgForeignObjectElementImpl : public CSvgElementImpl |
|
34 { |
|
35 public: |
|
36 |
|
37 // Constructor/deconstructor |
|
38 |
|
39 |
|
40 /** |
|
41 * Need method description |
|
42 * |
|
43 * @since 1.0 |
|
44 * @param |
|
45 * @return |
|
46 */ |
|
47 static CSvgForeignObjectElementImpl*NewL( const TUint8 aElemID, |
|
48 CSvgDocumentImpl* aDoc ); |
|
49 |
|
50 |
|
51 /** |
|
52 * Need method description |
|
53 * |
|
54 * @since 1.0 |
|
55 * @param |
|
56 * @return |
|
57 */ |
|
58 static CSvgForeignObjectElementImpl*NewLC( const TUint8 aElemID, |
|
59 CSvgDocumentImpl* aDoc ); |
|
60 |
|
61 |
|
62 /** |
|
63 * Need method description |
|
64 * |
|
65 * @since 1.0 |
|
66 * @param |
|
67 * @return |
|
68 */ |
|
69 virtual ~CSvgForeignObjectElementImpl(); |
|
70 |
|
71 |
|
72 /** |
|
73 * Need method description |
|
74 * |
|
75 * @since 1.0 |
|
76 * @param |
|
77 * @return |
|
78 */ |
|
79 CSvgElementImpl* SvgElementImpl(); |
|
80 |
|
81 // From MXmlElement API |
|
82 |
|
83 |
|
84 /** |
|
85 * Need method description |
|
86 * |
|
87 * @since 1.0 |
|
88 * @param |
|
89 * @return |
|
90 */ |
|
91 TInt SetAttributeL( const TDesC& aName, |
|
92 const TDesC& aValue ); |
|
93 // From CSvgElementImpl |
|
94 TInt SetAttributeFloatL( const TInt aNameId, |
|
95 const TFloatFixPt aValue ); |
|
96 |
|
97 TInt SetAttributeDesL( const TInt aNameId, |
|
98 const TDesC& aValue ); |
|
99 |
|
100 void SetCdataL( const TDesC& aCdata ); |
|
101 |
|
102 TFloatFixPt X(); |
|
103 TFloatFixPt Y(); |
|
104 TFloatFixPt Width(); |
|
105 TFloatFixPt Height(); |
|
106 |
|
107 /** |
|
108 * Need method description |
|
109 * |
|
110 * @since 1.0 |
|
111 * @param |
|
112 * @return |
|
113 */ |
|
114 MXmlElement* CloneL(MXmlElement* aParentElement); |
|
115 |
|
116 |
|
117 /** |
|
118 * Need method description |
|
119 * |
|
120 * @since 1.0 |
|
121 * @param |
|
122 * @return |
|
123 */ |
|
124 TBool DrawL( CGfx2dGc* aGc, |
|
125 CSvgElementImpl* aElement ); |
|
126 |
|
127 /** |
|
128 * Return wether an svg element is displayable, such as <rect>, <circle>, or |
|
129 * an abstract element, such as <g>, <animate>. |
|
130 * |
|
131 * @since 1.0 |
|
132 * @param None |
|
133 * @return ETrue if element is viewable. |
|
134 */ |
|
135 TBool IsViewable() { return ETrue; } |
|
136 |
|
137 /** |
|
138 * Notified when the mouse pointer enters a visible svg element. |
|
139 * |
|
140 * @since 1.0 |
|
141 * param : aElements -- SVG elements containing the mouse point. |
|
142 * param : aX -- x coordinate of mouse pointer. |
|
143 * param : aY -- y coordinate of mouse pointer. |
|
144 * @return : For future use. Value is ignored. |
|
145 */ |
|
146 TBool MouseEntered( RPointerArray<CSvgElementImpl>& aElements, |
|
147 TInt aX, TInt aY ); |
|
148 |
|
149 /** |
|
150 * Notified when the mouse pointer exits a visible svg element. |
|
151 * |
|
152 * @since 1.0 |
|
153 * param : aElements -- SVG elements containing the mouse point. |
|
154 * param : aX -- x coordinate of mouse pointer. |
|
155 * param : aY -- y coordinate of mouse pointer. |
|
156 * @return : For future use. Value is ignored. |
|
157 */ |
|
158 TBool MouseExited( RPointerArray<CSvgElementImpl>& aElements, |
|
159 TInt aX, TInt aY ); |
|
160 |
|
161 /** |
|
162 * Notified when the mouse pointer exits a visible svg element. |
|
163 * |
|
164 * @since 1.0 |
|
165 * param : aElements -- SVG elements containing the mouse point. |
|
166 * param : aX -- x coordinate of mouse pointer. |
|
167 * param : aY -- y coordinate of mouse pointer. |
|
168 * @return : For future use. Value is ignored. |
|
169 */ |
|
170 TBool MouseMoved( RPointerArray<CSvgElementImpl>& aElements, |
|
171 TInt aX, TInt aY ); |
|
172 |
|
173 /** |
|
174 * Notified when the mouse pointer is pressed down on visible svg element. |
|
175 * |
|
176 * @since 1.0 |
|
177 * param : aElements -- SVG elements containing the mouse point. |
|
178 * param : aX -- x coordinate of mouse pointer. |
|
179 * param : aY -- y coordinate of mouse pointer. |
|
180 * @return : For future use. Value is ignored. |
|
181 */ |
|
182 TBool MousePressed( RPointerArray<CSvgElementImpl>& aElements, |
|
183 TInt aX, TInt aY ); |
|
184 |
|
185 /** |
|
186 * Notified when the mouse pointer is released on on visible svg element. |
|
187 * |
|
188 * @since 1.0 |
|
189 * param : aElements -- SVG elements containing the mouse point. |
|
190 * param : aX -- x coordinate of mouse pointer. |
|
191 * param : aY -- y coordinate of mouse pointer. |
|
192 * @return : For future use. Value is ignored. |
|
193 */ |
|
194 TBool MouseReleased( RPointerArray<CSvgElementImpl>& aElements, |
|
195 TInt aX, TInt aY ); |
|
196 |
|
197 private: |
|
198 |
|
199 HBufC* iCdata; |
|
200 |
|
201 TFloatFixPt iX; |
|
202 TFloatFixPt iY; |
|
203 TFloatFixPt iWidth; |
|
204 TFloatFixPt iHeight; |
|
205 |
|
206 /** |
|
207 * Need method description |
|
208 * |
|
209 * @since 1.0 |
|
210 * @param |
|
211 * @return |
|
212 */ |
|
213 void ConstructL( const TUint8 aElemID ); |
|
214 |
|
215 |
|
216 /** |
|
217 * Need method description |
|
218 * |
|
219 * @since 1.0 |
|
220 * @param |
|
221 * @return |
|
222 */ |
|
223 CSvgForeignObjectElementImpl( CSvgDocumentImpl* aDoc ); |
|
224 |
|
225 void Print( TBool aIsEncodeOn ); |
|
226 }; |
|
227 |
|
228 #endif |