CEikButtonGroupContainer Class Reference

API published in: S60 1st Ed

Link against: eikcoctl.lib avkon.lib

Capability Information

Required Capabilities

None


#include <
eikbtgpc.h>

Inherits CAknControl.


Detailed Description

The CEikButtonGroupContainer class provides a wrapper around the different button arrays used in pen and no-pen devices.

Public Types

enum  TOrientation { EVertical = SLafButtonGroupContainer::EVertical, EHorizontal = SLafButtonGroupContainer::EHorizontal }
 Describes the orientation of the container. More...
enum  TLocation { EInternal = SLafButtonGroupContainer::EInternal, EExternal = SLafButtonGroupContainer::EExternal }
 Relative positions of the container and the control which uses it. More...
enum  THotKeyFlags { EShowHotKey = 0x01, EPlainHotKey = 0x02 }
 Flags for the display of hotkeys. More...
enum  TFlags { EAddToStack = 0x01, EDelayActivation = 0x02, EUseMaxSize = 0x04 }
 Additional flags. More...
enum  TCommandPosition { ELeftSoftkeyPosition = 0, ERightSoftkeyPosition = 2, EMiddleSoftkeyPosition = 3 }
 Defines the positions for each command. More...

Public Member Functions

 DECLARE_TYPE_ID (0x101F4107) enum TUse
 Describes how the container is being used.
IMPORT_C ~CEikButtonGroupContainer ()
 Destructor.
void SetCommandL (TInt aPosition, TInt aCommandId, const TDesC &aText)
 Sets a command button's text label and command ID.
void SetCommandL (TInt aPosition, TInt aCommandId, const CFbsBitmap &aBitmap, const CFbsBitmap &aMask)
 Sets a command button's bitmap and command ID.
void SetCommandL (TInt aPosition, TInt aCommandId, const TDesC &aText, const CFbsBitmap &aBitmap, const CFbsBitmap &aMask)
 Sets a command button's bitmap, text and command ID.
void SetCommandL (TInt aPosition, TInt aCommandId, const TDesC &aFile, TInt aBitmapId, TInt aMaskId)
 Sets a command button's bitmap and command ID.
void SetCommandL (TInt aPosition, TInt aCommandId, const TDesC &aText, const TDesC &aFile, TInt aBitmapId, TInt aMaskId)
 Sets a command button's bitmap, text label and command ID.
void SetCommandL (TInt aPosition, TInt aResourceId)
 Sets a command button's bitmap, text label and command ID.
void SetCommandL (TInt aCommandId, const TDesC &aText)
 Sets a command button's text.
void SetCommandL (TInt aCommandId, const CFbsBitmap &aBitmap, const CFbsBitmap &aMask)
 Sets a command button's bitmap and mask.
void SetCommandL (TInt aCommandId, const TDesC &aText, const CFbsBitmap &aBitmap, const CFbsBitmap &aMask)
 Sets a command button's bitmap, mask and text.
void SetCommandL (TInt aCommandId, const TDesC &aFile, TInt aBitmapId, TInt aMaskId)
 Sets a command button's bitmap and mask.
void SetCommandL (TInt aCommandId, const TDesC &aText, const TDesC &aFile, TInt aBitmapId, TInt aMaskId)
 Sets a command button's bitmap, mask and text.
IMPORT_C void SetCommandSetL (TInt aResourceId)
 Initialises the group of command buttons from a resource.
void AddCommandL (TInt aPosition, TInt aCommandId, const TDesC &aText)
 Adds a command button with a text label and command ID.
void AddCommandL (TInt aPosition, TInt aCommandId, const CFbsBitmap &aBitmap, const CFbsBitmap &aMask)
 Adds a command button with a bitmap label and command ID.
void AddCommandL (TInt aPosition, TInt aCommandId, const TDesC &aText, const CFbsBitmap &aBitmap, const CFbsBitmap &aMask)
 Adds a command button with a command ID and a label containing both a bitmap and text.
void AddCommandL (TInt aPosition, TInt aCommandId, const TDesC &aFile, TInt aBitmapId, TInt aMaskId)
 Adds a command button with a command ID and a bitmap which is read from a file.
void AddCommandL (TInt aPosition, TInt aCommandId, const TDesC &aText, const TDesC &aFile, TInt aBitmapId, TInt aMaskId)
 Adds a command button with a command ID and a label containing both a bitmap and text.
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const TDesC &aText)
 Pushes a command button with a text label and command ID onto a position's button stack.
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const CFbsBitmap &aBitmap, const CFbsBitmap &aMask)
 Pushes a command button with a bitmap, mask and command ID onto a position's button stack.
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const TDesC &aText, const CFbsBitmap &aBitmap, const CFbsBitmap &aMask)
 Pushes a command button with text, bitmap, mask and a command ID onto a position's button stack.
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const TDesC &aFile, TInt aBitmapId, TInt aMaskId)
 Pushes a command button with a bitmap, mask and command ID onto a position's button stack.
