Update contrib.
2 * Copyright (c) 1997-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.
29 // Classes declared in this file
37 const TUid KUidXzePictureType={268435508};
42 const TUid KUidXzeDoorType={268435509};
47 const TInt KWidthInTwips=360;
48 const TInt KHeightInTwips=360;
50 class MDemPictureFactory : public MPictureFactory
55 // Instantiates new CDemPictureHeaders.
57 IMPORT_C MDemPictureFactory(); // Force GCC to export vtable.
58 IMPORT_C virtual void NewPictureL(TPictureHeader& aHeader,const CStreamStore& aDeferredPictureStore)const;
62 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
64 class CXzePicture : public CPicture
69 // A simple test picture, that is store aware, and has state.
72 IMPORT_C static CXzePicture* NewL(TChar aLabel);
73 IMPORT_C static CXzePicture* NewL(const CStreamStore& aStore,TStreamId aId);
74 IMPORT_C virtual ~CXzePicture();
76 IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
77 IMPORT_C void InternalizeL(RReadStream& aStream);
78 IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aId);
80 IMPORT_C void GetOriginalSizeInTwips(TSize& aSize) const;
82 IMPORT_C virtual void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect,MGraphicsDeviceMap* aMap=NULL)const;
84 IMPORT_C CXzePicture(TChar aLabel);
85 IMPORT_C CXzePicture();
87 TSize iOriginalSizeInTwips;
88 TChar iLabel; // Provides object state.
92 class CXzeDoor : public CXzePicture
97 // A sample door, that has emulates 2 states of presence. An iconic representation
98 // and a deep representation.
101 IMPORT_C static CXzeDoor* NewL(TChar aLabel,TBool aAlwaysFailToDetach=EFalse);
102 IMPORT_C static CXzeDoor* NewL(const CStreamStore& aStore,TStreamId aId);
104 IMPORT_C virtual void DetachFromStoreL(TDetach aDegree);
106 IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
107 IMPORT_C void InternalizeL(RReadStream& aStream);
108 IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aId);
110 IMPORT_C CXzeDoor(TChar aLabel,TBool aAlwaysFailToDetach);
111 IMPORT_C CXzeDoor(TBool aAlwaysFailToDetach);
113 TBool iAlwaysFailToDetach;
117 class CTestPicture : public CPicture
123 IMPORT_C static CTestPicture* NewL();
125 IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
127 IMPORT_C void GetOriginalSizeInTwips(TSize& aSize) const;
129 IMPORT_C virtual void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect,MGraphicsDeviceMap* aMap=NULL) const;
131 IMPORT_C CTestPicture();
133 TSize iOriginalSizeInTwips;
136 ///////////////////////////////////////////////////////////////////////
139 class CDummyField : public CTextField
145 IMPORT_C CDummyField();
146 IMPORT_C virtual TInt Value(TPtr& aValueText); // value is always "XXX"
147 IMPORT_C virtual void InternalizeL(RReadStream& aStream);
148 IMPORT_C virtual void ExternalizeL(RWriteStream& aStream)const;
149 IMPORT_C virtual TUid Type() const;