CEikMenuPane Class Reference

class CEikMenuPane : public CEikBorderedControl

Menu panes are opened by activating the menu title (CEikMenuPaneTitle / MENU_TITLE) which is displayed in the menu bar (CEikMenuBar / MENU_BAR). They can also be cascaded from a menu item (CEikMenuPaneItem / MENU_ITEM) or launched by a menu button (CEikMenuButton).

Menu panes may be defined using a MENU_PANE resource.

Nested Classes and Structures

Public Member Functions
CEikMenuPane(MEikMenuObserver *)
~CEikMenuPane()
voidActivateCurrentItemL()
voidAddCascadeMenuItemsToActionMenuL(TInt, TBool, CAknItemActionMenuData &)
IMPORT_C voidAddMenuItemL(const CEikMenuPaneItem::SData &)
IMPORT_C voidAddMenuItemL(const CEikMenuPaneItem::SData &, TInt)
IMPORT_C voidAddMenuItemsL(TInt, TInt, TBool)
voidAddMenuItemsToItemActionMenuL(CAknItemActionMenuData &)
TBool CancelActiveMenuPane()
IMPORT_C CEikMenuPane *CascadeMenuPane()
IMPORT_C voidClose()
IMPORT_C voidCloseCascadeMenu()
voidCloseCascadeMenu(TBool)
IMPORT_C CCoeControl *ComponentControl(TInt)
IMPORT_C voidConstructL(CEikMenuPane *, MEikMenuObserver *)
IMPORT_C voidConstructMenuSctRowFromDialogL(TDes &, TInt)
IMPORT_C voidConstructMenuSctRowFromDialogL(TInt, TDes &, TInt)
IMPORT_C voidConstructMenuSctRowL(TDes &)
IMPORT_C voidConstructMenuSctRowL(TDes &, TInt)
IMPORT_C TIntCountComponentControls()
IMPORT_C voidDeleteBetweenMenuItems(TInt, TInt)
IMPORT_C voidDeleteMenuItem(TInt)
IMPORT_C voidEnableMarqueeL(const TBool)
voidFilterDimmedItems()
IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &)
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C voidHandleResourceChange(TInt)
IMPORT_C TCoeInputCapabilitiesInputCapabilities()
IMPORT_C voidInsertMenuItemL(const CEikMenuPaneItem::SData &, TInt)
IMPORT_C TBoolIsCascadeMenuPane()
IMPORT_C CEikMenuPaneItem *ItemAndPos(TInt, TInt &)
IMPORT_C CEikMenuPaneItem::SData &ItemData(TInt)
IMPORT_C CEikMenuPaneItem::SData &ItemDataByIndexL(TInt)
IMPORT_C TIntMenuItemCommandId(TInt)
IMPORT_C TBoolMenuItemExists(TInt, TInt &)
IMPORT_C voidMoveHighlightTo(TInt)
IMPORT_C voidNavigateToNextItem()
CEikMenuPane *NewItemCommandMenuL(MEikMenuObserver *)
IMPORT_C TIntNumberOfItemsInPane()
IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode, TBool)
IMPORT_C voidReset()
IMPORT_C TIntSelectedItem()
IMPORT_C voidSetArrowHeadScrollBar(TBool)
voidSetDefaultHighlight()
voidSetEmbeddedCba(CEikCba *)
IMPORT_C voidSetItemArray(CItemArray *)
IMPORT_C voidSetItemArrayOwnedExternally(TBool)
IMPORT_C voidSetItemButtonState(TInt, TInt)
voidSetItemCommandsDimmed()
IMPORT_C voidSetItemDimmed(TInt, TBool)
IMPORT_C voidSetItemSpecific(TInt, TBool)
IMPORT_C voidSetItemTextL(TInt, const TDesC &)
IMPORT_C voidSetItemTextL(TInt, TInt)
IMPORT_C voidSetLaunchingButton(CEikButtonBase *)
IMPORT_C voidSetScrollBarOnLeft(TBool)
IMPORT_C voidSetSelectedItem(TInt)
IMPORT_C voidStartDisplayingMenuPane(const CEikHotKeyTable *, const TPoint &, const CEikMenuPaneTitle *, TInt, TPopupTargetPosType)
Protected Member Functions
IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidDraw(const TRect &)
IMPORT_C voidFocusChanged(TDrawNow)
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
TInt NumberOfItemsThatFitInView()
Private Member Functions
TInt CalculateItemHeight()
TRect CalculateSizeAndPosition()
TRect CalculateSizeAndPositionScalable(const TRect &, TInt)
voidCheckCreateExtensionL()
TBool CheckCreateScroller()
voidCheckCreateScrollerL()
voidCreateIconFromResourceL(TResourceReader &, CEikMenuPaneItem &)
voidCreateItemArrayL()
voidCreateScrollBarFrame()
voidDoLaunchCascadeMenuL(TInt)
voidDoUpdateScrollBarL()
voidDrawItem(TInt, THighlightType)
voidDrawItem(CWindowGc &, TInt, THighlightType)
CEikMenuPaneExtension *Extension()
IMPORT_C void *ExtensionInterface(TUid)
voidHandleScrollEventL(CEikScrollBar *, TEikScrollEvent)
TRect HighlightRect()
TBool IsHotKeyL(const TInt, const TInt)
TBool IsItemMemberOfRadioButtonGroup(TInt)
TBool ItemArrayOwnedExternally()
TRect ItemRect(TInt)
voidLaunchCascadeMenuL(TInt)
voidLoadCascadeBitmapL()
voidLoadCheckMarkBitmapL()
voidLoadRadioButtonBitmapL()
TBool MenuHasCheckBoxOn()
TBool MenuHasIcon()
TBool MoveToItemL(TInt, TInt)
voidPrepareGcForDrawingItems(CGraphicsContext &)
voidPrepareHighlightFrame()
voidRepaintHighlight()
voidReportCanceled()
voidReportSelectionMadeL(TBool)
IMPORT_C voidReserved_1()
IMPORT_C voidReserved_2()
voidResetItemArray()
voidScroll(TInt)
voidScrollToMakeItemVisible(TInt)
voidSetCascadedIconSize()
TInt TotalItemHeight()
voidTryLaunchCascadeMenuL(const CEikMenuPaneItem &)
voidUpdateBackgroundContext(const TRect &)
voidUpdateScrollBar()
TInt UpdateScrollBarCallBackL(TAny *)
voidUpdateScrollBarThumbs()
TRect ViewRect()
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::ActivateL()
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MakeVisible(TBool)
CCoeControl::MaximumWidth()const
CCoeControl::MinimumSize()
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SizeChanged()
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikBorderedControl::WriteInternalStateL(RWriteStream &)const
Private Member Enumerations
enumTHighlightType { ENoHighlight, EDrawHighlight, ERemoveHighlight }
Inherited Enumerations
CCoeControl:TZoomType
Public Member Type Definitions
typedef TBuf< 20 > THotKeyDisplayText
Private Attributes
TBool iAllowPointerUpEvents
TBool iArrayOwnedExternally
TInt iBaseLine
CEikMenuPane *iCascadeMenuPane
MEikMenuObserver *iEditMenuObserver
CEikMenuPaneExtension *iExtension
TInt iFlags
const CEikHotKeyTable *iHotKeyTable
TInt iHotkeyColWidth
CItemArray *iItemArray
TInt iItemHeight
CEikButtonBase *iLaunchingButton
MEikMenuObserver *iMenuObserver
const CEikMenuPaneTitle *iMenuPaneTitle
TInt iNumberOfDragEvents
CEikMenuPane *iOwner
CEikScrollBarFrame *iSBFrame
CMenuScroller *iScroller
TInt iSelectedItem
TInt iSpare
TInt iSubPopupWidth
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder

