CRichBio Class Reference

class CRichBio : public CCoeControl

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.

Inherits from

Nested Classes and Structures

Public Member Functions
CRichBio(TRichBioMode)
~CRichBio()
IMPORT_C voidAddItemL(const TDesC &, const TDesC &)
IMPORT_C voidConstructL(const CCoeControl *)
IMPORT_C TRectCurrentLineRect()
IMPORT_C CEikRichTextEditor &Editor()
IMPORT_C TBoolIsCursorLocation(TMsgCursorLocation)
IMPORT_C TBoolIsEditorBaseMode()
IMPORT_C CRichBio *NewL(const CCoeControl *, TRichBioMode)
IMPORT_C voidNotifyViewEvent(TMsgViewEvent, TInt)
TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C voidReset()
IMPORT_C TIntScrollL(TInt, TMsgScrollDirection)
IMPORT_C voidSetAndGetSizeL(TSize &)
IMPORT_C TIntVirtualHeight()
IMPORT_C TIntVirtualVisibleTop()
Private Member Functions
CRichBio()
CRichBio(const CRichBio &)
voidAddItemToRichTextL(const TDesC &, const TDesC &)
voidAppendTextL(const TDesC &, const TCharFormat &, const TCharFormatMask &)
voidApplyFormat(TCharFormat &, TCharFormatMask &, TBool)
voidApplyLabelFormat(TCharFormat &, TCharFormatMask &)
voidApplyValueFormat(TCharFormat &, TCharFormatMask &)
TBool CacheExists()
voidCacheItemL(const TDesC &, const TDesC &)
CCoeControl *ComponentControl(TInt)
TInt CountComponentControls()
voidDraw(const TRect &)
voidLoadFromCacheL()
voidPanic(TInt)
voidSizeChanged()
const CRichBio &operator=(const CRichBio &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::ActivateL()
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ConstructFromResourceL(TResourceReader &)
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::FocusChanged(TDrawNow)
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandlePointerEventL(const TPointerEvent &)
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HandleResourceChange(TInt)
CCoeControl::HasBorder()const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::InputCapabilities()const
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MakeVisible(TBool)
CCoeControl::MaximumWidth()const
CCoeControl::MinimumSize()
CCoeControl::MopSupplyObject(TTypeUid)
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAdjacent(TInt)
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateL(RWriteStream &)const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
Inherited Enumerations
CCoeControl:TZoomType
Private Attributes
CMsgExpandableControlEditor *iEditor
CEdwinSizeObserver *iEdwinSizeObserver
TBool iIsFirstItem
CDesC16ArrayFlat *iLabelCache
const TRichBioModeiMode
CDesC16ArrayFlat *iValueCache
TInt iVirtualHeight
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize

Constructor & Destructor Documentation

CRichBio(TRichBioMode)

IMPORT_CCRichBio(TRichBioModeaMode)

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

TRichBioMode aModeEither ERichBioModeEditorBase or ERichBioModeStandard

CRichBio()

CRichBio()[private]

Default constructor prohibited

CRichBio(const CRichBio &)

CRichBio(const CRichBio &aSource)[private]

Copy constructor hidden away.

Parameters

const CRichBio & aSource

~CRichBio()

~CRichBio()

Destructor

Member Functions Documentation

AddItemL(const TDesC &, const TDesC &)

IMPORT_C voidAddItemL(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

const TDesC & aLabeltext to displayed in label text format.
const TDesC & aValuetext to displayed in text format.

AddItemToRichTextL(const TDesC &, const TDesC &)

voidAddItemToRichTextL(const TDesC &aLabel,
const TDesC &aValue
)[private]

Appends text to RichText viewer.

Parameters

const TDesC & aLabelLabel text
const TDesC & aValuevalue text

AppendTextL(const TDesC &, const TCharFormat &, const TCharFormatMask &)

voidAppendTextL(const TDesC &aText,
const TCharFormat &aFormat,
const TCharFormatMask &aMask
)[private]

Add text to viewer, checks and removes linefeeds and carriage returns

Parameters

const TDesC & aTexttext to be added
const TCharFormat & aFormatCharacter format
const TCharFormatMask & aMaskCharacter format mask

ApplyFormat(TCharFormat &, TCharFormatMask &, TBool)

voidApplyFormat(TCharFormat &aFormat,
TCharFormatMask &aMask,
TBoolaIsLabel
)[private]

Applies the format of value and label text to viewer.

Parameters

TCharFormat & aFormatCharacter format to be applied.
TCharFormatMask & aMaskCharacter format mask Determines is the text label or value.
TBool aIsLabel

ApplyLabelFormat(TCharFormat &, TCharFormatMask &)

voidApplyLabelFormat(TCharFormat &aFormat,
TCharFormatMask &aMask
)[private]

Applies the format of label text to viewer.

Parameters

TCharFormat & aFormatCharacter format to be applied.
TCharFormatMask & aMaskCharacter format mask

ApplyValueFormat(TCharFormat &, TCharFormatMask &)

voidApplyValueFormat(TCharFormat &aFormat,
TCharFormatMask &aMask
)[private]

Applies the format of value text to viewer.

Parameters

TCharFormat & aFormatCharacter format to be applied.
TCharFormatMask & aMaskCharacter format mask

CacheExists()

TBool CacheExists()[private]

Checks either cache exists or not.

CacheItemL(const TDesC &, const TDesC &)

voidCacheItemL(const TDesC &aLabel,
const TDesC &aValue
)[private]

Adds item to cache

Parameters

const TDesC & aLabellabel text
const TDesC & aValuevalue text

ComponentControl(TInt)

CCoeControl *ComponentControl(TIntaIndex)const [private, virtual]

Parameters

TInt aIndex

ConstructL(const CCoeControl *)

IMPORT_C voidConstructL(const CCoeControl *aParent)

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

Parameters

const CCoeControl * aParentThe parent control, which has container window.

CountComponentControls()

TInt CountComponentControls()const [private, virtual]

CurrentLineRect()

IMPORT_C TRectCurrentLineRect()

This is needed for scrolling with Editor Base.

Draw(const TRect &)

voidDraw(const TRect &aRect)const [private, virtual]

Parameters

const TRect & aRect

Editor()

IMPORT_C CEikRichTextEditor &Editor()
For accessing the richtext editor. Must not be called before ConstructL has been called.
Exceptions
Panics

if the iEditor is NULL.

IsCursorLocation(TMsgCursorLocation)

IMPORT_C TBoolIsCursorLocation(TMsgCursorLocationaLocation)const

Find out if the cursor is at a certain position.

Parameters

TMsgCursorLocation aLocationindicates either that the cursor is at the topmost position of the control or at the bottom most position.

IsEditorBaseMode()

IMPORT_C TBoolIsEditorBaseMode()const

Is the editor base mode on.

LoadFromCacheL()

voidLoadFromCacheL()[private]

Adds items to richtext from cache.

NewL(const CCoeControl *, TRichBioMode)

IMPORT_C CRichBio *NewL(const CCoeControl *aParent,
TRichBioModeaMode
)[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

const CCoeControl * aParentThe parent control.
TRichBioMode aModeEither ERichBioModeEditorBase or ERichBioModeStandard

NotifyViewEvent(TMsgViewEvent, TInt)

IMPORT_C voidNotifyViewEvent(TMsgViewEventaEvent,
TIntaParam
)
Prepares control for viewing.
Since
3.2

Parameters

TMsgViewEvent aEventThe event type
TInt aParamEvent related parameters

OfferKeyEventL(const TKeyEvent &, TEventCode)

TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

Parameters

const TKeyEvent & aKeyEvent
TEventCode aType

Panic(TInt)

voidPanic(TIntaPanic)[private, static]

panic wrapper

Parameters

TInt aPanic

Reset()

IMPORT_C voidReset()

Empties the data contents.

ScrollL(TInt, TMsgScrollDirection)

IMPORT_C TIntScrollL(TIntaPixelsToScroll,
TMsgScrollDirectionaDirection
)
Performs the internal scrolling of control if needed.
Since
3.2

Parameters

TInt aPixelsToScrollAmount of pixels to scroll.
TMsgScrollDirection aDirectionScrolling direction.

SetAndGetSizeL(TSize &)

IMPORT_C voidSetAndGetSizeL(TSize &aSize)

Returns the preferred size of the control.

Parameters

TSize & aSizeControl may set its preferred size

SizeChanged()

voidSizeChanged()[private, virtual]

VirtualHeight()

IMPORT_C TIntVirtualHeight()

Returns the rich text virtual length.

VirtualVisibleTop()

IMPORT_C TIntVirtualVisibleTop()

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

operator=(const CRichBio &)

const CRichBio &operator=(const CRichBio &aSource)[private]

Assignment operator hidden away.

Parameters

const CRichBio & aSource

Member Data Documentation

CMsgExpandableControlEditor * iEditor

CMsgExpandableControlEditor *iEditor[private]

CEdwinSizeObserver * iEdwinSizeObserver

CEdwinSizeObserver *iEdwinSizeObserver[private]

TBool iIsFirstItem

TBool iIsFirstItem[private]

CDesC16ArrayFlat * iLabelCache

CDesC16ArrayFlat *iLabelCache[private]

const TRichBioMode iMode

const TRichBioModeiMode[private]

CDesC16ArrayFlat * iValueCache

CDesC16ArrayFlat *iValueCache[private]

TInt iVirtualHeight

TInt iVirtualHeight[private]