CEikCba Class Reference

API published in: S60 1st Ed

Link against: eikcoctl.lib avkon.lib

Capability Information

Required Capabilities

None


#include <eikcba.h>

Inherits CEikControlGroup, MEikEnhancedButtonGroup, and MEikScrollBarObserver.


Detailed Description

Defines a Control Button Array control, used in Avkon to define the softkeys in the control pane.

Public Member Functions

  DECLARE_TYPE_ID (0x101F4105) static CEikCba *NewL(const CEikCba *aPrevious
  Creates a new control button array.
  ~CEikCba ()
  Destructor.
TInt  MaxCommands () const
  Gets the maximum number of buttons that can be supported by the device.
void  UpdateCbaLabels (TBool aScrollerOn)
  Updates the cba labels.
TInt  MSKEnabledInPlatform () const
  For checking whether the middle softkey is supported in the platform.
void  SetSBFrameObserver (MEikScrollBarObserver *aObserver)
  Sets the scroll bar frame observer.
void  SetScrollBarModelL (TEikScrollBarModel *aModel)
  Sets the scroll bar model.
const CEikCbaScrollBarFrame ScrollBarFrame () const
  Returns the scroll bar frame.
CEikScrollBar VScrollBarAsControl ()
  Returns the vertical scroll bar as a control.
void  CreateArrowHeadScrollBarL ()
  Replaces empty scroll bar with actual arrow head scroll bar.
void  InsertControlL (TEikGroupControl &aGroupControl, TInt aIndex)
  From CEikControlGroup.
void  SetCommandL (TInt aPosition, TInt aCommandId, const TDesC *aText, const CFbsBitmap *aBitmap, const CFbsBitmap *aMask)
  From MEikButtonGroup.
void  SetCommandL (TInt aPosition, TInt aResourceId)
  From MEikButtonGroup.
void  SetCommandSetL (TInt aResourceId)
  From MEikButtonGroup.
void  AddCommandL (TInt aPosition, TInt aCommandId, const TDesC *aText, const CFbsBitmap *aBitmap, const CFbsBitmap *aMask)
  From MEikButtonGroup.
void  AddCommandToStackL (TInt aPosition, TInt aCommandId, const TDesC *aText, const CFbsBitmap *aBitmap, const CFbsBitmap *aMask)
  From MEikButtonGroup.
void  AddCommandToStackL (TInt aPosition, TInt aResourceId)
  From MEikButtonGroup.
void  AddCommandSetToStackL (TInt aResourceId)
  From MEikButtonGroup.
void  SetDefaultCommand (TInt aCommandId)
  From MEikButtonGroup.
TSize  CalcMinimumSizeL (TInt aResourceId)
  From MEikButtonGroup.
void  RemoveCommandFromStack (TInt aPosition, TInt aCommandId)
  From MEikButtonGroup.
TInt  CommandPos (TInt aCommandId) const
  From MEikButtonGroup.
void  DimCommand (TInt aCommandId, TBool aDimmed)
  From MEikButtonGroup.
TBool  IsCommandDimmed (TInt aCommandId) const
  From MEikButtonGroup.
void  MakeCommandVisible (TInt aCommandId, TBool aVisible)
  From MEikButtonGroup.
TBool  IsCommandVisible (TInt aCommandId) const
  From MEikButtonGroup.
void  AnimateCommand (TInt aCommandId)
  From MEikButtonGroup.
CCoeControl *  AsControl ()
  From MEikButtonGroup.
const CCoeControl *  AsControl () const
  From MEikButtonGroup.
void  SetBoundingRect (const TRect &aBoundingRect)
  From MEikButtonGroup.
void  ReduceRect (TRect &aBoundingRect) const
  From MEikButtonGroup.
CCoeControl *  GroupControlById (TInt aCommandId)
  Returns a group control (a button) as a control.
CCoeControl *  GroupControlById (TInt aCommandId) const
  From MEikButtonGroup.
TInt  CommandId (TInt aCommandPos) const
  From MEikButtonGroup.
TInt  ButtonCount () const
  From MEikButtonGroup.
void  RemovePreviousCommand (TInt aPosition)
  Removes previous command.
CEikCommandButton GroupControlAsButton (TInt aCommandId) const
  From MEikButtonGroup.
TUint  ButtonGroupFlags () const
  From MEikButtonGroup.
IMPORT_C void  SetButtonGroupFlags (TInt aFlags)
  Sets the button group flags.
IMPORT_C void  SetSkinBackgroundId (const TAknsItemID &aIID)
  Sets the skin background for this control button array.
void  SetMSKIconL ()
  Sets the middle softkey icon.
void  SetMSKCommandObserver (MEikCommandObserver *aCommandObserver)
  From MEikButtonGroup.
void  DimCommandByPosition (TInt aPosition, TBool aDimmed)
  From MEikButtonGroup.
TBool  IsCommandDimmedByPosition (TInt aPosition) const
  From MEikButtonGroup.
void  MakeCommandVisibleByPosition (TInt aPosition, TBool aVisible)
  From MEikButtonGroup.
TBool  IsCommandVisibleByPosition (TInt aPosition) const
  From MEikButtonGroup.
void  AnimateCommandByPosition (TInt aPosition)
  From MEikButtonGroup.
CCoeControl *  GroupControlByPosition (TInt aPosition) const
  Returns a group control (a button) as a control.
virtual void  Reserved_MtsmPosition ()
  Formerly from MTopSetMember<CEikCba>, now reserved.
virtual void  Reserved_MtsmObject ()
  Formerly from MTopSetMember<CEikCba>, now reserved.
TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
  From CCoeControl.
TSize  MinimumSize ()
  From CCoeControl.
void  GetColorUseListL (CArrayFix< TCoeColorUse > &aColorUseList) const
  From CCoeControl.
void  HandleResourceChange (TInt aType)
  From CCoeControl.
void  MakeVisible (TBool aVisible)
  From CCoeControl.
void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.
IMPORT_C void  OfferCommandListL (const RArray< TInt > &aCommandList)
  From MEikEnhancedButtonGroup.
IMPORT_C void  OfferCommandListL (const TInt aResourceId)
  From MEikEnhancedButtonGroup.
IMPORT_C TBool  IsCommandInGroup (const TInt aCommandId) const
  From MEikEnhancedButtonGroup.
IMPORT_C void  ReplaceCommand (const TInt aCommandId, const TInt aResourceId)
  From MEikEnhancedButtonGroup.

Static Public Member Functions

static CEikCba NewL (TInt aResourceId, const CEikCba *aPrevious, MEikCommandObserver *aCommandObserver, RWindowGroup *aParentWg)
  Creates a new control button array.
static CEikCba NewLC (const CEikCba *aPrevious, MEikCommandObserver *aCommandObserver, RWindowGroup *aParentWg)
  Creates a new control button array.
static CEikCba NewLC (TInt aResourceId, const CEikCba *aPrevious, MEikCommandObserver *aCommandObserver, RWindowGroup *aParentWg)
  Creates a new control button array.

Data Fields

MEikCommandObserver *  aCommandObserver
MEikCommandObserver RWindowGroup *  aParentWg

Protected Member Functions

virtual void  HandleScrollEventL (CEikScrollBar *aScrollBar, TEikScrollEvent aEventType)
  From MEikScrollBarObserver Handles scroll events.
TTypeUid::Ptr  MopSupplyObject (TTypeUid aId)
  From CCoeControl Retrieves an object of the same type as that encapsulated in aId.
void  Draw (const TRect &aRect) const
  From CCoeControl.

Constructor & Destructor Documentation

CEikCba::~CEikCba  ) 
 

