#include <mw/AknDialog.h>
class CAknDialog : public CEikDialog |
Protected Attributes | |
---|---|
CEikMenuBar * | iMenuBar |
Public Member Functions | |
---|---|
CAknDialog() | |
~CAknDialog() | |
IMPORT_C void | ConstructL(TInt) |
virtual IMPORT_C void | DynInitMenuPaneL(TInt, CEikMenuPane *) |
virtual IMPORT_C TInt | ExecuteLD(TInt) |
virtual IMPORT_C void | FocusChanged(TDrawNow) |
virtual IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
virtual IMPORT_C TKeyResponse | OfferKeyEventL(const TKeyEvent &, TEventCode) |
virtual IMPORT_C void | PrepareLC(TInt) |
virtual IMPORT_C void | ProcessCommandL(TInt) |
virtual IMPORT_C TInt | RunLD() |
virtual IMPORT_C void | SetEmphasis(CCoeControl *, TBool) |
Protected Member Functions | |
---|---|
void | CreateMenuBarL(TInt) |
IMPORT_C void | DisplayMenuL() |
virtual IMPORT_C void | Draw(const TRect &) |
IMPORT_C void | HideMenu() |
IMPORT_C TBool | MenuShowing() |
IMPORT_C TTypeUid::Ptr | MopSupplyObject(TTypeUid) |
virtual IMPORT_C TBool | OkToExitL(TInt) |
virtual IMPORT_C void | SizeChanged() |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikDialog:@125 |
Base class for different types of AknDialogs
Instances of the CAikDialog class may be created, and it is possible to add controls directly to them. However it is more normal to create a subclass, and to handle the controls appearing on the dialog dynamically.
IMPORT_C void | ConstructL | ( | TInt | aMenuTitleResourceId | ) |
Handles Symbian 2nd phase construction.
A menu resource MUST be specified - this function will Panic otherwise. If a menu is not required use CEikDialog!
Parameter | Description |
---|---|
aMenuTitleResourceId | Title of the menu. |
void | CreateMenuBarL | ( | TInt | aMenuTitleResourceId | ) | [protected] |
Creates or replaces dialog's menu bar.
Parameter | Description |
---|---|
aMenuTitleResourceId | Title of the menu bar. |
IMPORT_C void | Draw | ( | const TRect & | aRect | ) | const [protected, virtual] |
Reimplemented from CEikDialog::Draw(const TRect &)const
From CEikDialog.
Draws the control.
Parameter | Description |
---|---|
aRect | Area to be drawn. |
IMPORT_C void | DynInitMenuPaneL | ( | TInt | aResourceId, |
CEikMenuPane * | aMenuPane | |||
) | [virtual] |
Not implemented.
Parameter | Description |
---|---|
aResourceId | Not used. |
aMenuPane | Not used. |
Reimplemented from CEikDialog::ExecuteLD(TInt)
From CEikDialog.
Loads, displays, and destroys the dialog.
This function loads the specified dialog from a resource and displays it. The method then destroys the dialog when it exits, therefore there is no need for the application program to destroy the dialog.
Parameter | Description |
---|---|
aResourceId | The resource ID of the dialog to load. |
Returns: Zero, unless it is a waiting dialog. For a waiting dialog, the return value is the ID of the button that closed the dialog, or zero if it was the cancel button (EEikBidCancel).
IMPORT_C void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [virtual] |
Reimplemented from CEikDialog::FocusChanged(TDrawNow)
From CCoeControl.
Responds to a change in focus.
This is called whenever the control gains or loses focus, as a result of a call to SetFocus(). A typical use of FocusChanged() is to change the appearance of the control, for example by drawing a focus rectangle around it.
Parameter | Description |
---|---|
aDrawNow | Contains the value that was passed to it by SetFocus(). |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikDialog::HandlePointerEventL(const TPointerEvent &)
From CCoeControl.
Handles pointer events.
This function gets called whenever a pointer event occurs in the control, i.e. when the pointer is within the control's extent, or when the control has grabbed the pointer. The control should implement this function to handle pointer events.
Note: events of type EButton1Down are processed before HandlePointerEventL() is called, in order to transfer keyboard focus to the control in which the EButton1Down event occurred.
Parameter | Description |
---|---|
aPointerEvent | The pointer event |
IMPORT_C TBool | MenuShowing | ( | ) | const [protected] |
From CEikDialog.
Checks if menu is displayed.
Returns: ETrue if menu is displayed, EFalse otherwise.
IMPORT_C TTypeUid::Ptr | MopSupplyObject | ( | TTypeUid | aId | ) | [protected] |
Reimplemented from CEikDialog::MopSupplyObject(TTypeUid)
From MObjectProvider.
Gets Mop supply object of the given type.
Parameter | Description |
---|---|
aId | Identifier for the supply object. |
Returns: Pointer to the supply object type ID.
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
Reimplemented from CEikDialog::OfferKeyEventL(const TKeyEvent &,TEventCode)
From CCoeControl.
Handles key events.
If a control wishes to process key events, it should implement this function. The implementation must ensure that the function returns EKeyWasNotConsumed if it does not do anything in response to a key event, otherwise, other controls or dialogs may be prevented from receiving the key event. If it is able to process the event it should return EKeyWasConsumed.
When a key event occurs, the control framework calls this function for each control on the control stack, until one of them can process the key event (and returns EKeyWasConsumed).
Each keyboard key press results in three separate events: EEventKeyDown, EEventKey, and EEventKeyUp, in that order.
To receive key events, which can be processed by this function, the application should call CCoeAppUi::AddToStackL() to add the control to the stack. This only applies, however, to controls which are not components of a compound control. Compound controls should pass key events to their components as necessary: the components themselves do not go on the stack.
Parameter | Description |
---|---|
aKeyEvent | The key event. |
aType | The type of key event: EEventKey, EEventKeyUp or EEventKeyDown. |
Returns: Indicates whether or not the key event was used by this control.
Reimplemented from CEikDialog::OkToExitL(TInt)
From CEikDialog.
Handles a dialog button press for the specified button.
This function is invoked when the user presses a button in the button panel. It is not called if the Cancel button is activated unless the EEikDialogFlagNotifyEsc flag has been set.
If there is an Options key then pops up menu, otherwise exits.
The function should be overridden by the derived class, and is usually used to validate the values of the dialog's controls. The function should return ETrue if it is OK to exit, and EFalse to keep the dialog active. It should always return ETrue if the button with ID EEikBidOK was activated.
Parameter | Description |
---|---|
aButtonId | The ID of the button that was activated. |
Returns: ETrue to validate and exit the dialog, EFalse to keep the dialog active. If ETrue, the dialog will be destroyed automatically by ExecuteLD(). The default implementation returns ETrue no matter which button is pressed.
IMPORT_C void | PrepareLC | ( | TInt | aResourceId | ) | [virtual] |
Reimplemented from CEikDialog::PrepareLC(TInt)
From CEikDialog.
Prepares the dialog, by constructing it from the specified resource.
Parameter | Description |
---|---|
aResourceId | The resource ID of the dialog. |
IMPORT_C void | ProcessCommandL | ( | TInt | aCommandId | ) | [virtual] |
From MEikMenuObserver.
Hides the menu.
Parameter | Description |
---|---|
aCommandId | Not used. |
IMPORT_C TInt | RunLD | ( | ) | [virtual] |
Reimplemented from CEikDialog::RunLD()
From CEikDialog.
Runs the dialog and returns the ID of the button used to dismiss it.
The dialog is destroyed on exit.
This function is called by the dialog framework (ExecuteLD()) to perform dynamic construction (layout) and to display/destroy the dialog. Static construction of the dialog must already be complete before this function is called, e.g. using PrepareLC().
The function returns immediately unless EEikDialogFlagWait has been specified in the DIALOG resource. If EEikDialogFlagWait is specified, it returns when the dialog exits.
Returns: The ID of the button used to dismiss the dialog.
IMPORT_C void | SetEmphasis | ( | CCoeControl * | aMenuControl, |
TBool | aEmphasis | |||
) | [virtual] |
From MEikMenuObserver.
Called by the Uikon framework to handle the emphasising or de-emphasising of a menu window.
CEikMenuBar objects call this on their observer to emphasise themselves when they are displayed, and de-emphasise themselves when they stop displaying.
Parameter | Description |
---|---|
aMenuControl | The menu control. |
aEmphasis | ETrue to emphasize the menu, EFalse otherwise. |
IMPORT_C void | SizeChanged | ( | ) | [protected, virtual] |
Reimplemented from CEikDialog::SizeChanged()
From CEikDialog.
Lays out the dialog's components when the size of the dialog is changed.