MAknsControlContext Class Reference

#include <mw/AknsControlContext.h>

Link against: AknSkins.lib

class MAknsControlContext
Public Member Enumerations
enumanonymous { ETypeId }
Public Member Functions
virtual ~MAknsControlContext()
pure virtual TBool IsCompatibleWithType(const TAknsControlContextType)
IMPORT_C TTypeUid::PtrSupplyMopObject(TTypeUid, MAknsControlContext *)
pure virtual TAny *SupplySkinObject(TAknsCCObject)
pure virtual TInt SupplySkinParameter(TAknsCCParameter)
virtual TInt UpdateContext()
Protected Member Functions
virtual TInt Reserved2()

Detailed Description

Interface that provides context specific skin parameters. This interface is used by AknsDrawUtils to query context specific parameters, such as background override. Application should instantiate a class that implements this interface and provide pointer to it using MObjectProvider::MopSupplyObject in the appropriate control.

This is a public class with exported functions. The class is not intended for user derivation - concrete classes implementing the interface are provided by the library. See CAknsBasicBackgroundControlContext and CAknsListBoxBackgroundControlContext for further details.

Since
2.0

Member Enumeration Documentation

Enum anonymous

Type ID declaration. Type ID is used to make it possible to retrieve control context through MObjectProvider::MopSupplyObject interface.

EnumeratorValueDescription
ETypeId0x10005a29

Constructor & Destructor Documentation

~MAknsControlContext ( )

~MAknsControlContext()[inline, virtual]

Destructor. Destructor is provided only to enable deletion using base class pointer. Caller should never delete control context retrieved through MObjectProvider interface.

Member Function Documentation

IsCompatibleWithType ( const TAknsControlContextType )

TBool IsCompatibleWithType(const TAknsControlContextTypeaType)const [pure virtual]

Determines whether this control context is compatible with the given derived type.

Since
2.0
ParameterDescription
aTypeType of the derived control context class (one of the values in TAknsControlContextType).

Returns: ETrue if this control context instance is compatible with the given type (i.e. can be casted to the corresponding concrete class). EFalse otherwise.

Reserved2 ( )

TInt Reserved2()[protected, virtual]

Reserved for future use.

Since
2.0

SupplyMopObject ( TTypeUid, MAknsControlContext * )

IMPORT_C TTypeUid::PtrSupplyMopObject(TTypeUidaId,
MAknsControlContext *aContext
)[static]

Returns type UID pointer that can be used in MopSupplyObject.

Since
2.0
ParameterDescription
aIdType UID, should be the same that was given as aId parameter of MopSupplyObject.
aContextPointer to an MAknsControlContext instance.

Returns: Type UID pointer containing aContext, or NULL type UID pointer if given type UID does not match MAknsControlContext or aContext is NULL.

SupplySkinObject ( TAknsCCObject )

TAny *SupplySkinObject(TAknsCCObjectaObject)[pure virtual]

Provides context specific object.

Since
2.0
ParameterDescription
aObjectType of the object to be retrieved. Possible values are defined in TAknsCCObject enumeration.

Returns: Pointer to object as defined in TAknsCCObject for that specific aObject parameter value. For unknown or unhandled values NULL must be returned.

SupplySkinParameter ( TAknsCCParameter )

TInt SupplySkinParameter(TAknsCCParameteraParam)[pure virtual]

Provides context specific integer parameter.

Since
2.0
ParameterDescription
aParamType of the parameter to be retrieved. Possible values are defined in TAknsCCParameter enumeration.

Returns: Integer value as defined in TAknsCCParameter for the particular parameter. For unknown or unhandled values zero must be returned.

UpdateContext ( )

TInt UpdateContext()[virtual]

Updates the control context, if necessary. This method is called by the framework before drawing with the context.

Base class implementation returns 0.

Since
2.6

Returns: Return value reserved for future use. Currently returns 0.