Destructor.


Member Function Documentation

void CEikCba::AddCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC *  aText,
const CFbsBitmap *  aBitmap,
const CFbsBitmap *  aMask
[virtual]
 

From MEikButtonGroup.

Not supported.

Implements MEikButtonGroup.

void CEikCba::AddCommandSetToStackL TInt  aResourceId  )  [virtual]
 

From MEikButtonGroup.

As with SetCommandL() but for a set of buttons, also allows the previous command button to be retrieved by calling RemoveCommand(). Note that this implementation does not support bitmap and mask.

Implements MEikButtonGroup.

void CEikCba::AddCommandToStackL TInt  aPosition,
TInt  aResourceId
[virtual]
 

From MEikButtonGroup.

Pushes a command button onto a position's button stack. The text and command ID are all read from resource. Note that this implementation does not support bitmap and mask.

Implements MEikButtonGroup.

void CEikCba::AddCommandToStackL TInt  aPosition,
TInt  aCommandId,
const TDesC *  aText,
const CFbsBitmap *  aBitmap,
const CFbsBitmap *  aMask
[virtual]
 

From MEikButtonGroup.

Pushes a command button with text and a command ID onto a position's button stack. Note that this implementation does not support bitmap and mask.

Implements MEikButtonGroup.

void CEikCba::AnimateCommand TInt  aCommandId  )  [virtual]
 

