epoc32/include/mw/apadbase.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/apadbase.h	Wed Mar 31 12:27:01 2010 +0100
     1.3 @@ -0,0 +1,127 @@
     1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __APADBASE_H__
    1.20 +#define __APADBASE_H__
    1.21 +
    1.22 +#if !defined(__E32STD_H__)
    1.23 +#include <e32std.h>
    1.24 +#endif
    1.25 +#if !defined(__S32STD_H__)
    1.26 +#include <s32std.h>
    1.27 +#endif
    1.28 +#if !defined(__GDI_H__)
    1.29 +#include <gdi.h>
    1.30 +#endif
    1.31 +
    1.32 +
    1.33 +class CApaDoorBase : public CPicture
    1.34 +// Base class for a wrapper for embedded CApaDocuments
    1.35 +/** The base class for the graphic representation of an embedded document.
    1.36 +
    1.37 +An embedded document can be represented either as an icon or as a glass picture. 
    1.38 +Such a graphic representation is known as a door.
    1.39 +
    1.40 +The class is intended for derivation.
    1.41 +
    1.42 +@publishedAll 
    1.43 +@released
    1.44 +@see CApaDoor
    1.45 +@see CApaModelDoor */
    1.46 +	{
    1.47 +public:
    1.48 +	
    1.49 +	/** Defines the possible formats for the graphical representation of the embedded 
    1.50 +	document. */
    1.51 +	enum TFormat {
    1.52 +		/** The representation is an icon. */
    1.53 +		EIconic,
    1.54 +		/** The representation is a glass door. */
    1.55 +		EGlassDoor,
    1.56 +		/** The representation is a glass door but has been temporarily switched to an icon. */
    1.57 +		ETemporarilyIconic
    1.58 +		};
    1.59 +public:
    1.60 +	inline TFormat Format()const;
    1.61 +	inline TUid Source()const;
    1.62 +	inline void SetSource(TUid aSource);
    1.63 +	// Virtuals from CPicture
    1.64 +	IMPORT_C virtual TStreamId StoreL(CStreamStore& aStore) const;
    1.65 +	IMPORT_C virtual void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); 
    1.66 +	IMPORT_C virtual void SetCropInTwips(const TMargins& aMargins); 
    1.67 +	IMPORT_C virtual TPictureCapability Capability() const;
    1.68 +	IMPORT_C virtual void GetCropInTwips(TMargins& aMargins) const; 
    1.69 +	IMPORT_C virtual TInt ScaleFactorWidth() const; 
    1.70 +	IMPORT_C virtual TInt ScaleFactorHeight() const; 
    1.71 +	IMPORT_C virtual TBool LineBreakPossible(TUint aClass,TBool aBeforePicture,TBool aHaveSpaces) const;
    1.72 +	IMPORT_C virtual TBool NativePixelSize(TSize& aPixelSize);
    1.73 +protected:
    1.74 +	IMPORT_C CApaDoorBase();
    1.75 +	IMPORT_C void ExternalizeBaseStreamL(CStreamStore& aStore,CStreamDictionary& aStreamDict)const;
    1.76 +	IMPORT_C TSize InternalizeBaseStreamL(const CStreamStore& aStore,const CStreamDictionary& aStreamDict); // returns current size in twips
    1.77 +
    1.78 +private:
    1.79 +	IMPORT_C virtual void CApaDoorBase_Reserved1();
    1.80 +	IMPORT_C virtual void CApaDoorBase_Reserved2();
    1.81 +protected:
    1.82 +
    1.83 +	/** Returns the size of the glass door, in twips.
    1.84 +	
    1.85 +	A concrete implementation of this function is provided by derived classes.
    1.86 +	
    1.87 +	@return The size of the glass door, in twips. 
    1.88 +	
    1.89 +	@publishedAll 
    1.90 +	@released */
    1.91 +	virtual TSize GlassDoorSize()const=0;
    1.92 +protected:
    1.93 +	TFormat iFormat;
    1.94 +	TUid iSource; // foreign representation of a translated door (eg MS Word doc)
    1.95 +
    1.96 +private:
    1.97 +	TInt iCApaDoorBase_Reserved1;
    1.98 +	};
    1.99 +
   1.100 +//
   1.101 +// inlines
   1.102 +//
   1.103 +
   1.104 +inline CApaDoorBase::TFormat CApaDoorBase::Format()const
   1.105 +	/** Gets the current format of the representation of the embedded document.
   1.106 +	
   1.107 +	@return The format for the representation of the embedded document. */
   1.108 +	{ return iFormat; }
   1.109 +
   1.110 +inline TUid CApaDoorBase::Source()const
   1.111 +	/** Gets the UID that identifies this door when the source originates on a non-Symbian 
   1.112 +	OS device.
   1.113 +	
   1.114 +	This is used by converters.
   1.115 +	
   1.116 +	@return The UID for the non-Symbian OS source. For a source that originates 
   1.117 +	on a Symbian OS phone, this is KNullUid. */
   1.118 +	{ return iSource; }
   1.119 +
   1.120 +inline void CApaDoorBase::SetSource(TUid aSource)
   1.121 +	/** Sets the UID that identifies this door when the source originates on a non-Symbian 
   1.122 +	OS device.
   1.123 +	
   1.124 +	This is used by converters.
   1.125 +	
   1.126 +	@param aSource The UID for the non-Symbian OS source. For a source that originates 
   1.127 +	on a Symbian OS phone, this is KNullUid. */
   1.128 +	{ iSource=aSource; }
   1.129 +
   1.130 +#endif