CAknAppUiBase Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikcore.lib eiksrv.lib

Capability Information

Required Capabilities

None


#include <aknappui.h>

Inherited by CAknAppUi.


Detailed Description

Abstract Avkon application UI base class.

Public Types

enum   TAppUiOrientation { EAppUiOrientationUnspecified, EAppUiOrientationPortrait, EAppUiOrientationLandscape, EAppUiOrientationAutomatic }
enum   {
  EAknEnableSkin = EAknEnableSkinFlag, EAppOrientationPortrait = EAppOrientationSpecifiedFlag, EAppOrientationLandscape, EAppOrientationAutomatic,
  EAknDisableHighlightAnimation = EAknDisableHighlightAnimationFlag, EAknEnableMSK = EAknEnableMSKflag, EAknExplicitStartupEffectCompletion = EAknExplicitStartupEffectCompletionFlag
}

Public Member Functions

IMPORT_C  ~CAknAppUiBase ()
  Destructor.
IMPORT_C  CAknAppUiBase ()
  C++ Default constructor.
IMPORT_C void  BaseConstructL (TInt aAppUiFlags)
  Initialises this Avkon base app UI with standard values.
IMPORT_C void  HandleForegroundEventL (TBool aForeground)
  Handles changes in keyboard focus when an application switches to, or from, the foreground.
IMPORT_C void  ConstructL ()
  From CEikAppUi.
IMPORT_C void  Exit ()
  From CEikAppUi.
IMPORT_C void  SetFadedL (TBool aFaded)
  From CEikAppUi.
IMPORT_C void  HandleResourceChangeL (TInt aType)
  From CEikAppUi.
IMPORT_C TRect  ApplicationRect () const
  From CEikAppUi.
IMPORT_C void  PrepareToExit ()
  From CCoeAppUiBase.
IMPORT_C TBool  IsFaded () const
  Determines whether the system is faded.
IMPORT_C CAknWsEventMonitor EventMonitor () const
  Returns the object which allows events to be spyed upon in addition to normal event handling.
IMPORT_C CAknKeySoundSystem KeySounds () const
  Gets a pointer to KeySound API object.
IMPORT_C TBool  IsFullScreenApp () const
  Determines whether the application is full screen application.
IMPORT_C TBool  IsLayoutAwareApp () const
  Determines whether the application is layout aware.
TBool  IsMSKEnabledApp () const
  Determines whether the application has MSK enabled.
TBool  IsAppClosing () const
  Determines whether the application is closing.
IMPORT_C void  SetLayoutAwareApp (TBool aLayoutAwareApp)
  Set application layout aware.
IMPORT_C TBool  IsForeground () const
  Determines whether the application is foreground.
IMPORT_C TBool  IsPartialForeground () const
  Determines whether the application is partially foreground.
IMPORT_C TAppUiOrientation  Orientation () const
  Gets the application screen orientation.
IMPORT_C TBool  OrientationCanBeChanged () const
  Tests whether it is possible for this app to have a practical effect on the screen orientation, through SetOrientationL().
IMPORT_C void  SetOrientationL (TAppUiOrientation aOrientation)
  Sets the application screen orientation.
TInt  FindAppWgIdBelowMeL ()
  Find the window group ID of the application below this application.
TInt  EventForForegroundState (TBool aPartialFg, TBool aForeground)
  Simply return KEikPartialForeground if aPartialFg == ETrue, otherwise if aForeground == ETrue then return EEventFocusGained else return EEventFocusLost.
TBool  ThreadIsForeground () const
  Determines whether the thread owning this application window group is foreground.
void  SimulateWsEventL (TInt aEvent)
  Simulates an event being received from wserv.
IMPORT_C TAknUiZoom  LocalUiZoom () const
  Gets the application local zoom.
IMPORT_C void  SetLocalUiZoom (TAknUiZoom aZoom)
  Sets the application local zoom.
IMPORT_C void  ApplyLayoutChangeL (TBool aReportChange)
TBool  HasFullOrPartialForeground () const
  Checks if application UI has full or partial foreground status.
void  SetScreenModeL (TInt aModeNumber)
TInt  ScreenMode () const

Protected Member Functions

virtual IMPORT_C void  HandleScreenDeviceChangedL ()
  From CCoeAppUiBase.
virtual IMPORT_C void  HandleApplicationSpecificEventL (TInt aType, const TWsEvent &aEvent)
  From CCoeAppUi.
IMPORT_C void  SetFullScreenApp (TBool aIsFullScreen)
  Set the application to be a full screen application.
IMPORT_C void  ReplaceKeySoundsL (TInt aUid)
  Replace current key sound server with new one.
virtual IMPORT_C TTypeUid::Ptr  MopSupplyObject (TTypeUid aId)

Friends

class  CAknAppUi