From MEikButtonGroup.

Not supported.

Reimplemented from MEikButtonGroup.

void CEikCba::AnimateCommandByPosition TInt  aPosition  )  [virtual]
 

From MEikButtonGroup.

Not supported.

Implements MEikButtonGroup.

const CCoeControl* CEikCba::AsControl  )  const [virtual]
 

From MEikButtonGroup.

Returns the button group as a control.

Implements MEikButtonGroup.

CCoeControl* CEikCba::AsControl  )  [virtual]
 

From MEikButtonGroup.

Returns the button group as a control.

Implements MEikButtonGroup.

TInt CEikCba::ButtonCount  )  const [virtual]
 

From MEikButtonGroup.

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

Implements MEikButtonGroup.

TUint CEikCba::ButtonGroupFlags  )  const [virtual]
 

From MEikButtonGroup.

Gets the button group flags.

Implements MEikButtonGroup.

TSize CEikCba::CalcMinimumSizeL TInt  aResourceId  )  [virtual]
 

From MEikButtonGroup.

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

Implements MEikButtonGroup.

TInt CEikCba::CommandId TInt  aCommandPos  )  const [virtual]
 

From MEikButtonGroup.

Returns the command id by position.

Implements MEikButtonGroup.

TInt CEikCba::CommandPos TInt  aCommandId  )  const [virtual]
 

From MEikButtonGroup.

Returns the command position by command id.

Implements MEikButtonGroup.

void CEikCba::CreateArrowHeadScrollBarL  ) 
 

Replaces empty scroll bar with actual arrow head scroll bar.

CEikCba::DECLARE_TYPE_ID 0x101F4105   )  const
 

Creates a new control button array.

void CEikCba::DimCommand TInt  aCommandId,
TBool  aDimmed
[virtual]
 

From MEikButtonGroup.

Dims or undims a button without drawing it.

Implements MEikButtonGroup.

void CEikCba::DimCommandByPosition TInt  aPosition,
TBool  aDimmed
[virtual]
 

From MEikButtonGroup.

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

Implements MEikButtonGroup.

void CEikCba::Draw const TRect &  aRect  )  const [protected]
 

From CCoeControl.

Draws the control.

Parameters:
aRect  Rectangle to draw on.

Reimplemented from CEikControlGroup.

void CEikCba::GetColorUseListL CArrayFix< TCoeColorUse > &  aColorUseList  )  const [virtual]
 

From CCoeControl.

Gets the list of logical colours used to draw the control. The list includes an explanation of how each colour is used.

Parameters:
aColorUseList  The colour list.

Reimplemented from CEikControlGroup.

CEikCommandButton* CEikCba::GroupControlAsButton TInt  aCommandId  )  const [virtual]
 

From MEikButtonGroup.

Not supported, because it is not possible to convert a CBA button to a CEikCommandButton. Calling this in debug build causes a panic, otherwise NULL is just returned.

Implements MEikButtonGroup.

CCoeControl* CEikCba::GroupControlById TInt  aCommandId  )  const [virtual]
 

From MEikButtonGroup.

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

Implements MEikButtonGroup.

CCoeControl* CEikCba::GroupControlById TInt  aCommandId  ) 
 

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

CCoeControl* CEikCba::GroupControlByPosition TInt  aPosition  )  const
 

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

void CEikCba::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Handles pointer events.

Parameters:
aPointerEvent  The pointer event

Reimplemented from CEikControlGroup.

void CEikCba::HandleResourceChange TInt  aType  )  [virtual]
 

From CCoeControl.

