|
||
class CGridLabelImg : public CBase;
Draws a grid cell's label.
CBase
-
Base class for all classes to be instantiated on the heap.
CGridLabelImg
- Draws a grid cell's label.
Defined in CGridLabelImg
:
CGridLabelImg(const TFontSpec &,MGraphicsDeviceMap *)
Constructor taking specified parameters.ConstructL()
Implements the second phase of two-phase construction.DrawColLabelL(CGraphicsContext *,TInt,const TRect &)const
Draws a column label.DrawRowCursorL(CGraphicsContext *,const TRect &)const
Draws a cursor to identify a row.DrawRowLabelL(CGraphicsContext *,TInt,const TRect &)const
Draws a row label.DrawTopLeftLabelL(CGraphicsContext *,const TRect &)const
Fills the specified rectangle with a colour.DrawTopLeftLabelL(CGraphicsContext *,const TRect &,TRgb)const
Fills the specified rectangle with the specified colour.EDefaultSideLabelWidthInTwips
The default width of side labels, in twips.EDefaultTopLabelHeightInTwips
The default height of top labels, in twips.FontSpec()const
Gets the font specification.NotifyGraphicsDeviceMapChangeL()
Deals with the result of changing the graphics device map, i.e. the interface fo...ReleaseFont()
Releases the font.SetGraphicsDeviceMap(MGraphicsDeviceMap *)
Supplies a new interface object for mapping between twips and device-specific un...SetGridColors(const TGridColors &)
Sets the colours to be used when drawing the label.SideLabelWidthInPixels(TInt,TInt)const
Gets the width of the side labels. TopLabelHeightInPixels()const
Gets the height of the top labels. anonymous
iFont
The nearest font to that specified in the font specification. iFontSpec
The font specification in device independent terms. iGraphicsDeviceMap
The graphics device map, an interface for mapping between twips and device-speci...iGridColors
The grid colour specification. ~CGridLabelImg()
Destructor.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C virtual ~CGridLabelImg();
Destructor.
Releases resources before the object is destroyed. Specifically, it releases the font acquired when the object was constructed.
IMPORT_C void ConstructL();
Implements the second phase of two-phase construction.
Specifically, it gets the nearest font to that specified in the font specification passed to the constructor.
protected: IMPORT_C CGridLabelImg(const TFontSpec &aFontSpec, MGraphicsDeviceMap *aGraphicsDeviceMap);
Constructor taking specified parameters.
|
inline void SetGraphicsDeviceMap(MGraphicsDeviceMap *aGraphicsDeviceMap);
Supplies a new interface object for mapping between twips and device-specific units.
Note that the caller must call CGridLabelImg::ReleaseFont()
before calling this function, and must call CGridLabelImg::NotifyGraphicsDeviceMapChangeL()
afterwards.
|
inline TFontSpec FontSpec() const;
Gets the font specification.
|
IMPORT_C void ReleaseFont();
Releases the font.
This is called by the destructor, and should be called before calling CGridLabelImg::SetGraphicsDeviceMap(MGraphicsDeviceMap *)
.
CGridLabelImg::ConstructL()
Implements the second phase of two-phase construction.IMPORT_C void NotifyGraphicsDeviceMapChangeL();
Deals with the result of changing the graphics device map, i.e. the interface for mapping between twips and device-specific units.
The function releases the existing font, and then tries to get the nearest font to that specified in the font specification.
CGridLabelImg::ConstructL()
Implements the second phase of two-phase construction.CGridLabelImg::SetGraphicsDeviceMap(MGraphicsDeviceMap *)
Supplies a new interface object for mapping between twips and device-specific un...inline void SetGridColors(const TGridColors &aGridColors);
Sets the colours to be used when drawing the label.
|
protected: IMPORT_C void DrawTopLeftLabelL(CGraphicsContext *aGc, const TRect &aRect, TRgb aColor) const;
Fills the specified rectangle with the specified colour.
|
private: virtual void DrawRowLabelL(CGraphicsContext *aGc, TInt aRow, const TRect &aRect) const=0;
Draws a row label.
|
private: virtual void DrawColLabelL(CGraphicsContext *aGc, TInt aCol, const TRect &aRect) const=0;
Draws a column label.
|
private: IMPORT_C virtual void DrawTopLeftLabelL(CGraphicsContext *aGc, const TRect &aRect) const;
Fills the specified rectangle with a colour.
The default implementation fills the specified rectangle with the background colour value as defined by the grid colour specification in iGridColors.
|
TGridColors
The grid colour specification.private: IMPORT_C virtual TInt SideLabelWidthInPixels(TInt aStartRow, TInt aEndRow) const;
Gets the width of the side labels.
|
|
private: IMPORT_C virtual TInt TopLabelHeightInPixels() const;
Gets the height of the top labels.
|
private: IMPORT_C virtual void DrawRowCursorL(CGraphicsContext *aGc, const TRect &aRect) const;
Draws a cursor to identify a row.
The default implementation is empty.
|
protected: n/a
|
protected: MGraphicsDeviceMap * iGraphicsDeviceMap;
The graphics device map, an interface for mapping between twips and device-specific units.
protected: TGridColors iGridColors;
The grid colour specification.