Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #if !defined(__EIKIMAGE_H__)
20 #define __EIKIMAGE_H__
22 #if !defined(__EIKALIGN_H__)
30 * The package class @c CEikImage enables bitmaps to be packaged into an
31 * image. Two bitmaps can be packaged, one for the image itself and,
32 * optionally, another for the image’s mask.
34 class CEikImage : public CEikAlignedControl
40 * C++ default constructor.
47 IMPORT_C ~CEikImage();
52 * Gets the minimum size required to draw the image.
54 * @return The minimum size required to draw the image.
56 IMPORT_C TSize MinimumSize();
59 * Constructs an image from resource using the specified resource reader.
61 * @param aReader The resource reader.
63 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
65 public: // new functions
68 * Creates a bitmap and a mask for an icon. If @c aMaskId is not negative
69 * then function allocates bitmap and mask objects and sets member variables
70 * to point at them. These bitmaps are not ready for drawing until they are
71 * initialized with @c SetSize() method. Usually, UI controls do this. Note
72 * also that a single @c SetSize() call initializes both the bitmap and the
75 * If @c aMaskId is not needed and not given then this function creates the
76 * bitmap for an icon. Returned object is saved to the member variable. The
77 * bitmap is not ready for drawing until it is initialized with @c
78 * SetSize() method. Usually, UI controls do this.
80 * @param aFilename File name. Can be either MBM or MIF file.
81 * Extension is changed based on the given bitmap ID.
82 * @param aMainId Bitmap id.
83 * @param aMaskId Mask id, by default -1.
85 IMPORT_C void CreatePictureFromFileL(const TDesC& aFilename,
90 * Sets picture parameters.
92 * @param aBitmap A bitmap.
93 * @param aMaskBitmap A bitmap mask.
95 IMPORT_C void SetPicture(const CFbsBitmap* aBitmap,
96 const CFbsBitmap* aMaskBitmap=NULL);
101 * @param aEmphasis Full emphasis if @c ETrue and if not then @c EFalse.
103 IMPORT_C void SetEmphasis(TBool aEmphasis);
106 * Sets the owner of the picture.
108 * @param aOwnership @c Etrue if owner is external and @c EFalse if not.
110 IMPORT_C void SetPictureOwnedExternally(TBool aOwnership);
113 * Gets a pointer of @c CFbsBitmap object.
115 * @return Pointer to handle to the bitmap or NULL.
117 IMPORT_C const CFbsBitmap* Bitmap() const;
120 * Gets pointer of @c CFbsBitmap object.
122 * @return Pointer to handle to the bitmap's mask or NULL.
124 IMPORT_C const CFbsBitmap* Mask() const;
129 * @param aBitmap Pointer to @c CFbsBitmap object containing the bitmap.
131 IMPORT_C void SetBitmap(const CFbsBitmap* aBitmap);
134 * Sets new bitmap mask.
136 * @param aMaskBitmap Pointer to @c CFbsBitmap object containing the bitmap
139 IMPORT_C void SetMask(const CFbsBitmap* aMaskBitmap);
142 * Sets new bitmap and bitmap's mask.
144 * @param aNewBitmap A bitmap.
145 * @param aNewMask A bitmap mask.
147 IMPORT_C void SetNewBitmaps(const CFbsBitmap* aNewBitmap,
148 const CFbsBitmap* aNewMask);
151 * Checks whether picture is owned externally.
153 * @return @c ETrue if picture owned externally and @c EFalse if
156 IMPORT_C TBool IsPictureOwnedExternally();
159 * Sets the brush style.
161 * @param aBrushStyle A brush style.
163 IMPORT_C void SetBrushStyle(CGraphicsContext::TBrushStyle aBrushStyle);
165 public: // from CCoeControl
168 * From @c CCoeControl.
170 * Handles pointer events.
172 * This function gets called whenever a pointer event occurs in the
173 * control, i.e. when the pointer is within the control's extent, or when
174 * the control has grabbed the pointer. The control should implement this
175 * function to handle pointer events.
177 * Note: events of type @c EButton1Down are processed before
178 * @c HandlePointerEventL() is called in order to transfer keyboard focus
179 * to the control in which the @c EButton1Down event occurred.
181 * If overriding @c HandlePointerEventL(), the implementation must include
182 * a base call to @c CCoeControl's @c HandlePointerEventL().
184 * @param aPointerEvent The pointer event.
186 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
188 protected: // from CCoeControl
191 * From @c CCoeControl
193 * Writes the internal state of the control and its components to a stream.
194 * Does nothing in release mode. Designed to be overidden and base called
197 * @since App-Framework_6.1
198 * @param[in,out] aWriteStream The pointer writestream.
200 IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const;
202 private: // from CCoeControl
204 IMPORT_C void Draw(const TRect& aRect) const;
205 IMPORT_C void Reserved_2();
212 IMPORT_C void* ExtensionInterface( TUid aInterface );
216 const CFbsBitmap* iBitmap;
217 const CFbsBitmap* iMaskBitmap;
220 CGraphicsContext::TBrushStyle iBrushStyle;
223 #endif // __EIKIMAGE_H__