210 */ |
209 */ |
211 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
210 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
212 public: |
211 public: |
213 void RegisterPageWithCaptionControl(CEikDialogPage* aPage); |
212 void RegisterPageWithCaptionControl(CEikDialogPage* aPage); |
214 |
213 |
215 public: // internal layout properties |
|
216 //void SetProperties(const TRegion &aRegion, const RArray<TCapCProperty> &aProperties); |
|
217 //TRect Line(TInt aLineIndex); // text line rectangles |
|
218 //TInt LineIndex(TPoint aPoint); |
|
219 //TPoint LineControlPoint(TInt aLineIndex); |
|
220 //RArray<TInt> LineIndexesIntersecting(TRect aRect); |
|
221 //void SetProperty(TInt aLine, TCapCProperty &aProperty); |
|
222 //void ClearProperty(TInt aLine, TCapCProperty &aProperty); |
|
223 //TCapCProperty Properties(TInt aLine); |
|
224 //void LineRegions(TRegion &aRegion); |
|
225 //void SetVisibleArea(TRect aRect); |
|
226 //void RemoveVisibleArea(); |
|
227 private: // from CCoeControl |
214 private: // from CCoeControl |
228 IMPORT_C TInt CountComponentControls() const; |
215 IMPORT_C TInt CountComponentControls() const; |
229 IMPORT_C CCoeControl* ComponentControl(TInt aIndex) const; |
216 IMPORT_C CCoeControl* ComponentControl(TInt aIndex) const; |
230 IMPORT_C void SizeChanged(); |
217 IMPORT_C void SizeChanged(); |
231 IMPORT_C void FocusChanged(TDrawNow aDrawNow); |
218 IMPORT_C void FocusChanged(TDrawNow aDrawNow); |
314 * @param aSelected whether captionedcontrol is focused |
300 * @param aSelected whether captionedcontrol is focused |
315 * @param aRedraw whether redraw is needed or not |
301 * @param aRedraw whether redraw is needed or not |
316 */ |
302 */ |
317 void SetCurrent(TBool aSelected, TBool aRedraw ); |
303 void SetCurrent(TBool aSelected, TBool aRedraw ); |
318 |
304 |
319 protected: |
|
320 TRect ViewRect() const; |
|
321 TRect EditRect() const; |
|
322 |
|
323 private: |
|
324 enum TWhichEars |
|
325 { |
|
326 ENoEar=0x00, |
|
327 ELeftEar=0x01, |
|
328 ERightEar=0x02, |
|
329 EBothEars=0x03 |
|
330 }; |
|
331 private: // new functions |
305 private: // new functions |
332 TInt WidthForEars(TInt aWidthRemaining) const; |
|
333 void DrawEarsNow(TWhichEars aEar) const; |
|
334 void DrawEars(TWhichEars aEar) const; |
|
335 void DrawSingleEar(TWhichEars aEar,TBool aPressed) const; |
|
336 TRect EarRect(TWhichEars aEar) const; |
|
337 void FireEarL(TWhichEars aEar,TInt aEarRepeat); |
|
338 TInt SquashComponentWidth(TInt& aTotalWidth,const TInt aComponentWidthHint); |
|
339 void StretchComponents(); |
306 void StretchComponents(); |
340 void SetVertEdgeSpacing( TInt aVertEdgeSpacing ); |
|
341 void SetHorzEdgeSpacing( TInt aHorzEdgeSpacing ); |
|
342 void SquashComponents(); |
307 void SquashComponents(); |
343 void CalculateNumberOfLinesForControl( TInt aLines ) ; |
308 void CalculateNumberOfLinesForControl( TInt aLines ) ; |
344 void SizeDialogComponents() ; |
|
345 void PositionDialogComponents() ; |
|
346 static TInt PictographAnimationCallBack( TAny* aPtr ); |
309 static TInt PictographAnimationCallBack( TAny* aPtr ); |
347 /** |
310 /** |
348 * Sets a size for a bitmap that has already been loaded. |
311 * Sets a size for a bitmap that has already been loaded. |
349 * @since 2.8 |
312 * @since 2.8 |
350 */ |
313 */ |
370 void ScrollBackEditorL(); |
333 void ScrollBackEditorL(); |
371 |
334 |
372 public: |
335 public: |
373 void DrawClosingLine() const; |
336 void DrawClosingLine() const; |
374 const CEikDialogPage* DialogPage() const { return iDialogPage; } |
337 const CEikDialogPage* DialogPage() const { return iDialogPage; } |
375 void SetPartiallyVisible( TBool aPVisible ); |
|
376 TBool PressedDownState() const; |
338 TBool PressedDownState() const; |
377 void SetPressedDownState( TBool aPressed ); |
339 void SetPressedDownState( TBool aPressed ); |
378 private: |
340 private: |
379 TSize EditorControlSize() const ; |
|
380 void SetElementBrushColorsL( TRgb aColor ) ; |
341 void SetElementBrushColorsL( TRgb aColor ) ; |
381 void SetElementTextColorsL( TRgb aColor ) ; |
342 void SetElementTextColorsL( TRgb aColor ) ; |
382 |
343 |
383 TBool ShowBitmap() const; |
344 TBool ShowBitmap() const; |
384 void LayoutBitmap(const TRect& aRect); |
345 void LayoutBitmap(const TRect& aRect); |
385 void LayoutCaption(const TRect& aRect); |
346 void LayoutCaption(const TRect& aRect); |
386 void DoFormCaptionSettingsL(const TDesC& aText); |
347 void DoFormCaptionSettingsL(const TDesC& aText); |
387 private: |
348 private: |
388 static void FormLayoutControlBitmap(CEikImage* aBitmap, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines); |
349 static void FormLayoutControlBitmap(CEikImage* aBitmap, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines); |
389 void FormLayoutControlEdwin(CEikEdwin* aEdwin, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent, TBool aIsFocused); |
350 void FormLayoutControlEdwin(CEikEdwin* aEdwin, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent, TBool aIsFocused); |
390 void FormLayoutControlLabel(CEikLabel* aSlider, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aLayoutWithBitmap, TBool aIsFocused, TInt aIconCount); |
351 void FormLayoutControlLabel(CEikLabel* aSlider, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aLayoutWithBitmap, TBool aIsFocused, TInt aIconCount); |
391 void FormLayoutControlMfne(CEikMfne* aMfne, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent, TBool aIsFocused ); |
352 void FormLayoutControlMfne(CEikMfne* aMfne, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent, TBool aIsFocused ); |
392 void FormLayoutControlPopfield(CAknPopupField* aPopfield, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent, TBool aIsFocused); |
353 void FormLayoutControlPopfield(CAknPopupField* aPopfield, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent, TBool aIsFocused); |
393 void FormLayoutControlSecretEditor(CEikSecretEditor* aSecretEd, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent, TBool aIsFocused ); |
354 void FormLayoutControlSecretEditor(CEikSecretEditor* aSecretEd, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent, TBool aIsFocused ); |
394 static void FormLayoutControlSlider(CAknSlider* aSlider, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent); |
355 static void FormLayoutControlSlider(CAknSlider* aSlider, const TRect& aParent, TBool aIsEditable, TBool aSingleLayout, TInt aNumberOfLines, TBool aBitmapPresent); |
395 static void ConvertViewRectToEditRect(TRect& aRect); |
|
396 static void ConvertEditRectToViewRect(TRect& aRect); |
|
397 |
356 |
398 /* |
357 /* |
399 * |
358 * |
400 * Access method for use in a CAknForm context. |
359 * Access method for use in a CAknForm context. |
401 * |
360 * |
437 |
396 |
438 public: |
397 public: |
439 CCoeControl* iControl; |
398 CCoeControl* iControl; |
440 CEikCapCLabel* iCaption; |
399 CEikCapCLabel* iCaption; |
441 HBufC* iCaptionText; |
400 HBufC* iCaptionText; |
442 |
|
443 CEikLabel* iTrailer; |
401 CEikLabel* iTrailer; |
444 TInt iId; |
402 TInt iId; |
445 TInt iControlType; |
403 TInt iControlType; |
446 TAny* iReturnValue; |
404 TAny* iReturnValue; |
447 TBool iIsFormControl ; |
405 TBool iIsFormControl ; |
448 CEikImage* iBitmap ; |
406 CEikImage* iBitmap ; |
449 TBool iIsEditable ; |
407 TBool iIsEditable ; |
450 |
408 |
451 private: |
409 private: |
452 TBool iHasAppendedEditIndicator; |
410 TInt iSpare1[3]; |
453 TSize iMinSize; |
411 TInt iCapCFlags; |
454 TInt iCapCFlags; |
412 TInt iCaptionWidth; |
455 TInt iCaptionWidth; |
413 TInt iFullWidth; |
456 TInt iFullWidth; |
414 TInt iSpare2[9]; |
457 TSize iNormalSize ; |
415 TInt iNumberOfLines; |
458 HBufC*iToolTipText ; |
|
459 TBool iDoNotDisplay ; |
|
460 |
|
461 TInt iVertEdgeSpacing ; |
|
462 TInt iHorzEdgeSpacing ; |
|
463 TInt iOriginalHeight ; |
|
464 |
|
465 TSize iEditorControlSize ; |
|
466 TInt iNumberOfLines ; |
|
467 |
|
468 friend class CEikCapCArray; |
416 friend class CEikCapCArray; |
469 |
417 enum { ENotSupplied = -1 }; |
470 enum { ENotSupplied = -1 } ; |
418 TInt iFlags; |
471 TInt iFlags ; |
419 TInt iSpare3; |
472 |
420 TInt iCaptionFontId; |
473 TBool iRefresh ; |
421 TInt iEditorFontId; |
474 |
422 TInt iVerticalLineXPosition; |
475 TInt iCaptionFontId ; |
|
476 TInt iEditorFontId ; |
|
477 TInt iVerticalLineXPosition; //iAknTopSpacing ; |
|
478 CCoeControl* iHighlightControl; |
423 CCoeControl* iHighlightControl; |
479 CEikCapCExtension* iExtension ; // BC extension for additional Data members. |
424 CEikCapCExtension* iExtension; // BC extension for additional Data members. |
480 TInt iAknFormControlHeight ; |
425 TInt iSpare4[4]; |
481 TInt iAknFormControlWidth ; |
|
482 TInt iPenColor ; |
|
483 TInt iShadowColor ; |
|
484 TBool iIsCurrentLine; |
426 TBool iIsCurrentLine; |
485 CEikDialogPage* iDialogPage; |
427 CEikDialogPage* iDialogPage; |
486 |
|
487 |
|
488 }; |
428 }; |
489 |
429 |
490 |
430 |
491 /* |
431 /* |
492 * Special Label Class which appends colon to label text |
432 * Special Label Class which appends colon to label text |