Member Enumeration Documentation

anonymous enum
 
Enumerator:
EAknEnableSkin  Flag indicating that default skin parameters should be provided by UI controls created within the scope of this AppUi instance.

This value (or binary combination with some other values) should be given as a parameter to BaseConstructL in case the application wants to enable default skin parameters for all the Avkon controls supporting them.

Note: The value can be queried by using AknsUtils::AvkonSkinEnabled() from AknSkins.lib.

EAppOrientationPortrait 
EAppOrientationLandscape 
EAppOrientationAutomatic 
EAknDisableHighlightAnimation 
EAknEnableMSK 
EAknExplicitStartupEffectCompletion 
enum CAknAppUiBase::TAppUiOrientation
 
Enumerator:
EAppUiOrientationUnspecified  Use the default device screen rotation of the product for this application.

This is the default rotation setting for an application, and it should be used by nearly all applications.

EAppUiOrientationPortrait  Use a portrait screen rotation for this application.

This should only be used when an application specifically wants portrait rotation. The device will select an appropriate portrait rotation, if one is available.

EAppUiOrientationLandscape  Use a landscape screen rotation for this application.

This should only be used when an application specifically wants landscape rotation. The device will select an appropriate landscape rotation, if one is available.

EAppUiOrientationAutomatic  Use the normal device screen rotation for this application.

Both portrait and landscape screen rotations are possible. The application rotation follows device screen rotation.


Constructor & Destructor Documentation

IMPORT_C CAknAppUiBase::~CAknAppUiBase  ) 
 

Destructor.

IMPORT_C CAknAppUiBase::CAknAppUiBase  ) 
 

C++ Default constructor.


Member Function Documentation

IMPORT_C TRect CAknAppUiBase::ApplicationRect  )  const
 

From CEikAppUi.

Gets the total area of the screen available to the application. This includes the space that is available for a toolbar, toolband or title band, if the application requires them.

Returns:
The total area of the screen available to the application.
IMPORT_C void CAknAppUiBase::ApplyLayoutChangeL TBool  aReportChange  ) 
 
IMPORT_C void CAknAppUiBase::BaseConstructL TInt  aAppUiFlags  ) 
 

Initialises this Avkon base app UI with standard values.

aAppUiFlags values are common with CEikAppUi::BaseConstructL(aAppUiFlags).

Parameters:
aAppUiFlags  Application user interface flags.

Reimplemented in CAknAppUi, and CAknViewAppUi.

IMPORT_C void CAknAppUiBase::ConstructL  ) 
 

From CEikAppUi.

Completes construction. The implementation of ConstructL() in CAknAppUiBase simply calls BaseConstructL().

Reimplemented in CAknAppUi.

TInt CAknAppUiBase::EventForForegroundState TBool  aPartialFg,
TBool  aForeground
 

Simply return KEikPartialForeground if aPartialFg == ETrue, otherwise if aForeground == ETrue then return EEventFocusGained else return EEventFocusLost.

Returns:
if aPartialFg then return KEikPartialForeground.
IMPORT_C CAknWsEventMonitor* CAknAppUiBase::EventMonitor  )  const
 

Returns the object which allows events to be spyed upon in addition to normal event handling.

Returns:
Pointer to window server event monitor object.
IMPORT_C void CAknAppUiBase::Exit  ) 
 

From CEikAppUi.

Closes the app UI.

TInt CAknAppUiBase::FindAppWgIdBelowMeL  ) 
 

Find the window group ID of the application below this application.

Returns:
the window group ID of the application below this application.
virtual IMPORT_C void CAknAppUiBase::HandleApplicationSpecificEventL TInt  aType,
const TWsEvent &  aEvent
[protected, virtual]
 

From CCoeAppUi.

Handles an application specific event.

Parameters:
aType  The type of the event that occurred. This should be a unique identifier constant.
aEvent  The window server event that occurred.
IMPORT_C void CAknAppUiBase::HandleForegroundEventL TBool  aForeground  ) 
 

Handles changes in keyboard focus when an application switches to, or from, the foreground.

This function calls CEikAppUi::HandleForegroundEventL.

Parameters:
aForeground  ETrue if the application is in the foreground, otherwise EFalse.

Reimplemented in CAknAppUi, and CAknViewAppUi.

IMPORT_C void CAknAppUiBase::HandleResourceChangeL TInt  aType  ) 
 

From CEikAppUi.

Handles a change to the application's resources which are shared across the environment. This function calls CEikAppUi::HandleResourceChangeL except when aType is KEikDynamicLayoutVariantSwitch.

Parameters:
aType  The type of resources that have changed.
virtual IMPORT_C void CAknAppUiBase::HandleScreenDeviceChangedL  )  [protected, virtual]
 

From CCoeAppUiBase.

