Location:
eikmenub.h
Link against: eikcoctl.lib
CEikMenuBar
Supported from 6.0
Menu bar.
Menu
bars are constructed from MENU_BAR
resources and issue
application commands which should be handled by overriding
CEikAppUi::HandleCommandL()
.
|
Defined in CEikMenuBar
:
CEikMenuBar()
, CTitleArray
, ChangeMenuBarL()
, ConstructFromResourceL()
, ConstructL()
, DrawItem()
, FindCommandIdInResourceL()
, GetColorUseListL()
, HandlePointerEventL()
, HandleResourceChange()
, HotKeyTable()
, MenuBarObserver()
, MoveHighlightToL()
, ReduceRect()
, SCursor
, SelectedItem()
, SelectedTitle()
, SetHotKeyTable()
, SetMenuCursor()
, SetMenuTitleArray()
, SetMenuTitleResourceId()
, SetTitleArrayOwnedExternally()
, SetTitleDimmed()
, SetTitleL()
, StopDisplayingMenuBar()
, TryDisplayMenuBarL()
, UseSmallAdornments()
, ~CEikMenuBar()
Inherited from CBase
:
operator new()
Inherited from CCoeControl
:
ActivateGc()
,
ActivateL()
,
BackedUpWindow()
,
CapturesPointer()
,
ClaimPointerGrab()
,
CloseWindow()
,
ComponentControl()
,
ControlContext()
,
ControlEnv()
,
CopyControlContextFrom()
,
CountComponentControls()
,
CreateBackedUpWindowL()
,
CreateWindowL()
,
DeactivateGc()
,
DrawDeferred()
,
DrawNow()
,
DrawableWindow()
,
EnableDragEvents()
,
FocusChanged()
,
GetColor()
,
GetHelpContext()
,
GrabbingComponent()
,
HandleComponentControlsResourceChange()
,
HandlePointerBufferReadyL()
,
HandleRedrawEvent()
,
IgnoreEventsUntilNextPointerUp()
,
Index()
,
InputCapabilities()
,
IsActivated()
,
IsBackedUp()
,
IsBeingDestroyed()
,
IsBlank()
,
IsDimmed()
,
IsFocused()
,
IsNonFocusing()
,
IsReadyToDraw()
,
IsVisible()
,
MakeVisible()
,
MinimumSize()
,
Observer()
,
OfferKeyEventL()
,
OverrideColorL()
,
OwnsWindow()
,
Position()
,
PositionChanged()
,
PositionRelativeToScreen()
,
PrepareForFocusGainL()
,
PrepareForFocusLossL()
,
Rect()
,
RecursivelyMergedInputCapabilities()
,
ReportEventL()
,
ResetGc()
,
SetAllowStrayPointers()
,
SetBlank()
,
SetCanDrawOutsideRect()
,
SetComponentsToInheritVisibility()
,
SetContainerWindow()
,
SetContainerWindowL()
,
SetControlContext()
,
SetCornerAndSize()
,
SetCornerAndSizeL()
,
SetDimmed()
,
SetExtent()
,
SetExtentL()
,
SetExtentToWholeScreen()
,
SetExtentToWholeScreenL()
,
SetFocus()
,
SetFocusing()
,
SetGloballyCapturing()
,
SetNeighbor()
,
SetNonFocusing()
,
SetObserver()
,
SetPointerCapture()
,
SetPosition()
,
SetRect()
,
SetRectL()
,
SetSize()
,
SetSizeL()
,
SetSizeWithoutNotification()
,
SetSizeWithoutNotificationL()
,
Size()
,
SizeChanged()
,
SizeChangedL()
,
SystemGc()
,
Window()
Inherited from CEikBorderedControl
:
Border()
,
Draw()
,
HasBorder()
,
SetAdjacent()
,
SetBorder()
,
iBorder
void ConstructL(MEikMenuObserver* aMenuObserver,TInt aHotKeyResourceId=0,TInt aMenuTitleResourceId=0);
Allocates and constructs a menu bar. This constructor sets an observer for the menu, optionally creates a hot key table, creates a menu title array and an array to hold menu positions.
|
void ConstructFromResourceL(TResourceReader& aReader);
Constructs a menu bar using the specified resource reader.
|
~CEikMenuBar();
Destructor. Removes everything associated with the menu bar, except the array holding menu titles if it is externally owned.
void ChangeMenuBarL(TInt aHotKeyResourceId=0,TInt aMenuTitleResourceId=0,TInt aDisplayNow=ETrue);
Dynamically changes a menu bar to use another resource. The
menu bar and its relative menu pane is automatically displayed if
EDisplayNow
is ETrue
.
|
void SetTitleL(const TDesC& aText, TInt aResourceId, CGulIcon* aIcon = NULL);
Sets the text and optionally icon for the specified title.
|
void SetTitleArrayOwnedExternally(TBool aOwnedExternally);
Sets the title array as externally owned. Sets the menu bar
title array as externally owned if aOwnedExternally
is
ETrue
.
|
CEikHotKeyTable* SetHotKeyTable(CEikHotKeyTable* aHotKeyTable);
Sets the hot key table.
|
SCursor SetMenuCursor(const SCursor& aCursor);
Sets the cursor to the specifed menu pane and menu item.
|
|
void SetMenuTitleArray(CTitleArray* aTitleArray);
Sets the menu title array. Removes the current array if it is not externally owned.
|
void SetMenuTitleResourceId(TInt aMenuTitleResourceId);
Sets the menu’s resource ID.
|
inline TBool UseSmallAdornments() const;
Tests whether the smallest possible spacing is being used by the menu bar.
|
void DrawItem(TInt aItem) const;
Draws the specified menu bar title.
|
void MoveHighlightToL(TInt aNewSelectedTitle,TInt aNewSelectedItem);
Highlights the specified item. The
aNewSelectedTitle
value identifies the new title bar to highlight.
While aNewSelectedItem
, if specified, is used to identify the a
menu pane item to highlight.
This function also redraws any previously highlighted item so
that it is no longer highlighted. If the specified item is dimmed, and so
cannot accept input, this function calls
HandleAttemptDimmedSelectionL()
on the menu’s
observer.
|
void ReduceRect(TRect& aRect) const;
If the menu bar is visible, removes the menu bar height from the top of aRect
and returns the new rectangle in a new value of aRect
.
|
void SetTitleDimmed(TInt aTitleIndex, TBool aTitleDimmed);
Sets the specified title’s dim state. Dimming usually indicates that user-input cannot be accepted.
|
void StopDisplayingMenuBar();
Stops displaying the menu bar.
This function causes the menu bar to disappear from the screen until it is invoked again by the user. In most circumstances this is done by the Uikon framework, so an application program will not normally need to use this function.
void TryDisplayMenuBarL();
Displays the menu bar. If the menu is not already displayed, this function displays the menu bar and allows the user to make a selection. In most circumstances this is done by the Uikon framework, so an application program will not normally need to use this function.
void FindCommandIdInResourceL(TInt aCommandId,TInt& aPaneindex,TInt& aItemindex);
Searches for the menu item that corresponds to the specified command.
|
virtual void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const;
Gets a list of logical colours used in the control, paired with
an explanation of how they are used. Appends the list to
aColorUseList
.
|
CEikHotKeyTable* HotKeyTable() const;
Gets a pointer to the menu’s hot key table.
|
MEikMenuObserver* MenuBarObserver() const;
Gets a pointer to the menu’s observer.
|
TInt SelectedItem();
Gets the index of the menu item selected by the cursor.
|
TInt SelectedTitle();
Gets the index of the menu pane selected by the cursor.
|
void HandlePointerEventL(const TPointerEvent& aPointerEvent);
Handles a pointer event on the menu.
|
virtual void HandleResourceChange(TInt aType);
Handles a change to the menu's resources which are shared across the environment. For example, colours or fonts.
|
SCursor
Specifies a menu item within a menu pane.
Defined in CEikMenuBar::SCursor
:
iMenuItemIndex
, iMenuPaneIndex
iMenuItemIndex
TInt iMenuItemIndex
Index of an item in a menu pane.
iMenuPaneIndex
TInt iMenuPaneIndex
Index of a title in the menu bar.
CTitleArray
This class enables construction, and destruction of an array of information about menu bar titles.
|
Defined in CEikMenuBar::CTitleArray
:
CTitleArray()
, ~CTitleArray()
Inherited from CArrayFix
:
AppendL()
,
AppendL()Append
,
Array()
,
At()
,
Back()
,
End()
,
ExpandL()
,
ExtendL()
,
Find()
,
FindIsq()
,
InsertIsqAllowDuplicatesL()
,
InsertIsqL()
,
InsertL()
,
ResizeL()
,
operator[]
Inherited from CArrayFixBase
:
Compress()
,
Count()
,
Delete()
,
Length()
,
Reset()
,
Sort()
Inherited from CArrayPtr
:
ResetAndDestroy()
Inherited from CArrayPtrFlat
:
SetReserveL()
Inherited from CBase
:
operator new()
~CTitleArray();
Destructor. This also destroys all menu bar titles.