CAknTabGroup Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <akntabgrp.h>

Inherits CAknControl, and MAknNaviDecoratorObserver.


Detailed Description

Tab group functionality for navigation pane.

Public Member Functions

IMPORT_C  ~CAknTabGroup ()
  Destructor.
IMPORT_C TInt  AddTabL (TResourceReader &aReader)
  Add a tab to the tab group from resources.
IMPORT_C void  AddTabL (TInt aTabId, const TDesC &aText)
  Add a tab to the tab group.
IMPORT_C void  AddTabL (TInt aTabId, const TDesC &aText, const CFbsBitmap *aTabBitmap, const CFbsBitmap *aMask=NULL)
  Add a tab to the tab group.
IMPORT_C void  AddTabL (TInt aTabId, const CFbsBitmap *aTabBitmap, const CFbsBitmap *aMask=NULL)
  Add a tab to the tab group.
IMPORT_C void  ReplaceTabL (TResourceReader &aReader)
  Replaces a tab with a new one from resources.
IMPORT_C void  ReplaceTabL (TInt aTabId, const TDesC &aText)
  Replaces a tab with a new one.
IMPORT_C void  ReplaceTabL (TInt aTabId, const TDesC &aText, const CFbsBitmap *aTabBitmap, const CFbsBitmap *aMask=NULL)
  Replaces a tab with a new one.
IMPORT_C void  ReplaceTabL (TInt aTabId, const CFbsBitmap *aTabBitmap, const CFbsBitmap *aMask=NULL)
  Replaces a tab with a new one.
IMPORT_C void  ReplaceTabTextL (TInt aTabId, const TDesC &aTabText)
  Replaces a tab text with a new one.
IMPORT_C void  DeleteTabL (TInt aTabId)
  Delete a tab.
IMPORT_C void  SetActiveTabById (TInt aTabId)
  Hightlight (activate) a tab.
IMPORT_C void  SetActiveTabByIndex (TInt aTabIndex)
  Hightlight (activate) a tab.
IMPORT_C TInt  ActiveTabId () const
  Returns the id of the currently active (=highlighted) tab.
IMPORT_C TInt  ActiveTabIndex () const
  Returns the index of the currently active (=highlighted) tab.
IMPORT_C void  SetTabFixedWidthL (TInt aWidth)
  Set width of each tab.
IMPORT_C void  DimTab (TInt aTabId, TBool aDimmed)
virtual IMPORT_C TBool  IsTabDimmed (TInt aTabId) const
virtual IMPORT_C TInt  TabIndexFromId (TInt aTabId) const
  Returns index of a tab.
virtual IMPORT_C TInt  TabIdFromIndex (TInt aTabIndex) const
  Returns id of a tab.
virtual IMPORT_C TInt  TabCount () const
  Number of tabs in the tab group.
IMPORT_C void  SetObserver (MAknTabObserver *aObserver)
  Sets tab observer for this tab group.
virtual IMPORT_C TSize  MinimumSize ()
  From CCoeControl.
virtual IMPORT_C TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
  From CCoeControl.
virtual IMPORT_C void  GetColorUseListL (CArrayFix< TCoeColorUse > &aColorUseList) const
  Gets the list of logical colors employed in the drawing of the control, paired with an explanation of how they are used.
void  HandleResourceChange (TInt aType)
  Handles the resource change.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl handles pointer events of tabs.
virtual IMPORT_C void  HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)
  From MCoeControlObserver.
virtual IMPORT_C void  PrepareContext (CWindowGc &aGc) const
  From MCoeControlContext.
virtual IMPORT_C void  HandleNaviDecoratorEventL (TInt aEventID)
  Method for handling events in observed classes.
void  SetNarrowTabLayoutL (TBool aNarrow)

Static Public Member Functions

static IMPORT_C CAknTabGroup NewL (const CCoeControl &aParent)
  Creates new tab group.
static IMPORT_C CAknTabGroup NewLC (const CCoeControl &aParent)
  Creates new tab group and pushes it to the clean up stack.

Protected Member Functions

virtual IMPORT_C void  SizeChanged ()
  From CCoeControl.
virtual IMPORT_C TInt  CountComponentControls () const
  From CCoeControl.
virtual IMPORT_C CCoeControl *  ComponentControl (TInt aIndex) const
  From CCoeControl.
