os/textandloc/textrendering/textformatting/test/tbandformat/inc/bandtestactions.h
First public contribution.
2 * Copyright (c) 2006-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.
20 #ifndef __TESTACTIONS_H
21 #define __TESTACTIONS_H
30 class CBandMaintainer;
32 class CFbsScreenDevice;
35 Base class for band test actions
36 This class is initialised with a CBandMaintainer, CBandValidator and a CRichText object.
37 These are used to perform the required action and then validate the test and reference view
42 // result of a band test action
50 Execute a test action.
51 @param aDocPos The position in the document where the test action is to be performed
52 @param aEditLength The length of the edit to be executed
53 @return TTestResult The result of the band test action
55 IMPORT_C virtual TTestResult ExecuteL(TInt aDocPos, TInt aEditLength) = 0;
57 TBandTestAction(CBandMaintainer& aTextViews, CRichText& aRichText, CBandValidator& aValidator);
58 CBandMaintainer& iTextViews;
60 CBandValidator& iValidator;
64 Band test action used to carry out a delete
66 class TDeleteText : public TBandTestAction
71 @param aTextViews The CBandMaintainer object which maintains the test and reference CTextView objects
72 @param aRichText The document which is represented by a CRichText object
73 @param aValidator The CBandValidator which is used to compare the test and reference views
75 IMPORT_C TDeleteText(CBandMaintainer& aTextViews, CRichText& aRichText, CBandValidator& aValidator);
78 @param aDocPos The position in the document where the test action is to be performed
79 @param aEditLength The length of the edit to be executed
80 @return TTestResult The result of the band test action
82 IMPORT_C virtual TTestResult ExecuteL(TInt aDocPos, TInt aEditLength);
86 Band test action used to carry out an insert
88 class TInsertText : public TBandTestAction
93 @param aTextViews The CBandMaintainer object which maintains the test and reference CTextView objects
94 @param aRichText The document which is represented by a CRichText object
95 @param aValidator The CBandValidator which is used to compare the test and reference views
96 @param aTextToInsert The text to be inserted
98 IMPORT_C TInsertText(CBandMaintainer& aTextViews, CRichText& aRichText, CBandValidator& aValidator, const TDesC& aTextToInsert);
101 @param aDocPos The position in the document where the test action is to be performed
102 @param aEditLength Not Used
103 @return TTestResult The result of the band test action
105 IMPORT_C virtual TTestResult ExecuteL(TInt aDocPos, TInt aEditLength);
107 const TDesC& iTextToInsert;
119 Band test action used to carry out a reformat
121 class TReformatText : public TBandTestAction
126 @param aTextViews The CBandMaintainer object which maintains the test and reference CTextView objects
127 @param aRichText The document which is represented by a CRichText object
128 @param aValidator The CBandValidator which is used to compare the test and reference views
130 IMPORT_C TReformatText(CBandMaintainer& aTextViews, CRichText& aRichText, CBandValidator& aValidator, TReformatAction aReformatAction, CFbsScreenDevice& aDevice);
133 @param aDocPos The position in the document where the test action is to be performed
134 @param aEditLength The length of the edit to be executed
135 @return TTestResult The result of the band test action
137 IMPORT_C virtual TTestResult ExecuteL(TInt aDocPos, TInt aEditLength);
139 TInt iReformatAction;
140 CFbsScreenDevice& iDevice;