Handles a change to the control's resources.

Parameters:
aType  A message UID value.

Reimplemented from CEikControlGroup.

virtual void CEikCba::HandleScrollEventL CEikScrollBar aScrollBar,
TEikScrollEvent  aEventType
[protected, virtual]
 

From MEikScrollBarObserver Handles scroll events.

This function is called by the CEikScrollBar object with which this scroll bar observer object is registered. Implementations should handle scroll events appropriately.

Parameters:
aScrollBar  Pointer to the originating scroll bar object.
aEventType  A scroll event.

Implements MEikScrollBarObserver.

void CEikCba::InsertControlL TEikGroupControl aGroupControl,
TInt  aIndex
 

From CEikControlGroup.

Adds a wrapped control to the control group array at the given index position. Overridden to prevent setting container window.

Parameters:
aGroupControl  The control to add to the group.
aIndex  The index for the added control.

Reimplemented from CEikControlGroup.

TBool CEikCba::IsCommandDimmed TInt  aCommandId  )  const [virtual]
 

From MEikButtonGroup.

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

Implements MEikButtonGroup.

TBool CEikCba::IsCommandDimmedByPosition TInt  aPosition  )  const [virtual]
 

From MEikButtonGroup.

Returns ETrue if the button with position aPosition is dimmed.

Implements MEikButtonGroup.

IMPORT_C TBool CEikCba::IsCommandInGroup const TInt  aCommandId  )  const [virtual]
 

From MEikEnhancedButtonGroup.

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.

Implements MEikEnhancedButtonGroup.

TBool CEikCba::IsCommandVisible TInt  aCommandId  )  const [virtual]
 

From MEikButtonGroup.

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

Implements MEikButtonGroup.

TBool CEikCba::IsCommandVisibleByPosition TInt  aPosition  )  const [virtual]
 

From MEikButtonGroup.

Returns ETrue if the button with position aPosition is visible.

Implements MEikButtonGroup.

void CEikCba::MakeCommandVisible TInt  aCommandId,
TBool  aVisible
[virtual]
 

From MEikButtonGroup.

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

Implements MEikButtonGroup.

void CEikCba::MakeCommandVisibleByPosition TInt  aPosition,
TBool  aVisible
[virtual]
 

From MEikButtonGroup.

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

Implements MEikButtonGroup.

void CEikCba::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.
TInt CEikCba::MaxCommands  )  const
 

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

TSize CEikCba::MinimumSize  ) 
 

From CCoeControl.

Sets the control's minimum required size.

Returns:
The minimum size required by the control.

Reimplemented from CEikControlGroup.

TTypeUid::Ptr CEikCba::MopSupplyObject TTypeUid  aId  )  [protected]
 

From CCoeControl Retrieves an object of the same type as that encapsulated in aId.

This function is used to allow controls to ask their owners for access to other objects that they own.

Parameters:
aId  An encapsulated object type ID.
Returns:
Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.
TInt CEikCba::MSKEnabledInPlatform  )  const
 

For checking whether the middle softkey is supported in the platform.

static CEikCba* CEikCba::NewL TInt  aResourceId,
const CEikCba aPrevious,
MEikCommandObserver *  aCommandObserver,
RWindowGroup *  aParentWg
[static]
 

Creates a new control button array.

static CEikCba* CEikCba::NewLC TInt  aResourceId,
const CEikCba aPrevious,
MEikCommandObserver *  aCommandObserver,
RWindowGroup *  aParentWg
[static]
 

Creates a new control button array.

static CEikCba* CEikCba::NewLC const CEikCba aPrevious,
MEikCommandObserver *  aCommandObserver,
RWindowGroup *  aParentWg
[static]
 

Creates a new control button array.

IMPORT_C void CEikCba::OfferCommandListL const TInt  aResourceId  )  [virtual]
 

From MEikEnhancedButtonGroup.

Used to offer list of commands for softkeys.

Parameters:
aResourceId  Id for CBA resource that defines enhanced cba buttons.

Implements MEikEnhancedButtonGroup.

IMPORT_C void CEikCba::OfferCommandListL const RArray< TInt > &  aCommandList  )  [virtual]
 

From MEikEnhancedButtonGroup.

Used to offer list of commands for softkeys.

