CAknLayoutFont Class Reference

API published in: S60 3rd Ed

Link against: uiklaf.lib avkon.lib fontutils.lib

Capability Information

Required Capabilities

None


#include <aknlayoutfont.h>

Detailed Description

This abstract class is a CFbsFont that can update itself (re-bind a font) and has standard Series 60 layout API available.

Concrete classes derived from this implement constructors and Update methods that supply the specification required for the initially, and newly bound font, respectively. Derived classes must also implement the CreateFont framework method in order to implement the font binding itself.


Public Member Functions

virtual  ~CAknLayoutFont ()
  C++ Destructor.
IMPORT_C void  Update ()
  Update this object's binding to a CFbsFont, using the member data of the derived class.
IMPORT_C TInt  MaxAscent () const
  Return the maximum extent of any pixel in the font upwards from the baseline Measured up, so therefore it is a positive value.
IMPORT_C TInt  MaxDescent () const
  Return the maximum extent of any pixel in the font down the baseline Measured down, so therefore it is usually a positive value.
IMPORT_C TInt  TextPaneTopToBaseline () const
IMPORT_C TInt  BaselineToTextPaneBottom () const
IMPORT_C TInt  TextPaneHeight () const
TInt  AscentForCharacter (TChar aCharacter) const
  This provides the baseline relative to the top of the combined font for a specific character code.
IMPORT_C TAknTextDecorationMetrics  TextDecorationMetrics () const
  Returns an object describing how the text with this font is to be decorated.
IMPORT_C TAknFontCategory  FontCategory () const
  Returns the Avkon font category (EAknFontCategoryPrimary, EAknFontCategorySecondary.
IMPORT_C TAknFontSpecification  FontSpecification () const
  This API allows the font to provide the metrics under which the font was requested.
TFontSpec  DoFontSpecInTwips () const

Static Public Member Functions

static IMPORT_C const CAknLayoutFont AsCAknLayoutFontOrNull (const CFont *aFont)
  Returns if a font pointer cast to this type if the actual type conforms to this type.

Protected Member Functions

  CAknLayoutFont (CBitmapDevice &aScreenDevice)
  C++ Constructor.
CBitmapDevice &  BitmapDevice () const
void  SetExcessAscent (TInt aExcessAscent)
void  SetExcessDescent (TInt aExcessDescent)
void  SetBottomShortfall (TInt aBottomShortfall)
void  SetTextPaneHeight (TInt aTextPaneHeight)

Constructor & Destructor Documentation

virtual CAknLayoutFont::~CAknLayoutFont  )  [virtual]
 

C++ Destructor.

CAknLayoutFont::CAknLayoutFont CBitmapDevice &  aScreenDevice  )  [protected]
 

C++ Constructor.


Member Function Documentation

static IMPORT_C const CAknLayoutFont* CAknLayoutFont::AsCAknLayoutFontOrNull const CFont *  aFont  )  [static]
 

Returns if a font pointer cast to this type if the actual type conforms to this type.

Returns:
NULL if the font does not conform to CAknLayoutFont.
TInt CAknLayoutFont::AscentForCharacter TChar  aCharacter  )  const
 

This provides the baseline relative to the top of the combined font for a specific character code.

This value does not include any TopShortfall.

IMPORT_C TInt CAknLayoutFont::BaselineToTextPaneBottom  )  const
 
CBitmapDevice& CAknLayoutFont::BitmapDevice  )  const [protected]
 
TFontSpec CAknLayoutFont::DoFontSpecInTwips  )  const
 
IMPORT_C TAknFontCategory CAknLayoutFont::FontCategory  )  const
 

Returns the Avkon font category (EAknFontCategoryPrimary, EAknFontCategorySecondary.

..) that was used to generate this font.

Returns:
font category
IMPORT_C TAknFontSpecification CAknLayoutFont::FontSpecification  )  const
 

This API allows the font to provide the metrics under which the font was requested.

Returns:
the font specification for which the font has been supplied
IMPORT_C TInt CAknLayoutFont::MaxAscent  )  const
 

Return the maximum extent of any pixel in the font upwards from the baseline Measured up, so therefore it is a positive value.

Returns:
maximum ascent of the font
IMPORT_C TInt CAknLayoutFont::MaxDescent  )  const
 

Return the maximum extent of any pixel in the font down the baseline Measured down, so therefore it is usually a positive value.

Returns:
maximum descent of the font
void CAknLayoutFont::SetBottomShortfall TInt  aBottomShortfall  )  [protected]
 
void CAknLayoutFont::SetExcessAscent TInt  aExcessAscent  )  [protected]
 
void CAknLayoutFont::SetExcessDescent TInt  aExcessDescent  )  [protected]
 
void CAknLayoutFont::SetTextPaneHeight TInt  aTextPaneHeight  )  [protected]
 
IMPORT_C TAknTextDecorationMetrics CAknLayoutFont::TextDecorationMetrics  )  const
 

Returns an object describing how the text with this font is to be decorated.

Returns:
text decoration metrics for the font
IMPORT_C TInt CAknLayoutFont::TextPaneHeight  )  const
 
IMPORT_C TInt CAknLayoutFont::TextPaneTopToBaseline  )  const
 
IMPORT_C void CAknLayoutFont::Update  ) 
 

Update this object's binding to a CFbsFont, using the member data of the derived class.

This method only needs to be called if the client owns the CAknLayoutFont object, and there has been a layout switch that may affect the font.

It is functionally equivalent to deleting the CAknLayoutFont object, and reconstructing it with the same parameters.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top