CEikMenuBarTitle Class Reference

API published in: S60 1st Ed

Link against: eikcoctl.lib eikcore.lib

Capability Information

Required Capabilities

None


#include <
eikmenub.h>

Detailed Description

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

Public Member Functions

IMPORT_C CEikMenuBarTitle ()
 C++ default constructor.
IMPORT_C ~CEikMenuBarTitle ()
 Destructor.
IMPORT_C void SetIcon (CGulIcon *aIcon)
 Sets the title icon.
IMPORT_C void SetBitmapsOwnedExternally (TBool aOwnedExternally)
 Sets whether the bitmap and mask are owned externally or not.
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.
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.
IMPORT_C void SetIconBitmapL (CFbsBitmap *aBitmap)
 Sets the bitmap for the icon.
IMPORT_C void SetIconMaskL (CFbsBitmap *aMask)
 Sets the bitmap mask for the icon.
IMPORT_C CFbsBitmap * IconBitmap () const
 Gets a pointer to the title icon’s bitmap.
IMPORT_C CFbsBitmap * IconMask () const
 Gets a pointer to the title icon’s bitmap mask.
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.
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.

Data Fields

TInt iPos
 The title’s position on the menu bar.
TInt iWidth
 The title’s width.
SData iData
 The menu bar title text.
TInt iTitleFlags
 Flags used internally by the menu bar title.

Data Structures

struct  SData
 Defines a menu bar. More...

Constructor & Destructor Documentation

IMPORT_C CEikMenuBarTitle::CEikMenuBarTitle  ) 
 

C++ default constructor.

IMPORT_C CEikMenuBarTitle::~CEikMenuBarTitle  ) 
 

Destructor.


Member Function Documentation

void CEikMenuBarTitle::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.

Parameters:
[in,out] aBaseLine Gets result of baseline.
[in,out] aTitleHeight Gets result of height.
IMPORT_C void CEikMenuBarTitle::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.

Parameters:
aBitmap Bitmap.
aMask Mask of the bitmap.
IMPORT_C void CEikMenuBarTitle::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.

Parameters:
aGc Window graphic context.
aRect Rectangle area.
aLeftMargin Left margin.
TInt CEikMenuBarTitle::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:
Value of extra left margin.
IMPORT_C CFbsBitmap* CEikMenuBarTitle::IconBitmap  )  const
 

Gets a pointer to the title icon’s bitmap.

Does not imply transfer of ownership.

Returns:
Pointer to the title icon’s bitmap.
IMPORT_C CFbsBitmap* CEikMenuBarTitle::IconMask  )  const
 

Gets a pointer to the title icon’s bitmap mask.

Does not imply transfer of ownership.

Returns:
Pointer to the title icon’s bitmap mask.
IMPORT_C void CEikMenuBarTitle::SetBitmapsOwnedExternally TBool  aOwnedExternally  ) 
 

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

Parameters:
aOwnedExternally ETrue if bitmaps are set as externally owned. EFalse if bitmaps are set as not being externally owned.
IMPORT_C void CEikMenuBarTitle::SetIcon CGulIcon *  aIcon  ) 
 

Sets the title icon.

Parameters:
aIcon The icon to set.
IMPORT_C void CEikMenuBarTitle::SetIconBitmapL CFbsBitmap *  aBitmap  ) 
 

Sets the bitmap for the icon.

Transfers ownership unless the bitmaps are owned externally.

Parameters:
aBitmap Bitmap
IMPORT_C void CEikMenuBarTitle::SetIconMaskL CFbsBitmap *  aMask  ) 
 

Sets the bitmap mask for the icon.

Transfers ownership unless the bitmaps are owned externally.

Parameters:
aMask Mask of a bitmap.

Field Documentation

SData CEikMenuBarTitle::iData
 

The menu bar title text.

TInt CEikMenuBarTitle::iPos
 

The title’s position on the menu bar.

TInt CEikMenuBarTitle::iTitleFlags
 

Flags used internally by the menu bar title.

TInt CEikMenuBarTitle::iWidth
 

The title’s width.


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

Copyright © Nokia Corporation 2001-2008
Back to top