sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* Header for the CWordTest class; testing functions added to WORD after it ceased to be a standard EPOC application.
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef __WPTEST_H__
|
sl@0
|
23 |
#define __WPTEST_H__ 1
|
sl@0
|
24 |
|
sl@0
|
25 |
#include <e32std.h>
|
sl@0
|
26 |
#include <txtfrmat.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
class CWordTest: public CBase, public MFormCustomDraw
|
sl@0
|
29 |
/**
|
sl@0
|
30 |
@internalComponent
|
sl@0
|
31 |
*/
|
sl@0
|
32 |
{
|
sl@0
|
33 |
public:
|
sl@0
|
34 |
static CWordTest* NewL(CTextView* aTextView);
|
sl@0
|
35 |
~CWordTest();
|
sl@0
|
36 |
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aEventCode,TChar& aCharToBeInserted);
|
sl@0
|
37 |
void Highlight(MUnifiedEditor& aEditor,TFontPresentation::TFontHighlightStyle aStyle);
|
sl@0
|
38 |
void SetPictureAlignmentL(CEikRichTextEditor* aEditor,TFontPresentation::TAlignment aAlignment);
|
sl@0
|
39 |
void SetWrapL(CEikRichTextEditor* aEditor,TBool aWrap);
|
sl@0
|
40 |
|
sl@0
|
41 |
enum TKeyboardCode
|
sl@0
|
42 |
{
|
sl@0
|
43 |
EStandardKeyboard,
|
sl@0
|
44 |
EArabicKeyboard,
|
sl@0
|
45 |
EGreekKeyboard,
|
sl@0
|
46 |
ERussianKeyboard
|
sl@0
|
47 |
};
|
sl@0
|
48 |
|
sl@0
|
49 |
TKeyboardCode Keyboard() const { return iKeyboard; }
|
sl@0
|
50 |
void SetKeyboardL(TKeyboardCode aKeyboard);
|
sl@0
|
51 |
void TurnOnCustomDrawing(CTextLayout* aLayout);
|
sl@0
|
52 |
TBool RuledPaper() const { return iRuledPaper; }
|
sl@0
|
53 |
void SetRuledPaperL(CEikRichTextEditor* aEditor,TBool aOn);
|
sl@0
|
54 |
TBool BackgroundBitmap() const { return iBackgroundBitmap != NULL; }
|
sl@0
|
55 |
void SetBackgroundBitmapL(CEikRichTextEditor* aEditor,TBool aOn);
|
sl@0
|
56 |
void ToggleCaseL(CEikRichTextEditor* aEditor);
|
sl@0
|
57 |
void BenchmarkL();
|
sl@0
|
58 |
void SetTruncateWithEllipsisL(CEikRichTextEditor* aEditor,TBool aOn);
|
sl@0
|
59 |
TBool TruncateWithEllipsis() const { return iTruncateWithEllipsis; }
|
sl@0
|
60 |
TBool CursorFlashing() const { return iCursorFlashing; }
|
sl@0
|
61 |
TTmCursorPlacement CursorPlacement() const { return iCursorPlacement; }
|
sl@0
|
62 |
TInt CursorWeight() const { return iCursorWeight; }
|
sl@0
|
63 |
TRgb CursorXorColor() const { return iCursorXorColor; }
|
sl@0
|
64 |
void ToggleCursorFlash();
|
sl@0
|
65 |
void SetCursorPlacement(TTmCursorPlacement aPlacement);
|
sl@0
|
66 |
void SetCursorWeight(TInt aWeight);
|
sl@0
|
67 |
void SetCursorXorColor(TRgb aColor);
|
sl@0
|
68 |
void SetSelectionHighlightStyle(TInt aStyleIndex);
|
sl@0
|
69 |
TInt SelectionHighlightStyle() const;
|
sl@0
|
70 |
void SetCursorPositioningHintL(TCursorPosition::TPosHint aHint);
|
sl@0
|
71 |
TCursorPosition::TPosHint CursorPositioningHint() const;
|
sl@0
|
72 |
void InsertPictureL(CEikRichTextEditor* aEditor);
|
sl@0
|
73 |
private:
|
sl@0
|
74 |
CWordTest(CTextView* aTextView);
|
sl@0
|
75 |
|
sl@0
|
76 |
// virtual functions from MFormCustomDraw
|
sl@0
|
77 |
void DrawLineGraphics(const TParam& aParam,const TLineInfo& aLineInfo) const;
|
sl@0
|
78 |
void DrawText(const TParam& aParam,const TLineInfo& aLineInfo,const TCharFormat& aFormat,const TDesC& aText,
|
sl@0
|
79 |
const TPoint& aTextOrigin,TInt aExtraPixels) const;
|
sl@0
|
80 |
void DrawBackground(const TParam& aParam,const TRgb& aBackground,TRect& aDrawn) const;
|
sl@0
|
81 |
TRgb SystemColor(TUint aColorIndex, TRgb aDefaultColor) const;
|
sl@0
|
82 |
|
sl@0
|
83 |
CTextView* iTextView;
|
sl@0
|
84 |
TKeyboardCode iKeyboard;
|
sl@0
|
85 |
TInt iKeyboardState;
|
sl@0
|
86 |
TBool iRuledPaper;
|
sl@0
|
87 |
CFbsBitmap* iBackgroundBitmap;
|
sl@0
|
88 |
TBool iTruncateWithEllipsis;
|
sl@0
|
89 |
TBool iCursorFlashing;
|
sl@0
|
90 |
TTmCursorPlacement iCursorPlacement;
|
sl@0
|
91 |
TInt iCursorWeight;
|
sl@0
|
92 |
TRgb iCursorXorColor;
|
sl@0
|
93 |
TInt iStyleIndex;
|
sl@0
|
94 |
TCursorPosition::TPosHint iPositioningHint;
|
sl@0
|
95 |
};
|
sl@0
|
96 |
|
sl@0
|
97 |
#endif // __WPTEST_H__
|