Constructor & Destructor Documentation

CEikMenuPane(MEikMenuObserver *)

IMPORT_CCEikMenuPane(MEikMenuObserver *aMenuObserver)

C++ default constructor. Constructs a menu pane object with the specified observer.

Parameters

MEikMenuObserver * aMenuObserverMenu observer.

~CEikMenuPane()

IMPORT_C~CEikMenuPane()

Destructor.

Member Functions Documentation

ActivateCurrentItemL()

voidActivateCurrentItemL()

Report that selection was done for the currently highlighted item.

AddCascadeMenuItemsToActionMenuL(TInt, TBool, CAknItemActionMenuData &)

voidAddCascadeMenuItemsToActionMenuL(TIntaCascadeId,
TBoolaItemSpecific,
CAknItemActionMenuData &aMenuData
)

Adds cascade menu items to item action menu data.

Parameters

TInt aCascadeId
TBool aItemSpecific
CAknItemActionMenuData & aMenuData

AddMenuItemL(const CEikMenuPaneItem::SData &)

IMPORT_C voidAddMenuItemL(const CEikMenuPaneItem::SData &aMenuItem)

Adds a menu item dynamically by creating a new menu item, setting its data to aMenuItem and appending it to the pane's menu item array. Updates the menu's scroll bar to take account of the new item.

Parameters

