THuiCommand Class Reference

class THuiCommand

THuiCommand is the base class of all commands. A command is an instruction to some class that can be set to occur some time in the future. Each command stores information about an operation. Each command is also responsible for the execution of the command. Commands are processed by the class's OfferEventL() method.

Public Member Functions
~THuiCommand()
voidExecuteL(CHuiEnv &)
IMPORT_C const THuiObjectCommand *ObjectCommand()
IMPORT_C TAny *Sender()
IMPORT_C CHuiControl *SenderControl()
IMPORT_C CHuiControlGroup *SenderControlGroup()
IMPORT_C THuiCommandObjectTypeSenderType()
IMPORT_C CHuiVisual *SenderVisual()
IMPORT_C voidSetSender(THuiCommandObjectType, TAny *)
TInt Size()
IMPORT_C THuiCommandTypeType()
Protected Member Functions
THuiCommand(THuiCommandType)
IMPORT_C voidCommandExtension(const TUid &, TAny **)
Private Attributes
TAny *iSender
THuiCommandObjectType iSenderType
TInt iSpare1
TInt iSpare2
THuiCommandType iType

Constructor & Destructor Documentation

THuiCommand(THuiCommandType)

IMPORT_CTHuiCommand(THuiCommandTypeaType)[protected]

Protected constructor.

Parameters

THuiCommandType aTypeType of the command.

~THuiCommand()

IMPORT_C~THuiCommand()[virtual]

Member Functions Documentation

CommandExtension(const TUid &, TAny **)

IMPORT_C voidCommandExtension(const TUid &aExtensionUid,
TAny **aExtensionParams
)[protected, virtual]

Parameters

const TUid & aExtensionUid
TAny ** aExtensionParams

ExecuteL(CHuiEnv &)

voidExecuteL(CHuiEnv &aEnv)const [pure virtual]

Executes the command.

Parameters

CHuiEnv & aEnvThe environment in which the command is being executed.

ObjectCommand()

IMPORT_C const THuiObjectCommand *ObjectCommand()const [virtual]

Returns a pointer to the command casted to THuiObjectCommand. If this is not possible (the command is not derived from THuiObjectCommand), returns NULL instead.

Sender()

IMPORT_C TAny *Sender()const

Returns the sender object. This is the object which issued the command originally.

SenderControl()

IMPORT_C CHuiControl *SenderControl()const

Returns the sender control. Returns NULL if the sender is not a control.

Sender()

SenderControlGroup()

IMPORT_C CHuiControlGroup *SenderControlGroup()const

Returns the sender control group. Returns NULL if the sender is not a control group.

Sender()

SenderType()

IMPORT_C THuiCommandObjectTypeSenderType()const

Determines the type of the object that sent the command.

SenderVisual()

IMPORT_C CHuiVisual *SenderVisual()const

Returns the sender visual. Returns NULL if the sender is not a visual.

Sender()

SetSender(THuiCommandObjectType, TAny *)

IMPORT_C voidSetSender(THuiCommandObjectTypeaType,
TAny *aSender
)

Sets the sender object of the command. The sender must not be deleted while the command is pending execution in a scheduler.

Parameters

THuiCommandObjectType aTypeSender type.
TAny * aSenderPointer to sender.

Size()

TInt Size()const [pure virtual]

Returns the size of the command.

Type()

IMPORT_C THuiCommandTypeType()const

Determines the type of the command.

Member Data Documentation

TAny * iSender

TAny *iSender[private]

Object that sent this command. Must exist.

THuiCommandObjectType iSenderType

THuiCommandObjectType iSenderType[private]

Type of the object that sent the command.

TInt iSpare1

TInt iSpare1[private]

TInt iSpare2

TInt iSpare2[private]

THuiCommandType iType

THuiCommandType iType[private]

Type of the command. Depends on the command class.