|
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: Capsulating fill rules |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef __CMFILLRULECONTAINER_H |
|
24 #define __CMFILLRULECONTAINER_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class RWriteStream; |
|
31 class RReadStream; |
|
32 class CCmFillRule; |
|
33 |
|
34 /** |
|
35 * CCmFillRuleContainer class |
|
36 * Capsulating fill rules |
|
37 * @lib cmcommon.lib |
|
38 * @since S60 v3.0 |
|
39 */ |
|
40 class CCmFillRuleContainer : public CBase |
|
41 { |
|
42 |
|
43 public: |
|
44 |
|
45 /* Constructors and destructor. */ |
|
46 |
|
47 /** |
|
48 * Creates new CCmFillRuleContainer class. |
|
49 * @param None |
|
50 * @return pointer to CCmFillRuleContainer class |
|
51 */ |
|
52 IMPORT_C static CCmFillRuleContainer* NewL(); |
|
53 |
|
54 /** |
|
55 * Creates new CCmFillRuleContainer class and |
|
56 * leaves the instance in the cleanup stack. |
|
57 * @param None |
|
58 * @return pointer to CCmFillRuleContainer class |
|
59 */ |
|
60 IMPORT_C static CCmFillRuleContainer* NewLC(); |
|
61 |
|
62 /** |
|
63 * Destructor. |
|
64 */ |
|
65 IMPORT_C virtual ~CCmFillRuleContainer(); |
|
66 |
|
67 public: |
|
68 |
|
69 /** |
|
70 * AddFillRuleL. |
|
71 * @since Series 60 3.1 |
|
72 * @param aRule |
|
73 * @returns index of the rule |
|
74 */ |
|
75 IMPORT_C TInt AddFillRuleL( CCmFillRule* aRule ); |
|
76 |
|
77 /** |
|
78 * DeleteFillRule. |
|
79 * @since Series 60 3.1 |
|
80 * @param aIndex |
|
81 * @returns None |
|
82 */ |
|
83 IMPORT_C void DeleteFillRule( TInt aIndex ); |
|
84 |
|
85 /** |
|
86 * FillRule. |
|
87 * @since Series 60 3.1 |
|
88 * @param aIndex rule index |
|
89 * @returns fill rule |
|
90 */ |
|
91 IMPORT_C CCmFillRule* FillRule( TInt aIndex ) const; |
|
92 |
|
93 /** |
|
94 * FillRuleCount. |
|
95 * @since Series 60 3.1 |
|
96 * @param None |
|
97 * @returns count |
|
98 */ |
|
99 IMPORT_C TInt FillRuleCount() const; |
|
100 |
|
101 /** |
|
102 * Externalizes container information to stream. |
|
103 * Leaves in case of errors. |
|
104 * @since Series 60 3.1 |
|
105 * @param reference to RWriteStream |
|
106 * @return none |
|
107 */ |
|
108 IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; |
|
109 |
|
110 /** |
|
111 * Internalizes container information from stream. |
|
112 * Leaves in case of errors. |
|
113 * @since Series 60 3.1 |
|
114 * @param reference to RReadStream |
|
115 * @return none |
|
116 */ |
|
117 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
118 |
|
119 private: |
|
120 |
|
121 /** |
|
122 * Constructor. |
|
123 */ |
|
124 CCmFillRuleContainer(); |
|
125 |
|
126 /** |
|
127 * Second-phase constructor. |
|
128 */ |
|
129 void ConstructL(); |
|
130 |
|
131 |
|
132 private: // data |
|
133 |
|
134 /** Array rules included to fill rule */ |
|
135 RPointerArray<CCmFillRule> iFillRuleArray; // items owned |
|
136 |
|
137 |
|
138 }; |
|
139 |
|
140 #endif // __CMFILLRULECONTAINER_H |