void AddCommandToStackL (TInt aPosition, TInt aCommandId, const TDesC &aText, const TDesC &aFile, TInt aBitmapId, TInt aMaskId)
 Pushes a command button with text, bitmap, mask and command button onto a position's button stack.
void AddCommandToStackL (TInt aPosition, TInt aResourceId)
 Pushes a command button onto a position's button stack.
IMPORT_C void AddCommandSetToStackL (TInt aResourceId)
 As with SetCommandL() but for a set of buttons, also allows the previous command button to be retrieved by calling RemoveCommand().
IMPORT_C void RemoveCommandFromStack (TInt aPosition, TInt aCommandId)
 Removes the command identified by aCommandId, in position aPosition in the group, from the command stack.
IMPORT_C void SetDefaultCommand (TInt aCommandId)
 Sets the default command ID for buttons in this container.
IMPORT_C TSize CalcMinimumSizeL (TInt aResourceId) const
 Calculates minimum size required to display the buttons defined in the specified resource structure.
IMPORT_C void CleanupCommandPushL (TInt aPosition)
 Places the command in position aPosition in the group on the cleanup stack.
void CleanupCommandPop ()
 Removes a command from the cleanup stack without destroying it.
IMPORT_C void CleanupCommandPop (TInt aCount)
 Removes one or more commands from the cleanup stack without destroying them.
void CleanupCommandPopAndDestroy ()
 Removes a single command which was pushed onto the cleanup stack.
void CleanupCommandPopAndDestroy (TInt aCount)
 Removes one or more commands which were pushed onto the cleanup stack.
IMPORT_C TInt MaxCommands () const
 Gets the maximum number of buttons that can be supported by the device.
IMPORT_C TInt ButtonCount () const
 Gets the total number of buttons currently present in the group.
