S60 3rd Edition API Reference: aknsitemdata.h Source File

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 #start_since SINCE_3_1_SDK
00163 
00166         IMPORT_C void SetParentIID(const TAknsItemID& aIID);
00170         IMPORT_C void SetDrawRect(const TRect& aRect);
00174         IMPORT_C TAknsItemID ParentIID();
00178         IMPORT_C TRect DrawRect();
00179 #end_since SINCE_3_1_SDK
00180 
00181     protected: // C++ protected constructor for derived classes
00182                 
00191         CAknsImageItemData( const TAknsItemType aType );
00192     
00193     protected:  // Data
00194 
00195         TAknsImageAttributeData* iAttributeData;
00196 #start_since SINCE_3_1_SDK
00197 
00200         TAknsItemID iParentIID;
00204         TRect iDrawRect;
00205 #end_since SINCE_3_1_SDK
00206     
00207     };
00208 
00222 NONSHARABLE_CLASS(CAknsBitmapItemData) : public CAknsImageItemData
00223     {
00224     public:  // Constructors and destructor
00225             
00238         IMPORT_C static CAknsBitmapItemData* NewL();
00239         
00244         virtual ~CAknsBitmapItemData();
00245 
00246     public: // New functions
00247         
00258         IMPORT_C void SetBitmap( CFbsBitmap* aBitmap );
00259 
00269         IMPORT_C void DestroyAndSetBitmap( CFbsBitmap* aBitmap );
00270 
00279         IMPORT_C CFbsBitmap* Bitmap();
00280         
00281     protected:  // C++ protected constructor
00282 
00293         CAknsBitmapItemData( const TAknsItemType aType );
00294     
00295     protected:  // Data
00296         CFbsBitmap* iBitmap;    
00297 
00298     };
00299 
00313 NONSHARABLE_CLASS(CAknsMaskedBitmapItemData) : public CAknsBitmapItemData
00314     {
00315     public:  // Constructors and destructor
00316             
00329         IMPORT_C static CAknsMaskedBitmapItemData* NewL();
00330         
00335         virtual ~CAknsMaskedBitmapItemData();
00336 
00337     public: // New functions
00338         
00348         IMPORT_C void SetMask( CFbsBitmap* aMask );
00349 
00359         IMPORT_C void DestroyAndSetMask( CFbsBitmap* aMask );
00360 
00369         IMPORT_C CFbsBitmap* Mask();
00370         
00371     protected:  // C++ protected constructor
00372 
00383         CAknsMaskedBitmapItemData( const TAknsItemType aType );    
00384     
00385     protected:  // Data
00386         CFbsBitmap* iMask;    
00387 
00388     };
00389 
00403 NONSHARABLE_CLASS(CAknsColorTableItemData) : public CAknsImageItemData
00404     {
00405     public:  // Constructors and destructor
00406             
00418         IMPORT_C static CAknsColorTableItemData* NewL();
00419         
00424         virtual ~CAknsColorTableItemData();
00425 
00426     public: // New functions
00427         
00438         IMPORT_C void SetColorsL( const TInt aNumberOfColors, 
00439             const TAknsColorTableEntry* aColors );
00440 
00458         IMPORT_C TInt ColorIndexed( const TInt aIndex ) const;
00459 
00477         IMPORT_C TRgb ColorRgb( const TInt aIndex ) const;
00478 
00494         IMPORT_C void GetColorL( const TInt aIndex, TRgb& aColor ) const;
00495         
00496     protected:  // C++ protected constructor
00497 
00508         CAknsColorTableItemData( const TAknsItemType aType );
00509     
00510     protected:  // Data
00511 
00512         TAknsColorTableEntry* iColorArray; 
00513         TInt iColorArraySize;
00514 
00515     };
00516 
00530 NONSHARABLE_CLASS(CAknsImageTableItemData) : public CAknsImageItemData
00531     {
00532     public:  // Constructors and destructor
00533             
00545         IMPORT_C static CAknsImageTableItemData* NewL();
00546         
00551         virtual ~CAknsImageTableItemData();
00552 
00553     public: // New functions
00554         
00565         IMPORT_C void SetImagesL( const TInt aNumberOfImages, 
00566             const TAknsItemID* aImages );        
00567 
00578         IMPORT_C TAknsItemID ImageIID( const TInt aIndex ) const;
00579 
00588         IMPORT_C TAknsItemID* Images() const;
00589 
00597         IMPORT_C TInt NumberOfImages() const;
00598         
00599     protected:  // C++ protected constructor
00600 
00611         CAknsImageTableItemData( const TAknsItemType aType );
00612     
00613     protected:  // Data
00614 
00615         TInt iNumberOfImages;       
00616         TAknsItemID* iImageArray;   
00617 
00618     };
00619 
00633 NONSHARABLE_CLASS(CAknsBmpAnimItemData) : public CAknsImageTableItemData
00634     {
00635     public:  // Constructors and destructor
00636             
00648         IMPORT_C static CAknsBmpAnimItemData* NewL();
00649         
00654         virtual ~CAknsBmpAnimItemData();
00655 
00656     public: // New functions
00657         
00671         IMPORT_C void SetFrameInfosL( const TAknsBmpAnimFrameInfo* aFrameInfos );
00672 
00681         IMPORT_C TAknsBmpAnimFrameInfo* FrameInfos() const;
00682 
00692         IMPORT_C void SetLastFrameBackground( TBool aLastFrameBg );
00693 
00702         IMPORT_C TBool LastFrameBackground() const;
00703 
00711         IMPORT_C void SetFrameInterval( const TInt16 aFrameInterval );
00712 
00720         IMPORT_C TInt16 FrameInterval() const;
00721 
00729         IMPORT_C void SetPlayMode( const TInt16 aPlayMode );
00730 
00738         IMPORT_C TInt16 PlayMode() const;
00739 
00747         IMPORT_C void SetFlash( const TBool aFlash );
00748 
00756         IMPORT_C TBool Flash() const;
00757         
00758     protected:  // C++ protected constructor
00759 
00770         CAknsBmpAnimItemData( const TAknsItemType aType );
00771     
00772     protected:  // Data
00773 
00774         TAknsBmpAnimFrameInfo* iFrameArray;   
00775 
00776         TBool iLastFrameBackground; 
00777         TInt16 iFrameInterval;  
00778         TInt16 iPlayMode;       
00779         TBool iFlash;           
00780 
00781     };
00782 
00796 NONSHARABLE_CLASS(CAknsStringItemData) : public CAknsItemData
00797     {
00798     public:  // Constructors and destructor
00799             
00811         IMPORT_C static CAknsStringItemData* NewL();
00812         
00817         virtual ~CAknsStringItemData();
00818 
00819     public: // New functions
00820         
00829         IMPORT_C void SetStringL( const TDesC& aValue );
00830 
00840         IMPORT_C const TDesC& String() const;
00841 
00842     protected:  // C++ protected constructor
00843 
00854         CAknsStringItemData( const TAknsItemType aType );
00855     
00856     protected:  // Data
00857 
00858         HBufC* iString; 
00859 
00860     };
00861 
00874 NONSHARABLE_CLASS(CAknsEffectCommand) : public CBase
00875     {
00876     public:  // Constructors and destructor
00877             
00887         IMPORT_C static CAknsEffectCommand* NewL();
00888         
00892         virtual ~CAknsEffectCommand();
00893 
00894     public: // New functions
00895 
00903         IMPORT_C void SetEffectUid( const TUid aValue );
00904 
00912         IMPORT_C TUid EffectUid() const;
00913 
00921         IMPORT_C void SetLayerConf( const TAknsRlRenderOpParam aValue );
00922 
00930         IMPORT_C TAknsRlRenderOpParam LayerConf() const;
00931 
00940         IMPORT_C void AppendParameterL( 
00941             const TAknsRlParameterData& aParameter );
00942 
00953         IMPORT_C MAknsRlParameterIterator* CreateParameterIteratorL();
00954 
00955     protected:  // C++ protected constructor
00956 
00962         CAknsEffectCommand();
00963     
00964     protected:  // Data
00965 
00966         TUid iUid; 
00967         TAknsRlRenderOpParam iLayerConf; 
00968         RPointerArray<CAknsEffectParameter> iParameters; 
00969 
00970     };
00971 
00987 NONSHARABLE_CLASS(CAknsEffectQueueItemData) : public CAknsItemData
00988     {
00989     public:  // Constructors and destructor
00990             
01001         IMPORT_C static CAknsEffectQueueItemData* NewL();
01002         
01006         virtual ~CAknsEffectQueueItemData();
01007 
01008     public: // New functions
01009 
01017         IMPORT_C void SetRefItem( const TAknsItemID aValue );
01018 
01026         IMPORT_C TAknsItemID RefItem() const;
01027 
01035         IMPORT_C void SetInputLayer( const TInt aValue );
01036 
01044         IMPORT_C TInt InputLayer() const;
01045 
01053         IMPORT_C void SetInputLayerMode( const TInt aValue );
01054 
01062         IMPORT_C TInt InputLayerMode() const;
01063 
01071         IMPORT_C void SetOutputLayer( const TInt aValue );
01072 
01080         IMPORT_C TInt OutputLayer() const;
01081 
01089         IMPORT_C void SetOutputLayerMode( const TInt aValue );
01090 
01098         IMPORT_C TInt OutputLayerMode() const;
01099 
01109         IMPORT_C void AppendCommandL( const CAknsEffectCommand* aCommand );
01110 
01121         IMPORT_C MAknsRlCommandIterator* CreateCommandIteratorL();
01122 
01123     protected:  // C++ protected constructor
01124 
01135         CAknsEffectQueueItemData( const TAknsItemType aType );
01136     
01137     protected:  // Data
01138 
01139         TAknsItemID iRefId; 
01140         TInt iInputLayer; 
01141         TInt iInputLayerMode; 
01142         TInt iOutputLayer; 
01143         TInt iOutputLayerMode; 
01144         RPointerArray<CAknsEffectCommand> iCommands; 
01145 
01146     };
01147 
01159 class CAknsTimingModel: public CBase
01160     {
01161     public: // Constructors and destructor
01162         static CAknsTimingModel* NewL();
01163         virtual ~CAknsTimingModel();
01164 
01165     protected: // C++ protected constructor
01166         CAknsTimingModel();
01167 
01168     public:
01169         void SetTimingModelUid( const TUid aValue );
01170         TUid TimingModelUid() const;
01171 
01172         void AppendParameterL( const TAknsRlParameterData& aParameter );
01173         MAknsRlParameterIterator* CreateParameterIteratorL();
01174 
01175     public: // Iteration support (internal)
01176         void AssignOutL( TAknsAlTimingModelData& aData );
01177 
01178         static void InitializeOut( TAknsAlTimingModelData& aData );
01179         static void ReleaseOut( TAknsAlTimingModelData& aData );
01180 
01181     private: // Data
01182          TUid iTimingModelUid;
01183          RPointerArray<CAknsEffectParameter> iParameters;
01184     };
01185 
01198 class CAknsAnimationValue: public CBase
01199     {
01200     public:
01201         static CAknsAnimationValue* NewL();
01202         virtual ~CAknsAnimationValue();
01203 
01204     private:
01205         CAknsAnimationValue();
01206 
01207     public:
01208         void SetAnimationValueUid( const TUid aValue );
01209         TUid AnimationValueUid() const;
01210 
01211         void SetTimingModelId( const TInt aId );
01212         TInt TimingModelId() const;
01213 
01214         void AppendParameterL( const TAknsRlParameterData& aParameter );
01215         MAknsRlParameterIterator* CreateParameterIteratorL();
01216 
01217     public: // Iteration support (internal)
01218         void AssignOutL( TAknsAlAnimationValueData& aData );
01219 
01220         static void InitializeOut( TAknsAlAnimationValueData& aData );
01221         static void ReleaseOut( TAknsAlAnimationValueData& aData );
01222 
01223     private:
01224          TInt iTimingModelId;
01225          TUid iAnimationValueUid;
01226          RPointerArray<CAknsEffectParameter> iParameters;
01227     };
01228 
01241 class CAknsAnimationCommand: public CAknsEffectCommand
01242     {
01243     public:
01244         static CAknsAnimationCommand* NewL();
01245         virtual ~CAknsAnimationCommand();
01246 
01247     private:
01248         CAknsAnimationCommand();
01249 
01250     public:
01251         void AppendNamedReferenceL( const TAknsAlNamedReferenceData& aData );
01252         MAknsAlIterator* CreateNamedReferenceIteratorL();
01253 
01254     public: // Iteration support (internal)
01255         void AssignOutL( TAknsAlAnimationCommandData& aData );
01256 
01257         static void InitializeOut( TAknsAlAnimationCommandData& aData );
01258         static void ReleaseOut( TAknsAlAnimationCommandData& aData );
01259 
01260     private:
01261          RPointerArray<CAknsNamedReference> iNamedReferences;
01262     };
01263 
01277 class CAknsAnimationItemData: public CAknsItemData
01278     {
01279     public:
01280         static CAknsAnimationItemData* NewL();
01281         virtual ~CAknsAnimationItemData();
01282 
01283     protected: // C++ protected constructor
01284         CAknsAnimationItemData();
01285 
01286     public: // New functions
01287         void SetMinInterval( TInt aMin );
01288         TInt MinInterval() const;
01289 
01290         void SetMorphing( TBool aMorphing );
01291         TBool Morphing() const;
01292 
01293         void SetInputLayer( const TInt aValue );
01294         TInt InputLayer() const;
01295 
01296         void SetInputLayerMode( const TInt aValue );
01297         TInt InputLayerMode() const;
01298 
01299         void SetOutputLayer( const TInt aValue );
01300         TInt OutputLayer() const;
01301 
01302         void SetOutputLayerMode( const TInt aValue );
01303         TInt OutputLayerMode() const;
01304 
01308         void AppendPreprocessCommandL( CAknsEffectCommand* aCommand );
01309         MAknsRlCommandIterator* PreprocessCommandIteratorL() const;
01310 
01314         void AppendCommandL( CAknsAnimationCommand* aCommand );
01315         MAknsAlIterator* CommandIteratorL() const;
01316 
01320         void AppendTimingModelL( CAknsTimingModel* aModel );
01321         MAknsAlIterator* TimingModelIteratorL() const;
01322 
01326         void AppendAnimationValueL( CAknsAnimationValue* aValue );
01327         MAknsAlIterator* AnimationValueIteratorL() const;
01328 
01329         void AppendSizeBoundParamL( const TAknsAlSizeBoundParameterData& aParam );
01330         MAknsAlIterator* SizeBoundParamIteratorL() const;
01331 
01332     private:
01333         TInt iMinInterval; // In milliseconds
01334         TBool iMorphing;
01335 
01336         TInt iInputLayer;
01337         TInt iInputLayerMode;
01338         TInt iOutputLayer;
01339         TInt iOutputLayerMode;
01340 
01341         RPointerArray<CAknsEffectCommand> iPreprocessCommands;
01342         RPointerArray<CAknsAnimationCommand> iAnimationCommands;
01343         RPointerArray<CAknsTimingModel> iTimingModels;
01344         RPointerArray<CAknsAnimationValue> iAnimationValues;
01345         RPointerArray<CAknsSizeBoundParameter> iSizeBoundParams;
01346     };
01347 
01348 // AKNSITEMDATA_H
01349 #endif
01350 
01351 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top