CRichBio Class Reference

API published in: S60 1st Ed

Link against: richbio.lib

Capability Information

Required Capabilities

LocalServices Location NetworkControl NetworkServices ReadDeviceData ReadUserData SwEvent UserEnvironment WriteDeviceData WriteUserData


#include <crichbio.h>

Detailed Description

A UI control used by Smart Messaging Viewers.

This control owns an editor, which is capable of viewing rich text content. NOTE! This is only intended for use with the Smart Message Viewers.


Public Member Functions

IMPORT_C  CRichBio (TRichBioMode aMode)
  Constructor.
IMPORT_C void  ConstructL (const CCoeControl *aParent)
  Second phase constructor.
  ~CRichBio ()
  Destructor.
IMPORT_C void  AddItemL (const TDesC &aLabel, const TDesC &aValue)
  Adds a label and value pair.
IMPORT_C TRect  CurrentLineRect ()
  This is needed for scrolling with Editor Base.
IMPORT_C CEikRichTextEditor Editor ()
  For accessing the richtext editor.
IMPORT_C TBool  IsEditorBaseMode () const
  Is the editor base mode on.
IMPORT_C void  Reset ()
  Empties the data contents.
IMPORT_C void  SetAndGetSizeL (TSize &aSize)
  Returns the preferred size of the control.
IMPORT_C TInt  VirtualHeight ()
  Returns the rich text virtual length.
IMPORT_C TInt  VirtualVisibleTop ()
  Returns the current cursor position.
IMPORT_C TBool  IsCursorLocation (TMsgCursorLocation aLocation) const
  Find out if the cursor is at a certain position.
IMPORT_C TInt  ScrollL (TInt aPixelsToScroll, TMsgScrollDirection aDirection)
  Performs the internal scrolling of control if needed.
IMPORT_C void  NotifyViewEvent (TMsgViewEvent aEvent, TInt aParam)
  Prepares control for viewing.
TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)

Static Public Member Functions

static IMPORT_C CRichBio NewL (const CCoeControl *aParent, TRichBioMode aMode)
  Two-phased constructor.

Friends

class  CEdwinSizeObserver
  Declare inner class friend.
class  T_RichBioTestSuite

Constructor & Destructor Documentation

IMPORT_C CRichBio::CRichBio TRichBioMode  aMode  ) 
 

Constructor.

ConstructL must be called after the container window is get. The type (TRichBioMode) is legacy code and has no effect on the construction or use of the object. Either ERichBioModeEditorBase or ERichBioModeStandard can be used with the same effect

Parameters:
aMode  Either ERichBioModeEditorBase or ERichBioModeStandard
CRichBio::~CRichBio  ) 
 

Destructor.


Member Function Documentation

IMPORT_C void CRichBio::AddItemL const TDesC &  aLabel,
const TDesC &  aValue
 

Adds a label and value pair.

The client does not need to check the length of the strings. This function will wrap strings that are too long.

Parameters:
aLabel  text to displayed in label text format.
aValue  text to displayed in text format.
IMPORT_C void CRichBio::ConstructL const CCoeControl *  aParent  ) 
 

Second phase constructor.

The parent control has to have a container window at this stage.

Parameters:
aParent  The parent control, which has container window.
IMPORT_C TRect CRichBio::CurrentLineRect  ) 
 

This is needed for scrolling with Editor Base.

Returns:
TRect Returns the rectangle of the "current" line.
IMPORT_C CEikRichTextEditor& CRichBio::Editor  ) 
 

For accessing the richtext editor.

Must not be called before ConstructL has been called.

Returns:
Reference to the CEikRichTextEditor
Exceptions:
Panics  if the iEditor is NULL.
IMPORT_C TBool CRichBio::IsCursorLocation TMsgCursorLocation  aLocation  )  const
 

Find out if the cursor is at a certain position.

Parameters:
aLocation  indicates either that the cursor is at the topmost position of the control or at the bottom most position.
Returns:
ETrue if the cursor is at the specified position, EFalse otherwise.
IMPORT_C TBool CRichBio::IsEditorBaseMode  )  const
 

Is the editor base mode on.

Returns:
ETrue if it is in Editor Base mode.
static IMPORT_C CRichBio* CRichBio::NewL const CCoeControl *  aParent,
TRichBioMode  aMode
[static]
 

Two-phased constructor.

Constructs the complete object. The parent control has to have a container window at this stage. The type (TRichBioMode) is legacy code and has no effect on the construction or use of the object. Either ERichBioModeEditorBase or ERichBioModeStandard can be used with the same effect

Parameters:
aParent  The parent control.
aMode  Either ERichBioModeEditorBase or ERichBioModeStandard
Returns:
a pointer to the created object.
IMPORT_C void CRichBio::NotifyViewEvent TMsgViewEvent  aEvent,
TInt  aParam
 

Prepares control for viewing.

Parameters:
aEvent  The event type
aParam  Event related parameters
TKeyResponse CRichBio::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
 
IMPORT_C void CRichBio::Reset  ) 
 

Empties the data contents.

IMPORT_C TInt CRichBio::ScrollL TInt  aPixelsToScroll,
TMsgScrollDirection  aDirection
 

Performs the internal scrolling of control if needed.

Parameters:
aPixelsToScroll  Amount of pixels to scroll.
aDirection  Scrolling direction.
Returns:
Amount of pixels the where scrolled. Zero value means the component cannot be scrolled to that direction anymore
IMPORT_C void CRichBio::SetAndGetSizeL TSize &  aSize  ) 
 

Returns the preferred size of the control.

Parameters:
aSize  Control may set its preferred size
IMPORT_C TInt CRichBio::VirtualHeight  ) 
 

Returns the rich text virtual length.

Returns:
text length in rich text.
IMPORT_C TInt CRichBio::VirtualVisibleTop  ) 
 

Returns the current cursor position.

Even in the viewer mode control contains a hidden cursor. This method return its position.

Returns:
a position of the hidden cursor relative to the virtual length.

Friends And Related Function Documentation

friend class CEdwinSizeObserver [friend]
 

Declare inner class friend.

friend class T_RichBioTestSuite [friend]
 

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

Copyright © Nokia Corporation 2001-2008
Back to top