class CAknItemActionMenu : public CBase |
Item action menu.
Classes implementing MAknCollection interface can launch item specific action menu using this class. Item specific commands are fetched from the current menu bar and handled like any other options menu commands.
Collections that wish to use item action menu should register themselves using static call RegisterCollectionL. This call returns pointer to item action menu instance (ownership does not transfer to caller). Pointer to item action menu can be used to launch the menu. When there is no need for item action menu usage in collection anymore, collection should be removed with method RemoveCollection.
// Initialization (NOTE: ownership does not transfer!) iItemActionMenu = CAknItemActionMenu::RegisterCollectionL( *this ); // Show menu if ( iItemActionMenu->InitMenuL() ) { iItemActionMenu->ShowMenuL( position ); } // Remove collection iItemActionMenu->RemoveCollection( *this );
eikcoctl S60 v5.2
Public Member Functions | |
---|---|
~CAknItemActionMenu() | |
void | AddCollectionStateL(MAknCollection &) |
IMPORT_C void | CollectionChanged(MAknCollection &) |
TInt | CollectionCount() |
TBool | CollectionHighlightVisible() |
TBool | CollectionSoftkeyVisible(TBool) |
IMPORT_C TBool | InitMenuL() |
CAknItemActionMenuData & | MenuData() |
CAknItemActionMenu * | NewL(MAknCollection &, MObjectProvider *) |
CAknItemActionMenu * | NewLC(MAknCollection &, MObjectProvider *) |
MObjectProvider * | Owner() |
IMPORT_C CAknItemActionMenu * | RegisterCollectionL(MAknCollection &) |
void | RegisterCollectionObserverL(MAknCollectionObserver &) |
IMPORT_C void | RemoveCollection(MAknCollection &) |
void | RemoveCollectionObserver(MAknCollectionObserver &) |
void | SetMenuBar(MEikMenuObserver *, CEikMenuBar *) |
IMPORT_C void | ShowMenuL(const TPoint &, TUint) |
Private Member Functions | |
---|---|
CAknItemActionMenu(MObjectProvider *) | |
void | ConstructL(MAknCollection &) |
TInt | LaunchSubMenuQueryL(const TDesC &) |
void | NotifyChangeToActiveObserver(TBool) |
void | ProcessCommandL(TInt) |
void | SetEmphasis(CCoeControl *, TBool) |
void | UnregisterMenu() |
Private Attributes | |
---|---|
CEikMenuBar * | iMenuBar |
MEikMenuObserver * | iMenuBarObserver |
CAknItemActionMenuData * | iMenuData |
CEikMenuPane * | iMenuPane |
RPointerArray< MAknCollectionObserver > | iObservers |
MObjectProvider * | iOwner |
CAknStylusPopUpMenu * | iPopupMenu |
TBool | iProcessingCommand |
RPointerArray< MAknCollection > | iStates |
CAknItemActionMenu | ( | MObjectProvider * | aOwner | ) | [private] |
C++ constructor.
MObjectProvider * aOwner | Menu's owner. |
void | AddCollectionStateL | ( | MAknCollection & | aCollection | ) |
Adds collection to this item action menu.
MAknCollection & aCollection | New collection. |
IMPORT_C void | CollectionChanged | ( | MAknCollection & | aCollection | ) |
Notifies that collection has been changed.
MAknCollection & aCollection | Changed collection. |
TBool | CollectionHighlightVisible | ( | ) | const |
Provides collection highlight state.
TBool | CollectionSoftkeyVisible | ( | TBool | aVisibleCollection = ETrue | ) | const |
Provides collection softkey state.
TBool aVisibleCollection = ETrue |
void | ConstructL | ( | MAknCollection & | aCollection | ) | [private] |
Symbian second-phase constructor.
MAknCollection & aCollection | Collection. |
IMPORT_C TBool | InitMenuL | ( | ) |
Initializes this item action menu. Menu should be initialized before it can be shown with ShowMenuL.
ETrue if item action menu has content. EFalse otherwise.
TInt | LaunchSubMenuQueryL | ( | const TDesC & | aHeading | ) | [private] |
Fills query dialog with menu data and launches it.
Selected menu data index.
const TDesC & aHeading | Dialog heading. |
CAknItemActionMenuData & | MenuData | ( | ) |
Provides reference to this item action menu data.
Reference to item action menu data.
CAknItemActionMenu * | NewL | ( | MAknCollection & | aCollection, |
MObjectProvider * | aOwner | |||
) | [static] |
Two-phased constructor.
MAknCollection & aCollection | |
MObjectProvider * aOwner |
CAknItemActionMenu * | NewLC | ( | MAknCollection & | aCollection, |
MObjectProvider * | aOwner | |||
) | [static] |
Two-phased constructor.
MAknCollection & aCollection | |
MObjectProvider * aOwner |
void | NotifyChangeToActiveObserver | ( | TBool | aCollectionVisible = ETrue | ) | [private] |
Notifies collection change to active observer.
TBool aCollectionVisible = ETrue | ETrue if collection that changed is visible. |
void | ProcessCommandL | ( | TInt | aCommandId | ) | [private] |
Processes user commands.
TInt aCommandId | ID of the command to respond to. |
IMPORT_C CAknItemActionMenu * | RegisterCollectionL | ( | MAknCollection & | aCollection | ) | [static] |
Adds collection to the item action menu of this view / dialog / appUi.
Pointer to the item action menu instance. Ownership does not transfer to caller.
MAknCollection & aCollection | Collection implementing MAknCollection interface. |
void | RegisterCollectionObserverL | ( | MAknCollectionObserver & | aObserver | ) |
Registers collection observer.
MAknCollectionObserver & aObserver |
IMPORT_C void | RemoveCollection | ( | MAknCollection & | aCollection | ) |
Removes collection of this item action menu.
MAknCollection & aCollection | Collection to be removed. |
void | RemoveCollectionObserver | ( | MAknCollectionObserver & | aObserver | ) |
Removes collection observer.
MAknCollectionObserver & aObserver |
void | SetEmphasis | ( | CCoeControl * | aMenuControl, |
TBool | aEmphasis | |||
) | [private] |
Called by the framework to handle the emphasising or de-emphasising of a menu window.
CCoeControl * aMenuControl | The menu control. |
TBool aEmphasis | ETrue to emphasize the menu, EFalse otherwise. |
void | SetMenuBar | ( | MEikMenuObserver * | aMenuObserver, |
CEikMenuBar * | aMenuBar | |||
) |
Sets menu bar to item action menu.
MEikMenuObserver * aMenuObserver | |
CEikMenuBar * aMenuBar |
IMPORT_C void | ShowMenuL | ( | const TPoint & | aPosition, |
TUint | aFlags = 0 | |||
) |
Shows this item action menu.
MEikMenuObserver * | iMenuBarObserver | [private] |
Menu bar observer. Not own.
RPointerArray< MAknCollectionObserver > | iObservers | [private] |
Collection observers.
TBool | iProcessingCommand | [private] |
Boolean ensuring that item action menu is not unregistered during command processing.
RPointerArray< MAknCollection > | iStates | [private] |
Collections.