50 |
50 |
51 void SetMaxLabelLength( TInt aMaxLength ); |
51 void SetMaxLabelLength( TInt aMaxLength ); |
52 |
52 |
53 TInt GetMinLabelLength() const; |
53 TInt GetMinLabelLength() const; |
54 |
54 |
55 void SetTextL( const TDesC& aText ); |
55 void SetTextsLD( CDesCArray* aAttachmentNames, |
56 void SetTextL( const TDesC& aAttachmentName, const TDesC& aAttachmentSizeDesc ); |
56 CDesCArray* aAttachmentSizes ); |
57 |
57 |
|
58 TInt FocusedAttachmentLabelIndex(); |
|
59 |
58 public: // from MNcsControl |
60 public: // from MNcsControl |
59 |
61 |
60 TInt LineCount() const; |
62 TInt LineCount() const; |
61 |
63 |
62 TInt ScrollableLines() const; |
64 TInt ScrollableLines() const; |
69 |
71 |
70 void Reposition( TPoint& aPt, TInt aWidth ); |
72 void Reposition( TPoint& aPt, TInt aWidth ); |
71 |
73 |
72 const TDesC& GetLabelText() const; |
74 const TDesC& GetLabelText() const; |
73 |
75 |
74 // <cmail> Platform layout change |
|
75 TInt LayoutLineCount() const; |
76 TInt LayoutLineCount() const; |
76 // </cmail> Platform layout change |
|
77 |
77 |
78 public: // from CCoeControl |
78 public: // from CCoeControl |
79 |
79 |
80 void Draw( const TRect& aRect ) const; |
80 void Draw( const TRect& aRect ) const; |
81 |
81 |
87 |
87 |
88 void FocusChanged( TDrawNow aDrawNow ); |
88 void FocusChanged( TDrawNow aDrawNow ); |
89 |
89 |
90 void HandleResourceChange( TInt aType ); |
90 void HandleResourceChange( TInt aType ); |
91 |
91 |
|
92 void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
93 |
92 private: // methods |
94 private: // methods |
93 |
95 |
94 CNcsAttachmentField( MNcsFieldSizeObserver* aSizeObserver, |
96 CNcsAttachmentField( TInt aLabelTextId, |
|
97 MNcsFieldSizeObserver* aSizeObserver, |
95 CNcsHeaderContainer* aParentControl ); |
98 CNcsHeaderContainer* aParentControl ); |
96 |
99 |
97 void ConstructL( TInt aLabelTextId ); |
100 void ConstructL(); |
98 |
101 |
99 void UpdateColors(); |
102 void UpdateColors(); |
|
103 void UpdateColors( CNcsLabel* aLabel ); |
100 |
104 |
101 void UpdateFontSize(); |
105 void UpdateFontSize(); |
|
106 void UpdateFontSize( CNcsLabel* aLabel ); |
102 |
107 |
103 // <cmail> Platform layout change |
|
104 void LayoutControls(); |
108 void LayoutControls(); |
105 |
109 |
106 void UpdateIconPositions( const TRect& aRect ); |
110 void UpdateIconPositions( const TRect& aRect ); |
107 // </cmail> Platform layout change |
|
108 |
111 |
109 void UpdateAttachmentTextL(); |
112 void UpdateAttachmentTextsL(); |
110 |
113 |
111 // <cmail> Platform layout change |
|
112 /** |
114 /** |
113 * Resizes icons |
115 * Resizes icons |
114 */ |
116 */ |
115 void ResizeIcons(); |
117 void ResizeIcons(); |
116 |
118 |
117 TInt CreateIcons(); |
119 TInt CreateIcons(); |
118 void CreateIconsL(); |
120 void CreateIconsL(); |
119 // </cmail> Platform layout change |
121 |
|
122 void UpdateComponentArrayL(); |
|
123 |
|
124 void UpdateSingleAttachmentLabelTextL( CNcsLabel* aLabel, TInt aIndex ); |
120 |
125 |
121 private: // data |
126 private: // data |
122 |
127 |
123 CNcsHeaderContainer* iParentControl; // not owned |
128 CNcsHeaderContainer* iParentControl; // not owned |
124 |
129 |
125 CNcsLabel* iAttachmentLabel; |
130 // attachment labels (within the array) owned |
|
131 RPointerArray<CNcsLabel> iAttachmentLabels; |
126 |
132 |
127 // <cmail> Platform layout change |
|
128 //CFont* iLabelFont; // not owned, needs to be released in the end |
|
129 //CFont* iEditorFont; // not owned, needs to be released in the end |
|
130 const CFont* iLabelFont; // not owned |
133 const CFont* iLabelFont; // not owned |
131 const CFont* iEditorFont; // not owned |
134 const CFont* iEditorFont; // not owned |
132 // </cmail> |
|
133 |
135 |
134 HBufC* iAttachmentName; |
136 CDesCArray* iAttachmentNames; |
135 HBufC* iAttachmentSizeDesc; |
137 CDesCArray* iAttachmentSizes; |
136 |
138 |
137 TInt iMaximumLabelLength; |
139 TInt iMaximumLabelLength; |
138 |
140 |
139 TRgb iBgColor; |
141 TRgb iBgColor; |
140 |
142 |
141 TRgb iBorderColor; |
143 TRgb iBorderColor; |
142 |
144 |
143 // Attachment icon |
145 // Attachment icon |
144 CFbsBitmap* iAttachmentBitmap; |
146 CFbsBitmap* iAttachmentBitmap; |
145 CFbsBitmap* iAttachmentMask; |
147 CFbsBitmap* iAttachmentMask; |
146 TPoint iAttachmentIconPos; |
148 TPoint iAttachmentIconPos; |
147 |
149 |
148 // Action menu icon |
150 TInt iLabelTextId; |
149 CFbsBitmap* iActionMenuBitmap; |
151 TInt iAttachmentLabelCount; |
150 CFbsBitmap* iActionMenuMask; |
152 TInt iFocusedLabelIndex; |
151 TPoint iActionMenuIconPos; |
|
152 }; |
153 }; |
153 |
154 |
154 #endif |
155 #endif |