CAknTabGroup Class Reference

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <
akntabgrp.h>

Inherits CAknControl, and MAknNaviDecoratorObserver.


Detailed Description

Tab group functionality for navigation pane.
Dll avkon.lib
Since:
0.9

Public Types

enum  TDirection { ELeft, ERight }
 Directions in which the tab group focus can be moved. More...

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 from the tab group.
IMPORT_C void SetActiveTabById (TInt aTabId)
 Activate (highlight) a tab.
IMPORT_C void SetActiveTabByIndex (TInt aTabIndex)
 Activate (highlight) 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)
 Sets a tab dimmed/not dimmed.
virtual IMPORT_C TBool IsTabDimmed (TInt aTabId) const
 Used to check whether or not a tab is dimmed.
virtual IMPORT_C TInt TabIndexFromId (TInt aTabId) const
 Returns the index of a tab.
virtual IMPORT_C TInt TabIdFromIndex (TInt aTabIndex) const
 Returns the ID of a tab.
virtual IMPORT_C TInt TabCount () const
 Number of tabs in the tab group.
IMPORT_C void SetObserver (MAknTabObserver *aObserver)
 Sets the tab observer for this tab group.
virtual IMPORT_C TSize MinimumSize ()
 Return minimum size of the control.
virtual IMPORT_C TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
 Handles key events.
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 a change to the control's resources.
IMPORT_C void HandlePointerEventL (const TPointerEvent &aPointerEvent)
 Handles pointer events in tabs.
virtual IMPORT_C void HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)
 Handles an event from an observed control.
virtual IMPORT_C void PrepareContext (CWindowGc &aGc) const
 Allows to modify graphics context before Draw.
virtual IMPORT_C void HandleNaviDecoratorEventL (TInt aEventID)
 Method for handling events in observed classes.
IMPORT_C void SetTabMultiColorMode (TInt aTabId, TBool aMultiColor)
 Sets the multi-color drawing mode of a tab.
void SetDecoratorLayout (TBool aNarrow)
 Sets the navigation decorator layout so that it corresponds the current tab group layout.
void SetNarrowTabLayoutL (TBool aNarrow, TBool aUseAnimation=EFalse)
void SetNaviArrowsVisible (TBool aVisible)

Static Public Member Functions

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

Protected Member Functions

virtual IMPORT_C void SizeChanged ()
 Handles the size change events.
virtual IMPORT_C TInt CountComponentControls () const
 Returns number of controls inside this control.
virtual IMPORT_C CCoeControl * ComponentControl (TInt aIndex) const
 Returns a component control determined by control index.
virtual IMPORT_C void FocusChanged (TDrawNow aDrawNow)
 This is called when the focus is changed.
void ReverseTabOrderL ()
 Reverse the order of tabs in tab array.

Member Enumeration Documentation

enum CAknTabGroup::TDirection
 

Directions in which the tab group focus can be moved.

Enumerator:
ELeft 
ERight 

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 the bitmap is taken.
aMask Bitmap's mask. Ownership of the mask is taken.
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 the bitmap is taken.
aMask Bitmap's mask. Ownership of the mask is taken.
IMPORT_C void CAknTabGroup::AddTabL TInt  aTabId,
const TDesC &  aText
 

Add a tab to the tab group.

Parameters:
aTabId ID of the tab to be added.
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]
 

Returns a component control determined by control index.

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

Returns number of controls inside this control.

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

Delete a tab from the tab group.

Parameters:
aTabId ID of the tab to be deleted.
IMPORT_C void CAknTabGroup::DimTab TInt  aTabId,
TBool  aDimmed
 

Sets a tab dimmed/not dimmed.

Parameters:
aTabId ID of the tab.
aDimmed ETrue to set the tab dimmed, EFalse otherwise.
virtual IMPORT_C void CAknTabGroup::FocusChanged TDrawNow  aDrawNow  )  [protected, virtual]
 

This is called when the focus is changed.

Parameters:
aDrawNow Whether or not to draw the control.
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.

Parameters:
[in,out] aColorUseList The color list.
virtual IMPORT_C void CAknTabGroup::HandleControlEventL CCoeControl *  aControl,
TCoeEvent  aEventType
[virtual]
 

Handles an event from an observed control.

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  ) 
 

Handles pointer events in tabs.

Parameters:
aPointerEvent Pointer event to be handled.
void CAknTabGroup::HandleResourceChange TInt  aType  ) 
 

Handles a change to the control's resources.

Parameters:
aType The type of resource change.
virtual IMPORT_C TBool CAknTabGroup::IsTabDimmed TInt  aTabId  )  const [virtual]
 

Used to check whether or not a tab is dimmed.

Parameters:
aTabId ID of the tab.
Returns:
ETrue if the tab is dimmed, EFalse otherwise.
virtual IMPORT_C TSize CAknTabGroup::MinimumSize  )  [virtual]
 

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]
 

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]
 

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 the bitmap is taken.
aMask Bitmap's mask. Ownership of the mask is taken.
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 the bitmap is taken.
aMask Bitmap's mask. Ownership of the mask is taken.
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 containing the text to be replaced.
aTabText New tab text.
void CAknTabGroup::ReverseTabOrderL  )  [protected]
 

Reverse the order of tabs in tab array.

IMPORT_C void CAknTabGroup::SetActiveTabById TInt  aTabId  ) 
 

Activate (highlight) a tab.

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

Activate (highlight) a tab.

Parameters:
aTabIndex Index of the tab to be highlighted.
void CAknTabGroup::SetDecoratorLayout TBool  aNarrow  ) 
 

Sets the navigation decorator layout so that it corresponds the current tab group layout.

Parameters:
aNarrow ETrue if narrow tab group layout is used, EFalse if normal layout is used.
void CAknTabGroup::SetNarrowTabLayoutL TBool  aNarrow,
TBool  aUseAnimation = EFalse
 
void CAknTabGroup::SetNaviArrowsVisible TBool  aVisible  ) 
 
IMPORT_C void CAknTabGroup::SetObserver MAknTabObserver aObserver  ) 
 

Sets the 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 a specific tab layout, use the following constants:

  • KTabWidthWithOneTab One tab layout
  • KTabWidthWithTwoTabs Two tabs layout
  • KTabWidthWithThreeTabs Three tabs layout
  • KTabWidthWithFourTabs Four tabs layout
  • KTabWidthWithTwoLongTabs Two long tabs layout
  • KTabWidthWithThreeLongTabs Three long tabs layout
Parameters:
aWidth Width of each tab,
See also:
aknconsts.h.
IMPORT_C void CAknTabGroup::SetTabMultiColorMode TInt  aTabId,
TBool  aMultiColor
 

Sets the multi-color drawing mode of a tab.

This should be called after adding a tab to the tab group if the icon in the tab should be drawn as multi-colored. The tab icon will be drawn using a color specified in the active skin if multi-color mode is not defined.

This function should be called right after a tab containing a multi-color icon is added to the tab group.

Parameters:
aTabId ID of the tab.
aMultiColor ETrue to set the multi-color mode on, EFalse to turn it off.
virtual IMPORT_C void CAknTabGroup::SizeChanged  )  [protected, virtual]
 

Handles 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 the 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 the 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-2007
Back to top