Update contrib.
2 * Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Header for the CWordTest class; testing functions added to WORD after it ceased to be a standard EPOC application.
23 #define __WPTEST_H__ 1
28 class CWordTest: public CBase, public MFormCustomDraw
34 static CWordTest* NewL(CTextView* aTextView);
36 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aEventCode,TChar& aCharToBeInserted);
37 void Highlight(MUnifiedEditor& aEditor,TFontPresentation::TFontHighlightStyle aStyle);
38 void SetPictureAlignmentL(CEikRichTextEditor* aEditor,TFontPresentation::TAlignment aAlignment);
39 void SetWrapL(CEikRichTextEditor* aEditor,TBool aWrap);
49 TKeyboardCode Keyboard() const { return iKeyboard; }
50 void SetKeyboardL(TKeyboardCode aKeyboard);
51 void TurnOnCustomDrawing(CTextLayout* aLayout);
52 TBool RuledPaper() const { return iRuledPaper; }
53 void SetRuledPaperL(CEikRichTextEditor* aEditor,TBool aOn);
54 TBool BackgroundBitmap() const { return iBackgroundBitmap != NULL; }
55 void SetBackgroundBitmapL(CEikRichTextEditor* aEditor,TBool aOn);
56 void ToggleCaseL(CEikRichTextEditor* aEditor);
58 void SetTruncateWithEllipsisL(CEikRichTextEditor* aEditor,TBool aOn);
59 TBool TruncateWithEllipsis() const { return iTruncateWithEllipsis; }
60 TBool CursorFlashing() const { return iCursorFlashing; }
61 TTmCursorPlacement CursorPlacement() const { return iCursorPlacement; }
62 TInt CursorWeight() const { return iCursorWeight; }
63 TRgb CursorXorColor() const { return iCursorXorColor; }
64 void ToggleCursorFlash();
65 void SetCursorPlacement(TTmCursorPlacement aPlacement);
66 void SetCursorWeight(TInt aWeight);
67 void SetCursorXorColor(TRgb aColor);
68 void SetSelectionHighlightStyle(TInt aStyleIndex);
69 TInt SelectionHighlightStyle() const;
70 void SetCursorPositioningHintL(TCursorPosition::TPosHint aHint);
71 TCursorPosition::TPosHint CursorPositioningHint() const;
72 void InsertPictureL(CEikRichTextEditor* aEditor);
74 CWordTest(CTextView* aTextView);
76 // virtual functions from MFormCustomDraw
77 void DrawLineGraphics(const TParam& aParam,const TLineInfo& aLineInfo) const;
78 void DrawText(const TParam& aParam,const TLineInfo& aLineInfo,const TCharFormat& aFormat,const TDesC& aText,
79 const TPoint& aTextOrigin,TInt aExtraPixels) const;
80 void DrawBackground(const TParam& aParam,const TRgb& aBackground,TRect& aDrawn) const;
81 TRgb SystemColor(TUint aColorIndex, TRgb aDefaultColor) const;
84 TKeyboardCode iKeyboard;
87 CFbsBitmap* iBackgroundBitmap;
88 TBool iTruncateWithEllipsis;
89 TBool iCursorFlashing;
90 TTmCursorPlacement iCursorPlacement;
94 TCursorPosition::TPosHint iPositioningHint;
97 #endif // __WPTEST_H__