equal
deleted
inserted
replaced
29 // |
29 // |
30 CMIDTextEditorEdwinCustomDraw::CMIDTextEditorEdwinCustomDraw( |
30 CMIDTextEditorEdwinCustomDraw::CMIDTextEditorEdwinCustomDraw( |
31 const MLafEnv& aLafEnv, |
31 const MLafEnv& aLafEnv, |
32 const MFormCustomDraw& aParentDraw, |
32 const MFormCustomDraw& aParentDraw, |
33 const CMIDTextEditorEdwin& aEdwin) : |
33 const CMIDTextEditorEdwin& aEdwin) : |
34 CLafEdwinCustomDrawBase(aLafEnv, aEdwin), |
34 CLafEdwinCustomDrawBase(aLafEnv, aEdwin), |
35 iEdwin(aEdwin), iParentDraw(aParentDraw) |
35 iEdwin(aEdwin), iParentDraw(aParentDraw) |
36 { |
36 { |
37 DEBUG("CMIDTextEditorEdwinCustomDraw::CMIDTextEditorEdwinCustomDraw"); |
37 DEBUG("CMIDTextEditorEdwinCustomDraw::CMIDTextEditorEdwinCustomDraw"); |
38 } |
38 } |
39 |
39 |
40 // --------------------------------------------------------------------------- |
40 // --------------------------------------------------------------------------- |
69 { |
69 { |
70 iEdwin.Redraw(); |
70 iEdwin.Redraw(); |
71 } |
71 } |
72 else |
72 else |
73 { |
73 { |
74 iParentDraw.DrawBackground(aParam, aBackground, aDrawn); |
74 // If scaling is on, it clips drawing to canvas size. After it |
|
75 // draws its background. |
|
76 // Only drawing otherwise. |
|
77 if (iEdwin.IsScalingOn()) |
|
78 { |
|
79 aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect()); |
|
80 |
|
81 iParentDraw.DrawBackground(aParam, aBackground, aDrawn); |
|
82 |
|
83 aParam.iGc.CancelClippingRect(); |
|
84 } |
|
85 else |
|
86 { |
|
87 iParentDraw.DrawBackground(aParam, aBackground, aDrawn); |
|
88 } |
75 } |
89 } |
76 } |
90 } |
77 |
91 |
78 // --------------------------------------------------------------------------- |
92 // --------------------------------------------------------------------------- |
79 // CMIDTextEditorEdwinCustomDraw::DrawLineGraphics |
93 // CMIDTextEditorEdwinCustomDraw::DrawLineGraphics |
82 // |
96 // |
83 void CMIDTextEditorEdwinCustomDraw::DrawLineGraphics( |
97 void CMIDTextEditorEdwinCustomDraw::DrawLineGraphics( |
84 const TParam& aParam, |
98 const TParam& aParam, |
85 const TLineInfo& aLineInfo) const |
99 const TLineInfo& aLineInfo) const |
86 { |
100 { |
87 iParentDraw.DrawLineGraphics(aParam, aLineInfo); |
101 // If scaling is on, it clips drawing to canvas size. After it |
|
102 // draws its lines. |
|
103 // Only drawing otherwise. |
|
104 if (iEdwin.IsScalingOn()) |
|
105 { |
|
106 aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect()); |
|
107 |
|
108 iParentDraw.DrawLineGraphics(aParam, aLineInfo); |
|
109 |
|
110 aParam.iGc.CancelClippingRect(); |
|
111 } |
|
112 else |
|
113 { |
|
114 iParentDraw.DrawLineGraphics(aParam, aLineInfo); |
|
115 } |
88 } |
116 } |
89 |
117 |
90 // --------------------------------------------------------------------------- |
118 // --------------------------------------------------------------------------- |
91 // CMIDTextEditorEdwinCustomDraw::DrawText |
119 // CMIDTextEditorEdwinCustomDraw::DrawText |
92 // (other items were commented in the header file) |
120 // (other items were commented in the header file) |
111 { |
139 { |
112 iEdwin.Redraw(); |
140 iEdwin.Redraw(); |
113 return; |
141 return; |
114 } |
142 } |
115 |
143 |
116 iParentDraw.DrawText( |
144 // If scaling is on, it clips drawing to canvas size. After it |
117 aParam, |
145 // draws its text. |
118 aLineInfo, |
146 // Only drawing otherwise. |
119 aFormat, |
147 if (iEdwin.IsScalingOn()) |
120 aText, |
148 { |
121 aTextOrigin, |
149 aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect()); |
122 aExtraPixels); |
150 |
|
151 iParentDraw.DrawText( |
|
152 aParam, |
|
153 aLineInfo, |
|
154 aFormat, |
|
155 aText, |
|
156 aTextOrigin, |
|
157 aExtraPixels); |
|
158 |
|
159 aParam.iGc.CancelClippingRect(); |
|
160 } |
|
161 else |
|
162 { |
|
163 iParentDraw.DrawText( |
|
164 aParam, |
|
165 aLineInfo, |
|
166 aFormat, |
|
167 aText, |
|
168 aTextOrigin, |
|
169 aExtraPixels); |
|
170 } |
123 } |
171 } |
124 |
172 |
125 #ifdef RD_JAVA_S60_RELEASE_9_2 |
173 #ifdef RD_JAVA_S60_RELEASE_9_2 |
126 // --------------------------------------------------------------------------- |
174 // --------------------------------------------------------------------------- |
127 // CMIDTextEditorEdwinCustomDraw::DrawText |
175 // CMIDTextEditorEdwinCustomDraw::DrawText |
149 { |
197 { |
150 iEdwin.Redraw(); |
198 iEdwin.Redraw(); |
151 return; |
199 return; |
152 } |
200 } |
153 |
201 |
154 iParentDraw.DrawText( |
202 // If scaling is on, it clips drawing to canvas size. After it |
155 aParam, |
203 // draws its text. |
156 aLineInfo, |
204 // Only drawing otherwise. |
157 aFormat, |
205 if (iEdwin.IsScalingOn()) |
158 aText, |
206 { |
159 aStart, |
207 aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect()); |
160 aEnd, |
208 |
161 aTextOrigin, |
209 iParentDraw.DrawText( |
162 aExtraPixels); |
210 aParam, |
|
211 aLineInfo, |
|
212 aFormat, |
|
213 aText, |
|
214 aStart, |
|
215 aEnd, |
|
216 aTextOrigin, |
|
217 aExtraPixels); |
|
218 |
|
219 aParam.iGc.CancelClippingRect(); |
|
220 } |
|
221 else |
|
222 { |
|
223 iParentDraw.DrawText( |
|
224 aParam, |
|
225 aLineInfo, |
|
226 aFormat, |
|
227 aText, |
|
228 aStart, |
|
229 aEnd, |
|
230 aTextOrigin, |
|
231 aExtraPixels); |
|
232 } |
163 } |
233 } |
164 #endif |
234 #endif |
165 |
235 |
166 // --------------------------------------------------------------------------- |
236 // --------------------------------------------------------------------------- |
167 // CMIDTextEditorEdwinCustomDraw::SystemColor |
237 // CMIDTextEditorEdwinCustomDraw::SystemColor |