45 */ |
45 */ |
46 IMPORT_C static CBubbleCtrl* NewL(const TRect& aRect, |
46 IMPORT_C static CBubbleCtrl* NewL(const TRect& aRect, |
47 CFepUiLayout* aUiLayout, |
47 CFepUiLayout* aUiLayout, |
48 TInt aCtrlId); |
48 TInt aCtrlId); |
49 |
49 |
|
50 inline void SetIconOffsetAndSize( |
|
51 const TSize& aOffset, const TSize& aSize ); |
50 IMPORT_C virtual void Draw(); |
52 IMPORT_C virtual void Draw(); |
51 |
53 |
52 IMPORT_C virtual void Hide(TBool aShowFlag); |
54 IMPORT_C virtual void Hide(TBool aShowFlag); |
53 |
55 |
54 IMPORT_C void SetBitmapParam(CFbsBitmap* aBmpId, |
56 IMPORT_C void SetBitmapParam(CFbsBitmap* aBmpId, |
82 IMPORT_C void Close(); |
84 IMPORT_C void Close(); |
83 |
85 |
84 IMPORT_C TBool IsShowing(); |
86 IMPORT_C TBool IsShowing(); |
85 |
87 |
86 IMPORT_C void SetFrameDiff(TInt aLeftDiff,TInt aTopDiff,TInt aRightDiff,TInt aBottomDiff); |
88 IMPORT_C void SetFrameDiff(TInt aLeftDiff,TInt aTopDiff,TInt aRightDiff,TInt aBottomDiff); |
|
89 inline void GetText( TDes& aText ); |
87 |
90 |
88 void Freeze(); |
91 void Freeze(); |
89 |
92 |
90 void UnFreeze( TBool aUpdate = ETrue ); |
93 void UnFreeze( TBool aUpdate = ETrue ); |
91 inline void SetTextColorIndex( TInt aTxtClrIndex ); |
94 inline void SetTextColorIndex( TInt aTxtClrIndex ); |
92 inline TInt TextColorIndex() const; |
95 inline TInt TextColorIndex() const; |
|
96 |
|
97 inline void SetLangCode( TInt aLangCode ); |
|
98 |
93 protected: |
99 protected: |
94 IMPORT_C CBubbleCtrl(const TRect& aRect, |
100 IMPORT_C CBubbleCtrl(const TRect& aRect, |
95 CFepUiLayout* aUiLayout, |
101 CFepUiLayout* aUiLayout, |
96 TInt aCtrlId); |
102 TInt aCtrlId); |
97 |
103 |
98 IMPORT_C void ConstructL(TInt aBmpId, TInt aMaskId); |
104 IMPORT_C void ConstructL(TInt aBmpId, TInt aMaskId); |
99 |
105 |
100 private: |
106 private: |
|
107 TRect GetRect(); |
|
108 |
|
109 private: |
101 CFbsBitmap* iForgroundBmp; |
110 CFbsBitmap* iForgroundBmp; |
102 CFbsBitmap* iForgroundBmpMask; |
111 CFbsBitmap* iForgroundBmpMask; |
103 |
112 |
104 TAknsItemID iBgSkinId; |
113 TAknsItemID iBgSkinId; |
105 TAknsItemID iFirstBmpId; |
114 TAknsItemID iFirstBmpId; |
120 TBool iFreeze; |
129 TBool iFreeze; |
121 TRect iInvalidRect; |
130 TRect iInvalidRect; |
122 |
131 |
123 TBool iNeedRedraw; // redraw flag after text changed. |
132 TBool iNeedRedraw; // redraw flag after text changed. |
124 TInt iTextColorIndex; |
133 TInt iTextColorIndex; |
|
134 TSize iIconOffset; |
|
135 TSize iIconSize; |
|
136 |
|
137 public: |
|
138 IMPORT_C virtual void SetRect(const TRect& aRect); |
|
139 void SetBmpDevice(CFbsBitGc* aGc,CFbsBitmapDevice* aDevice); |
|
140 void CreateBmpDevL(); |
|
141 inline void SetOffset(TPoint& aPt); |
|
142 protected: |
|
143 IMPORT_C void HandleResourceChange(TInt aType); |
|
144 private: |
|
145 |
|
146 |
|
147 private: |
|
148 CFbsBitmap* iBitmap; |
|
149 CFbsBitmap* iMaskBitmap; |
|
150 |
|
151 TPoint iOffset; |
|
152 TInt iReserved1; |
|
153 |
|
154 TInt iLangCode; |
125 }; |
155 }; |
126 |
156 |
|
157 inline void CBubbleCtrl::SetOffset(TPoint& aPt) |
|
158 { |
|
159 iOffset = aPt; |
|
160 } |
|
161 |
127 inline void CBubbleCtrl::SetTextColorIndex( TInt aTxtClrIndex ) |
162 inline void CBubbleCtrl::SetTextColorIndex( TInt aTxtClrIndex ) |
128 { |
163 { |
129 iTextColorIndex = aTxtClrIndex; |
164 iTextColorIndex = aTxtClrIndex; |
130 } |
165 } |
131 |
166 |
132 inline TInt CBubbleCtrl::TextColorIndex() const |
167 inline TInt CBubbleCtrl::TextColorIndex() const |
133 { |
168 { |
134 return iTextColorIndex; |
169 return iTextColorIndex; |
135 } |
170 } |
|
171 inline void CBubbleCtrl::SetIconOffsetAndSize( |
|
172 const TSize& aOffset, const TSize& aSize ) |
|
173 { |
|
174 iIconOffset = aOffset; |
|
175 iIconSize = aSize; |
|
176 } |
|
177 |
|
178 inline void CBubbleCtrl::GetText( TDes& aText ) |
|
179 { |
|
180 aText.Copy( *iText ); |
|
181 } |
|
182 |
|
183 inline void CBubbleCtrl::SetLangCode( TInt aLangCode ) |
|
184 { |
|
185 iLangCode = aLangCode; |
|
186 } |
136 |
187 |
137 class CTooltipBubbleCtrl: public CBubbleCtrl |
188 class CTooltipBubbleCtrl: public CBubbleCtrl |
138 { |
189 { |
139 public: |
190 public: |
140 //constructor and destructor |
191 //constructor and destructor |