1 /* |
|
2 * Copyright (c) 2003 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: CScreensaverIndicatorIcon declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_SCREENSAVERINDICATORICON_H |
|
21 #define C_SCREENSAVERINDICATORICON_H |
|
22 |
|
23 #include "screensaverindicator.h" |
|
24 |
|
25 /** |
|
26 * Simple icon indicator. Displays icon, but no other information. |
|
27 */ |
|
28 class CScreensaverIndicatorIcon : public CScreensaverIndicator |
|
29 { |
|
30 public: |
|
31 |
|
32 /** |
|
33 * Destructor |
|
34 */ |
|
35 ~CScreensaverIndicatorIcon(); |
|
36 |
|
37 /** |
|
38 * Draw the indicator. it should be implemented by the derived class |
|
39 */ |
|
40 virtual void Draw(CWindowGc& aGc) const; |
|
41 |
|
42 /** |
|
43 * two-phased constructor |
|
44 * |
|
45 * @param aReader the resource read of the STRUCT |
|
46 * SCREENSAVER_PARAMETERS_ARRAY defined by ourself |
|
47 * @param aBgColor the background color of display screen |
|
48 * @param aTextColor the text color |
|
49 */ |
|
50 virtual void ConstructL(TResourceReader &aReader, TUint32 aBgColor, TUint aTextColor); |
|
51 |
|
52 /** |
|
53 * Set the parameters of drawing |
|
54 * |
|
55 * @param aCorner the position of the lefttop of the indicator |
|
56 * @param aParentRect |
|
57 */ |
|
58 virtual void SetupDrawingParameters(const TPoint &aCorner, const TRect& aParentRect); |
|
59 |
|
60 /** |
|
61 * Check if indicator is visible or not |
|
62 * |
|
63 * @return TBool |
|
64 */ |
|
65 virtual TBool CheckVisibilityConditions() const; |
|
66 |
|
67 /** |
|
68 * Get the payload through the property |
|
69 * |
|
70 * @param aPayload the reference to the payload |
|
71 */ |
|
72 virtual void Payload(TIndicatorPayload& aPayload) const; |
|
73 |
|
74 /** |
|
75 * Set the property through the payload |
|
76 * |
|
77 * @param aPayload |
|
78 */ |
|
79 virtual void SetPayload(const TIndicatorPayload& aPayload); |
|
80 |
|
81 /** |
|
82 * Sets icon position and size |
|
83 */ |
|
84 virtual void SetIconLayout(TAknLayoutRect& aLayout, TInt aX = -1); |
|
85 |
|
86 private: |
|
87 |
|
88 /** |
|
89 * The icon will be displayer |
|
90 * |
|
91 * Owned |
|
92 */ |
|
93 CGulIcon* iIcon; |
|
94 }; |
|
95 |
|
96 #endif // C_SCREENSAVERINDICATORICON_H |
|