IMPORT_C void DimCommand (TInt aCommandId, TBool aDimmed)
 Dims (but doesn't draw) the button with id aCommandId if aDimmed is ETrue.
IMPORT_C TBool IsCommandDimmed (TInt aCommandId) const
 Returns ETrue if the button with id aCommandId is dimmed.
IMPORT_C void MakeCommandVisible (TInt aCommandId, TBool aVisible)
 Sets the the button with id aCommandId to be visible if aVisible is ETrue.
IMPORT_C TBool IsCommandVisible (TInt aCommandId) const
 Returns ETrue if the button with id aCommandId is visible.
IMPORT_C void AnimateCommand (TInt aCommandId)
 Animates the button with id aCommandId.
IMPORT_C void DimCommandByPosition (TCommandPosition aPosition, TBool aDimmed)
 Dims (but doesn't draw) the button with position aPosition.
IMPORT_C TBool IsCommandDimmedByPosition (TCommandPosition aPosition) const
 Returns ETrue if the button with position aPosition is dimmed.
IMPORT_C void MakeCommandVisibleByPosition (TCommandPosition aPosition, TBool aVisible)
 Sets the the button with position aPosition to be visible if aVisible is ETrue.
IMPORT_C TBool IsCommandVisibleByPosition (TCommandPosition aPosition) const
 Returns ETrue if the button with position aPosition is visible.
IMPORT_C void AnimateCommandByPosition (TCommandPosition aPosition)
 Animates the button with position aPosition.
IMPORT_C TLocation Location () const
 Gets the button group's location.
IMPORT_C CEikCommandButtonCommandButtonOrNull (TInt aCommandId) const
 Gets a pointer to the command button with the specified command Id.
IMPORT_C void SetBoundingRect (const TRect &aRect)
 Sets the boundary rectangle for externally-positioned button groups.
IMPORT_C void ReduceRect (TRect &aBoundingRect) const
 Subtracts the area occupied by the button group from the specified bounding rectangle.
IMPORT_C CCoeControl * ControlOrNull (TInt aCommandId) const
 Gets a pointer to the control (button) with the specified command ID.
IMPORT_C CEikCommandButtonButtonById (TInt aCommandId) const
 Gets a pointer to the the button with the specified command Id.
IMPORT_C TInt PositionById (TInt aCommandId) const
 Gets the position in the group of the button with the specified command Id.
IMPORT_C void UpdateHotKey (TInt aCommandId, THotKeyFlags aFlags, TInt aKeyId)
 Updates a command's hotkey and whether the key is displayed.
IMPORT_C void UpdateCommandObserverL (TInt aPos, MEikCommandObserver &aCommandObserver)
 Changes the command observer for the button at aPos to aCommandObserver.
IMPORT_C void RemoveCommandObserver (TInt aPos)
 Removes the temporary observer for the button at aPos, replacing it with the observer that was present when UpdateCommandObserverL() was called.
IMPORT_C TBool UpdatedCommandObserverExists (TCommandPosition aPosition) const
 Checks for existence of updated command observer for the button at aPosition.
IMPORT_C TBool DelayActivation () const
 Tests whether the button group has explicitly been instructed to suppress redraws.
MEikButtonGroupButtonGroup ()
 Returns the container's button group.
TUse ButtonGroupType ()
 Returns the button group type.
void UpdateMSKCommandObserver (CEikListBox *aMSKObserverOwner, MEikCommandObserver *aCommandObserver)
 Internal method for setting markable list's MSK observer.
IMPORT_C TSize MinimumSize ()
 From CCoeControl.
IMPORT_C TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
 From CCoeControl.
void MakeVisible (TBool aVisible)
 From CCoeControl.
IMPORT_C void WriteInternalStateL (RWriteStream &aWriteStream) const
 From CCoeControl.
virtual IMPORT_C void Reserved_MtsmPosition ()
 Formerly from MTopSetMember<CEikButtonGroupContainer>, now reserved.
virtual IMPORT_C void Reserved_MtsmObject ()
 Formerly from MTopSetMember<CEikButtonGroupContainer>, now reserved.
IMPORT_C void OfferCommandListL (const RArray< TInt > &aCommandList)
 Used to offer list of commands for softkeys.
IMPORT_C void OfferCommandListL (const TInt aResourceId)
 Used to offer list of commands for softkeys.
IMPORT_C TBool IsCommandInGroup (const TInt aCommandId) const
 Used to check if a certain command have been approved to the current command set.
IMPORT_C void ReplaceCommand (const TInt aCommandId, const TInt aResourceId)
 Replaces command with another.

Static Public Member Functions

static IMPORT_C CEikButtonGroupContainerNewL (TUse aUse, TOrientation aOrientation, MEikCommandObserver *aCommandObserver, TInt aResourceId, TUint aFlags=EAddToStack)
 Creates a button group container in its own window.
static IMPORT_C CEikButtonGroupContainerNewL (TUse aUse, TOrientation aOrientation, MEikCommandObserver *aCommandObserver, TInt aResourceId, const CCoeControl &aParent, TUint aFlags=EAddToStack)
 Creates a button group container in its parent control's window.
static IMPORT_C CEikButtonGroupContainerNewL (TUse aUse, TOrientation aOrientation, MEikCommandObserver *aCommandObserver, TInt aResourceId, RWindowGroup &aParentWg, TUint aFlags=EAddToStack)
 Creates a button group container in given window group.
static IMPORT_C CEikButtonGroupContainerCurrent ()
 Gets a pointer to an application's currently active CEikButtonGroupContainer (if any).

Friends

class CCmdObserverArray
class CEikButtonGroupStack

Data Structures

class  CCmdObserverArray
class  TCmdObserver
class  TCmdPos

Member Enumeration Documentation

enum CEikButtonGroupContainer::TCommandPosition
 

Defines the positions for each command.

Enumerator:
ELeftSoftkeyPosition  Position for left softkey.
ERightSoftkeyPosition  Position for right softkey.
EMiddleSoftkeyPosition  Position for middle softkey.
enum CEikButtonGroupContainer::TFlags
 

Additional flags.

Enumerator:
EAddToStack  Not used.
EDelayActivation  If set, the container is not activated during construction.
EUseMaxSize  Not used.
enum CEikButtonGroupContainer::THotKeyFlags
 

Flags for the display of hotkeys.

Enumerator:
EShowHotKey  Hotkeys for commands should be shown.
EPlainHotKey  Hotkeys for commands should not be shown.
enum CEikButtonGroupContainer::TLocation
 

Relative positions of the container and the control which uses it.

Enumerator:
EInternal  The button group is internal to the control which is using it.

E.g. dialog buttons.

EExternal  The button group is external to the control which is using it.

E.g. toolbar or cba.

enum CEikButtonGroupContainer::TOrientation
 

Describes the orientation of the container.

Enumerator:
EVertical  Buttons are laid out vertically.
EHorizontal  Buttons are laid out horizontally.

Constructor & Destructor Documentation

IMPORT_C CEikButtonGroupContainer::~CEikButtonGroupContainer  ) 
 

Destructor.


Member Function Documentation

void CEikButtonGroupContainer::AddCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aText,
const TDesC &  aFile,
TInt  aBitmapId,
TInt  aMaskId
[inline]
 

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

The bitmap and mask are read from file.

Parameters:
aPosition The position in the button group for the new button.
aCommandId Command ID for the new button.
aText Text for the button.
aFile Multi-bitmap file containing the bitmap and mask.
aBitmapId ID of the bitmap within aFile.
aMaskId ID of the mask within aFile.
void CEikButtonGroupContainer::AddCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aFile,
TInt  aBitmapId,
TInt  aMaskId
[inline]
 

Adds a command button with a command ID and a bitmap which is read from a file.

Parameters:
aPosition The position in the button group for the new button.
aCommandId Command ID for the new button.
aFile Multi-bitmap file containing the bitmap and mask.
aBitmapId ID of the bitmap within aFile.
aMaskId ID of the mask within aFile.
void CEikButtonGroupContainer::AddCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aText,
const CFbsBitmap &  aBitmap,
const CFbsBitmap &  aMask
[inline]
 

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

Parameters:
aPosition The position in the button group for the new button.
aCommandId Command ID for the new button.
aText Text for the button.
aBitmap Bitmap for the button.
aMask Mask bitmap for aBitmap.
void CEikButtonGroupContainer::AddCommandL TInt  aPosition,
TInt  aCommandId,
const CFbsBitmap &  aBitmap,
const CFbsBitmap &  aMask
[inline]
 

Adds a command button with a bitmap label and command ID.

Parameters:
aPosition The position in the button group for the new button.
aCommandId Command ID for the new button.
aBitmap Bitmap for the button.
aMask Mask bitmap for aBitmap.
void CEikButtonGroupContainer::AddCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aText
[inline]
 

Adds a command button with a text label and command ID.

Parameters:
aPosition The position in the button group for the new button.
aCommandId Command ID for the new button.
aText Text for the button.
IMPORT_C void CEikButtonGroupContainer::AddCommandSetToStackL TInt  aResourceId  ) 
 

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

