Update contrib.
2 * Copyright (c) 2004-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.
16 * TTranspEditor test header file. A base set of classes, neeeded for transparent editors
17 * functionality testing, is declared here.
22 #ifndef __TTRANSPEDITOR_H__
23 #define __TTRANSPEDITOR_H__
25 /////////////////////////////////////////////////////////////////////////////////////////////
27 //CTestPicture test class is used to check the effect of opaque drawing, applied on pictures
28 //inserted into the text.
30 class CTestPicture : public CPicture
33 static CTestPicture* NewL();
34 virtual ~CTestPicture();
35 void Draw(CGraphicsContext&, const TPoint&, const TRect&, MGraphicsDeviceMap*) const;
36 void ExternalizeL(RWriteStream&) const;
37 void GetOriginalSizeInTwips(TSize& aSize) const;
38 TInt ScaleFactorWidth() const;
39 TInt ScaleFactorHeight() const;
50 /////////////////////////////////////////////////////////////////////////////////////////////
53 class CTranspEditorApp : public CEikApplication
56 CApaDocument* CreateDocumentL();
57 TUid AppDllUid() const;
61 /////////////////////////////////////////////////////////////////////////////////////////////
64 class CTranspEditorDoc : public CEikDocument
67 CTranspEditorDoc(CEikApplication& aApp);
70 CEikAppUi* CreateAppUiL();
74 /////////////////////////////////////////////////////////////////////////////////////////////
76 //CTranspEditorView1 class is used for displaying a bitmap, which occupies the whole screen
77 //and is used as a background for a transparent text view, displayed on top of it.
79 class CTranspEditorView1 : public CCoeControl
82 static CTranspEditorView1* NewL();
83 ~CTranspEditorView1();
87 void Draw(const TRect&) const;
94 /////////////////////////////////////////////////////////////////////////////////////////////
96 //CTranspEditorView2 class is used for displaying a transparent text view on top of a
97 //background bitmap. The class offers functions for inserting texts, pictures, switching
98 //on/off text selection and opaque drawing mode.
100 class CTranspEditorView2 : public CCoeControl
103 static CTranspEditorView2* NewL();
104 ~CTranspEditorView2();
107 void SwitchSelectL();
108 void InsertPictureL();
109 void SetCharFormatL();
113 void Draw(const TRect&) const;
116 CRichText* iRichText;
117 CTextLayout* iLayout;
118 CTextView* iTextView;
124 /////////////////////////////////////////////////////////////////////////////////////////////
127 class CTranspEditorUi : public CEikAppUi
134 void HandleCommandL(TInt aCommand);
137 CTranspEditorView1* iTranspEditorView1;
138 CTranspEditorView2* iTranspEditorView2;
142 #endif//__TTRANSPEDITOR_H__