MEikButtonGroup Class Reference

#include <mw/eikbtgrp.h>

Link against: eikcoctl.lib

class MEikButtonGroup
Public Member Functions
pure virtual voidAddCommandL(TInt, TInt, const TDesC *, const CFbsBitmap *, const CFbsBitmap *)
pure virtual voidAddCommandSetToStackL(TInt)
pure virtual voidAddCommandToStackL(TInt, TInt, const TDesC *, const CFbsBitmap *, const CFbsBitmap *)
pure virtual voidAddCommandToStackL(TInt, TInt)
virtual IMPORT_C voidAnimateCommand(TInt)
pure virtual voidAnimateCommandByPosition(TInt)
pure virtual CCoeControl *AsControl()
pure virtual const CCoeControl *AsControl()
pure virtual TInt ButtonCount()
pure virtual TUint ButtonGroupFlags()
pure virtual TSize CalcMinimumSizeL(TInt)
pure virtual TInt CommandId(TInt)
pure virtual TInt CommandPos(TInt)
pure virtual voidDimCommand(TInt, TBool)
pure virtual voidDimCommandByPosition(TInt, TBool)
pure virtual CEikCommandButton *GroupControlAsButton(TInt)
pure virtual CCoeControl *GroupControlById(TInt)
pure virtual TBool IsCommandDimmed(TInt)
pure virtual TBool IsCommandDimmedByPosition(TInt)
pure virtual TBool IsCommandVisible(TInt)
pure virtual TBool IsCommandVisibleByPosition(TInt)
pure virtual voidMakeCommandVisible(TInt, TBool)
pure virtual voidMakeCommandVisibleByPosition(TInt, TBool)
pure virtual voidReduceRect(TRect &)
voidRelease()
pure virtual voidRemoveCommandFromStack(TInt, TInt)
pure virtual voidSetBoundingRect(const TRect &)
pure virtual voidSetCommandL(TInt, TInt, const TDesC *, const CFbsBitmap *, const CFbsBitmap *)
pure virtual voidSetCommandL(TInt, TInt)
pure virtual voidSetCommandSetL(TInt)
pure virtual voidSetDefaultCommand(TInt)
pure virtual voidSetMSKCommandObserver(MEikCommandObserver *)

Detailed Description

Abstract base class for EIKON button group.

Since
S60 0.9

Member Function Documentation

AddCommandL ( TInt, TInt, const TDesC *, const CFbsBitmap *, const CFbsBitmap * )

voidAddCommandL(TIntaPosition,
TIntaCommandId,
const TDesC *aText,
const CFbsBitmap *aBitmap,
const CFbsBitmap *aMask
)[pure virtual]

Adds a command button with a command ID and a label containing both a bitmap and text.

ParameterDescription
aPositionThe position in the button group for the new button.
aCommandIdCommand ID for the new button.
aTextText for the button.
aBitmapBitmap for the button.
aMaskMask bitmap for aBitmap.

AddCommandSetToStackL ( TInt )

voidAddCommandSetToStackL(TIntaResourceId)[pure virtual]

As with SetCommandL() but for a set of buttons, also allows the previous command button to be retrieved by calling RemoveCommand().

ParameterDescription
aResourceIdResource describing the set of command buttons.

AddCommandToStackL ( TInt, TInt, const TDesC *, const CFbsBitmap *, const CFbsBitmap * )

voidAddCommandToStackL(TIntaPosition,
TIntaCommandId,
const TDesC *aText,
const CFbsBitmap *aBitmap,
const CFbsBitmap *aMask
)[pure virtual]

Pushes a command button with text, bitmap, mask and a command ID onto a position's button stack.

ParameterDescription
aPositionThe position in the button group at which to add the command button.
aCommandIdCommand ID the button will send.
aTextText for the button.
aBitmapBitmap for the button.
aMaskMask bitmap for aBitmap.

AddCommandToStackL ( TInt, TInt )