Parameters:
aResourceId Resource describing the set of command buttons.
void CEikButtonGroupContainer::AddCommandToStackL TInt  aPosition,
TInt  aResourceId
[inline]
 

Pushes a command button onto a position's button stack.

The text, bitmap, mask and command ID are all read from resource. This function behaves similarly to SetCommandL() but allows the previous command button to be retrieved by calling RemoveCommandFromStack().

Parameters:
aPosition The position in the button group at which to push the command button.
aResourceId ID of a resource specifying the text, bitmaps and command ID.
void CEikButtonGroupContainer::AddCommandToStackL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aText,
const TDesC &  aFile,
TInt  aBitmapId,
TInt  aMaskId
[inline]
 

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

The bitmap and mask are read from a file. This function behaves similarly to SetCommandL() but allows the previous command button to be retrieved by calling RemoveCommandFromStack().

Parameters:
aPosition The position in the button group at which to push the command button.
aCommandId Command ID the button will send.
aText Text for the button.
aFile A multi-bitmap file containing mask and bitmap.
aBitmapId Index into the file of the bitmap.
aMaskId Index into the file of the bitmap mask.
void CEikButtonGroupContainer::AddCommandToStackL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aFile,
TInt  aBitmapId,
TInt  aMaskId
[inline]
 

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

The bitmap and mask are read from a file. This function behaves similarly to SetCommandL() but allows the previous command button to be retrieved by calling RemoveCommandFromStack().

Parameters:
aPosition The position in the button group at which to add the command button.
aCommandId Command ID the button will send.
aFile A multi-bitmap file containing mask and bitmap.
aBitmapId Index into the file of the bitmap.
aMaskId Index into the file of the bitmap mask.
void CEikButtonGroupContainer::AddCommandToStackL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aText,
const CFbsBitmap &  aBitmap,
const CFbsBitmap &  aMask
[inline]
 

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

This function behaves similarly to SetCommandL() but allows the previous command button to be retrieved by calling RemoveCommandFromStack().

Parameters:
aPosition The position in the button group at which to add the command button.
aCommandId Command ID the button will send.
aText Text for the button.
aBitmap Bitmap for the button.
aMask Mask bitmap for aBitmap.
void CEikButtonGroupContainer::AddCommandToStackL TInt  aPosition,
TInt  aCommandId,
const CFbsBitmap &  aBitmap,
const CFbsBitmap &  aMask
[inline]
 

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

This function behaves similarly to SetCommandL() but allows the previous command button to be retrieved by calling RemoveCommandFromStack().

Parameters:
aPosition The position in the button group at which to add the command button.
aCommandId Command ID the button will send.
aBitmap Bitmap for the button.
aMask Mask bitmap for aBitmap.
void CEikButtonGroupContainer::AddCommandToStackL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aText
[inline]
 

Pushes a command button with a text label and command ID onto a position's button stack.

This function behaves similarly to SetCommandL() but allows the previous command button to be retrieved by calling RemoveCommandFromStack().

Parameters:
aPosition The position in the button group at which to add the command button.
aCommandId Command ID the button will send.
aText Text for the button.
IMPORT_C void CEikButtonGroupContainer::AnimateCommand TInt  aCommandId  ) 
 

Animates the button with id aCommandId.

If two buttons have the same id, the button to be animated is undefined.

Parameters:
aCommandId The id for command to be animated.
IMPORT_C void CEikButtonGroupContainer::AnimateCommandByPosition TCommandPosition  aPosition  ) 
 

Animates the button with position aPosition.

Parameters:
aPosition The position for command to be animated.
IMPORT_C CEikCommandButton* CEikButtonGroupContainer::ButtonById TInt  aCommandId  )  const
 

Gets a pointer to the the button with the specified command Id.

