17 |
17 |
18 |
18 |
19 #ifndef C_BUBBLEMAINPANECONTROL_H |
19 #ifndef C_BUBBLEMAINPANECONTROL_H |
20 #define C_BUBBLEMAINPANECONTROL_H |
20 #define C_BUBBLEMAINPANECONTROL_H |
21 |
21 |
|
22 #include <coecntrl.h> |
22 #include "BMBubbleManager.h" |
23 #include "BMBubbleManager.h" |
23 #include <coecntrl.h> |
24 #include "telbubbleimagescaler.h" |
24 |
25 |
25 class CBubbleCallObjectManager; |
26 class CBubbleCallObjectManager; |
26 class CTelBubbleCustomElement; |
27 class CTelBubbleCustomElement; |
27 class CBubbleCustomManager; |
28 class CBubbleCustomManager; |
28 class CFbsBitmap; |
29 class CFbsBitmap; |
32 * |
33 * |
33 * |
34 * |
34 * @lib BubbleManager.lib |
35 * @lib BubbleManager.lib |
35 * @since S60 v5.0 |
36 * @since S60 v5.0 |
36 */ |
37 */ |
37 NONSHARABLE_CLASS( CBubbleMainPaneControl ) : public CCoeControl |
38 NONSHARABLE_CLASS( CBubbleMainPaneControl ) : public CCoeControl, |
|
39 public MTelBubbleImageScalerObserver |
38 { |
40 { |
39 public: |
41 public: |
40 /** |
42 /** |
41 * Two-phased constructor. |
43 * Two-phased constructor. |
42 * @param aBubbleManager Bubble manager. |
44 * @param aBubbleManager Bubble manager. |
75 |
77 |
76 /** |
78 /** |
77 * Returns ETrue when image is being displayed. |
79 * Returns ETrue when image is being displayed. |
78 */ |
80 */ |
79 TBool IsUsed() const; |
81 TBool IsUsed() const; |
80 |
82 |
|
83 // from MTelBubbleImageScalerObserver |
|
84 /** |
|
85 * Callback function from CTelBubbleImageScaler |
|
86 * |
|
87 * @param aError Error happened during scaling |
|
88 * @param aBitmap Scaled bitmap |
|
89 * @return None |
|
90 */ |
|
91 void ImageScalingComplete |
|
92 (TInt aError, CFbsBitmap* aBitmap); |
|
93 |
81 private: |
94 private: |
82 CBubbleMainPaneControl( CBubbleManager& aCustomManager, |
95 CBubbleMainPaneControl( CBubbleManager& aCustomManager, |
83 CBubbleCallObjectManager& aCallObjectManager ); |
96 CBubbleCallObjectManager& aCallObjectManager ); |
84 void ConstructL(); |
97 void ConstructL(); |
85 void SizeChanged(); |
98 void SizeChanged(); |
86 void PrepareBitmapsL( CFbsBitmap*& aBitmap, |
99 void PrepareBitmapsL( CFbsBitmap*& aBitmap, |
87 TBool& aBitmapOwnership, |
100 TBool& aBitmapOwnership, |
88 CFbsBitmap*& aMask, |
101 CFbsBitmap*& aMask, |
89 TBool& aMaskOwnership, |
102 TBool& aMaskOwnership, |
90 TBool aIsScalable ); |
103 TBool aIsScalable, |
|
104 TBool aThumbnail = EFalse ); |
91 |
105 |
|
106 void StartScaling( CFbsBitmap *aSourceBitmap ); |
92 private: // data |
107 private: // data |
93 CBubbleManager& iBubbleManager; |
108 CBubbleManager& iBubbleManager; |
94 CBubbleCallObjectManager& iCallObjectManager; |
109 CBubbleCallObjectManager& iCallObjectManager; |
95 CBubbleManager::TBubbleId iBubble; |
110 CBubbleManager::TBubbleId iBubble; |
96 TBool iThreeLinedBubble; |
111 TBool iThreeLinedBubble; |
97 CTelBubbleCustomElement* iCallImage; |
112 CTelBubbleCustomElement* iCallImage; |
98 TBool iIsUsed; |
113 TBool iIsUsed; |
99 CFbsBitmap* iBitmap; // not owned |
114 CFbsBitmap* iBitmap; // not owned |
100 CFbsBitmap* iMask; // not owned |
115 CFbsBitmap* iMask; // not owned |
|
116 CTelBubbleImageScaler *iScaler; |
|
117 CFbsBitmap *iScaledImage; |
|
118 |
|
119 // to prevent loading & scaling the same image again. |
|
120 CFbsBitmap* iOldBitmap; |
101 }; |
121 }; |
102 |
122 |
103 #endif // C_BUBBLEMAINPANECONTROL_H |
123 #endif // C_BUBBLEMAINPANECONTROL_H |