const CEikMenuPaneItem::SData & aMenuItemThe menu item to add. NOTICE that SData is a structure so all fields in it should be set to avoid any unexpected behaviour.

AddMenuItemL(const CEikMenuPaneItem::SData &, TInt)

IMPORT_C voidAddMenuItemL(const CEikMenuPaneItem::SData &aMenuItem,
TIntaPreviousId
)

Adds a menu item dynamically by creating a new menu item, setting its data to aMenuItem and inserting it into the pane's menu item array. Updates the menu's scroll bar to take account of the new item.

Parameters

const CEikMenuPaneItem::SData & aMenuItemThe menu item to add. NOTICE that SData is a structure so all fields in it should be set to avoid any unexpected behaviour.
TInt aPreviousIdThe id of the item after which the new item should be added.

AddMenuItemsL(TInt, TInt, TBool)

IMPORT_C voidAddMenuItemsL(TIntaResourceId,
TIntaPreviousId = 0,
TBoolaAddSeperator = EFalse
)

Adds menu items dynamically by creating new menu items from resource and inserts them into the pane's menu item array.

Parameters

TInt aResourceIdThe ID of the resource for the menu item.
TInt aPreviousId = 0The ID of the previous menu item, after which this newly created item should be added.
TBool aAddSeperator = EFalseShouldn't be used as separator is not not supported anymore.

AddMenuItemsToItemActionMenuL(CAknItemActionMenuData &)

voidAddMenuItemsToItemActionMenuL(CAknItemActionMenuData &aMenuData)

Adds menu items to this menu and item action menu data.

Parameters

CAknItemActionMenuData & aMenuData

CalculateItemHeight()

TInt CalculateItemHeight()const [private]

Calculates the height of menu items.

Item height.

CalculateSizeAndPosition()

TRect CalculateSizeAndPosition()[private]

CalculateSizeAndPositionScalable(const TRect &, TInt)

TRect CalculateSizeAndPositionScalable(const TRect &aWindowRect,
TIntaNumItemsInPane
)[private]

Parameters

const TRect & aWindowRect
TInt aNumItemsInPane

CancelActiveMenuPane()

TBool CancelActiveMenuPane()

Closes cascade menu if there is one and it is active.

CascadeMenuPane()

IMPORT_C CEikMenuPane *CascadeMenuPane()

Gets the menu pane for the cascade menu.

The menu pane for the cascade menu.

CheckCreateExtensionL()

voidCheckCreateExtensionL()[private]

Creates menu pane's extension object if it doesn't exist yet.

CheckCreateScroller()

TBool CheckCreateScroller()[private]

CheckCreateScrollerL()

voidCheckCreateScrollerL()[private]

Close()

IMPORT_C voidClose()

Closes the menu pane.

CloseCascadeMenu()

IMPORT_C voidCloseCascadeMenu()

Closes and destroys any current cascade menu and takes focus back. Does nothing if no cascade menu exists.

CloseCascadeMenu(TBool)

voidCloseCascadeMenu(TBoolaMainMenuClosing)

Closes and destroys any current cascade menu and takes focus back. Does nothing if no cascade menu exists.

Parameters

TBool aMainMenuClosingETrue if main menu is also to be closed.

ComponentControl(TInt)

IMPORT_C CCoeControl *ComponentControl(TIntaIndex)const [virtual]

From CoeControl.

Gets the specified component of a compound control. This function should? be implemented by all compound controls.

Note: Within a compound control, each component control is identified by an index, where the index depends on the order the controls were added: the first is given an index of 0, the next an index of 1, and so on.

The component control with an index of aIndex.

Parameters

TInt aIndexThe index of the control to get.

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[protected, virtual]

From CCoeControl.

Constructs the menu pane using the specified resource reader. Fills the menu item array with the list of menu items provided by the resource file.

leave

KErrNoMemory Memory allocation failure earlier construction.

Parameters

TResourceReader & aReaderThe resource reader to use.

ConstructL(CEikMenuPane *, MEikMenuObserver *)

IMPORT_C voidConstructL(CEikMenuPane *aOwner,
MEikMenuObserver *aEditMenuObserver = NULL
)

Handles 2nd base construction. Completes construction of a menu pane object.

Parameters

CEikMenuPane * aOwnerMenu pane owner ( for cascade menu ).
MEikMenuObserver * aEditMenuObserver = NULLObserver for the edit menu. In default this is NULL.

ConstructMenuSctRowFromDialogL(TDes &, TInt)

IMPORT_C voidConstructMenuSctRowFromDialogL(TDes &aSpecialChars,
TIntaResourceId
)

