CAknTitlePane Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <akntitle.h>

Inherits CAknControl.


Detailed Description

A default control in the status pane's title pane.

Public Member Functions

IMPORT_C  CAknTitlePane ()
  Constructor.
IMPORT_C  ~CAknTitlePane ()
  Destructor.
IMPORT_C void  ConstructL ()
  2nd phase constructor.
IMPORT_C void  ConstructFromResourceL (TResourceReader &aReader)
  Read title pane data from resource file and show it in the status pane's title pane.
IMPORT_C void  SetTextL (const TDesC &aText)
  Set a text and show it in the status pane's title pane.
IMPORT_C void  SetText (HBufC *aText)
  Sets text to the title pane.
IMPORT_C void  SetTextL (const TDesC &aText, TBool aScroll)
  Set a text and show it in the status pane's title pane.
IMPORT_C void  SetText (HBufC *aText, TBool aScroll)
  Sets text to the title pane.
const TDesC *  Text () const
  Returns text currently in the status pane's title pane.
IMPORT_C void  SetPicture (const CFbsBitmap *aBitmap, const CFbsBitmap *aMaskBitmap=NULL)
  Set a picture to the title pane and show it in the status pane's title pane.
IMPORT_C void  SetPictureFromFileL (const TDesC &aFileName, TInt aMainId, TInt aMaskId=-1)
  Set a picture from file and show it in the status pane's title pane.
IMPORT_C void  SetSmallPicture (const CFbsBitmap *aBitmap, const CFbsBitmap *aMaskBitmap, TBool aVisible)
  Set a small picture to the title pane and show it in the status pane's title pane together with text.
IMPORT_C void  SetFromResourceL (TResourceReader &aReader)
  Set data from resource file and show it in the status pane's title pane.
IMPORT_C void  SetTextToDefaultL ()
  Set default value to the status pane's title pane.
IMPORT_C TInt  MaxNumberOfVisibleTextRows () const
  Gets the maximum amount of text rows that title pane is able to display simultaneously in the currently active status pane layout.
IMPORT_C void  SetNumberOfVisibleTextRows (TInt aRows)
  Sets the number of text rows that can be used to display the text.
virtual IMPORT_C void  PrepareContext (CWindowGc &aGc) const
  From MCoeControlContext.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.
IMPORT_C void  SetTitlePaneObserver (MAknTitlePaneObserver *aObserver)
  Sets observer for title pane events.
CEikLabel TextLabel ()
  Gets title text label.

Protected Member Functions

virtual IMPORT_C void  SizeChanged ()
  From CCoeControl.
virtual IMPORT_C void  PositionChanged ()
  From CCoeControl.
virtual IMPORT_C void  HandleResourceChange (TInt aType)
  Handles a change to the control's resources of type aType which are shared across the environment, e.g.
virtual IMPORT_C TInt  CountComponentControls () const
  From CCoeControl.
virtual IMPORT_C CCoeControl *  ComponentControl (TInt aIndex) const
  From CCoeControl.

Protected Attributes

MAknTitlePaneObserver *  iTitlePaneObserver

Constructor & Destructor Documentation

IMPORT_C CAknTitlePane::CAknTitlePane  ) 
 

Constructor.

IMPORT_C CAknTitlePane::~CAknTitlePane  ) 
 

Destructor.


Member Function Documentation

virtual IMPORT_C CCoeControl* CAknTitlePane::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
IMPORT_C void CAknTitlePane::ConstructFromResourceL TResourceReader &  aReader  ) 
 

Read title pane data from resource file and show it in the status pane's title pane.

IMPORT_C void CAknTitlePane::ConstructL  ) 
 

2nd phase constructor.

virtual IMPORT_C TInt CAknTitlePane::CountComponentControls  )  const [protected, virtual]
 

From CCoeControl.

Returns number of controls inside the context pane control.

Returns:
Number of component controls.
IMPORT_C void CAknTitlePane::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Handles pointer events

Parameters:
aPointerEvent  Pointer event to be handled
virtual IMPORT_C void CAknTitlePane::HandleResourceChange TInt  aType  )  [protected, virtual]
 

Handles a change to the control's resources of type aType which are shared across the environment, e.g.

color scheme change.

Parameters:
aType  Event type.
IMPORT_C TInt CAknTitlePane::MaxNumberOfVisibleTextRows  )  const
 

Gets the maximum amount of text rows that title pane is able to display simultaneously in the currently active status pane layout.

Typically the return value is either 2 (default portrait mode layout) or 1 (landscape mode layouts). In the extended status pane layouts the maximum number of lines is always 1.