Calls CCoeAppUi::HandleScreenDeviceChangedL().

TBool CAknAppUiBase::HasFullOrPartialForeground  )  const
 

Checks if application UI has full or partial foreground status.

Returns:
ETrue if application UI has full or partial foreground status. Otherwise EFalse.
TBool CAknAppUiBase::IsAppClosing  )  const
 

Determines whether the application is closing.

In practice this means that CEikonEnv has been destroyed.

Returns:
ETrue if the application is closing.
IMPORT_C TBool CAknAppUiBase::IsFaded  )  const
 

Determines whether the system is faded.

Returns:
ETrue if system is faded
IMPORT_C TBool CAknAppUiBase::IsForeground  )  const
 

Determines whether the application is foreground.

Returns:
ETrue if the application is foreground.
IMPORT_C TBool CAknAppUiBase::IsFullScreenApp  )  const
 

Determines whether the application is full screen application.

Returns:
ETrue if the application is full screen application.
IMPORT_C TBool CAknAppUiBase::IsLayoutAwareApp  )  const
 

Determines whether the application is layout aware.

Returns:
ETrue if the application is layout aware.
TBool CAknAppUiBase::IsMSKEnabledApp  )  const
 

Determines whether the application has MSK enabled.

Returns:
ETrue if the application has MSK enabled.
IMPORT_C TBool CAknAppUiBase::IsPartialForeground  )  const
 

Determines whether the application is partially foreground.

Returns:
ETrue if the application is partially foreground.
IMPORT_C CAknKeySoundSystem* CAknAppUiBase::KeySounds  )  const
 

Gets a pointer to KeySound API object.

Returns:
Pointer to KeySound API object.
IMPORT_C TAknUiZoom CAknAppUiBase::LocalUiZoom  )  const
 

Gets the application local zoom.

Returns:
Application local zoom
virtual IMPORT_C TTypeUid::Ptr CAknAppUiBase::MopSupplyObject TTypeUid  aId  )  [protected, virtual]
 
IMPORT_C TAppUiOrientation CAknAppUiBase::Orientation  )  const
 

Gets the application screen orientation.

Returns:
Application screen orientation.
IMPORT_C TBool CAknAppUiBase::OrientationCanBeChanged  )  const
 

Tests whether it is possible for this app to have a practical effect on the screen orientation, through SetOrientationL().

Returns:
ETrue if SetOrientationL can change the orientation, EFalse otherwise.
IMPORT_C void CAknAppUiBase::PrepareToExit  ) 
 

From CCoeAppUiBase.

Performs pre-exit processing by calling CEikAppUi::PrepareToExit() to ensure the application will exit cleanly.

Reimplemented in CAknAppUi.

IMPORT_C void CAknAppUiBase::ReplaceKeySoundsL TInt  aUid  )  [protected]
 

Replace current key sound server with new one.

Parameters:
aUid  ID of the new key sound server.
TInt CAknAppUiBase::ScreenMode  )  const
 
IMPORT_C void CAknAppUiBase::SetFadedL TBool  aFaded  ) 
 

From CEikAppUi.

Sets whether the windows are faded.

Parameters:
aFaded  ETrue if windows are faded, otherwise windows are unfaded.
IMPORT_C void CAknAppUiBase::SetFullScreenApp TBool  aIsFullScreen  )  [protected]
 

Set the application to be a full screen application.

Parameters:
aIsFullScreen  is ETrue if the application is a full screen application, EFlase otherwise.
IMPORT_C void CAknAppUiBase::SetLayoutAwareApp TBool  aLayoutAwareApp  ) 
 

Set application layout aware.

Parameters:
aLayoutAwareApp  ETrue if the application is layout aware, EFlase otherwise.
IMPORT_C void CAknAppUiBase::SetLocalUiZoom TAknUiZoom  aZoom  ) 
 

Sets the application local zoom.

However, in order to have any effect, it may be necessary to make a subsequent call to ApplyLayoutChangeL.

Parameters:
aZoom  application local zoom
IMPORT_C void CAknAppUiBase::SetOrientationL TAppUiOrientation  aOrientation  ) 
 

Sets the application screen orientation.

Note: this API has no effect on non-full-screen app UIs.

Parameters:
aOrientation  application screen orientation.
void CAknAppUiBase::SetScreenModeL TInt  aModeNumber  ) 
 
void CAknAppUiBase::SimulateWsEventL TInt  aEvent  ) 
 

Simulates an event being received from wserv.

Parameters:
aEvent  the event id being simulated.
TBool CAknAppUiBase::ThreadIsForeground  )  const
 

Determines whether the thread owning this application window group is foreground.

Returns:
ETrue if the thread owning this application window group is foreground, EFlase otherwise.

Friends And Related Function Documentation

friend class CAknAppUi [friend]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top