CEikMenuPaneItem Class Reference

API published in: S60 1st Ed

Link against: eikcoctl.lib eikcore.lib

Capability Information

Required Capabilities

None


#include <eikmenup.h>

Detailed Description

The CEikMenuPaneItem class encapsulates the data needed to define a menu pane item and provides some of the functionality required to display the item.

Public Member Functions

IMPORT_C  CEikMenuPaneItem ()
  C++ default constructor.
IMPORT_C  ~CEikMenuPaneItem ()
  Destructor.
IMPORT_C void  SetIcon (CGulIcon *aIcon)
  Sets a menu item icon.
IMPORT_C void  DrawItemIcon (CWindowGc &aGc, TRect aRect, TBool aDimmed, TInt aBitmapSpaceRequired) const
  Draws the menu item icon.
IMPORT_C void  CreateIconL (CFbsBitmap *aBitmap, CFbsBitmap *aMask)
  Construct an icon from bitmaps.
IMPORT_C CFbsBitmap *  IconBitmap () const
  Gets a pointer to the menu item's icon picture bitmap.
IMPORT_C CFbsBitmap *  IconMask () const
  Gets a pointer to the menu item's icon mask bitmap.
IMPORT_C void  SetBitmapsOwnedExternally (TBool aOwnedExternally)
  Sets icon bitmap ownership.
IMPORT_C void  SetIconBitmapL (CFbsBitmap *aBitmap)
  Sets the picture bitmap.
IMPORT_C void  SetIconMaskL (CFbsBitmap *aMask)
  Sets the mask bitmap.
IMPORT_C TPtrC  ScaleableText () const
  Returns scaleable text.
IMPORT_C void  SetScaleableTextL (const TDesC &aText)
  Sets scaleable text.

Data Fields

TInt  iPos
  The y position of the menu pane item.
TInt  iHotKeyCode
  The menu pane item's hotkey text.
SData  iData
  Information from an SData struct.

Data Structures

struct   SData
  Struct to menu pane item. More...

Constructor & Destructor Documentation

IMPORT_C CEikMenuPaneItem::CEikMenuPaneItem  ) 
 

C++ default constructor.

IMPORT_C CEikMenuPaneItem::~CEikMenuPaneItem  ) 
 

Destructor.


Member Function Documentation

IMPORT_C void CEikMenuPaneItem::CreateIconL CFbsBitmap *  aBitmap,
CFbsBitmap *  aMask
 

Construct an icon from bitmaps.

Constructs a new icon for the menu item, taking ownership of the picture bitmap aBitmap and the mask bitmap aMask unless the bitmaps are externally owned.

Parameters:
aBitmap  Picture bitmap.
aMask  Mask bitmap.
IMPORT_C void CEikMenuPaneItem::DrawItemIcon CWindowGc &  aGc,
TRect  aRect,
TBool  aDimmed,
TInt  aBitmapSpaceRequired
const
 

Draws the menu item icon.

Parameters:
aGc  Graphics context to which the icon is drawn.
aRect  Rectangle in which the icon is drawn.
aDimmed  If ETrue the icon is drawn dimmed.
aBitmapSpaceRequired  Length of one side of the square required to contain the bitmap.
IMPORT_C CFbsBitmap* CEikMenuPaneItem::IconBitmap  )  const
 

Gets a pointer to the menu item's icon picture bitmap.

This does not imply transfer of ownership.

Returns:
Picture bitmap.
IMPORT_C CFbsBitmap* CEikMenuPaneItem::IconMask  )  const
 

Gets a pointer to the menu item's icon mask bitmap.

This does not imply transfer of ownership.

Returns:
Mask bitmap.
IMPORT_C TPtrC CEikMenuPaneItem::ScaleableText  )  const
 

Returns scaleable text.

If there isn't scaleable text available then this method returns iData.iText.

Returns:
Pointer to TPtrC object that contains scaleable text.
IMPORT_C void CEikMenuPaneItem::SetBitmapsOwnedExternally TBool  aOwnedExternally  ) 
 

Sets icon bitmap ownership.

Sets the menu item's icon bitmaps as externally owned if aOwnedExternally is ETrue.

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

Sets a menu item icon.

This replaces any icon already set for the menu item.

Parameters:
aIcon  Menu item icon consisting of a picture bitmap and a mask bitmap.
IMPORT_C void CEikMenuPaneItem::SetIconBitmapL CFbsBitmap *  aBitmap  ) 
 

Sets the picture bitmap.

Transfers ownership unless the bitmaps are already owned externally.

Parameters:
aBitmap  Picture bitmap.
IMPORT_C void CEikMenuPaneItem::SetIconMaskL CFbsBitmap *  aMask  ) 
 

Sets the mask bitmap.

Transfers ownership unless the bitmaps are already owned externally.

Parameters:
aMask  Mask bitmap.
IMPORT_C void CEikMenuPaneItem::SetScaleableTextL const TDesC &  aText  ) 
 

Sets scaleable text.

iData.iText is set to first text version.

Parameters:
aText  Scalable text.

Field Documentation

SData CEikMenuPaneItem::iData
 

Information from an SData struct.

TInt CEikMenuPaneItem::iHotKeyCode
 

The menu pane item's hotkey text.

TInt CEikMenuPaneItem::iPos
 

The y position of the menu pane item.


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

Copyright © Nokia Corporation 2001-2008
Back to top