aknsitemdata.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : AknsItemData.h
00004 *  Part of     : Avkon Skins / Skin Library
00005 *  Interface   : ?Interface_category, ?Interface_name
00006 *  Description : Defines public item data classes.
00007 *  Version     : ?Version
00008 *
00009 *  Copyright © 2002 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef AKNSITEMDATA_H
00022 #define AKNSITEMDATA_H
00023 
00024 // INCLUDES
00025 #include <AknsItemID.h>
00026 #include <AknsRlEffect.h>
00027 #include <gdi.h>
00028 
00029 // FORWARD DECLARATIONS
00030 class CFbsBitmap;
00031 struct TAknsAppIconInfo;
00032 struct TAknsImageAttributeData;
00033 struct TAknsColorTableEntry;
00034 struct TAknsBmpAnimFrameInfo;
00035 class CAknsEffectParameter;
00036 class MAknsRlCommandIterator;
00037 class MAknsAlIterator;
00038 class CAknsNamedReference;
00039 class CAknsSizeBoundParameter;
00040 struct TAknsAlAnimationCommandData;
00041 struct TAknsAlTimingModelData;
00042 struct TAknsAlAnimationValueData;
00043 struct TAknsAlNamedReferenceData;
00044 struct TAknsAlSizeBoundParameterData;
00045 
00046 // CLASS DECLARATIONS
00047 
00062 NONSHARABLE_CLASS(CAknsItemData) : public CBase
00063     {
00064     public:  // Constructors and destructor
00065                 
00071         virtual ~CAknsItemData();
00072 
00073     public: // New functions
00074 
00085         void SetType( const TAknsItemType aType );
00086         
00096         IMPORT_C TAknsItemType Type() const;
00097 
00098     protected: // C++ protected constructor for derived classes
00099                 
00108         CAknsItemData( const TAknsItemType aType );    
00109     
00110     protected:  // Data
00111 
00112         TAknsItemType iType;    
00113 
00114     };
00115 
00129 NONSHARABLE_CLASS(CAknsImageItemData) : public CAknsItemData
00130     {
00131     public:  // Constructors and destructor
00132                 
00136         virtual ~CAknsImageItemData();
00137 
00138     public: // New functions
00139 
00148         IMPORT_C void SetAttributesL( 
00149             const TAknsImageAttributeData& aAttributes );
00150         
00160         IMPORT_C const TAknsImageAttributeData* Attributes() const;
00161 
00162         IMPORT_C void SetParentIID(const TAknsItemID& aIID);
00163         IMPORT_C void SetDrawRect(const TRect& aRect);
00164         IMPORT_C TAknsItemID ParentIID();
00165         IMPORT_C TRect DrawRect();
00166 
00167 
00168     protected: // C++ protected constructor for derived classes
00169                 
00178         CAknsImageItemData( const TAknsItemType aType );
00179     
00180     protected:  // Data
00181 
00182         TAknsImageAttributeData* iAttributeData;
00183         TAknsItemID iParentIID;
00184         TRect iDrawRect;
00185 
00186     
00187     };
00188 
00202 NONSHARABLE_CLASS(CAknsBitmapItemData) : public CAknsImageItemData
00203     {
00204     public:  // Constructors and destructor
00205             
00218         IMPORT_C static CAknsBitmapItemData* NewL();
00219         
00224         virtual ~CAknsBitmapItemData();
00225 
00226     public: // New functions
00227         
00238         IMPORT_C void SetBitmap( CFbsBitmap* aBitmap );
00239 
00249         IMPORT_C void DestroyAndSetBitmap( CFbsBitmap* aBitmap );
00250 
00259         IMPORT_C CFbsBitmap* Bitmap();
00260         
00261     protected:  // C++ protected constructor
00262 
00273         CAknsBitmapItemData( const TAknsItemType aType );
00274     
00275     protected:  // Data
00276         CFbsBitmap* iBitmap;    
00277 
00278     };
00279 
00293 NONSHARABLE_CLASS(CAknsMaskedBitmapItemData) : public CAknsBitmapItemData
00294     {
00295     public:  // Constructors and destructor
00296             
00309         IMPORT_C static CAknsMaskedBitmapItemData* NewL();
00310         
00315         virtual ~CAknsMaskedBitmapItemData();
00316 
00317     public: // New functions
00318         
00328         IMPORT_C void SetMask( CFbsBitmap* aMask );
00329 
00339         IMPORT_C void DestroyAndSetMask( CFbsBitmap* aMask );
00340 
00349         IMPORT_C CFbsBitmap* Mask();
00350         
00351     protected:  // C++ protected constructor
00352 
00363         CAknsMaskedBitmapItemData( const TAknsItemType aType );    
00364     
00365     protected:  // Data
00366         CFbsBitmap* iMask;    
00367 
00368     };
00369 
00383 NONSHARABLE_CLASS(CAknsColorTableItemData) : public CAknsImageItemData
00384     {
00385     public:  // Constructors and destructor
00386             
00398         IMPORT_C static CAknsColorTableItemData* NewL();
00399         
00404         virtual ~CAknsColorTableItemData();
00405 
00406     public: // New functions
00407         
00418         IMPORT_C void SetColorsL( const TInt aNumberOfColors, 
00419             const TAknsColorTableEntry* aColors );
00420 
00438         IMPORT_C TInt ColorIndexed( const TInt aIndex ) const;
00439 
00457         IMPORT_C TRgb ColorRgb( const TInt aIndex ) const;
00458 
00474         IMPORT_C void GetColorL( const TInt aIndex, TRgb& aColor ) const;
00475         
00476     protected:  // C++ protected constructor
00477 
00488         CAknsColorTableItemData( const TAknsItemType aType );
00489     
00490     protected:  // Data
00491 
00492         TAknsColorTableEntry* iColorArray; 
00493         TInt iColorArraySize;
00494 
00495     };
00496 
00510 NONSHARABLE_CLASS(CAknsImageTableItemData) : public CAknsImageItemData
00511     {
00512     public:  // Constructors and destructor
00513             
00525         IMPORT_C static CAknsImageTableItemData* NewL();
00526         
00531         virtual ~CAknsImageTableItemData();
00532 
00533     public: // New functions
00534         
00545         IMPORT_C void SetImagesL( const TInt aNumberOfImages, 
00546             const TAknsItemID* aImages );        
00547 
00558         IMPORT_C TAknsItemID ImageIID( const TInt aIndex ) const;
00559 
00568         IMPORT_C TAknsItemID* Images() const;
00569 
00577         IMPORT_C TInt NumberOfImages() const;
00578         
00579     protected:  // C++ protected constructor
00580 
00591         CAknsImageTableItemData( const TAknsItemType aType );
00592     
00593     protected:  // Data
00594 
00595         TInt iNumberOfImages;       
00596         TAknsItemID* iImageArray;   
00597 
00598     };
00599 
00613 NONSHARABLE_CLASS(CAknsBmpAnimItemData) : public CAknsImageTableItemData
00614     {
00615     public:  // Constructors and destructor
00616             
00628         IMPORT_C static CAknsBmpAnimItemData* NewL();
00629         
00634         virtual ~CAknsBmpAnimItemData();
00635 
00636     public: // New functions
00637         
00651         IMPORT_C void SetFrameInfosL( const TAknsBmpAnimFrameInfo* aFrameInfos );
00652 
00661         IMPORT_C TAknsBmpAnimFrameInfo* FrameInfos() const;
00662 
00672         IMPORT_C void SetLastFrameBackground( TBool aLastFrameBg );
00673 
00682         IMPORT_C TBool LastFrameBackground() const;
00683 
00691         IMPORT_C void SetFrameInterval( const TInt16 aFrameInterval );
00692 
00700         IMPORT_C TInt16 FrameInterval() const;
00701 
00709         IMPORT_C void SetPlayMode( const TInt16 aPlayMode );
00710 
00718         IMPORT_C TInt16 PlayMode() const;
00719 
00727         IMPORT_C void SetFlash( const TBool aFlash );
00728 
00736         IMPORT_C TBool Flash() const;
00737         
00738     protected:  // C++ protected constructor
00739 
00750         CAknsBmpAnimItemData( const TAknsItemType aType );
00751     
00752     protected:  // Data
00753 
00754         TAknsBmpAnimFrameInfo* iFrameArray;   
00755 
00756         TBool iLastFrameBackground; 
00757         TInt16 iFrameInterval;  
00758         TInt16 iPlayMode;       
00759         TBool iFlash;           
00760 
00761     };
00762 
00776 NONSHARABLE_CLASS(CAknsStringItemData) : public CAknsItemData
00777     {
00778     public:  // Constructors and destructor
00779             
00791         IMPORT_C static CAknsStringItemData* NewL();
00792         
00797         virtual ~CAknsStringItemData();
00798 
00799     public: // New functions
00800         
00809         IMPORT_C void SetStringL( const TDesC& aValue );
00810 
00820         IMPORT_C const TDesC& String() const;
00821 
00822     protected:  // C++ protected constructor
00823 
00834         CAknsStringItemData( const TAknsItemType aType );
00835     
00836     protected:  // Data
00837 
00838         HBufC* iString; 
00839 
00840     };
00841 
00854 NONSHARABLE_CLASS(CAknsEffectCommand) : public CBase
00855     {
00856     public:  // Constructors and destructor
00857             
00867         IMPORT_C static CAknsEffectCommand* NewL();
00868         
00872         virtual ~CAknsEffectCommand();
00873 
00874     public: // New functions
00875 
00883         IMPORT_C void SetEffectUid( const TUid aValue );
00884 
00892         IMPORT_C TUid EffectUid() const;
00893 
00901         IMPORT_C void SetLayerConf( const TAknsRlRenderOpParam aValue );
00902 
00910         IMPORT_C TAknsRlRenderOpParam LayerConf() const;
00911 
00920         IMPORT_C void AppendParameterL( 
00921             const TAknsRlParameterData& aParameter );
00922 
00933         IMPORT_C MAknsRlParameterIterator* CreateParameterIteratorL();
00934 
00935     protected:  // C++ protected constructor
00936 
00942         CAknsEffectCommand();
00943     
00944     protected:  // Data
00945 
00946         TUid iUid; 
00947         TAknsRlRenderOpParam iLayerConf; 
00948         RPointerArray<CAknsEffectParameter> iParameters; 
00949 
00950     };
00951 
00967 NONSHARABLE_CLASS(CAknsEffectQueueItemData) : public CAknsItemData
00968     {
00969     public:  // Constructors and destructor
00970             
00981         IMPORT_C static CAknsEffectQueueItemData* NewL();
00982         
00986         virtual ~CAknsEffectQueueItemData();
00987 
00988     public: // New functions
00989 
00997         IMPORT_C void SetRefItem( const TAknsItemID aValue );
00998 
01006         IMPORT_C TAknsItemID RefItem() const;
01007 
01015         IMPORT_C void SetInputLayer( const TInt aValue );
01016 
01024         IMPORT_C TInt InputLayer() const;
01025 
01033         IMPORT_C void SetInputLayerMode( const TInt aValue );
01034 
01042         IMPORT_C TInt InputLayerMode() const;
01043 
01051         IMPORT_C void SetOutputLayer( const TInt aValue );
01052 
01060         IMPORT_C TInt OutputLayer() const;
01061 
01069         IMPORT_C void SetOutputLayerMode( const TInt aValue );
01070 
01078         IMPORT_C TInt OutputLayerMode() const;
01079 
01089         IMPORT_C void AppendCommandL( const CAknsEffectCommand* aCommand );
01090 
01101         IMPORT_C MAknsRlCommandIterator* CreateCommandIteratorL();
01102 
01103     protected:  // C++ protected constructor
01104 
01115         CAknsEffectQueueItemData( const TAknsItemType aType );
01116     
01117     protected:  // Data
01118 
01119         TAknsItemID iRefId; 
01120         TInt iInputLayer; 
01121         TInt iInputLayerMode; 
01122         TInt iOutputLayer; 
01123         TInt iOutputLayerMode; 
01124         RPointerArray<CAknsEffectCommand> iCommands; 
01125 
01126     };
01127 
01139 class CAknsTimingModel: public CBase
01140     {
01141     public: // Constructors and destructor
01142         static CAknsTimingModel* NewL();
01143         virtual ~CAknsTimingModel();
01144 
01145     protected: // C++ protected constructor
01146         CAknsTimingModel();
01147 
01148     public:
01149         void SetTimingModelUid( const TUid aValue );
01150         TUid TimingModelUid() const;
01151 
01152         void AppendParameterL( const TAknsRlParameterData& aParameter );
01153         MAknsRlParameterIterator* CreateParameterIteratorL();
01154 
01155     public: // Iteration support (internal)
01156         void AssignOutL( TAknsAlTimingModelData& aData );
01157 
01158         static void InitializeOut( TAknsAlTimingModelData& aData );
01159         static void ReleaseOut( TAknsAlTimingModelData& aData );
01160 
01161     private: // Data
01162          TUid iTimingModelUid;
01163          RPointerArray<CAknsEffectParameter> iParameters;
01164     };
01165 
01178 class CAknsAnimationValue: public CBase
01179     {
01180     public:
01181         static CAknsAnimationValue* NewL();
01182         virtual ~CAknsAnimationValue();
01183 
01184     private:
01185         CAknsAnimationValue();
01186 
01187     public:
01188         void SetAnimationValueUid( const TUid aValue );
01189         TUid AnimationValueUid() const;
01190 
01191         void SetTimingModelId( const TInt aId );
01192         TInt TimingModelId() const;
01193 
01194         void AppendParameterL( const TAknsRlParameterData& aParameter );
01195         MAknsRlParameterIterator* CreateParameterIteratorL();
01196 
01197     public: // Iteration support (internal)
01198         void AssignOutL( TAknsAlAnimationValueData& aData );
01199 
01200         static void InitializeOut( TAknsAlAnimationValueData& aData );
01201         static void ReleaseOut( TAknsAlAnimationValueData& aData );
01202 
01203     private:
01204          TInt iTimingModelId;
01205          TUid iAnimationValueUid;
01206          RPointerArray<CAknsEffectParameter> iParameters;
01207     };
01208 
01221 class CAknsAnimationCommand: public CAknsEffectCommand
01222     {
01223     public:
01224         static CAknsAnimationCommand* NewL();
01225         virtual ~CAknsAnimationCommand();
01226 
01227     private:
01228         CAknsAnimationCommand();
01229 
01230     public:
01231         void AppendNamedReferenceL( const TAknsAlNamedReferenceData& aData );
01232         MAknsAlIterator* CreateNamedReferenceIteratorL();
01233 
01234     public: // Iteration support (internal)
01235         void AssignOutL( TAknsAlAnimationCommandData& aData );
01236 
01237         static void InitializeOut( TAknsAlAnimationCommandData& aData );
01238         static void ReleaseOut( TAknsAlAnimationCommandData& aData );
01239 
01240     private:
01241          RPointerArray<CAknsNamedReference> iNamedReferences;
01242     };
01243 
01257 class CAknsAnimationItemData: public CAknsItemData
01258     {
01259     public:
01260         static CAknsAnimationItemData* NewL();
01261         virtual ~CAknsAnimationItemData();
01262 
01263     protected: // C++ protected constructor
01264         CAknsAnimationItemData();
01265 
01266     public: // New functions
01267         void SetMinInterval( TInt aMin );
01268         TInt MinInterval() const;
01269 
01270         void SetMorphing( TBool aMorphing );
01271         TBool Morphing() const;
01272 
01273         void SetInputLayer( const TInt aValue );
01274         TInt InputLayer() const;
01275 
01276         void SetInputLayerMode( const TInt aValue );
01277         TInt InputLayerMode() const;
01278 
01279         void SetOutputLayer( const TInt aValue );
01280         TInt OutputLayer() const;
01281 
01282         void SetOutputLayerMode( const TInt aValue );
01283         TInt OutputLayerMode() const;
01284 
01288         void AppendPreprocessCommandL( CAknsEffectCommand* aCommand );
01289         MAknsRlCommandIterator* PreprocessCommandIteratorL() const;
01290 
01294         void AppendCommandL( CAknsAnimationCommand* aCommand );
01295         MAknsAlIterator* CommandIteratorL() const;
01296 
01300         void AppendTimingModelL( CAknsTimingModel* aModel );
01301         MAknsAlIterator* TimingModelIteratorL() const;
01302 
01306         void AppendAnimationValueL( CAknsAnimationValue* aValue );
01307         MAknsAlIterator* AnimationValueIteratorL() const;
01308 
01309         void AppendSizeBoundParamL( const TAknsAlSizeBoundParameterData& aParam );
01310         MAknsAlIterator* SizeBoundParamIteratorL() const;
01311 
01312     private:
01313         TInt iMinInterval; // In milliseconds
01314         TBool iMorphing;
01315 
01316         TInt iInputLayer;
01317         TInt iInputLayerMode;
01318         TInt iOutputLayer;
01319         TInt iOutputLayerMode;
01320 
01321         RPointerArray<CAknsEffectCommand> iPreprocessCommands;
01322         RPointerArray<CAknsAnimationCommand> iAnimationCommands;
01323         RPointerArray<CAknsTimingModel> iTimingModels;
01324         RPointerArray<CAknsAnimationValue> iAnimationValues;
01325         RPointerArray<CAknsSizeBoundParameter> iSizeBoundParams;
01326     };
01327 
01328 // AKNSITEMDATA_H
01329 #endif
01330 
01331 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top