API published in: S60 1st Ed
Link against: eikcoctl.lib eikcore.lib
Required Capabilities
None
#include <eikmenup.h>
Inherits CEikBorderedControl.
(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.
Public Types |
|
typedef TBuf< 20 > | THotKeyDisplayText |
The text to be displayed for a hotkey. |
|
Public Member Functions |
|
IMPORT_C | ~CEikMenuPane () |
Destructor. |
|
IMPORT_C | CEikMenuPane (MEikMenuObserver *aMenuObserver) |
C++ default constructor. |
|
IMPORT_C void | ConstructL (CEikMenuPane *aOwner, MEikMenuObserver *aEditMenuObserver=NULL) |
Handles 2nd base construction. |
|
IMPORT_C void | Reset () |
Destroys the menu pane's item array. |
|
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
From CcoeControl . |
|
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
From CcoeControl . |
|
virtual IMPORT_C void | GetColorUseListL (CArrayFix< TCoeColorUse > &aColorUseList) const |
From CcoeControl . |
|
virtual IMPORT_C void | HandleResourceChange (TInt aType) |
From CcoeControl . |
|
IMPORT_C TCoeInputCapabilities | InputCapabilities () const |
From CCoeControl . |
|
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. |
|
IMPORT_C void | AddMenuItemL (const CEikMenuPaneItem::SData &aMenuItem, TInt aPreviousId) |
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. |
|
IMPORT_C void | AddMenuItemsL (TInt aResourceId, TInt aPreviousId=0, TBool aAddSeperator=EFalse) |
Adds menu items dynamically by creating new menu items from resource and inserts them into the pane's menu item array. |
|
IMPORT_C void | DeleteMenuItem (TInt aCommandId) |
Deletes the specified item in the menu pane. |
|
IMPORT_C void | DeleteBetweenMenuItems (TInt aStartIndex, TInt aEndIndex) |
Deletes the items between specified items. |
|
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. |
|
IMPORT_C void | StartDisplayingMenuPane (const CEikHotKeyTable *aHotKeyTable, const TPoint &aTargetPos, const CEikMenuPaneTitle *aMenuPaneTitle, TInt aMinWidth, TPopupTargetPosType aTargetType=EPopupTargetTopLeft) |
Displays the menu pane with the corner identified by aTargetType in the position specified by aTargetPos . |
|
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. |
|
IMPORT_C void | SetItemButtonState (TInt aCommandId, TInt aButtonState) |
Sets the item to be indicated or not. |
|
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. |
|
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. |
|
IMPORT_C void | MoveHighlightTo (TInt aNewSelectedItem) |
Moves the menu pane highlight to a newly selected menu item identified by aNewSelectedItem . |
|
IMPORT_C TInt | NumberOfItemsInPane () const |
Gets the number of menu items within the menu pane. |
|
IMPORT_C void | Close () |
Closes the menu pane. |
|
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType, TBool aConsumeAllKeys) |
From @ CCoeControl. |
|
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 void | NavigateToNextItem () |
Moves highlight to the next item or to the first one if last item is selected. |
|
IMPORT_C void | InsertMenuItemL (const CEikMenuPaneItem::SData &aMenuItem, TInt aPosition) |
Inserts the menu item to the specified position. |
|
IMPORT_C TBool | MenuItemExists (TInt aCommandId, TInt &aPosition) |
Checks whether menu pane contains the menu item and returns position of it if the item is found. |
|
IMPORT_C TBool | IsCascadeMenuPane () const |
Checks whether the menu pane is a cascade menu or a main menu. |
|
IMPORT_C void | EnableMarqueeL (const TBool aEnable) |
Enables or disables text scrolling functionality. |
|
void | ActivateCurrentItemL () |
Report that selection was done for the currently highlighted item. |
|
TBool | CancelActiveMenuPane () |
Closes cascade menu if there is one and it is active. |
|
void | FilterDimmedItems () |
Deletes dimmed items from the menu item array. |
|
void | ClipMenuItems (TInt aWidth) |
Not implemented. |
|
IMPORT_C CEikMenuPane * | CascadeMenuPane () |
Gets the menu pane for the cascade menu. |
|
IMPORT_C CEikMenuPaneItem::SData & | ItemDataByIndexL (TInt aItemIndex) |
Gets a reference to the data in the specified menu item. |
|
TBool | IsPositionToBeForced () const |
Checks if the position of the menu was set from outside. |
|
IMPORT_C void | ConstructMenuSctRowL (TDes &aSpecialChars) |
Creates and enables a special characters row to be used in the edit menu. |
|
IMPORT_C TInt | MenuItemCommandId (TInt aIndex) const |
Returns the command id of the specified menu item. |
|
IMPORT_C void | ConstructMenuSctRowL (TDes &aSpecialChars, TInt aResourceId) |
Creates and enables a special characters row to be used in the edit menu. |
|
IMPORT_C void | ConstructMenuSctRowFromDialogL (TDes &aSpecialChars, TInt aResourceId) |
Creates and enables a special characters row to be used in the edit menu. |
|
IMPORT_C void | ConstructMenuSctRowFromDialogL (TInt aCharCase, TDes &aSpecialChars, TInt aResourceId) |
Creates and enables a special characters row to be used in the edit menu. |
|
IMPORT_C TInt | CountComponentControls () const |
From CoeControl . |
|
IMPORT_C CCoeControl * | ComponentControl (TInt aIndex) const |
From CoeControl . |
|
Protected Member Functions |
|
IMPORT_C void | Draw (const TRect &aRect) const |
From CCoeControl . |
|
IMPORT_C void | FocusChanged (TDrawNow aDrawNow) |
From CCoeControl . |
|
IMPORT_C void | ConstructFromResourceL (TResourceReader &aReader) |
From CCoeControl . |
|
IMPORT_C TTypeUid::Ptr | MopSupplyObject (TTypeUid aId) |
From CCoeControl . |
|
void | DisableAnimation () |
Disables sliding effect By default is enabled if there is enough memory. |
|
void | SetPositionToBeForced (TBool aForced) |
The position of the menu will be changed according to the one which is specified by arguments in StartDisplayingMenuPane() By default those arguments are not used. |
|
TInt | NumberOfItemsThatFitInView () const |
Gets the maximum number of items which can be seen simultaneously. |
|
Friends |
|
class | CMenuScroller |
class | CEikMenuPaneExtension |
class | CAknMarqueeControl |
class | CEikMenuButton |
Data Structures |
|
class | CItemArray |
This class provides a constructor to create an array of menu pane items and a destructor to destroy an array of menu pane
items. More... |
|
The text to be displayed for a hotkey. |
|
Destructor. |
|
C++ default constructor. Constructs a menu pane object with the specified observer.
|
|
Report that selection was done for the currently highlighted item. |
|
Adds a menu item dynamically by creating a new menu item, setting its data to Updates the menu's scroll bar to take account of the new item.
|
|
Adds a menu item dynamically by creating a new menu item, setting its data to Updates the menu's scroll bar to take account of the new item.
|
|
Adds menu items dynamically by creating new menu items from resource and inserts them into the pane's menu item array.
|
|
Closes cascade menu if there is one and it is active. |
|
Gets the menu pane for the cascade menu.
|
|
Not implemented.
|
|
Closes the menu pane. |
|
Closes and destroys any current cascade menu and takes focus back. Does nothing if no cascade menu exists. |
|
From 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.
|
|
From 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.
|
|
Handles 2nd base construction. Completes construction of a menu pane object.
|
|
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.
|
|
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.
|
|
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.
|
|
Creates and enables a special characters row to be used in the edit menu.
|
|
From 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.
|
|
Deletes the items between specified items.
|
|
Deletes the specified item in the menu pane.
|
|
Disables sliding effect By default is enabled if there is enough memory. |
|
From 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
The rectangle aRect indicates the region of the control that needs to be redrawn. The implementation of
Reimplemented from CEikBorderedControl. |
|
Enables or disables text scrolling functionality. It is disabled by default.
|
|
Deletes dimmed items from the menu item array. |
|
From Takes any action required when the menu pane gains or loses focus, to change its appearance for example.
|
|
From
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
Reimplemented from CEikBorderedControl. |
|
From Handles a pointer event on the menu.
Reimplemented from CEikBorderedControl. |
|
From Handles a change to the menu's resources which are shared across the environment. For example, colours or fonts.
Reimplemented from CEikBorderedControl. |
|
From Gets the list box’s input capabilities as set through the list box flags.
|
|
Inserts the menu item to the specified position.
|
|
Checks whether the menu pane is a cascade menu or a main menu.
|
|
Checks if the position of the menu was set from outside.
|
|
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.
|
|
Gets a reference to the data in the specified menu item.
|
|
Gets a reference to the data in the specified menu item.
|
|
Returns the command id of the specified menu item. The function panics if aIndex doesn't exist or is out of range.
|
|
Checks whether menu pane contains the menu item and returns position of it if the item is found.
|
|
From
Retrieves an object of the same type as that encapsulated in aId. Other than in the case where
|
|
Moves the menu pane highlight to a newly selected menu item identified by 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.
|
|
Moves highlight to the next item or to the first one if last item is selected. |
|
Gets the number of menu items within the menu pane.
|
|
Gets the maximum number of items which can be seen simultaneously.
|
|
From @ CCoeControl. Handles key events offered to the menu by the control environment.
|
|
From
Handles key events offered to the menu by the control environment and provides an appropriate implementation of
|
|
Destroys the menu pane's item array. |
|
Gets the position of the selected menu item.
|
|
Sets whether the menu pane uses an arrow head scroll bar.
|
|
Sets the array containing the list of menu items for the current menu pane.
|
|
Set menu item array ownership.
|
|
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.
|
|
Dims (greys out) or undims a menu item. Dimming indicates that user input is not accepted.
|
|
Sets the text in a menu item from resource.
|
|
Sets the text in a menu item.
|
|
Sets the specified button to launch the menu pane. Doesn't have any effect in current implementation.
|
|
The position of the menu will be changed according to the one which is specified by arguments in StartDisplayingMenuPane() By default those arguments are not used.
|
|
Sets whether the scroll bar occupies the left side of the menu pane.
|
|
Sets the selected menu item.
|
|
Displays the menu pane with the corner identified by
This function uses
|
|
|
|
|