Parameters:
aCommandId Command ID of the button to obtain.
Returns:
The button object.
IMPORT_C TInt CEikButtonGroupContainer::ButtonCount  )  const
 

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

Returns:
The number of buttons.
MEikButtonGroup * CEikButtonGroupContainer::ButtonGroup  )  [inline]
 

Returns the container's button group.

Returns:
Pointer to the button group object. Ownership is not transferred.
CEikButtonGroupContainer::TUse CEikButtonGroupContainer::ButtonGroupType  )  [inline]
 

Returns the button group type.

Returns:
The button group type.
IMPORT_C TSize CEikButtonGroupContainer::CalcMinimumSizeL TInt  aResourceId  )  const
 

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

Parameters:
aResourceId The ID of the resource structure describing the button group.
Returns:
Minimum size required to display the button group defined in the specified resource structure.
IMPORT_C void CEikButtonGroupContainer::CleanupCommandPop TInt  aCount  ) 
 

Removes one or more commands from the cleanup stack without destroying them.

Parameters:
aCount Number of commands to pop.
void CEikButtonGroupContainer::CleanupCommandPop  )  [inline]
 

Removes a command from the cleanup stack without destroying it.

void CEikButtonGroupContainer::CleanupCommandPopAndDestroy TInt  aCount  )  [inline]
 

Removes one or more commands which were pushed onto the cleanup stack.

It does this by calling CleanupCommandPushL(), rolling back to the previous details. The command buttons popped are destroyed.

Parameters:
aCount Number of commands to pop and destroy.
void CEikButtonGroupContainer::CleanupCommandPopAndDestroy  )  [inline]
 

Removes a single command which was pushed onto the cleanup stack.

It does this by calling CleanupCommandPushL(), rolling back to the previous details. The command button popped is destroyed.

IMPORT_C void CEikButtonGroupContainer::CleanupCommandPushL TInt  aPosition  ) 
 

Places the command in position aPosition in the group on the cleanup stack.

Typically used when a control or view changes the contents of two or more buttons on receipt of focus. After altering one command with a call to AddCommandToStackL() the push is made to guarantee the display will be left in a consistent state if the second (and any subsequent) calls to AddCommandToStackL() fail. Only a single command can be pushed for each position.

Parameters:
aPosition Position in the container of the button to push.
IMPORT_C CEikCommandButton* CEikButtonGroupContainer::CommandButtonOrNull TInt  aCommandId  )  const
 

Gets a pointer to the command button with the specified command Id.

Parameters:
aCommandId Command ID of the button.
Returns:
Pointer to the command button CEikCommandButton, NULL if there was no button with Id aCommandId.
IMPORT_C CCoeControl* CEikButtonGroupContainer::ControlOrNull TInt  aCommandId  )  const
 

Gets a pointer to the control (button) with the specified command ID.

This method is intended to allow access to standard CCoeControl functionality only. Casting the return value is likely to fail on different devices.

Parameters:
aCommandId Command ID of the button to get.
Returns:
Pointer to a CCoeControl, NULL if there was no button at aCommandId.
static IMPORT_C CEikButtonGroupContainer* CEikButtonGroupContainer::Current  )  [static]
 

Gets a pointer to an application's currently active CEikButtonGroupContainer (if any).

Returns NULL if there are no containers active or none suitable for sharing. Ownership of the returned pointer is not transferred.

Returns:
Pointer to the button group container.
CEikButtonGroupContainer::DECLARE_TYPE_ID 0x101F4107   )  [inline]
 

Describes how the container is being used.

The enumeration is used by the system to create the appropriate (UI variant-specific) button group for the specified type.

< In a view.

< In a dialog.

< In a toolbar.

< In a control button array.

< In dialog buttons.

IMPORT_C TBool CEikButtonGroupContainer::DelayActivation  )  const
 

Tests whether the button group has explicitly been instructed to suppress redraws.

Some button groups may not activate themselves during construction, in which case, they need to be activated by the client. This method allows the client to enquire whether this is necessary.

Returns:
ETrue if the button group will suppress redraws, otherwise EFalse.
IMPORT_C void CEikButtonGroupContainer::DimCommand TInt  aCommandId,
TBool  aDimmed
 

Dims (but doesn't draw) the button with id aCommandId if aDimmed is ETrue.

If two buttons have the same id, the button to be dimmed is undefined.

Parameters:
aCommandId The id for command to be dimmed.
aDimmed ETrue for dimming.
IMPORT_C void CEikButtonGroupContainer::DimCommandByPosition TCommandPosition  aPosition,
TBool  aDimmed
 

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

Parameters:
aPosition The position for command to be dimmed.
aDimmed ETrue for dimming.
IMPORT_C TBool CEikButtonGroupContainer::IsCommandDimmed TInt  aCommandId  )  const
 

Returns ETrue if the button with id aCommandId is dimmed.

If two buttons have the same id, the results of this check are undefined.

