24 #include "xncontroladapter.h" |
24 #include "xncontroladapter.h" |
25 |
25 |
26 |
26 |
27 // FORWARD DECLARATIONS |
27 // FORWARD DECLARATIONS |
28 class CXnNodePluginIf; |
28 class CXnNodePluginIf; |
|
29 class CXnImageDecoder; |
29 |
30 |
30 // CLASS DECLARATION |
31 // CLASS DECLARATION |
31 /** |
32 /** |
32 * @ingroup group_xnbitmapfactory |
33 * @ingroup group_xnbitmapfactory |
33 * @lib xn3bitmapfactory.dll |
34 * @lib xn3bitmapfactory.dll |
55 * @param aMask Mask to use |
56 * @param aMask Mask to use |
56 */ |
57 */ |
57 void SetContentBitmaps(CFbsBitmap* aBitmap, CFbsBitmap* aMask); |
58 void SetContentBitmaps(CFbsBitmap* aBitmap, CFbsBitmap* aMask); |
58 |
59 |
59 /** |
60 /** |
|
61 * Sets content bitmaps from file. |
|
62 * @since S60 5.2 |
|
63 * @param aFilename Bitmap filename. |
|
64 */ |
|
65 void SetContentBitmaps( TFileName& aFilename ); |
|
66 |
|
67 /** |
60 * Gets content bitmaps. Ownership not is transferred. |
68 * Gets content bitmaps. Ownership not is transferred. |
61 * @since Series 60 3.1 |
69 * @since Series 60 3.1 |
62 * @param aBitmap Bitmap to draw |
70 * @param aBitmap Bitmap to draw |
63 * @param aMask Mask to use |
71 * @param aMask Mask to use |
64 */ |
72 */ |
71 * @return void. |
79 * @return void. |
72 */ |
80 */ |
73 void DoHandlePropertyChangeL(CXnProperty* aProperty = NULL); |
81 void DoHandlePropertyChangeL(CXnProperty* aProperty = NULL); |
74 |
82 |
75 /** |
83 /** |
76 * From CCoeControl Handles the resource change. |
|
77 * @since Series 60 3.1 |
|
78 * @param aType A type of the resource change |
|
79 * @return void. |
|
80 */ |
|
81 void HandleScreenDeviceChangedL(); |
|
82 |
|
83 /** |
|
84 * See CCoeControl documentation |
|
85 */ |
|
86 void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
87 /** |
|
88 * From CCoeControl Handles the skin change |
84 * From CCoeControl Handles the skin change |
89 * @since Series 60 3.2 |
85 * @since Series 60 3.2 |
90 * @return void. |
86 * @return void. |
91 */ |
87 */ |
92 void SkinChanged(); |
88 void SkinChanged(); |
94 protected: |
90 protected: |
95 /** |
91 /** |
96 * Size change notification |
92 * Size change notification |
97 */ |
93 */ |
98 void SizeChanged(); |
94 void SizeChanged(); |
99 void Draw(const TRect& aRect) const; |
95 |
100 |
|
101 private: |
96 private: |
102 CXnBitmapAdapter(CXnNodePluginIf& aNode); |
97 CXnBitmapAdapter(CXnNodePluginIf& aNode); |
103 void ConstructL(CXnNodePluginIf& aNode); |
98 void ConstructL(CXnNodePluginIf& aNode); |
104 |
99 |
105 void InitializeBitmapsL(); |
100 void InitializeBitmapsL(); |
106 private: // Data |
101 private: // Data |
107 // UI node, not owned |
102 // UI node, not owned |
108 CXnNodePluginIf& iNode; |
103 CXnNodePluginIf& iNode; |
|
104 // Image decoder, owned |
|
105 CXnImageDecoder* iDecoder; |
109 // Whether the bitmaps has been loaded or not. |
106 // Whether the bitmaps has been loaded or not. |
110 mutable TBool iAreBitmapsLoaded; |
107 mutable TBool iAreBitmapsLoaded; |
111 // Whether the data API has been used or not. |
108 // Whether the data API has been used or not. |
112 TBool iAreBitmapsSet; |
109 TBool iAreBitmapsSet; |
113 // Path of the bitmap |
110 // Path of the bitmap, owned |
114 HBufC* iPath; |
111 HBufC* iPath; |
115 // The size of the current bitmap |
112 // The size of the current bitmap |
116 TSize iBitmapSize; |
113 TSize iBitmapSize; |
117 // The path of the fallback image |
114 // The path of the fallback image, owned |
118 HBufC* iFallbackPath; |
115 HBufC* iFallbackPath; |
119 // Whether fallback path has changed and bitmaps need to be reloaded |
116 // Whether fallback path has changed and bitmaps need to be reloaded |
120 TBool iFallbackPathChange; |
117 TBool iFallbackPathChange; |
121 }; |
118 }; |
122 |
119 |