uiacceltk/hitchcock/Client/src/alfdisplaybackgrounditem.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 17:03:00 +0300
branchRCL_3
changeset 10 7c5dd702d6d3
parent 0 15bf7259bb7c
permissions -rw-r--r--
Revision: 201018 Kit: 201019

/*
* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   Defines item in display background.
*
*/



#include "alf/alfdisplaybackgrounditem.h"  // Class definition
#include "alf/alfdisplay.h"  


// Constructors
EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem()
    :iRect(TRect(0,0,0,0)), 
     iSkinID(KAknsIIDNone), 
     iColorIndex(0), 
     iColor(KRgbWhite), 
     iClearMode(CAlfDisplay::EClearNone)
    {   
             
    }

EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem( const TRect& aRect ) 
    :iRect(aRect), 
     iSkinID(KAknsIIDNone), 
     iColorIndex(0), 
     iColor(KRgbWhite), 
     iClearMode(CAlfDisplay::EClearNone)
    {        
    }

EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem( const TRect& aRect,
                           const TAknsItemID& aSkinID )
    :iRect(aRect),
     iSkinID(aSkinID), 
     iColorIndex(0), 
     iColor(KRgbWhite), 
     iClearMode(CAlfDisplay::EClearWithSkinBackground)
    {
    }

EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem( const TRect& aRect,
                           const TAknsItemID& aSkinID,
                           TInt aColorIndex )
    :iRect(aRect),
     iSkinID(aSkinID), 
     iColorIndex(aColorIndex), 
     iColor(KRgbWhite), 
     iClearMode(CAlfDisplay::EClearWithColor)
    {
    }

EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem( const TRect& aRect,
                           const TRgb& aColor )
    :iRect(aRect),
     iSkinID(KAknsIIDNone), 
     iColorIndex(0), 
     iColor(aColor), 
     iClearMode(CAlfDisplay::EClearWithColor)
    {        
    }

EXPORT_C void TAlfDisplayBackgroundItem::SetRect( const TRect& aRect )
    {
    iRect = aRect;   
    }

EXPORT_C void TAlfDisplayBackgroundItem::SetColor( const TRgb& aColor )
    {
    iColor = aColor;    
    iClearMode = CAlfDisplay::EClearWithColor;
    }
    
EXPORT_C void TAlfDisplayBackgroundItem::SetColor( const TAknsItemID& aSkinID, TInt aColorIndex )
    {
    iSkinID = aSkinID;
    iColorIndex = aColorIndex;      
    iClearMode = CAlfDisplay::EClearWithColor;
    }
    
EXPORT_C void TAlfDisplayBackgroundItem::SetSkinBackground( const TAknsItemID& aSkinID )
    {
    iSkinID = aSkinID;
    iClearMode = CAlfDisplay::EClearWithSkinBackground;    
    }