Parameters:
aCommandId The id for command to be checked.
Returns:
The state of the button.
IMPORT_C TBool CEikButtonGroupContainer::IsCommandDimmedByPosition TCommandPosition  aPosition  )  const
 

Returns ETrue if the button with position aPosition is dimmed.

Parameters:
aPosition The position for command to be checked.
Returns:
The state of the button.
IMPORT_C TBool CEikButtonGroupContainer::IsCommandInGroup const TInt  aCommandId  )  const
 

Used to check if a certain command have been approved to the current command set.

Parameters:
aCommandId The id for command which existence should be checked.
Returns:
ETrue if command is in control group, otherwise EFalse.
IMPORT_C TBool CEikButtonGroupContainer::IsCommandVisible TInt  aCommandId  )  const
 

Returns ETrue if the button with id aCommandId is visible.

If two buttons have the same id, the results are undefined.

Parameters:
aCommandId The id for command to be checked.
Returns:
The state of the button.
IMPORT_C TBool CEikButtonGroupContainer::IsCommandVisibleByPosition TCommandPosition  aPosition  )  const
 

Returns ETrue if the button with position aPosition is visible.

Parameters:
aPosition The position for command to be checked.
Returns:
The state of the button.
IMPORT_C TLocation CEikButtonGroupContainer::Location  )  const
 

Gets the button group's location.

Typically the button group is external to the view which is using it. In some cases, such as in dialogs with button panels, the button group is internal to the control which is using it.

Returns:
The button group's location.
IMPORT_C void CEikButtonGroupContainer::MakeCommandVisible TInt  aCommandId,
TBool  aVisible
 

Sets the the button with id aCommandId to be visible if aVisible is ETrue.

If two buttons have the same id, the button to be altered is undefined.

Parameters:
aCommandId The id for command to be made visible.
aVisible EFalse for making button invisible.
IMPORT_C void CEikButtonGroupContainer::MakeCommandVisibleByPosition TCommandPosition  aPosition,
TBool  aVisible
 

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

Parameters:
aPosition The position for command to be made visible.
aVisible EFalse for making button invisible.
void CEikButtonGroupContainer::MakeVisible TBool  aVisible  ) 
 

From CCoeControl.

Sets this control as visible or invisible.

Parameters:
aVisible ETrue to make the control visible, EFalse to make it invisible.
IMPORT_C TInt CEikButtonGroupContainer::MaxCommands  )  const
 

Gets the maximum number of buttons that can be supported by the device.

Returns:
The number of command buttons supported.
IMPORT_C TSize CEikButtonGroupContainer::MinimumSize  ) 
 

From CCoeControl.

Gets the control's minimum required size.

Returns:
The minimum size required by the control.
static IMPORT_C CEikButtonGroupContainer* CEikButtonGroupContainer::NewL TUse  aUse,
TOrientation  aOrientation,
MEikCommandObserver *  aCommandObserver,
TInt  aResourceId,
RWindowGroup &  aParentWg,
TUint  aFlags = EAddToStack
[static]
 

Creates a button group container in given window group.

Parameters:
aUse The button group's type.
aOrientation The button group's orientation. You need specify this only for devices that can layout their buttons either horizontally or vertically.
aCommandObserver A command observer to be notified of commands on the container.
aResourceId A resource containing descriptions of buttons in the group. This can be NULL if buttons are to be added dynamically.
aParentWg The parent window group.
aFlags The button group's flags.
Returns:
Button group container object.
static IMPORT_C CEikButtonGroupContainer* CEikButtonGroupContainer::NewL TUse  aUse,
TOrientation  aOrientation,
MEikCommandObserver *  aCommandObserver,
TInt  aResourceId,
const CCoeControl &  aParent,
TUint  aFlags = EAddToStack
[static]
 

Creates a button group container in its parent control's window.

Parameters:
aUse The button group's type.
aOrientation The button group's orientation. You need specify this only for devices that can layout their buttons either horizontally or vertically.
aCommandObserver A command observer to be notified of commands on the container.
aResourceId A resource containing descriptions of buttons in the group. This can be NULL if buttons are to be added dynamically.
aParent The control's parent.
aFlags The button group's flags.
Returns:
Button group container object.
static IMPORT_C CEikButtonGroupContainer* CEikButtonGroupContainer::NewL TUse  aUse,
TOrientation  aOrientation,
MEikCommandObserver *  aCommandObserver,
TInt  aResourceId,
TUint  aFlags = EAddToStack
[static]
 

Creates a button group container in its own window.

Parameters:
aUse The button group's type.
aOrientation The button group's orientation. You need specify this only for devices that can layout their buttons either horizontally or vertically.
aCommandObserver A command observer to be notified of commands on the container.
aResourceId A resource containing descriptions of buttons in the group. This can be NULL if buttons are to be added dynamically.
aFlags The button group's flags.
Returns:
Button group container object.
IMPORT_C void CEikButtonGroupContainer::OfferCommandListL const TInt  aResourceId  ) 
 