virtual IMPORT_C void  FocusChanged (TDrawNow aDrawNow)
  From CCoeControl.
void  ReverseTabOrderL ()
  Reverse the order of tabs in tab array.

Constructor & Destructor Documentation

IMPORT_C CAknTabGroup::~CAknTabGroup  ) 
 

Destructor.


Member Function Documentation

IMPORT_C TInt CAknTabGroup::ActiveTabId  )  const
 

Returns the id of the currently active (=highlighted) tab.

Returns:
id of the highlighted tab.
IMPORT_C TInt CAknTabGroup::ActiveTabIndex  )  const
 

Returns the index of the currently active (=highlighted) tab.

Returns:
index of the highlighted tab.
IMPORT_C void CAknTabGroup::AddTabL TInt  aTabId,
const CFbsBitmap *  aTabBitmap,
const CFbsBitmap *  aMask = NULL
 

Add a tab to the tab group.

Parameters:
aTabId  id of the tab.
aTabBitmap  bitmap for the tab. Ownership of a bitmap is taken.
aMask  bitmap's mask.
IMPORT_C void CAknTabGroup::AddTabL TInt  aTabId,
const TDesC &  aText,
const CFbsBitmap *  aTabBitmap,
const CFbsBitmap *  aMask = NULL
 

Add a tab to the tab group.

Parameters:
aTabId  id of the tab.
aTabText  text for the tab.
aTabBitmap  bitmap for the tab. Ownership of a bitmap is taken.
aMask  bitmap's mask.
IMPORT_C void CAknTabGroup::AddTabL TInt  aTabId,
const TDesC &  aText
 

Add a tab to the tab group.

Parameters:
aTabId  id of the added tab.
aTabText  text for the tab.
IMPORT_C TInt CAknTabGroup::AddTabL TResourceReader &  aReader  ) 
 

Add a tab to the tab group from resources.

Parameters:
aReader  resource reader.
Returns:
Id of the added tab.
virtual IMPORT_C CCoeControl* CAknTabGroup::ComponentControl TInt  aIndex  )  const [protected, virtual]
 

From CCoeControl.

Returns a control determined by control id.

Parameters:
anIndex  Index of a control to be returned.
Returns:
Pointer to control
virtual IMPORT_C TInt CAknTabGroup::CountComponentControls  )  const [protected, virtual]
 

From CCoeControl.

Returns number of controls inside the context pane control.

Returns:
Number of component controls.
IMPORT_C void CAknTabGroup::DeleteTabL TInt  aTabId  ) 
 

Delete a tab.

Parameters:
aTabId  id of the tab to be deleted.
IMPORT_C void CAknTabGroup::DimTab TInt  aTabId,
TBool  aDimmed
 
virtual IMPORT_C void CAknTabGroup::FocusChanged TDrawNow  aDrawNow  )  [protected, virtual]
 

From CCoeControl.

This is called when a focus is changed.

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

Gets the list of logical colors employed in the drawing of the control, paired with an explanation of how they are used.

Appends the list into aColorUseList.

virtual IMPORT_C void CAknTabGroup::HandleControlEventL CCoeControl *  aControl,
TCoeEvent  aEventType
[virtual]
 

From MCoeControlObserver.

Parameters:
aControl  Control that caused the event.
aEventType  Type of the event.
virtual IMPORT_C void CAknTabGroup::HandleNaviDecoratorEventL TInt  aEventID  )  [virtual]
 

Method for handling events in observed classes.

Parameters:
aEventID  Id of the event.

Implements MAknNaviDecoratorObserver.

IMPORT_C void CAknTabGroup::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl handles pointer events of tabs.

Parameters:
aPointerEvent  pointerevent to be handled
void CAknTabGroup::HandleResourceChange TInt  aType  ) 
 

Handles the resource change.

virtual IMPORT_C TBool CAknTabGroup::IsTabDimmed TInt  aTabId  )  const [virtual]
 
virtual IMPORT_C TSize CAknTabGroup::MinimumSize  )  [virtual]
 

From CCoeControl.

Return minimum size of the control.

Returns:
Minimum size of the control.
static IMPORT_C CAknTabGroup* CAknTabGroup::NewL const CCoeControl &  aParent  )  [static]
 

Creates new tab group.

Parameters:
aParent  Parent control.
static IMPORT_C CAknTabGroup* CAknTabGroup::NewLC const CCoeControl &  aParent  )  [static]
 