Creates and enables a special characters row to be used in the edit menu. The special character row is constructed from the given special character dialog.

S60 3.2

Parameters

TDes & aSpecialCharsBuffer that holds the selected characters after user has selected them.
TInt aResourceIdThe special character dialog resource id that contains a special character table

ConstructMenuSctRowFromDialogL(TInt, TDes &, TInt)

IMPORT_C voidConstructMenuSctRowFromDialogL(TIntaCharCase,
TDes &aSpecialChars,
TIntaResourceId
)

Creates and enables a special characters row to be used in the edit menu. The special character row is constructed from the given special character dialog.

S60 3.2

Parameters

TInt aCharCasethe charcase used by menu sct
TDes & aSpecialCharsBuffer that holds the selected characters after user has selected them.
TInt aResourceIdThe special character dialog resource id that contains a special character table

ConstructMenuSctRowL(TDes &)

IMPORT_C voidConstructMenuSctRowL(TDes &aSpecialChars)

Creates and enables a special characters row to be used in the edit menu.

S60 3.1

Parameters

TDes & aSpecialCharsBuffer that holds the selected characters after user has selected them.

ConstructMenuSctRowL(TDes &, TInt)

IMPORT_C voidConstructMenuSctRowL(TDes &aSpecialChars,
TIntaResourceId
)

Creates and enables a special characters row to be used in the edit menu. The special character row is constructed from the given special character table.

S60 3.1

Parameters

TDes & aSpecialCharsBuffer that holds the selected characters after user has selected them.
TInt aResourceIdThe special character table resource id to define the characters in the row.

CountComponentControls()

IMPORT_C TIntCountComponentControls()const [virtual]

From CoeControl.

Gets the number of controls contained in a compound control. This function should be implemented by all compound controls.

Note: In SDK 6.1 this was changed from protected to public.

The number of component controls contained by this control.

CreateIconFromResourceL(TResourceReader &, CEikMenuPaneItem &)

voidCreateIconFromResourceL(TResourceReader &aReader,
CEikMenuPaneItem &aItem
)const [private]

Parameters

TResourceReader & aReader
CEikMenuPaneItem & aItem

CreateItemArrayL()

voidCreateItemArrayL()[private]

CreateScrollBarFrame()

voidCreateScrollBarFrame()[private]

DeleteBetweenMenuItems(TInt, TInt)

IMPORT_C voidDeleteBetweenMenuItems(TIntaStartIndex,
TIntaEndIndex
)

Deletes the items between specified items.

Parameters

TInt aStartIndexThe index of the item after which items should be deleted.
TInt aEndIndexThe index of the item up to which items should be deleted.

DeleteMenuItem(TInt)

IMPORT_C voidDeleteMenuItem(TIntaCommandId)

Deletes the specified item in the menu pane.

Parameters

TInt aCommandIdThe ID for the item to be deleted.

DoLaunchCascadeMenuL(TInt)

voidDoLaunchCascadeMenuL(TIntaCascadeMenuId)[private]

Parameters

TInt aCascadeMenuId

DoUpdateScrollBarL()

voidDoUpdateScrollBarL()[private]

Draw(const TRect &)

IMPORT_C voidDraw(const TRect &aRect)const [protected, virtual]

From CCoeControl

Draw a control called by window server.

All controls, except blank controls, should implement this function. The default implementation draws a blank control. This function is used for window server-initiated redrawing of controls, and for some application-initiated drawing. It should be implemented by each control, but is only called from within CCoeControl's member functions, and not from the derived class. For this reason it is a private member function of CCoeControl.

The rectangle aRect indicates the region of the control that needs to be redrawn. The implementation of Draw() must always draw to every pixel within this rectangle.

Parameters

const TRect & aRectThe region of the control to be redrawn. Co-ordinates are relative to the control's origin (top left corner). Optional, not used currently.

DrawItem(TInt, THighlightType)

voidDrawItem(TIntaItem,
THighlightTypeaHighlight
)const [private]

Parameters

TInt aItem
THighlightType aHighlight

DrawItem(CWindowGc &, TInt, THighlightType)

voidDrawItem(CWindowGc &aGc,
TIntaItem,
THighlightTypeaHighlight
)const [private]

Parameters

CWindowGc & aGc
TInt aItem
THighlightType aHighlight

EnableMarqueeL(const TBool)

IMPORT_C voidEnableMarqueeL(const TBoolaEnable)

Enables or disables text scrolling functionality. It is disabled by default.

Parameters

const TBool aEnableETrue to enable text scrolling functionality.

Extension()

CEikMenuPaneExtension *Extension()const [private]