Used to offer list of commands for softkeys.

Parameters:
aResourceId Id for CBA resource that defines enhanced cba buttons.
IMPORT_C void CEikButtonGroupContainer::OfferCommandListL const RArray< TInt > &  aCommandList  ) 
 

Used to offer list of commands for softkeys.

Parameters:
aCommandList A list of command ids to be offered for softkeys.
IMPORT_C TKeyResponse CEikButtonGroupContainer::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
 

From CCoeControl.

Handles key events.

Parameters:
aKeyEvent The key event.
aType The type of key event: EEventKey, EEventKeyUp or EEventKeyDown.
Returns:
Indicates whether or not the key event was used by this control.
IMPORT_C TInt CEikButtonGroupContainer::PositionById TInt  aCommandId  )  const
 

Gets the position in the group of the button with the specified command Id.

The return value is undefined if two buttons share the same id.

Parameters:
aCommandId Identifies the command.
Returns:
The command's container position.
IMPORT_C void CEikButtonGroupContainer::ReduceRect TRect &  aBoundingRect  )  const
 

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.

Parameters:
aBoundingRect Rectangle to be modified.
IMPORT_C void CEikButtonGroupContainer::RemoveCommandFromStack TInt  aPosition,
TInt  aCommandId
 

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.

Parameters:
aPosition The position in the button group from which to remove the command button.
aCommandId Command ID.
IMPORT_C void CEikButtonGroupContainer::RemoveCommandObserver TInt  aPos  ) 
 

Removes the temporary observer for the button at aPos, replacing it with the observer that was present when UpdateCommandObserverL() was called.

Parameters:
aPos The button's position.
IMPORT_C void CEikButtonGroupContainer::ReplaceCommand const TInt  aCommandId,
const TInt  aResourceId
 

Replaces command with another.

Parameters:
aCommandId Id for command that should be replaced.
aResourceId Resource id for new enhanced cba button.
virtual IMPORT_C void CEikButtonGroupContainer::Reserved_MtsmObject  )  [virtual]
 

Formerly from MTopSetMember<CEikButtonGroupContainer>, now reserved.

virtual IMPORT_C void CEikButtonGroupContainer::Reserved_MtsmPosition  )  [virtual]
 

Formerly from MTopSetMember<CEikButtonGroupContainer>, now reserved.

IMPORT_C void CEikButtonGroupContainer::SetBoundingRect const TRect &  aRect  ) 
 

Sets the boundary rectangle for externally-positioned button groups.

For use by EExternal button groups only.

Parameters:
aRect The boundary rectangle to use. The button group attaches itself to the inside of this rectangle.
void CEikButtonGroupContainer::SetCommandL TInt  aCommandId,
const TDesC &  aText,
const TDesC &  aFile,
TInt  aBitmapId,
TInt  aMaskId
[inline]
 

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

The bitmap and its mask are read from a multi bitmap file. The button to change is identified by its command ID.

Parameters:
aCommandId Command ID of the button to change.
aText Text for the button.
aFile A multi-bitmap file, containing mask and bitmap images.
aBitmapId ID of the bitmap within aFile.
aMaskId ID of the mask within aFile.
void CEikButtonGroupContainer::SetCommandL TInt  aCommandId,
const TDesC &  aFile,
TInt  aBitmapId,
TInt  aMaskId
[inline]
 

Sets a command button's bitmap and mask.

The bitmap and mask are read from a multi bitmap file. The button to change is identified by its command ID.

Parameters:
aCommandId Command ID of the button to change.
aFile A multi-bitmap file, containing mask and bitmap images.
aBitmapId ID of the bitmap within aFile.
aMaskId ID of the mask within aFile.
void CEikButtonGroupContainer::SetCommandL TInt  aCommandId,
const TDesC &  aText,
const CFbsBitmap &  aBitmap,
const CFbsBitmap &  aMask
[inline]
 

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

The button to change is identified by its command ID.

Parameters:
aCommandId Command ID of the button to change.
aText Text for the button.
aBitmap Bitmap for the button.
aMask Mask bitmap for aBitmap.
void CEikButtonGroupContainer::SetCommandL TInt  aCommandId,
const CFbsBitmap &  aBitmap,
const CFbsBitmap &  aMask
[inline]
 

Sets a command button's bitmap and mask.

The button to change is identified by its command ID.

Parameters:
aCommandId Command ID of the button to change.
aBitmap Bitmap for the button.
aMask Mask bitmap for aBitmap.
Leave:
KErrNotFound The ID cannot be matched to any button.
void CEikButtonGroupContainer::SetCommandL TInt  aCommandId,
const TDesC &  aText
[inline]
 

Sets a command button's text.

The button to change is identified by its command ID.