Creates new tab group and pushes it to the clean up stack.

Parameters:
aParent  Parent control.
virtual IMPORT_C TKeyResponse CAknTabGroup::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
[virtual]
 

From CCoeControl.

Handles key events.

Parameters:
aKeyEvent  The key event.
aType  The type of the event.
Returns:
Indicates whether or not the key event was used by this control.
virtual IMPORT_C void CAknTabGroup::PrepareContext CWindowGc &  aGc  )  const [virtual]
 

From MCoeControlContext.

Allows to modify graphics context before Draw.

Parameters:
aGc  Graphics context to be modified.
IMPORT_C void CAknTabGroup::ReplaceTabL TInt  aTabId,
const CFbsBitmap *  aTabBitmap,
const CFbsBitmap *  aMask = NULL
 

Replaces a tab with a new one.

Parameters:
aTabId  id of the tab to be replaced.
aTabBitmap  bitmap for the tab. Ownership of a bitmap is taken.
aMask  bitmap's mask.
IMPORT_C void CAknTabGroup::ReplaceTabL TInt  aTabId,
const TDesC &  aText,
const CFbsBitmap *  aTabBitmap,
const CFbsBitmap *  aMask = NULL
 

Replaces a tab with a new one.

Parameters:
aTabId  id of the tab to be replaced.
aTabText  text for the new tab.
aTabBitmap  bitmap for the tab. Ownership of a bitmap is taken.
aMask  bitmap's mask.
IMPORT_C void CAknTabGroup::ReplaceTabL TInt  aTabId,
const TDesC &  aText
 

Replaces a tab with a new one.

Parameters:
aTabId  id of the tab to be replaced.
aTabText  text for the new tab.
IMPORT_C void CAknTabGroup::ReplaceTabL TResourceReader &  aReader  ) 
 

Replaces a tab with a new one from resources.

Tab with same id is replaced.

Parameters:
aReader  resource reader.
IMPORT_C void CAknTabGroup::ReplaceTabTextL TInt  aTabId,
const TDesC &  aTabText
 

Replaces a tab text with a new one.

Parameters:
aTabId  Id of the tab of replaced tab text.
aTabText  New tab text.
void CAknTabGroup::ReverseTabOrderL  )  [protected]
 

Reverse the order of tabs in tab array.

IMPORT_C void CAknTabGroup::SetActiveTabById TInt  aTabId  ) 
 

Hightlight (activate) a tab.

Parameters:
aTabId  id of the tab to be set highlighted.
IMPORT_C void CAknTabGroup::SetActiveTabByIndex TInt  aTabIndex  ) 
 

Hightlight (activate) a tab.

Parameters:
aTabIndex  index of the tab to be set highlighted.
void CAknTabGroup::SetNarrowTabLayoutL TBool  aNarrow  ) 
 
IMPORT_C void CAknTabGroup::SetObserver MAknTabObserver aObserver  ) 
 

Sets tab observer for this tab group.

Parameters:
aObserver  tab observer to set.
IMPORT_C void CAknTabGroup::SetTabFixedWidthL TInt  aWidth  ) 
 

Set width of each tab.

This width determines what tab layout is used. To get specific tab layout, use following constants/enumerations: (KTabWidthWithOneTab, KTabWidthWithTwoTabs, KTabWidthWithThreeTabs, KTabWidthWithFourTabs, KTabWidthWithTwoLongTabs, KTabWidthWithThreeLongTabs).

Parameters:
aWidth  width of each tab.
virtual IMPORT_C void CAknTabGroup::SizeChanged  )  [protected, virtual]
 

From CCoeControl.

Handle the size change events.

virtual IMPORT_C TInt CAknTabGroup::TabCount  )  const [virtual]
 

Number of tabs in the tab group.

Returns:
number of tabs in the tab group.
virtual IMPORT_C TInt CAknTabGroup::TabIdFromIndex TInt  aTabIndex  )  const [virtual]
 

Returns id of a tab.

Parameters:
aTabIndex  index of a tab.
Returns:
id of the tab.
virtual IMPORT_C TInt CAknTabGroup::TabIndexFromId TInt  aTabId  )  const [virtual]
 

Returns index of a tab.

Parameters:
aTabId  id of a tab.
Returns:
index of the tab.

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

Copyright © Nokia Corporation 2001-2008
Back to top