ExtensionInterface(TUid)

IMPORT_C void *ExtensionInterface(TUidaInterface)[private, virtual]

Not implemented.

NULL

Parameters

TUid aInterface

FilterDimmedItems()

voidFilterDimmedItems()

Deletes dimmed items from the menu item array.

FocusChanged(TDrawNow)

IMPORT_C voidFocusChanged(TDrawNowaDrawNow)[protected, virtual]

From CCoeControl.

Takes any action required when the menu pane gains or loses focus, to change its appearance for example.

Parameters

TDrawNow aDrawNowIf EDrawNow the menu pane is redrawn. If ENoDrawNow the menu pane is not redrawn.

GetColorUseListL(CArrayFix< TCoeColorUse > &)

IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList)const [virtual]

From CcoeControl.

Gets the list of logical colours employed in the drawing of the control, paired with an explanation of how they are used. Appends the list into aColorUseList.

005u

Parameters

CArrayFix< TCoeColorUse > & aColorUseListThe list of colours paired with explanations.

HandlePointerEventL(const TPointerEvent &)

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CcoeControl.

Handles a pointer event on the menu.

Parameters

const TPointerEvent & aPointerEventThe pointer event to handle.

HandleResourceChange(TInt)

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

From CcoeControl.

Handles a change to the menu's resources which are shared across the environment. For example, colours or fonts.

005u

Parameters

TInt aTypeThe type of resource that has changed.

HandleScrollEventL(CEikScrollBar *, TEikScrollEvent)

voidHandleScrollEventL(CEikScrollBar *aScrollBar,
TEikScrollEventaEventType
)[private]

Parameters

CEikScrollBar * aScrollBar
TEikScrollEvent aEventType

HighlightRect()

TRect HighlightRect()const [private]

InputCapabilities()

IMPORT_C TCoeInputCapabilitiesInputCapabilities()const [virtual]

From CCoeControl.

Gets the list box s input capabilities as set through the list box flags.

List box input capabilities.

InsertMenuItemL(const CEikMenuPaneItem::SData &, TInt)

IMPORT_C voidInsertMenuItemL(const CEikMenuPaneItem::SData &aMenuItem,
TIntaPosition
)

Inserts the menu item to the specified position.

Parameters

const CEikMenuPaneItem::SData & aMenuItemThe menu item to add. NOTICE SData is the structure and all fileds should be initialized.
TInt aPositionThe position of newly created item in the array.

IsCascadeMenuPane()

IMPORT_C TBoolIsCascadeMenuPane()const

Checks whether the menu pane is a cascade menu or a main menu.

ETrue if the menu pane is cascade menu and EFalse if the menu pane is the main menu.

IsHotKeyL(const TInt, const TInt)

TBool IsHotKeyL(const TIntmodifiers,
const TIntaCode
)[private]

Parameters

const TInt modifiers
const TInt aCode

IsItemMemberOfRadioButtonGroup(TInt)

TBool IsItemMemberOfRadioButtonGroup(TIntaItem)const [private]

Parameters

TInt aItem

ItemAndPos(TInt, TInt &)

IMPORT_C CEikMenuPaneItem *ItemAndPos(TIntaCommandId,
TInt &aPos
)

Gets a pointer to the specified menu item. Also gets the position of the item within the menu pane. Panics if there are no menu items in the menu pane. Panics if the menu pane id does not identify any menu pane item in the array.

A pointer to the menu item.

panic

EEikPanicNoSuchMenuItem Panics if there are no menu items in the menu pane or if the menu pane id does not identify any menu pane item in the array.

Parameters

TInt aCommandIdThe ID of the menu item for which a pointer is returned.
TInt & aPosOn return, the position of the menu item with an ID of aCommandId.

ItemArrayOwnedExternally()

TBool ItemArrayOwnedExternally()const [private]

ItemData(TInt)

IMPORT_C CEikMenuPaneItem::SData &ItemData(TIntaCommandId)

Gets a reference to the data in the specified menu item.

Reference to struct that contains command id.

Parameters

TInt aCommandIdThe command ID of the menu item for which data is obtained.

ItemDataByIndexL(TInt)

IMPORT_C CEikMenuPaneItem::SData &ItemDataByIndexL(TIntaItemIndex)

Gets a reference to the data in the specified menu item.

S60 3.1

The menu item's data.

leave

KErrArgument Wrong .

Parameters

TInt aItemIndexThe index of the item in the items array.

ItemRect(TInt)

TRect ItemRect(TIntaItemIndex)const [private]

Calculates the rectangle occupied by an item.

