|
1 /* |
|
2 * Copyright (c) 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: This file defines class CFsWatermark. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_FSWATERMARK_H |
|
21 #define C_FSWATERMARK_H |
|
22 //<cmail> SF |
|
23 #include <alf/alfdecklayout.h> |
|
24 #include <alf/alfcontrol.h> |
|
25 #include <alf/alftexture.h> |
|
26 //</cmail> |
|
27 |
|
28 /** |
|
29 * Class used for placing watermark. |
|
30 * |
|
31 * @lib fs_generic |
|
32 */ |
|
33 NONSHARABLE_CLASS(CFsWatermark) : public CBase |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Factory method. |
|
40 * |
|
41 * @param aParentControl Parent control for watermark layout. |
|
42 * @param aParentLayout Parent layout for watermarkLayout. |
|
43 */ |
|
44 static CFsWatermark* NewL( CAlfControl& aParentControl, |
|
45 CAlfLayout& aParentLayout ); |
|
46 |
|
47 /** |
|
48 * C++ destructor. |
|
49 */ |
|
50 virtual ~CFsWatermark(); |
|
51 |
|
52 /** |
|
53 * Returns the position of the watermark. |
|
54 * |
|
55 * @return Reference to the object holding position of watermark. |
|
56 */ |
|
57 TAlfTimedPoint Pos(); |
|
58 |
|
59 /** |
|
60 * Sets the position of the watermark. |
|
61 * |
|
62 * @param aPos Target position for watermark. |
|
63 */ |
|
64 void SetPos(TAlfTimedPoint& aPos); |
|
65 |
|
66 /** |
|
67 * Returns the size of the watermark. |
|
68 * |
|
69 * @return Reference to the object holding size of watermark. |
|
70 */ |
|
71 TAlfTimedPoint Size(); |
|
72 |
|
73 /** |
|
74 * Sets the size of the watermark. |
|
75 * |
|
76 * @param aPos Target size for watermark. |
|
77 */ |
|
78 void SetSize(TAlfTimedPoint& aSize); |
|
79 |
|
80 /** |
|
81 * Returns opacity of the watermark. |
|
82 * |
|
83 * @return Reference to the object holding opacity of watermark. |
|
84 */ |
|
85 const TAlfTimedValue Opacity(); |
|
86 |
|
87 /** |
|
88 * Sets the opacity of the watermark. |
|
89 * |
|
90 * @param aOpacity Target opacity for watermark. |
|
91 */ |
|
92 void SetOpacity(TAlfTimedValue& aOpacity); |
|
93 |
|
94 /** |
|
95 * Sets the texture for watermark. |
|
96 * |
|
97 * @param aTexture Reference to the new watermark texture. |
|
98 */ |
|
99 // <cmail> |
|
100 void SetWatermarkTextureL( CAlfTexture& aTexture ); |
|
101 // </cmail> |
|
102 |
|
103 private: |
|
104 |
|
105 /** |
|
106 * 2nd phase constructor. |
|
107 * |
|
108 * @param aParentControl Parent control for watermark layout. |
|
109 * @param aParentLayout ParentLayout for watermarkLayout. |
|
110 */ |
|
111 void ConstructL( CAlfControl& aParentControl, CAlfLayout& aParentLayout ); |
|
112 |
|
113 /** |
|
114 * C++ constructor. |
|
115 */ |
|
116 CFsWatermark(); |
|
117 |
|
118 private: |
|
119 |
|
120 /** |
|
121 * Pointer to the watermark layout. |
|
122 * Own. |
|
123 */ |
|
124 CAlfDeckLayout* iWatermarkLayout; |
|
125 |
|
126 /** |
|
127 * Pointer to the watermark texture. |
|
128 * Not own. |
|
129 */ |
|
130 CAlfTexture* iWatermarkTexture; |
|
131 |
|
132 }; |
|
133 |
|
134 |
|
135 #endif /*C_FSWATERMARK_H*/ |