|
1 /* |
|
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Defines item in display background. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "alf/alfdisplaybackgrounditem.h" // Class definition |
|
21 #include "alf/alfdisplay.h" |
|
22 |
|
23 |
|
24 // Constructors |
|
25 EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem() |
|
26 :iRect(TRect(0,0,0,0)), |
|
27 iSkinID(KAknsIIDNone), |
|
28 iColorIndex(0), |
|
29 iColor(KRgbWhite), |
|
30 iClearMode(CAlfDisplay::EClearNone) |
|
31 { |
|
32 |
|
33 } |
|
34 |
|
35 EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem( const TRect& aRect ) |
|
36 :iRect(aRect), |
|
37 iSkinID(KAknsIIDNone), |
|
38 iColorIndex(0), |
|
39 iColor(KRgbWhite), |
|
40 iClearMode(CAlfDisplay::EClearNone) |
|
41 { |
|
42 } |
|
43 |
|
44 EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem( const TRect& aRect, |
|
45 const TAknsItemID& aSkinID ) |
|
46 :iRect(aRect), |
|
47 iSkinID(aSkinID), |
|
48 iColorIndex(0), |
|
49 iColor(KRgbWhite), |
|
50 iClearMode(CAlfDisplay::EClearWithSkinBackground) |
|
51 { |
|
52 } |
|
53 |
|
54 EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem( const TRect& aRect, |
|
55 const TAknsItemID& aSkinID, |
|
56 TInt aColorIndex ) |
|
57 :iRect(aRect), |
|
58 iSkinID(aSkinID), |
|
59 iColorIndex(aColorIndex), |
|
60 iColor(KRgbWhite), |
|
61 iClearMode(CAlfDisplay::EClearWithColor) |
|
62 { |
|
63 } |
|
64 |
|
65 EXPORT_C TAlfDisplayBackgroundItem::TAlfDisplayBackgroundItem( const TRect& aRect, |
|
66 const TRgb& aColor ) |
|
67 :iRect(aRect), |
|
68 iSkinID(KAknsIIDNone), |
|
69 iColorIndex(0), |
|
70 iColor(aColor), |
|
71 iClearMode(CAlfDisplay::EClearWithColor) |
|
72 { |
|
73 } |
|
74 |
|
75 EXPORT_C void TAlfDisplayBackgroundItem::SetRect( const TRect& aRect ) |
|
76 { |
|
77 iRect = aRect; |
|
78 } |
|
79 |
|
80 EXPORT_C void TAlfDisplayBackgroundItem::SetColor( const TRgb& aColor ) |
|
81 { |
|
82 iColor = aColor; |
|
83 iClearMode = CAlfDisplay::EClearWithColor; |
|
84 } |
|
85 |
|
86 EXPORT_C void TAlfDisplayBackgroundItem::SetColor( const TAknsItemID& aSkinID, TInt aColorIndex ) |
|
87 { |
|
88 iSkinID = aSkinID; |
|
89 iColorIndex = aColorIndex; |
|
90 iClearMode = CAlfDisplay::EClearWithColor; |
|
91 } |
|
92 |
|
93 EXPORT_C void TAlfDisplayBackgroundItem::SetSkinBackground( const TAknsItemID& aSkinID ) |
|
94 { |
|
95 iSkinID = aSkinID; |
|
96 iClearMode = CAlfDisplay::EClearWithSkinBackground; |
|
97 } |
|
98 |
|
99 |