|
|
|||
Location:
QikAppUi.h
Link against: qikcore.lib
class CQikAppUi : public CEikAppUi, public MQikCommandHandler;
Application UI layer with support for categories.
This App UI class implements functions to set up a categories menu and respond to user choices. It uses, but does not own, a category model class CQikCategoryModel to hold the applications categories information. Methods to initialise the categories from an ini file or resource file, and to externalise to an ini file, are provided by QikCategoryUtils .
Developers should derive from this class to provide the App UI for their application, and also from MQikEditCategoryObserver if they wish to use stock dialogs to add, remove or change the available categories.
MQikCommandHandler - Interface for classes responsible of executing commandsMObjectProvider - An interface that allows an object to be part of a network of object providersMCoeMessageObserver - Interface for handling incoming window server messagesMEikCommandObserver - Command observers respond to user commands, and have the secondary function of creating custom controls on request for classes such as CEikToolbar, or user-defined classesMEikMenuObserver - Menu observer interfaceCBase - Base class for all classes to be instantiated on the heapCCoeAppUi - Application user interface (app UI) base classCEikAppUi - Handles application-wide aspects of the application's user interface such as the menu bar, toolbar pop-up menus, opening and closing files and exiting the application cleanlyCQikAppUi - Application UI layer with support for categoriesDefined in CQikAppUi:
AboutToOpenOrCreateFile(), AddViewL(), AddViewL(), ApplicationRect(), AutoExitOnAppSwitch(), BaseConstructL(), CQikAppUi(), CategoryModel(), CoeView(), CoeView(), ConstructL(), CreateFileL(), CurrentCoeView(), CurrentQikView(), CurrentViewAsControl(), DynInitCategoryMenuPaneL(), DynInitCategoryMenuPaneL(), Exit(), HandleApplicationSpecificEventL(), HandleCategoryChangeL(), HandleCommandL(), HandleCommandL(), HandleError(), HandleForegroundEventL(), HandleMessageL(), HandleModelChangeL(), HandleResourceChangeL(), HandleSystemEventL(), HandleWsEventL(), IgnorePointerEventsWhenInBackground(), InputCapabilities(), OpenFileL(), PrepareToExit(), ProcessCommandL(), ProcessCommandParametersL(), ProcessCommandParametersL(), ProcessMessageL(), QikView(), RemoveToolbarL(), RemoveView(), ReportResourceChangedToAppL(), SetAutoExitOnAppSwitch(), SetCategoryModel(), SetFadedL(), SetToolbarL(), StopDisplayingMenuBar(), ViewAsControl(), ViewAsControl(), ViewCount(), ViewSwitcher(), ZoomFactorL(), ~CQikAppUi()
Inherited from CBase:
Delete(),
Extension_(),
operator new()
Inherited from CCoeAppUi:
ActivateViewL(),
AddToStackL(),
AddToViewStackL(),
AddViewDeactivationObserverL(),
AppHelpContextL(),
CCoeAppUi_Reserved1(),
CCoeAppUi_Reserved2(),
CheckSourceOfViewSwitchL(),
DeactivateActiveViewL(),
DeregisterApplicationView(),
DeregisterView(),
GetActiveViewId(),
GetDefaultViewId(),
HandleStackChanged(),
HandleStackedControlsResourceChange(),
IsDisplayingControlBetweenPriorities(),
IsDisplayingDialog(),
IsDisplayingMenuOrDialog(),
IsViewConstructed(),
NotifyNextDeactivation(),
RegisterApplicationViewL(),
RegisterViewL(),
RemoveFromStack(),
RemoveFromViewStack(),
RemoveViewDeactivationObserver(),
SetDefaultViewL(),
TopFocusedControl(),
UpdateStackedControlFlags(),
WriteInternalStateOfStackedControlsL(),
iCoeEnv
Inherited from CEikAppUi:
Application(),
ApplicationLanguageL(),
ClientRect(),
ClosePopup(),
ContainerAppUi(),
CreateHotKeyControlL(),
Document(),
ELastReservedEikAppUiFlag,
ENoAppResourceFile,
ENoScreenFurniture,
ENonStandardResourceFile,
EStandardApp,
FadeWhenInBackground(),
HandleScreenDeviceChangedL(),
HandleSideBarMenuL(),
LaunchPopupMenuL(),
MopNext(),
MopSupplyObject(),
ReadAppInfoResourceL(),
ReportResourceChangedToAppStackL(),
SaveAnyChangesL(),
SaveL(),
SetDocChanged(),
SetDocument(),
SetEmbeddedDocInfo(),
SetFaded(),
anonymous,
iContainerAppUi,
iDocument,
iDoorObserver,
iEmbeddedAndReadOnly,
iFlags
Inherited from MCoeMessageObserver:
EMessageHandled,
EMessageNotHandled,
TMessageResponse
Inherited from MEikMenuObserver:
CheckHotKeyNotDimmedL(),
CreateCustomCommandControlL(),
DynInitMenuBarL(),
DynInitMenuPaneL(),
EMenuBar,
EMenuPane,
HandleAttemptDimmedSelectionL(),
OfferKeyToAppL(),
RestoreMenuL(),
SetEmphasis(),
TMenuType
Inherited from MObjectProvider:
MopGetObject(),
MopGetObjectNoChaining()
IMPORT_C CQikAppUi();
Default constructor.
First phase in the two phase construction. The construction process will be not complete until ConstructL() it's called and executed.
This constructor initialises the base class by calling the CEikAppUi default constructor. The class member method IgnorePointerEventsWhenInBackground() is also called.
IMPORT_C ~CQikAppUi();
Destructor.
Frees all memory owned by the object, prior to its destruction.
virtual IMPORT_C void ConstructL();
Second phase in the two phase construction. This function completes the construction of a newly allocated CQikAppUi instance.
This method should be overridden by the application's AppUi class deriving from this class. Usually the application's implementation of the App Ui class calls this method in its own ConstructL() method.
The BaseConstructL() method is called from within this method. Add application views from within this method.
IMPORT_C void AddViewL(CQikViewBase &aView);
After you have created a view, use AddViewL to add the view to the framework. The framework will take over the ownership, register the view in the Viewserver and add it to CCoeAppUi's control stack. AddViewL needs to be called from ConstructL for at least one view to avoid the AppUi to be registered as viewless. Leaves if failed while registering the view, adding it to the control stack or due to OOM condition.
|
IMPORT_C void AddViewL(CCoeControl &aViewControl, MCoeView &aView);
After you have created a view, use AddViewL to add the view to the framework. The framework will take over the ownership, register the view in the Viewserver and add it to CCoeAppUi's control stack. AddViewL needs to be called from ConstructL for at least one view to avoid the AppUi to be registered as viewless. Leaves if failed while registering the view, adding it to the control stack or due to OOM condition.
|
IMPORT_C void RemoveView(const CCoeControl &aView);
Removing the active view will panic the view server. Removes the view from the framework by deregistering it and removing it from the control stack.
This should only be called if you want to destruct a view in runtime without closing the application. Normally there is no need for a developer to call this function as it is done by CQikAppUi's destructor.
|
IMPORT_C TInt ViewCount() const;
Returns the number of views.
|
IMPORT_C MCoeView *CoeView(TInt aIndex);
Returns a view for an index. Must have been added with AddViewL() .
|
|
IMPORT_C CCoeControl *ViewAsControl(TInt aIndex);
Returns a view for an index. Must have been added with AddViewL() .
|
|
IMPORT_C MCoeView *CoeView(const TVwsViewId &aViewId);
Returns a view for a viewid. Must have been added with AddViewL() .
|
|
IMPORT_C CQikViewBase *QikView(const TVwsViewId &aViewId);
Returns a view for aViewId . Checks if the view is a CQikViewBase using the MOP framework.
|
|
IMPORT_C CCoeControl *ViewAsControl(const TVwsViewId &aViewId);
Returns a view for a viewid. Must have been added with AddViewL() .
|
|
IMPORT_C MCoeView *CurrentCoeView();
Only one view at a time can be active in an application. This method returns the currently active view.
|
IMPORT_C CQikViewBase *CurrentQikView();
Only one view at a time can be active in an application. This method returns the currently active view. It also checks so that the current view is a CQikViewBase using the MOP framework.
|
IMPORT_C CCoeControl *CurrentViewAsControl();
Only one view at a time can be active in an application. This method returns the currently active view.
|
IMPORT_C CQikViewSwitcher &ViewSwitcher();
Returns the view switcher member. The CQikViewSwitcher is used to handle view switching and back behaviour.
|
virtual IMPORT_C void HandleResourceChangeL(TInt aType);
Handles a change to the application's run-time resources which are shared across the environment, colors or fonts for example.
|
virtual IMPORT_C void ProcessMessageL(TUid aUid, const TDesC8 &aParams);
Processes a message. This function calls CEikAppUi::ProcessMessageL() .
|
virtual IMPORT_C TErrorHandlerResponse HandleError(TInt aError, const SExtendedError &aExtErr, TDes &aErrorText, TDes &aContextText);
Handles an application-defined error message.
This function allows application-defined error messages to be called from functions within the control frameworks active scheduler.
|
|
| Interface status: | deprecated |
IMPORT_C CQikCategoryModel *CategoryModel() const;
This method has been deprecated. Use the new Command Processing Framework instead.
|
| Interface status: | deprecated |
IMPORT_C void SetCategoryModel(CQikCategoryModel *aCategoryModel);
This method has been deprecated. Use the new Command Processing Framework instead.
Set the CategoryModel to be used by the category menu pane. Note: Does NOT take ownership of the Category Model.
|
IMPORT_C void SetToolbarL(TUint aToolbarResId, TDrawNow aDrawNow=EDrawNow);
Creates a toolbar from the resource with the given id.
|
|
QIK_TOOLBARIMPORT_C void RemoveToolbarL();
Removes the current toolbar from the application space.
No action is taken if there is no current toolbar.
static IMPORT_C TInt ZoomFactorL(TInt aZoomLevel, const CEikonEnv &aEikonEnv);
Returns zoomfactor for any valid zoomlevel, panics otherwise. If a Zoom.ini file has been created, the zoomfactor values are read from this file rather than from the resource file. This enables runtime changes of the zoomfactors.
|
|
IMPORT_C TBool AutoExitOnAppSwitch() const;
Checks if EAutoExitOnAppSwitch is set.
|
virtual IMPORT_C void PrepareToExit();
Performs pre-exit processing on the control environment. This function calls CEikAppUi::PrepareToExit() .
virtual IMPORT_C void HandleCommandL(CQikCommand &aCommand);
This is where command selections for orphan commands ends up. The default implementation shows an infoprint in debug builds. From MQikCommandHandler .
|
| Interface status: | deprecated |
virtual IMPORT_C void HandleCommandL(TInt aCommandId);
|
| Interface status: | deprecated |
protected: virtual IMPORT_C void HandleCategoryChangeL(TInt aCategoryHandle);
This method has been deprecated. Use the new Command Processing Framework instead.
Empty default implementation of the HandleCategoryChangeL() method.
|
| Interface status: | deprecated |
protected: IMPORT_C void DynInitCategoryMenuPaneL(CEikMenuPane *aMenuPane);
This method has been deprecated. Use the new Command Processing Framework instead.
Call this method from the applications DynInitMenuPaneL to add the categories in the CategoryModel to the category menu pane.
|
CQikViewBase::DynInitOrDeleteCommand()| Interface status: | deprecated |
protected: IMPORT_C void DynInitCategoryMenuPaneL(CEikMenuPane *aMenuPane, const TArray< TInt > aExcludeHandles);
This method has been deprecated. Use the new Command Processing Framework instead.
Call this method from the applications DynInitMenuPaneL to add the categories in the CategoryModel to the category menu pane.
|
CQikViewBase::DynInitOrDeleteCommand()protected: IMPORT_C void SetAutoExitOnAppSwitch(TBool aAutoExit);
Requests the framework to close the application when it loses foreground. This mechanism is typically only used by applications that behave as though they are part of another application, for instance viewers.
Note that this automatic exit flag can be set on embedded app UI objects, and such objects will be closed down when the user switches away to another application.
|
protected: IMPORT_C void IgnorePointerEventsWhenInBackground(TBool aIgnore);
Tells the framework not to send pointer events to the application when it is in the background.
Viewer applications may not cover the whole of the application screen space, so allowing the user to tap on another, backgrounded, application. It is rare for an application to want to process these events, so the default is for these not to be sent to the application.
|
protected: IMPORT_C TBool AboutToOpenOrCreateFile() const;
Tests whether a file for the application is about to be opened or created.
This function is provided for viewer applications. The system can request the view to close its dialog through its MQikShutterTarget interface when either:
The application is losing foreground, e.g. as another application is being opened.
The viewer should open a different file.
Call this function to check which of these is happening.
|
protected: IMPORT_C void BaseConstructL(TInt aAppUiFlags=0);
Initialises this App UI with standard values.
The application's implementation of the App Ui class must make sure that this method is called during the construction phase. Either by calling the CQikAppUi::ConstructL() method from its own ConstructL() method or by calling this method directly, that is the method CQikAppUi::BaseConstructL() .
|
|
protected: virtual IMPORT_C void HandleApplicationSpecificEventL(TInt aType, const TWsEvent &aEvent);
Handles a specific window server event for the application.
This function calls CEikAppUi::HandleApplicationSpecificEventL() which takes action on notification of a change to the environment color scheme and informs everything on the control stack of the change.
|
protected: virtual IMPORT_C void HandleForegroundEventL(TBool aForeground);
Handles a change in keyboard focus when an application is about to get or lose the foreground.
This function should be overridden, and that function should call this implementation.
|
protected: virtual IMPORT_C void HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination);
Handles window server events.
It is called whenever the window server sends an event (standard or special) to the application. This function calls CEikAppUi::HandleWsEventL() .
|
protected: virtual IMPORT_C void HandleSystemEventL(const TWsEvent &aEvent);
Handles message ready events generated by the window server.
|
CCoeAppUi::HandleSystemEventL()protected: virtual IMPORT_C MCoeMessageObserver::TMessageResponse HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const TDesC8 &aMessageParameters);
Handles window server messages.
|
|
protected: virtual IMPORT_C void ProcessCommandL(TInt aCommand);
Dispatches calls to HandleCommandL and HandleCategoryChangeL .
|
|
virtual IMPORT_C TBool ProcessCommandParametersL(CApaCommandLine &aCommandLine);
Processes shell commands. Called by the application framework when an application is launched by the user opening an application from the shell or when a Create new file command is issued.
|
|
virtual IMPORT_C void HandleModelChangeL();
Handles changes to the model associated with this application.
virtual IMPORT_C TRect ApplicationRect() const;
Gets the total area of the screen available to the application.
This includes the space available for UI components like the menu bar.
|
virtual IMPORT_C void StopDisplayingMenuBar();
Stops displaying the application's menu bar.
If the application has no menu bar, or if the menu bar is not visible, this function has no effect.
virtual IMPORT_C void SetFadedL(TBool aFaded);
Sets whether the graphics context is faded.
|
virtual IMPORT_C void ReportResourceChangedToAppL(TInt aType);
Reports a resource change to the application.
|
virtual IMPORT_C void OpenFileL(const TDesC &aFileName);
Opens the specified file.
|
virtual IMPORT_C void CreateFileL(const TDesC &aFileName);
Creates and opens a file with the given name.
|
virtual IMPORT_C TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName &aDocumentName, const TDesC8 &aTail);
Processes shell commands.
The Uikon application framework calls this overload when an application is launched by the user opening a file from the shell or when a Create new file command is issued.
|
|
virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;
Returns the input capabilities of the control with focus.
|
virtual IMPORT_C void Exit();
Closes the app UI.