|
|
|||
Location:
EIKMENUP.H
Link against: eikcoctl.lib
class CEikMenuPane : public CEikBorderedControl;
A menu pane.
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.
MEikBorderedControl - Interface for bordered controlsMObjectProvider - An interface that allows an object to be part of a network of object providersCBase - Base class for all classes to be instantiated on the heapCCoeControl - Control base class from which all other controls are derivedCEikBorderedControl - A control which is drawn surrounded by a rectangular borderCEikMenuPane - A menu paneDefined in CEikMenuPane:
ActivateL(), AddMenuItemL(), AddMenuItemL(), CEikMenuPane(), CItemArray, Close(), CloseCascadeMenu(), ConstructFromResourceL(), ConstructL(), DeleteMenuItem(), Draw(), ENoSeparators, EUseGroupIdSeparator, EUseTypeSeparator, FocusChanged(), GetColorUseListL(), HandlePointerEventL(), HandleResourceChange(), InputCapabilities(), InsertMenuItemAtL(), InsertMenuItemAtL(), ItemAndPos(), ItemArray(), ItemData(), Margins(), MenuItemCascadeId(), MenuItemCommandId(), MenuItemIndex(), MinimumSize(), MoveHighlightTo(), NumberOfItemsInPane(), OfferKeyEventL(), OfferKeyEventL(), PopulateMenuPaneL(), Reset(), SelectedItem(), SetArrowHeadScrollBar(), SetItemArray(), SetItemArrayOwnedExternally(), SetItemButtonState(), SetItemDimmed(), SetItemTextL(), SetItemTextL(), SetLaunchingButton(), SetMargins(), SetMenuCascadeObserver(), SetScrollBarOnLeft(), SetSelectedItem(), StartDisplayingMenuPane(), THotKeyDisplayText, TItemAttributes, TPopulationFlags, ViewRect(), WriteInternalStateL(), ~CEikMenuPane()
Inherited from CBase:
Delete(),
Extension_(),
operator new()
Inherited from CCoeControl:
AccumulatedZoom(),
ActivateGc(),
BackedUpWindow(),
Background(),
CapturesPointer(),
ClaimPointerGrab(),
CloseWindow(),
Components(),
ControlContext(),
ControlEnv(),
CopyControlContextFrom(),
CreateBackedUpWindowL(),
CreateWindowL(),
DeactivateGc(),
DrawBackground(),
DrawDeferred(),
DrawForeground(),
DrawNow(),
DrawableWindow(),
EAbsoluteZoom,
ERelativeZoom,
EnableDragEvents(),
FindBackground(),
FindFontProvider(),
GetColor(),
GetGc(),
GrabbingComponent(),
HandleComponentControlsResourceChange(),
HandleRedrawEvent(),
HitTest(),
IgnoreEventsUntilNextPointerUp(),
Index(),
InitComponentArrayL(),
IsActivated(),
IsBackedUp(),
IsBeingDestroyed(),
IsBlank(),
IsDimmed(),
IsFocused(),
IsNonFocusing(),
IsReadyToDraw(),
IsVisible(),
LayoutManager(),
MaximumWidth(),
Observer(),
OverrideColorL(),
OwnsWindow(),
Parent(),
Position(),
PositionRelativeToScreen(),
Rect(),
RecursivelyMergedInputCapabilities(),
ReportEventL(),
Reserved_CCoeControl_10(),
Reserved_CCoeControl_11(),
Reserved_CCoeControl_12(),
Reserved_CCoeControl_13(),
ResetGc(),
ScreenFont(),
SetAllowStrayPointers(),
SetBackground(),
SetBlank(),
SetCanDrawOutsideRect(),
SetComponentsToInheritVisibility(),
SetControlContext(),
SetCornerAndSize(),
SetExtent(),
SetExtentToWholeScreen(),
SetFocus(),
SetFocusing(),
SetFontProviderL(),
SetGc(),
SetGloballyCapturing(),
SetHitTest(),
SetMaximumWidth(),
SetMopParent(),
SetNonFocusing(),
SetObserver(),
SetPointerCapture(),
SetPosition(),
SetRect(),
SetSize(),
SetSizeWithoutNotification(),
SetUniqueHandle(),
SetZoomFactorL(),
Size(),
SystemGc(),
TZoomType,
TextDrawer(),
UniqueHandle(),
Window(),
ZoomWithType(),
iCoeEnv,
iContext,
iPosition,
iSize
Inherited from CEikBorderedControl:
Border(),
ComponentControl(),
CountComponentControls(),
GetHelpContext(),
HandleControlArrayEventL(),
HandlePointerBufferReadyL(),
HasBorder(),
MakeVisible(),
MopSupplyObject(),
PositionChanged(),
PrepareForFocusGainL(),
PrepareForFocusLossL(),
RequestRelayout(),
SetAdjacent(),
SetBorder(),
SetContainerWindowL(),
SetDimmed(),
SetLayoutManagerL(),
SetNeighbor(),
SetParent(),
SetTextBaselineSpacing(),
SizeChanged(),
TextBaselineOffset(),
iBorder
Inherited from MEikBorderedControl:
ETypeId,
anonymous
Inherited from MObjectProvider:
MopGetObject(),
MopGetObjectNoChaining()
IMPORT_C ~CEikMenuPane();
Destructs the menu pane and any associated resources, unless they are externally owned.
IMPORT_C CEikMenuPane(MEikMenuObserver *aMenuObserver);
Constructs a menu pane object with the specified observer.
|
IMPORT_C void ConstructL(CEikMenuPane *aOwner, MEikMenuCascadeObserver *aMenuCascadeObserver=0);
Completes construction of a menu pane object.
This is where a menu is the owner of a cascade menu. See also ConstructFromResourceL() .
|
virtual IMPORT_C void ActivateL();
Activates the menu pane control and makes sure that the selected item is visible. It may also activate and draw its relative menu pane title. This function won't leave since the menu pane and menu pane title don't use the backup window.
virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
Handles key events offered to the menu by the control environment and provides an appropriate implementation of CCoeControl::OfferKeyEventL() .
|
|
virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);
Handles a pointer event on the menu.
|
virtual IMPORT_C void GetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList) const;
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 .
|
virtual IMPORT_C void HandleResourceChange(TInt aType);
Handles a change to the menu's resources of the specified type, which are shared across the environment, colours or fonts for example.
|
virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;
Gets the input capabilities of the menu pane which accepts all text.
|
virtual IMPORT_C void WriteInternalStateL(RWriteStream &aWriteStream) const;
Writes the internal state of the control and its components to aStream. Does nothing in release mode. Designed to be overidden and base called by subclasses.
|
virtual IMPORT_C void Draw(const TRect &aRect) const;
Redraws an area of the menu pane.
|
virtual IMPORT_C TSize MinimumSize();
Gets the minimum size of this menu pane.
|
protected: virtual IMPORT_C void FocusChanged(TDrawNow aDrawNow);
Takes any action required when the menu pane gains or loses focus, to change its appearance for example.
|
protected: virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);
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.
|
IMPORT_C void AddMenuItemL(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.
|
IMPORT_C void AddMenuItemL(CEikMenuPaneItem *aMenuItem);
Adds a new menu item to the menu pane.
Updates the menu's scroll bar to take account of the new item. Note that the item is appended after the existing items - see InsertMenuItemAtL() .
|
IMPORT_C void InsertMenuItemAtL(const CEikMenuPaneItem::SData &aMenuItemData, TInt aIndex);
Inserts a new menu item.
The item is inserted into the menu pane's array of menu items at the position identified by aIndex . This is done by creating a new menu item, setting its data to aMenuItemData and inserting it into the pane's menu item array. This function also updates the menu's scroll bar to take account of the new item. If the index is beyond the end of the array, the item is appended to it.
|
IMPORT_C void InsertMenuItemAtL(CEikMenuPaneItem *aMenuItem, TInt aIndex);
Inserts a new menu item at index aIndex within the menu pane.
Updates the menu's scroll bar to take account of the new item. If the index is beyond the end of the menu pane's array of menu items, the item is appended to the array.
|
IMPORT_C void DeleteMenuItem(TInt aCommandId);
Deletes the specified item in the menu pane.
|
IMPORT_C CEikMenuPaneItem::SData &ItemData(TInt aCommandId);
Gets a reference to the data in the specified menu item.
|
|
IMPORT_C CEikMenuPaneItem *ItemAndPos(TInt aCommandId, 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.
|
|
IMPORT_C void StartDisplayingMenuPane(const CEikHotKeyTable *aHotKeyTable, const TPoint &aTargetPos, const CEikMenuPaneTitle *aMenuPaneTitle, TInt aMinWidth, TPopupTargetPosType aTargetType=EPopupTargetTopLeft);
Displays a menu pane.
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.
|
IMPORT_C void SetItemTextL(TInt aCommandId, const TDesC &aDes);
Sets the text in a menu item.
|
IMPORT_C void SetItemTextL(TInt aCommandId, TInt aRid);
Sets the text in a menu item from resource.
|
IMPORT_C void SetItemDimmed(TInt aCommandId, TBool aDimmed);
Dims (greys out) or undims a menu item.
Dimming indicates that user input is not accepted.
|
IMPORT_C void SetItemButtonState(TInt aCommandId, TInt aButtonState);
Sets the state of the specified menu item.
|
IMPORT_C void SetSelectedItem(TInt aSelectedItem);
Sets the selected menu item.
|
IMPORT_C TInt SelectedItem() const;
Gets the position of the selected menu item.
|
IMPORT_C void CloseCascadeMenu();
Closes and destroys any current cascade menu and takes focus back.
Does nothing if no cascade menu exists.
IMPORT_C void SetItemArray(CItemArray *aItemArray);
Sets the array containing the list of menu items for the current menu pane.
|
IMPORT_C void SetItemArrayOwnedExternally(TBool aOwnedExternally);
Set menu item array ownership.
|
IMPORT_C void SetLaunchingButton(CEikButtonBase *aButton);
Sets the specified button to launch the menu pane. The HandlePointerEventL() of aButton should not leave for TPointerEvent::EButton1Up event, because this function is called by the menu pane destructor.
|
IMPORT_C void MoveHighlightTo(TInt aNewSelectedItem);
Moves the menu pane highlight.
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.
|
IMPORT_C TInt NumberOfItemsInPane() const;
Gets the number of menu items within the menu pane.
|
IMPORT_C void Close();
Closes the menu pane.
Destroys the command button area container if one exists, closes the window if the menu pane owns one.
IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType, TBool aConsumeAllKeys);
Handles key events offered to the menu by the control environment.
Provides an appropriate implementation of CCoeControl::OfferKeyEventL() .
|
|
IMPORT_C void SetScrollBarOnLeft(TBool aOnLeft);
Sets whether the scroll bar occupies the left side of the menu pane.
|
IMPORT_C void SetArrowHeadScrollBar(TBool aArrowHead);
Sets whether the menu pane uses an arrow head scroll bar.
|
IMPORT_C TInt MenuItemIndex(TInt aCommandId);
Gets the index of the menu item with a command ID of aCommandId .
This function panics if aCommandId does not exist.
|
|
IMPORT_C TInt MenuItemCommandId(TInt aIndex);
Gets the CommandId of the specified menu item.
This function panics if aIndex does not exist. Panics if the index is out of range.
|
|
IMPORT_C TInt MenuItemCascadeId(TInt aIndex);
Gets the CascadeId of the specified menu item.
This function panics if aIndex does not exist. Panics if the index is out of range.
|
|
IMPORT_C void SetMargins(TMargins8 aMargins);
Sets margins in the menupane. Menuitems will be clipped against on these margins.
|
IMPORT_C TInt PopulateMenuPaneL(TInt aPaneId, const TArray< CQikCommand * > &aCommands, TInt aCascadeLevel, TInt aMaxCascadeLevel, TUint aFlags);
Populates a menupane with menupane items corresponding to the commands in aCommands
|
|
IMPORT_C void SetMenuCascadeObserver(MEikMenuCascadeObserver *aMenuCascadeObserver);
Set observer for cascading menupanes
|
class CItemArray : public CArrayPtrFlat< CEikMenuPaneItem >;
This class provides a constructor to create an array of menu pane items and a destructor to destroy an array of menu pane items.
CArrayPtrFlat< CEikMenuPaneItem > - No description.CEikMenuPane::CItemArray - This class provides a constructor to create an array of menu pane items and a destructor to destroy an array of menu pane itemsDefined in CEikMenuPane::CItemArray:
CItemArray(), ~CItemArray()
CItemArray()
IMPORT_C CItemArray();
Creates a flat array of menu pane items.
~CItemArray()
IMPORT_C ~CItemArray();
DestructorResets and destroys array of menu pane items.
class TItemAttributes;
Internally used data type class holding draw attributes about each item.
Defined in CEikMenuPane::TItemAttributes:
iBaseLine, iExtraText, iFlags, iHeight, iHighlightType, iHotKeysText, iHotkeyWidthAndGap, iIconWidth, iInternalFlags, iItemIndex, iSuperHotKeyOffset, iText, iVPosition
iBaseLine
TInt iBaseLine;
iFlags
TInt iFlags;
iInternalFlags
TInt iInternalFlags;
iHeight
TInt iHeight;
iHighlightType
SLafMenuPane::THighlightType iHighlightType;
iVPosition
TInt iVPosition;
iHotkeyWidthAndGap
TInt iHotkeyWidthAndGap;
iIconWidth
TInt iIconWidth;
iText
TPtrC iText;
iExtraText
TPtrC iExtraText;
iHotKeysText
TPtrC iHotKeysText;
iItemIndex
TInt iItemIndex;
iSuperHotKeyOffset
TInt iSuperHotKeyOffset;
TPopulationFlags
Flags for populating the menu pane
|
typedef TBuf<20> CEikMenuPane::THotKeyDisplayText;
The text to be displayed for a hotkey.