Parameters:
aCommandId Command ID of the button to change.
aText The text for the button.
Leave:
KErrNotFound The ID cannot be matched to any button.
void CEikButtonGroupContainer::SetCommandL TInt  aPosition,
TInt  aResourceId
[inline]
 

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

The bitmap, mask, text and command ID are all read from resource.

Parameters:
aPosition The position within the button group of the button to change. If the position is out of range, the function raises a panic.
aResourceId Resource ID specifying the text, bitmaps and command ID.
void CEikButtonGroupContainer::SetCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aText,
const TDesC &  aFile,
TInt  aBitmapId,
TInt  aMaskId
[inline]
 

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

The bitmap and its mask are read from a file.

Parameters:
aPosition The position within the button group of the button to change. If the position is out of range, the function raises a panic.
aCommandId Command ID the button will send.
aText The text for the button.
aFile A multi-bitmap file, containing mask and bitmap images.
aBitmapId ID of the bitmap within aFile.
aMaskId ID of the mask within aFile.
void CEikButtonGroupContainer::SetCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aFile,
TInt  aBitmapId,
TInt  aMaskId
[inline]
 

Sets a command button's bitmap and command ID.

The bitmap and its mask are read from a file.

Parameters:
aPosition The position within the button group of the button to change. If the position is out of range, the function raises a panic.
aCommandId Command ID the button will send.
aFile A multi-bitmap file, containing mask and bitmap images.
aBitmapId ID of the bitmap within aFile.
aMaskId ID of the mask within aFile.
void CEikButtonGroupContainer::SetCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aText,
const CFbsBitmap &  aBitmap,
const CFbsBitmap &  aMask
[inline]
 

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

Parameters:
aPosition The position within the button group of the button to change. If the position is out of range, the function raises a panic.
aCommandId Command ID the button will send.
aText The text for the button.
aBitmap The bitmap for the button.
aMask The mask bitmap for aBitmap.
void CEikButtonGroupContainer::SetCommandL TInt  aPosition,
TInt  aCommandId,
const CFbsBitmap &  aBitmap,
const CFbsBitmap &  aMask
[inline]
 

Sets a command button's bitmap and command ID.

Parameters:
aPosition The position within the button group of the button to change. If the position is out of range this function raises a panic.
aCommandId Command ID the button will send.
aBitmap The bitmap for the button.
aMask The mask bitmap for aBitmap.
void CEikButtonGroupContainer::SetCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC &  aText
[inline]
 

Sets a command button's text label and command ID.

Parameters:
aPosition The position within the button group of the button to change. If the position is out of range this function raises a panic.
aCommandId Command ID the button will send.
aText Text for the button.
IMPORT_C void CEikButtonGroupContainer::SetCommandSetL TInt  aResourceId  ) 
 

Initialises the group of command buttons from a resource.

Parameters:
aResourceId ID of the resource structure specifying the command buttons.
IMPORT_C void CEikButtonGroupContainer::SetDefaultCommand TInt  aCommandId  ) 
 

Sets the default command ID for buttons in this container.

Parameters:
aCommandId Command to issue if no other is specified.
IMPORT_C void CEikButtonGroupContainer::UpdateCommandObserverL TInt  aPos,
MEikCommandObserver &  aCommandObserver
 

Changes the command observer for the button at aPos to aCommandObserver.

Panics if an updated observer is already present. This function should be followed by RemoveCommandObserver() when you need to put back the original observer.

Parameters:
aPos The button's position.
aCommandObserver The command observer.
IMPORT_C TBool CEikButtonGroupContainer::UpdatedCommandObserverExists TCommandPosition  aPosition  )  const
 

Checks for existence of updated command observer for the button at aPosition.

Parameters:
aPosition The position for button to be checked.
Returns:
ETrue, if updated command observer exists.
IMPORT_C void CEikButtonGroupContainer::UpdateHotKey TInt  aCommandId,
THotKeyFlags  aFlags,
TInt  aKeyId
 

Updates a command's hotkey and whether the key is displayed.

This function is only supported by containers being used for dialog buttons.

Parameters:
aCommandId Identifies the command to update.
aFlags Whether to display the hotkey.
aKeyId Hotkey identifier.
void CEikButtonGroupContainer::UpdateMSKCommandObserver CEikListBox aMSKObserverOwner,
MEikCommandObserver *  aCommandObserver
 

Internal method for setting markable list's MSK observer.

This observer is called before default CBA observer if MSK is pressed. Observer is removed by passing NULL as parameter.

Parameters:
aMSKObserverOwner 
aCommandObserver 
IMPORT_C void CEikButtonGroupContainer::WriteInternalStateL RWriteStream &  aWriteStream  )  const
 

From CCoeControl.

Writes the internal state of the control and its components to aStream. Does nothing in release mode.

Parameters:
aWriteStream The output stream.

Friends And Related Function Documentation

friend class CCmdObserverArray [friend]
 
friend class CEikButtonGroupStack [friend]
 

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

Copyright © Nokia Corporation 2001-2008
Back to top