Returns:
Maximum number of visible text lines.
virtual IMPORT_C void CAknTitlePane::PositionChanged  )  [protected, virtual]
 

From CCoeControl.

Handles the position change events.

virtual IMPORT_C void CAknTitlePane::PrepareContext CWindowGc &  aGc  )  const [virtual]
 

From MCoeControlContext.

Allows to modify graphics context before Draw.

Parameters:
aGc  Graphics context to be modified.
IMPORT_C void CAknTitlePane::SetFromResourceL TResourceReader &  aReader  ) 
 

Set data from resource file and show it in the status pane's title pane.

IMPORT_C void CAknTitlePane::SetNumberOfVisibleTextRows TInt  aRows  ) 
 

Sets the number of text rows that can be used to display the text.

The largest allowed value is the the value returned from MaxNumberOfVisibleTextRows() and the minimum value is always 1.

Parameters:
aRows  Number of rows that can be used to display the text.
IMPORT_C void CAknTitlePane::SetPicture const CFbsBitmap *  aBitmap,
const CFbsBitmap *  aMaskBitmap = NULL
 

Set a picture to the title pane and show it in the status pane's title pane.

Title pane object takes ownership of the picture. If NULL bitmap is passed, previously set image is shown.

Parameters:
aBitmap  bitmap to the title pane.
aMaskBitmap  mask of the bitmap.
IMPORT_C void CAknTitlePane::SetPictureFromFileL const TDesC &  aFileName,
TInt  aMainId,
TInt  aMaskId = -1
 

Set a picture from file and show it in the status pane's title pane.

Parameters:
aFileName  name of the bitmap file.
aMainId  id of the bitmap in the bitmap file.
aMaskId  id of the bitmap's mask in the bitmap file.
IMPORT_C void CAknTitlePane::SetSmallPicture const CFbsBitmap *  aBitmap,
const CFbsBitmap *  aMaskBitmap,
TBool  aVisible
 

Set a small picture to the title pane and show it in the status pane's title pane together with text.

This method is currently supported only in landscape orientation statuspane layouts.

Title pane object takes ownership of the picture.

If NULL bitmap is passed, previously set image is used.

Parameters:
aBitmap  bitmap to the title pane.
aMaskBitmap  mask of the bitmap.
aVisible  if ETrue, picture is set visible. Otherwise only text is shown.
IMPORT_C void CAknTitlePane::SetText HBufC *  aText,
TBool  aScroll
 

Sets text to the title pane.

If whole text does not fit into titlepane, it will be scrolled once and then shown in truncated form.

Parameters:
aText  new text. This object takes ownership of aText. If NULL is given then already existing text will be used.
aScroll  If ETrue text is scrolled when needed, otherwise not.
IMPORT_C void CAknTitlePane::SetText HBufC *  aText  ) 
 

Sets text to the title pane.

Parameters:
aText  new text. This object takes ownership of aText.
IMPORT_C void CAknTitlePane::SetTextL const TDesC &  aText,
TBool  aScroll
 

Set a text and show it in the status pane's title pane.

If whole text does not fit into titlepane, it will be scrolled once and then shown in truncated form.

Descriptor is copied to the title pane control and ownership of the original descriptor leaves to the application.

Parameters:
aText  Text to be shown on the title pane.
aScroll  If ETrue text is scrolled when needed, otherwise not.
IMPORT_C void CAknTitlePane::SetTextL const TDesC &  aText  ) 
 

Set a text and show it in the status pane's title pane.

Descriptor is copied to the title pane control and ownership of the original descriptor leaves to the application.

Parameters:
aText  Text to be shown on the title pane.
IMPORT_C void CAknTitlePane::SetTextToDefaultL  ) 
 

Set default value to the status pane's title pane.

Default value is the name of currently active application.

IMPORT_C void CAknTitlePane::SetTitlePaneObserver MAknTitlePaneObserver *  aObserver  ) 
 

Sets observer for title pane events.

Parameters:
aObserver  pointer to title pane observer
virtual IMPORT_C void CAknTitlePane::SizeChanged  )  [protected, virtual]
 

From CCoeControl.

Handle the size change events.

const TDesC * CAknTitlePane::Text  )  const [inline]
 

Returns text currently in the status pane's title pane.

Ownership is not transferred.

Returns:
text currently shown in the title pane.
CEikLabel* CAknTitlePane::TextLabel  ) 
 

Gets title text label.


Field Documentation

MAknTitlePaneObserver* CAknTitlePane::iTitlePaneObserver [protected]
 

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

Copyright © Nokia Corporation 2001-2008
Back to top