|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef IMAGEEDITORUIITEM_HPP |
|
22 #define IMAGEEDITORUIITEM_HPP |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CFbsBitmap; |
|
29 |
|
30 |
|
31 /* CLASS: CUiItem |
|
32 * |
|
33 * CUiItem represents an UI information item for a single Image Editor |
|
34 * plug-in. |
|
35 */ |
|
36 class CUiItem : public CBase |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 /** @name Methods:*/ |
|
42 //@{ |
|
43 |
|
44 /** NewL factory method, pops cleanupstack |
|
45 * |
|
46 * @param - |
|
47 * @return pointer to created CUiItem object |
|
48 */ |
|
49 IMPORT_C static CUiItem * NewL (); |
|
50 |
|
51 /** NewLC factory method, does not pop cleanupstack |
|
52 * |
|
53 * @param - |
|
54 * @return pointer to created CUiItem object |
|
55 */ |
|
56 IMPORT_C static CUiItem * NewLC (); |
|
57 |
|
58 /** ComparePluginOrder |
|
59 * |
|
60 * Comparison method for CUiItem instances. |
|
61 * |
|
62 * @param aItem1 - item 1 |
|
63 * @param aItem2 - item 2 |
|
64 * @return - -1 if aItem1 is first in plug-in order |
|
65 * @return - 1 if aItem2 is first in plug-in order |
|
66 * @return - 0 otherwise |
|
67 */ |
|
68 IMPORT_C static TInt ComparePluginOrder ( |
|
69 const CUiItem & aItem1, |
|
70 const CUiItem & aItem2 |
|
71 ); |
|
72 |
|
73 /** Destructor |
|
74 * |
|
75 * @param - |
|
76 * @return - |
|
77 */ |
|
78 IMPORT_C virtual ~CUiItem (); |
|
79 |
|
80 /** Setter/getter, PluginName, non-const |
|
81 * |
|
82 * @param - |
|
83 * @return - plug-in name |
|
84 */ |
|
85 IMPORT_C TDes & PluginName(); |
|
86 |
|
87 /** Getter, PluginName, const |
|
88 * |
|
89 * @param - |
|
90 * @return - plug-in name |
|
91 */ |
|
92 IMPORT_C const TDesC & PluginName() const; |
|
93 |
|
94 /** Setter/getter, PluginRID, non-const |
|
95 * |
|
96 * @param - |
|
97 * @return - plug-in order inside group |
|
98 */ |
|
99 IMPORT_C TInt & PluginRID(); |
|
100 |
|
101 /** Getter, PluginRID, const |
|
102 * |
|
103 * @param - |
|
104 * @return - plug-in order inside group |
|
105 */ |
|
106 IMPORT_C const TInt & PluginRID() const; |
|
107 |
|
108 /** Setter/getter, PluginOrder, non-const |
|
109 * |
|
110 * @param - |
|
111 * @return - plug-in order inside group |
|
112 */ |
|
113 IMPORT_C TInt & PluginOrder(); |
|
114 |
|
115 /** Getter, PluginOrder, const |
|
116 * |
|
117 * @param - |
|
118 * @return - plug-in order inside group |
|
119 */ |
|
120 IMPORT_C const TInt & PluginOrder() const; |
|
121 |
|
122 /** Setter/getter, GroupOrder, non-const |
|
123 * |
|
124 * @param - |
|
125 * @return - plug-in order inside group |
|
126 */ |
|
127 IMPORT_C TInt & GroupOrder(); |
|
128 |
|
129 /** Getter, GroupOrder, const |
|
130 * |
|
131 * @param - |
|
132 * @return - plug-in order inside group |
|
133 */ |
|
134 IMPORT_C const TInt & GroupOrder() const; |
|
135 |
|
136 /** Setter/getter, Icon, non-const |
|
137 * |
|
138 * @param - |
|
139 * @return - icon bitmap |
|
140 */ |
|
141 IMPORT_C CFbsBitmap *& Icon(); |
|
142 |
|
143 /** Getter, Icon, const |
|
144 * |
|
145 * @param - |
|
146 * @return - icon bitmap |
|
147 */ |
|
148 IMPORT_C const CFbsBitmap * Icon() const; |
|
149 |
|
150 /** Setter/getter, Mask, non-const |
|
151 * |
|
152 * @param - |
|
153 * @return - icon bitmap |
|
154 */ |
|
155 IMPORT_C CFbsBitmap *& Mask(); |
|
156 |
|
157 /** Getter, Mask, const |
|
158 * |
|
159 * @param - |
|
160 * @return - icon bitmap |
|
161 */ |
|
162 IMPORT_C const CFbsBitmap * Mask() const; |
|
163 |
|
164 //@} |
|
165 |
|
166 protected: |
|
167 |
|
168 /** @name Methods:*/ |
|
169 //@{ |
|
170 |
|
171 //@} |
|
172 |
|
173 /** @name Members:*/ |
|
174 //@{ |
|
175 |
|
176 //@} |
|
177 |
|
178 private: |
|
179 |
|
180 /** @name Methods:*/ |
|
181 //@{ |
|
182 |
|
183 /** Default constructor |
|
184 * |
|
185 * @param - |
|
186 * @return - |
|
187 */ |
|
188 IMPORT_C CUiItem (); |
|
189 |
|
190 /** Second phase constructor, may leave |
|
191 * |
|
192 * @param - |
|
193 * @return - |
|
194 */ |
|
195 IMPORT_C void ConstructL (); |
|
196 |
|
197 /** Copy constructor, disabled |
|
198 */ |
|
199 CUiItem (const CUiItem & rhs); |
|
200 |
|
201 /** Assignment operator, disabled |
|
202 */ |
|
203 CUiItem & operator= (const CUiItem & rhs); |
|
204 |
|
205 //@} |
|
206 |
|
207 /** @name Members:*/ |
|
208 //@{ |
|
209 /// Plug-in name |
|
210 TBuf<64> iPluginName; |
|
211 /// Plug-in run-time ID |
|
212 TInt iPluginRID; |
|
213 /// Plug-in order inside group |
|
214 TInt iPluginOrder; |
|
215 /// Group order |
|
216 TInt iGroupOrder; |
|
217 /// Icon bitmap |
|
218 CFbsBitmap * iIcon; |
|
219 /// Icon mask |
|
220 CFbsBitmap * iMask; |
|
221 |
|
222 //@} |
|
223 |
|
224 }; |
|
225 |
|
226 #endif |
|
227 |
|
228 // End of File |