CEikMenuBarTitle Class Reference

class CEikMenuBarTitle : public CBase

The CEikMenuBarTitle class encapsulates the data needed to define a menu bar title and provides some of the functionality required to display the title.

Since
ER5U

Inherits from

Nested Classes and Structures

Constructor & Destructor Documentation

CEikMenuBarTitle()

IMPORT_C CEikMenuBarTitle ( )

C++ default constructor.

~CEikMenuBarTitle()

IMPORT_C ~CEikMenuBarTitle ( )

Destructor.

Member Functions Documentation

CalculateBaseLine(TInt &, TInt &)

void CalculateBaseLine ( TInt & aBaseLine,
TInt & aTitleHeight
)

Adjusts the value of the title text baseline offset aBaseLine to take into account any size of the title icon.

Adjusts the value of the title text baseline offset aBaseLine to take into account the any size of any title icon.

Parameters

TInt & aBaseLine Gets result of baseline.
TInt & aTitleHeight Gets result of height.

CreateIconL(CFbsBitmap *, CFbsBitmap *)

IMPORT_C void CreateIconL ( CFbsBitmap * aBitmap,
CFbsBitmap * aMask
)

Constructs a new icon for the title, taking ownership of the picture bitmap and the mask bitmap unless they are externally owned.

Constructs an new icon for the title, taking ownership of the picture bitmap aBitmap and the mask bitmap aMask unless the icon bitmaps have been set to be owned externally.

Parameters

CFbsBitmap * aBitmap Bitmap.
CFbsBitmap * aMask Mask of the bitmap.

DrawIcon(CWindowGc &, TRect, TInt)

IMPORT_C void DrawIcon ( CWindowGc & aGc,
TRect aRect,
TInt aLeftMargin
) const

Draws the title icon to the graphics context aGc , inside the rect aRect with an offset from the left side of the rectangle of size aLeftMargin .

Draws the title icon to the graphics context aGc, inside the rect aRect with an offset from the left side of the rectangle of size aLeftMargin

Parameters

CWindowGc & aGc Window graphic context.
TRect aRect Rectangle area.
TInt aLeftMargin Left margin.

ExtraLeftMargin()

TInt ExtraLeftMargin ( ) const

Gets the value of the extra left margin for the title text which will take into account the width of the title icon.

Returns the value of the extra left margin for the title text which will take into account the width of the title icon.

IconBitmap()

IMPORT_C CFbsBitmap * IconBitmap ( ) const

Gets a pointer to the title icon s bitmap. Does not imply transfer of ownership.

Returns a pointer to the picture bitmap of the title icon. Does not normally imply transfer of ownership.

IconMask()

IMPORT_C CFbsBitmap * IconMask ( ) const

Gets a pointer to the title icon s bitmap mask. Does not imply transfer of ownership.

Returns a pointer to the mask bitmap of the title icon. Does not normally imply transfer of ownership.

SetBitmapsOwnedExternally(TBool)

IMPORT_C void SetBitmapsOwnedExternally ( TBool aOwnedExternally )

Sets whether the bitmap and mask are owned externally or not.

Sets the title icon to be ownded externally if aOwnedExternally is ETrue.

Parameters

TBool aOwnedExternally ETrue if bitmaps are set as externally owned. EFalse if bitmaps are set as not being externally owned.

SetIcon(CGulIcon *)

IMPORT_C void SetIcon ( CGulIcon * aIcon )

Sets the title icon.

Parameters

CGulIcon * aIcon The icon to set.

SetIconBitmapL(CFbsBitmap *)

IMPORT_C void SetIconBitmapL ( CFbsBitmap * aBitmap )

Sets the bitmap for the icon. Transfers ownership unless the bitmaps are owned externally.

Sets the picture bitmap for the title icon to aBitmap. Transfers ownership unless the bitmaps are owned externally.

Parameters

CFbsBitmap * aBitmap Bitmap

SetIconMaskL(CFbsBitmap *)

IMPORT_C void SetIconMaskL ( CFbsBitmap * aMask )

Sets the bitmap mask for the icon. Transfers ownership unless the bitmaps are owned externally.

Sets the mask bitmap for the title icon to aMask. Transfers ownership unless the bitmaps are owned externally.

Parameters

CFbsBitmap * aMask Mask of a bitmap.

Member Data Documentation

SData iData

SData iData

The menu bar title text.

CGulIcon * iIcon

CGulIcon * iIcon [private]

TInt iPos

TInt iPos

The title s position on the menu bar.

TInt iTitleFlags

TInt iTitleFlags

Flags used internally by the menu bar title.

TInt iWidth

TInt iWidth

The title s width.