Item's rectangle.

Parameters

TInt aItemIndexItem's index.

LaunchCascadeMenuL(TInt)

voidLaunchCascadeMenuL(TIntaCascadeMenuId)[private]

Parameters

TInt aCascadeMenuId

LoadCascadeBitmapL()

voidLoadCascadeBitmapL()[private]

LoadCheckMarkBitmapL()

voidLoadCheckMarkBitmapL()[private]

LoadRadioButtonBitmapL()

voidLoadRadioButtonBitmapL()[private]

MenuHasCheckBoxOn()

TBool MenuHasCheckBoxOn()const [private]

MenuHasIcon()

TBool MenuHasIcon()const [private]

MenuItemCommandId(TInt)

IMPORT_C TIntMenuItemCommandId(TIntaIndex)const

Returns the command id of the specified menu item. The function panics if aIndex doesn't exist or is out of range. 3.1

Parameters

TInt aIndexThe index of the menu item for which the command ID is returned.

MenuItemExists(TInt, TInt &)

IMPORT_C TBoolMenuItemExists(TIntaCommandId,
TInt &aPosition
)

Checks whether menu pane contains the menu item and returns position of it if the item is found.

ETrue if item was found. Otherwise EFalse.

Parameters

TInt aCommandIdThe command ID of the item to be searched for.
TInt & aPositionOn return contains position of the item.

MopSupplyObject(TTypeUid)

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected]

From CCoeControl.

Retrieves an object of the same type as that encapsulated in aId. Other than in the case where NULL is returned, the object returned must be of the same object type - that is, the ETypeId member of the object pointed to by the pointer returned by this function must be equal to the iUid member of aId.

SDK 7.0s

Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.

Parameters

TTypeUid aIdAn encapsulated object type ID.

MoveHighlightTo(TInt)

IMPORT_C voidMoveHighlightTo(TIntaNewSelectedItem)

Moves the menu pane highlight to a newly selected menu item identified by aNewSelectedItem. Scrolls the menu to show the new selected item if necessary and redraws only the newly selected item and the currently selected item if possible.

Parameters

TInt aNewSelectedItemThe newly selected menu item index.

MoveToItemL(TInt, TInt)

TBool MoveToItemL(TIntaCode,
TIntaModifiers
)[private]

Parameters

TInt aCode
TInt aModifiers

NavigateToNextItem()

IMPORT_C voidNavigateToNextItem()

Moves highlight to the next item or to the first one if last item is selected.

NewItemCommandMenuL(MEikMenuObserver *)

CEikMenuPane *NewItemCommandMenuL(MEikMenuObserver *aObserver)[static]

Symbian two-phased constructor for menu panes that are created for item specific menus.

Parameters

MEikMenuObserver * aObserver

NumberOfItemsInPane()

IMPORT_C TIntNumberOfItemsInPane()const

Gets the number of menu items within the menu pane.

Number of menu items within menu pane.

NumberOfItemsThatFitInView()

TInt NumberOfItemsThatFitInView()const [protected]

Gets the maximum number of items which can be seen simultaneously.

The maximum number of items which can be seen simultaneously.

OfferKeyEventL(const TKeyEvent &, TEventCode)

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

From CcoeControl.

Handles key events offered to the menu by the control environment and provides an appropriate implementation of CCoeControl::OfferKeyEventL().

Parameters

const TKeyEvent & aKeyEventThe key event.
TEventCode aTypeThe type of key event: EEventKey, EEventKeyUp or EEventKeyDown.

OfferKeyEventL(const TKeyEvent &, TEventCode, TBool)

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType,
TBoolaConsumeAllKeys
)

From @ CCoeControl

Handles key events offered to the menu by the control environment.

Platform 004.

Parameters

const TKeyEvent & aKeyEventThe key event.
TEventCode aTypeThe type of key event: EEventKey, EEventKeyUp or EEventKeyDown.
TBool aConsumeAllKeysIf ETrue this function returns EKeyWasConsumed regardless of whether it was used. If EFalse the key event is consumed if possible and either EKeyWasConsumed or EKeyWasNotConsumed is returned as appropriate.

PrepareGcForDrawingItems(CGraphicsContext &)

voidPrepareGcForDrawingItems(CGraphicsContext &aGc)const [private]

Parameters

CGraphicsContext & aGc

PrepareHighlightFrame()

voidPrepareHighlightFrame()const [private]

RepaintHighlight()

voidRepaintHighlight()const [private]

ReportCanceled()

voidReportCanceled()[private]

ReportSelectionMadeL(TBool)

voidReportSelectionMadeL(TBoolaAbortTransition = ETrue)[private]