voidAddCommandToStackL(TIntaPosition,
TIntaResourceId
)[pure virtual]

Pushes a command button onto a position's button stack. The text, bitmap, mask and command ID are all read from resource.

ParameterDescription
aPositionThe position in the button group at which to push the command button.
aResourceIdID of a resource specifying the text, bitmaps and command ID.

AnimateCommand ( TInt )

IMPORT_C voidAnimateCommand(TIntaCommandId)[virtual]

Animates the button with the specified id.

ParameterDescription
aCommandIdThe button to animate.

AnimateCommandByPosition ( TInt )

voidAnimateCommandByPosition(TIntaPosition)[pure virtual]

Animates the button with position aPosition.

ParameterDescription
aPositionThe position for command to be animated.

AsControl ( )

CCoeControl *AsControl()[pure virtual]

Returns the button group as a control.

Returns: The button group as a control.

AsControl ( )

const CCoeControl *AsControl()const [pure virtual]

Returns the button group as a control.

Returns: The button group as a control.

ButtonCount ( )

TInt ButtonCount()const [pure virtual]

Gets the total number of buttons currently present in the group.

Returns: The number of buttons.

ButtonGroupFlags ( )

TUint ButtonGroupFlags()const [pure virtual]

Gets the button group flags.

Returns: The button group flags.

CalcMinimumSizeL ( TInt )

TSize CalcMinimumSizeL(TIntaResourceId)[pure virtual]

Calculates minimum size required to display the buttons defined in the specified resource structure.

ParameterDescription
aResourceIdThe ID of the resource structure describing the button group.

Returns: Minimum size required to display the button group defined in the specified resource structure.

CommandId ( TInt )

TInt CommandId(TIntaCommandPos)const [pure virtual]

Returns the command id by position.

ParameterDescription
aCommandPosThe command's position.

Returns: The command id.

CommandPos ( TInt )

TInt CommandPos(TIntaCommandId)const [pure virtual]

Returns the command position by command id.

ParameterDescription
aCommandIdThe button's command id.

Returns: The command position in the button group.

DimCommand ( TInt, TBool )

voidDimCommand(TIntaCommandId,
TBoolaDimmed
)[pure virtual]

Dims or undims a button without drawing it.

ParameterDescription
aCommandIdCommand ID of the button to change.
aDimmedETrue to dim the specified command. EFalse to undim the specified command.

DimCommandByPosition ( TInt, TBool )

voidDimCommandByPosition(TIntaPosition,
TBoolaDimmed
)[pure virtual]