Parameters:
aCommandList  A list of command ids to be offered for softkeys.

Implements MEikEnhancedButtonGroup.

TKeyResponse CEikCba::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.
void CEikCba::ReduceRect TRect &  aBoundingRect  )  const [virtual]
 

From MEikButtonGroup.

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.

Implements MEikButtonGroup.

void CEikCba::RemoveCommandFromStack TInt  aPosition,
TInt  aCommandId
[virtual]
 

From MEikButtonGroup.

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.

Implements MEikButtonGroup.

void CEikCba::RemovePreviousCommand TInt  aPosition  ) 
 

Removes previous command.

IMPORT_C void CEikCba::ReplaceCommand const TInt  aCommandId,
const TInt  aResourceId
[virtual]
 

From MEikEnhancedButtonGroup.

Replace existing command with a new command.

Parameters:
aCommandId  Id for command that should be replaced.
aResourceId  Resource id for new enhanced cba button.

Implements MEikEnhancedButtonGroup.

virtual void CEikCba::Reserved_MtsmObject  )  [virtual]
 

Formerly from MTopSetMember<CEikCba>, now reserved.

virtual void CEikCba::Reserved_MtsmPosition  )  [virtual]
 

Formerly from MTopSetMember<CEikCba>, now reserved.

const CEikCbaScrollBarFrame* CEikCba::ScrollBarFrame  )  const
 

Returns the scroll bar frame.

void CEikCba::SetBoundingRect const TRect &  aBoundingRect  )  [virtual]
 

From MEikButtonGroup.

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

Implements MEikButtonGroup.

IMPORT_C void CEikCba::SetButtonGroupFlags TInt  aFlags  ) 
 

Sets the button group flags.

void CEikCba::SetCommandL TInt  aPosition,
TInt  aResourceId
[virtual]
 

From MEikButtonGroup.

Sets a command button's text label and command ID. The text and command ID are all read from resource. Note that this implementation does not support bitmap and mask.

Implements MEikButtonGroup.

void CEikCba::SetCommandL TInt  aPosition,
TInt  aCommandId,
const TDesC *  aText,
const CFbsBitmap *  aBitmap,
const CFbsBitmap *  aMask
[virtual]
 

From MEikButtonGroup.

Sets a command button's text and command ID. Note that this implementation does not support bitmap and mask.

Parameters:
aPosition  The position within the button group of the button to change.
aCommandId  Command ID the button will send.
aText  The text for the button.
aBitmap  Not used.
aMask  Not used.

Implements MEikButtonGroup.

void CEikCba::SetCommandSetL TInt  aResourceId  )  [virtual]
 

From MEikButtonGroup.

Initialises the group of command buttons from a resource. Note that this implementation does not support bitmap and mask.

Implements MEikButtonGroup.

void CEikCba::SetDefaultCommand TInt  aCommandId  )  [virtual]
 

From MEikButtonGroup.

Not supported.

Implements MEikButtonGroup.

void CEikCba::SetMSKCommandObserver MEikCommandObserver *  aCommandObserver  )  [virtual]
 

From MEikButtonGroup.

Sets the middle softkey command observer.

Implements MEikButtonGroup.

void CEikCba::SetMSKIconL  ) 
 

Sets the middle softkey icon.

void CEikCba::SetSBFrameObserver MEikScrollBarObserver aObserver  ) 
 

Sets the scroll bar frame observer.

void CEikCba::SetScrollBarModelL TEikScrollBarModel aModel  ) 
 

Sets the scroll bar model.

IMPORT_C void CEikCba::SetSkinBackgroundId const TAknsItemID aIID  ) 
 

Sets the skin background for this control button array.

The new background is used for all the subsequent drawing operations. This method does not itself cause a repaint.

void CEikCba::UpdateCbaLabels TBool  aScrollerOn  ) 
 

Updates the cba labels.

CEikScrollBar* CEikCba::VScrollBarAsControl  ) 
 

Returns the vertical scroll bar as a control.


Field Documentation

MEikCommandObserver* CEikCba::aCommandObserver
 
MEikCommandObserver RWindowGroup* CEikCba::aParentWg
 

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

Copyright © Nokia Corporation 2001-2008
Back to top