Parameters

TBool aAbortTransition = ETrue

Reserved_1()

IMPORT_C voidReserved_1()[private]

Reserved_2()

IMPORT_C voidReserved_2()[private, virtual]

Reset()

IMPORT_C voidReset()

Destroys the menu pane's item array.

ResetItemArray()

voidResetItemArray()[private]

Scroll(TInt)

voidScroll(TIntaAmount)[private]

Parameters

TInt aAmount

ScrollToMakeItemVisible(TInt)

voidScrollToMakeItemVisible(TIntaItemIndex)[private]

Parameters

TInt aItemIndex

SelectedItem()

IMPORT_C TIntSelectedItem()const

Gets the position of the selected menu item.

The position of the selected menu item.

SetArrowHeadScrollBar(TBool)

IMPORT_C voidSetArrowHeadScrollBar(TBoolaArrowHead)

Sets whether the menu pane uses an arrow head scroll bar.

Parameters

TBool aArrowHeadIf ETrue the menu pane uses an arrow head scroll bar.

SetCascadedIconSize()

voidSetCascadedIconSize()const [private]

SetDefaultHighlight()

voidSetDefaultHighlight()

Enables the default highlight in menu

SetEmbeddedCba(CEikCba *)

voidSetEmbeddedCba(CEikCba *aCba)

Sets the embedded cba to options menu

S60 v5.2

Parameters

CEikCba * aCbaCba to embed to menu

SetItemArray(CItemArray *)

IMPORT_C voidSetItemArray(CItemArray *aItemArray)

Sets the array containing the list of menu items for the current menu pane.

Parameters

CItemArray * aItemArrayThe menu item array for the menu pane.

SetItemArrayOwnedExternally(TBool)

IMPORT_C voidSetItemArrayOwnedExternally(TBoolaOwnedExternally)

Set menu item array ownership.

Parameters

TBool aOwnedExternallyIf ETrue the menu pane's menu item array is set as externally owned. If EFalse the menu pane's menu item array is set as not externally owned.

SetItemButtonState(TInt, TInt)

IMPORT_C voidSetItemButtonState(TIntaCommandId,
TIntaButtonState
)

Sets the item to be indicated or not. It should be used to change the state of radio buttons or check box items. It has real effect only starting from S60 v3.0.

Parameters

TInt aCommandIdThe command (as defined in an .hrh file) associated with this menu item. This identifies the menu item for which the state is set or unset.
TInt aButtonStateshould be EEikMenuItemSymbolOn or EEikMenuItemSymbolIndeterminate

SetItemCommandsDimmed()

voidSetItemCommandsDimmed()

Sets item specific commands dimmed.

SetItemDimmed(TInt, TBool)

IMPORT_C voidSetItemDimmed(TIntaCommandId,
TBoolaDimmed
)

Dims (greys out) or undims a menu item. Dimming indicates that user input is not accepted.

Parameters

TInt aCommandIdThe command (as defined in an .hrh file) associated with this menu item. This identifies the menu item whose text is to be dimmed or un-dimmed.
TBool aDimmedETrue to dim this menu item. EFalse to un-dim this menu item.

SetItemSpecific(TInt, TBool)

IMPORT_C voidSetItemSpecific(TIntaCommandId,
TBoolaItemSpecific
)

Sets menu item as item specific command.

Parameters

TInt aCommandIdThe command associated with this menu item.
TBool aItemSpecificETrue to define the menu item item specific, EFalse otherwise.

SetItemTextL(TInt, const TDesC &)

IMPORT_C voidSetItemTextL(TIntaCommandId,
const TDesC &aDes
)

Sets the text in a menu item.

Parameters

TInt aCommandIdThe command (as defined in an .hrh file) associated with this menu item. This identifies the menu item whose text is to be set.
const TDesC & aDesNew item text.

SetItemTextL(TInt, TInt)

IMPORT_C voidSetItemTextL(TIntaCommandId,
TIntaRid
)

Sets the text in a menu item from resource.

Parameters

TInt aCommandIdThe command (as defined in an .hrh file) associated with this menu item. This identifies the menu item whose text is to be set.
TInt aRidThe resource ID of the menu item text.

SetLaunchingButton(CEikButtonBase *)

IMPORT_C voidSetLaunchingButton(CEikButtonBase *aButton)

Sets the specified button to launch the menu pane. Doesn't have any effect in current implementation.

Parameters

CEikButtonBase * aButtonThe button to set as launching the menu.

SetScrollBarOnLeft(TBool)

IMPORT_C voidSetScrollBarOnLeft(TBoolaOnLeft)