Dims (but doesn't draw) the button with position aPosition.

ParameterDescription
aPositionThe position for command to be dimmed.
aDimmedETrue for dimming.

GroupControlAsButton ( TInt )

CEikCommandButton *GroupControlAsButton(TIntaCommandId)const [pure virtual]

Returns a group control (a button) as a command button.

ParameterDescription
aCommandIdThe button's command id.

Returns: The group control as a command button.

GroupControlById ( TInt )

CCoeControl *GroupControlById(TIntaCommandId)const [pure virtual]

Returns a group control (a button) as a control.

ParameterDescription
aCommandIdThe button's command id.

Returns: The group control as a control.

IsCommandDimmed ( TInt )

TBool IsCommandDimmed(TIntaCommandId)const [pure virtual]

Determines whether the button with the specified command ID is dimmed.

ParameterDescription
aCommandIdThe command ID.

Returns: ETrue if the specified command is dimmed. EFalse if the specified command is not dimmed.

IsCommandDimmedByPosition ( TInt )

TBool IsCommandDimmedByPosition(TIntaPosition)const [pure virtual]

Returns ETrue if the button with position aPosition is dimmed.

ParameterDescription
aPositionThe position for command to be checked.

Returns: The state of the button.

IsCommandVisible ( TInt )

TBool IsCommandVisible(TIntaCommandId)const [pure virtual]

Tests whether the button with the specified command ID is visible.

ParameterDescription
aCommandIdSpecifies the button.

Returns: ETrue if the specified button is visible. EFalse if the specified button is not visible.

IsCommandVisibleByPosition ( TInt )

TBool IsCommandVisibleByPosition(TIntaPosition)const [pure virtual]

Returns ETrue if the button with position aPosition is visible.

ParameterDescription
aPositionThe position for command to be checked.

Returns: The state of the button.

MakeCommandVisible ( TInt, TBool )

voidMakeCommandVisible(TIntaCommandId,
TBoolaVisible
)[pure virtual]

Makes the button with the specified id either visible, or invisible.

ParameterDescription
aCommandIdSpecifies the button to alter.
aVisibleETrue to make the specified button visible. EFalse to make the specified button invisible.

MakeCommandVisibleByPosition ( TInt, TBool )

voidMakeCommandVisibleByPosition(TIntaPosition,
TBoolaVisible
)[pure virtual]

Sets the the button with position aPosition to be visible if aVisible is ETrue.

ParameterDescription
aPositionThe position for command to be made visible.
aVisibleEFalse for making button invisible.

ReduceRect ( TRect & )

voidReduceRect(TRect &aBoundingRect)const [pure virtual]

Subtracts the area occupied by the button group from the specified bounding rectangle. This method should be used in preference to querying the container's area at all times. For use by EExternal button groups only.

ParameterDescription
aBoundingRectRectangle to be modified.

Release ( )

voidRelease()

Deletes the object.

RemoveCommandFromStack ( TInt, TInt )

voidRemoveCommandFromStack(TIntaPosition,
TIntaCommandId
)[pure virtual]

Removes the command identified by aCommandId, in position aPosition in the group, from the command stack. Automatically retrieves the previous command details. Commands are added to the stack by calling AddCommandToStackL.

ParameterDescription
aPositionThe position in the button group from which to remove the command button.
aCommandIdCommand ID.

SetBoundingRect ( const TRect & )

voidSetBoundingRect(const TRect &aBoundingRect)[pure virtual]

Sets the boundary rectangle for externally-positioned button groups. For use by EExternal button groups only.

ParameterDescription
aBoundingRectThe boundary rectangle to use. The button group attaches itself to the inside of this rectangle.

SetCommandL ( TInt, TInt, const TDesC *, const CFbsBitmap *, const CFbsBitmap * )

voidSetCommandL(TIntaPosition,
TIntaCommandId,
const TDesC *aText,
const CFbsBitmap *aBitmap,
const CFbsBitmap *aMask
)[pure virtual]

Sets a command button's bitmap, text and command ID.

ParameterDescription
aPositionThe position within the button group of the button to change.
aCommandIdCommand ID the button will send.
aTextThe text for the button.
aBitmapThe bitmap for the button.
aMaskThe mask bitmap for aBitmap.

SetCommandL ( TInt, TInt )

voidSetCommandL(TIntaPosition,
TIntaResourceId
)[pure virtual]

Sets a command button's bitmap, text label and command ID. The bitmap, mask, text and command ID are all read from resource.

ParameterDescription
aPositionThe position within the button group of the button to change.
aResourceIdResource ID specifying the text, bitmaps and command ID.

SetCommandSetL ( TInt )

voidSetCommandSetL(TIntaResourceId)[pure virtual]

Initialises the group of command buttons from a resource.

ParameterDescription
aResourceIdID of the resource structure specifying the command buttons.

SetDefaultCommand ( TInt )

voidSetDefaultCommand(TIntaCommandId)[pure virtual]

Sets the default command ID for buttons in this button group.

ParameterDescription
aCommandIdCommand to issue if no other is specified.

SetMSKCommandObserver ( MEikCommandObserver * )

voidSetMSKCommandObserver(MEikCommandObserver *aCommandObserver)[pure virtual]

Sets the middle softkey command observer.

ParameterDescription
aCommandObserverThe middle softkey command observer.