Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: eikhkeyt.h
Link against: eikcoctl.lib

Class CEikHotKeyTable

CEikHotKeyTable

Support

Supported from 6.0

Description

An array for hotkey commands and their associated key codes and modifiers.

Derivation

CArrayFixA thin templated base class for arrays of fixed length objects
CArrayFixBaseBase class for arrays of fixed length objects
CArrayFixFlatArray of fixed length objects contained within a flat dynamic buffer
CBaseBase class for all classes to be instantiated on the heap
CEikHotKeyTableAn array for hotkey commands and their associated key codes and modifiers

Defined in CEikHotKeyTable:
AddItemL(), CEikHotKeyTable(), CommandIdFromHotKey(), ConstructFromResourceL(), HotKeyFromCommandId(), RemoveItem(), Reset(), SEikHotKey, ~CEikHotKeyTable()

Inherited from CArrayFix:
AppendL(), AppendL()Append, Array(), At(), Back(), End(), ExpandL(), ExtendL(), Find(), FindIsq(), InsertIsqAllowDuplicatesL(), InsertIsqL(), InsertL(), ResizeL(), operator[]

Inherited from CArrayFixBase:
Compress(), Count(), Delete(), Length(), Sort()

Inherited from CArrayFixFlat:
SetReserveL()

Inherited from CBase:
operator new()


Construction and destruction


CEikHotKeyTable()

CEikHotKeyTable();

Description

Constructs an empty array.


ConstructFromResourceL()

void ConstructFromResourceL(TInt aResourceId);

Description

Constructs an empty array from resource.

Parameters

TInt aResourceId

The ID if the resource reader to use to construct the array.


~CEikHotKeyTable()

~CEikHotKeyTable();

Description

Destructor.

[Top]


Member functions


AddItemL()

void AddItemL(TInt aCommandId,TInt aKeycode,TInt aModifiers);

Description

Adds the specified hotkey to the hotkey array. This function will leave if the specified modifier is not supported.

Parameters

TInt aCommandId

The command associated with the hotkey.

TInt aKeycode

The key code used to invoke the command.

TInt aModifiers

Any modifiers used to invoke the command, shift or control for example.


RemoveItem()

void RemoveItem(TInt aCommandId);

Description

Removes the item specified by command ID from the array.

Parameters

TInt aCommandId

The ID of the item to remove.


CommandIdFromHotKey()

TInt CommandIdFromHotKey(TInt aKeycode,TInt aModifiers) const;

Description

Gets the command ID associated with the specified key code and modifier.

Parameters

TInt aKeycode

The key code for which the command ID is obtained.

TInt aModifiers

The key modifier for which the command ID is obtained.

Return value

TInt

The command ID for the specified key code and modifier.


HotKeyFromCommandId()

TBool HotKeyFromCommandId(TInt aCommandId,TInt& aKeycode,TInt& aModifiers) const;

Description

Gets the hotkey code and modifier for the specified command ID.

Parameters

TInt aCommandId

The ID of the hotkey for which the key code and modifiers are obtained.

TInt& aKeycode

On return, the key code for the specified command ID.

TInt& aModifiers

On return, the modifier for the specified command ID.

Return value

TBool

ETrue if the hotkey exists, EFalse otherwise.


Reset()

void Reset();

Description

Resets the hotkey array.

[Top]


Struct SEikHotKey

SEikHotKey

Description

Hotkey parameters. This can be added to a hotkey table using the functions provided by the CEikHotKeyTable class.

Defined in CEikHotKeyTable::SEikHotKey:
iCommandId, iKeycode


iCommandId

TInt iCommandId

Description

The command ID associated with the hotkey.


iKeycode

TInt iKeycode

Description

The key code associated with the hotkey.