Sets whether the scroll bar occupies the left side of the menu pane.

Parameters

TBool aOnLeftIf ETrue the scroll bar will occupy the left side of the menu pane.

SetSelectedItem(TInt)

IMPORT_C voidSetSelectedItem(TIntaSelectedItem)

Sets the selected menu item.

Parameters

TInt aSelectedItemThe index of the item to get selected

StartDisplayingMenuPane(const CEikHotKeyTable *, const TPoint &, const CEikMenuPaneTitle *, TInt, TPopupTargetPosType)

IMPORT_C voidStartDisplayingMenuPane(const CEikHotKeyTable *aHotKeyTable,
const TPoint &aTargetPos,
const CEikMenuPaneTitle *aMenuPaneTitle,
TIntaMinWidth,
TPopupTargetPosTypeaTargetType = EPopupTargetTopLeft
)

Displays the menu pane with the corner identified by aTargetType in the position specified by aTargetPos. This function uses aMinTitleWidth to calculate the area required to display the menu pane, taking into account whether the menu is a cascading menu or popup menu.

Parameters

const CEikHotKeyTable * aHotKeyTableOptional hotkey table.
const TPoint & aTargetPosPosition of the corner of the menu pane identified by aTargetType.
const CEikMenuPaneTitle * aMenuPaneTitleThe menu pane's title.
TInt aMinWidthMinimum width of the menu's title.
TPopupTargetPosType aTargetType = EPopupTargetTopLeftThe corner of the menu pane to which aTargetPos relates. The default is the top left corner. Possible: EPopupTargetTopLeft, EPopupTargetTopRight, , EPopupTargetBottomRight.

TotalItemHeight()

TInt TotalItemHeight()const [private]

TryLaunchCascadeMenuL(const CEikMenuPaneItem &)

voidTryLaunchCascadeMenuL(const CEikMenuPaneItem &aItem)[private]

Parameters

const CEikMenuPaneItem & aItem

UpdateBackgroundContext(const TRect &)

voidUpdateBackgroundContext(const TRect &aWindowRect)[private]

Parameters

const TRect & aWindowRect

UpdateScrollBar()

voidUpdateScrollBar()[private]

UpdateScrollBarCallBackL(TAny *)

TInt UpdateScrollBarCallBackL(TAny *aObj)[private, static]

Parameters

TAny * aObj

UpdateScrollBarThumbs()

voidUpdateScrollBarThumbs()[private]

ViewRect()

TRect ViewRect()const [private]

Member Enumerations Documentation

Enum THighlightType

Enumerators

ENoHighlight
EDrawHighlight
ERemoveHighlight

Member Type Definitions Documentation

Typedef THotKeyDisplayText

typedef TBuf< 20 >THotKeyDisplayText

The text to be displayed for a hotkey.

Member Data Documentation

TBool iAllowPointerUpEvents

TBool iAllowPointerUpEvents[private]

TBool iArrayOwnedExternally

TBool iArrayOwnedExternally[private]

TInt iBaseLine

TInt iBaseLine[private]

CEikMenuPane * iCascadeMenuPane

CEikMenuPane *iCascadeMenuPane[private]

MEikMenuObserver * iEditMenuObserver

MEikMenuObserver *iEditMenuObserver[private]

CEikMenuPaneExtension * iExtension

CEikMenuPaneExtension *iExtension[private]

TInt iFlags

TInt iFlags[private]

const CEikHotKeyTable * iHotKeyTable

const CEikHotKeyTable *iHotKeyTable[private]

TInt iHotkeyColWidth

TInt iHotkeyColWidth[private]

CItemArray * iItemArray

CItemArray *iItemArray[private]

TInt iItemHeight

TInt iItemHeight[private]

CEikButtonBase * iLaunchingButton

CEikButtonBase *iLaunchingButton[private]

MEikMenuObserver * iMenuObserver

MEikMenuObserver *iMenuObserver[private]

const CEikMenuPaneTitle * iMenuPaneTitle

const CEikMenuPaneTitle *iMenuPaneTitle[private]

TInt iNumberOfDragEvents

TInt iNumberOfDragEvents[private]

CEikMenuPane * iOwner

CEikMenuPane *iOwner[private]

CEikScrollBarFrame * iSBFrame

CEikScrollBarFrame *iSBFrame[private]

CMenuScroller * iScroller

CMenuScroller *iScroller[private]

TInt iSelectedItem

TInt iSelectedItem[private]

TInt iSpare

TInt iSpare[private]

TInt iSubPopupWidth

TInt iSubPopupWidth[private]