CMsgBioControl Class Reference

class CMsgBioControl : public CCoeControl

The base class for Bio controls.

Inherits from

Public Member Functions
CMsgBioControl ( MMsgBioControlObserver &, CMsvSession *, TMsvId , TMsgBioMode , const RFile *)
~CMsgBioControl ()
IMPORT_C TBool ConfirmationQueryL (const TDesC &)
IMPORT_C TBool ConfirmationQueryL ( TInt )
IMPORT_C TBool IsCursorLocation ( TMsgCursorLocation )
IMPORT_C void NotifyViewEvent ( TMsgViewEvent , TInt )
IMPORT_C TUint32 OptionMenuPermissionsL ()
IMPORT_C TInt ScrollL ( TInt , TMsgScrollDirection )
IMPORT_C TInt VirtualHeight ()
IMPORT_C TInt VirtualVisibleTop ()
Protected Member Functions
IMPORT_C void AddMenuItemL ( CEikMenuPane &, TInt , TInt , TInt )
IMPORT_C const RFile & FileHandle ()
IMPORT_C const TFileName & FileName ()
IMPORT_C TBool IsEditor ()
IMPORT_C TBool IsFileBased ()
IMPORT_C void LoadResourceL (const TDesC &)
IMPORT_C void LoadResourceL (const TDesC &, const TDesC &)
IMPORT_C void LoadStandardBioResourceL ()
IMPORT_C CMsvSession & MsvSession ()
IMPORT_C TBool NotifyEditorViewL ( TMsgBioControlEventRequest , TInt )
IMPORT_C void SetExtension (MMsgBioControlExtension *)
Private Member Functions
CMsgBioControl ()
CMsgBioControl (const CMsgBioControl &)
TBool IsNear ( TInt , TInt )
void SetBioBodyControl ( MMsgBioBodyControl *)
const CMsgBioControl & operator= (const CMsgBioControl &)
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::ComponentControl(TInt)const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ConstructFromResourceL(TResourceReader &)
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CountComponentControls()const
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::OfferKeyEventL(const TKeyEvent &,TEventCode)
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::SizeChanged()
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
Protected Attributes
MMsgBioControlObserver & iBioControlObserver
TMsvId iId
Private Attributes
TUint8 iBCFiller
TInt iBCStatusFlags
MMsgBioBodyControl * iBioBodyControl
MMsgBioControlExtension * iExt
const RFile * iFile
TMsgBioMode iMode
CMsvSession * iMsvSession
CArrayFixFlat < TInt > * iResourceOffsets
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize

Constructor & Destructor Documentation

CMsgBioControl(MMsgBioControlObserver &, CMsvSession *, TMsvId, TMsgBioMode, const RFile *)

IMPORT_C CMsgBioControl ( MMsgBioControlObserver & aObserver,
CMsvSession * aSession,
TMsvId aId,
TMsgBioMode aEditorOrViewerMode,
const RFile * aFile
)

Constructor. Call this from your Bio Control constructor.

Parameters

MMsgBioControlObserver & aObserver Reference to the Bio control observer.
CMsvSession * aSession Message Server session. Ownership not transferred.
TMsvId aId Id of the message in the server.
TMsgBioMode aEditorOrViewerMode Sets Bio Control into editor or viewer mode.
const RFile * aFile Data file handle. Bio controls can also be file based. Not owned.

CMsgBioControl()

CMsgBioControl ( ) [private]

Default constructor hidden away

CMsgBioControl(const CMsgBioControl &)

CMsgBioControl ( const CMsgBioControl & aSource ) [private]

Copy constructor prohibited.

Parameters

const CMsgBioControl & aSource

~CMsgBioControl()

IMPORT_C ~CMsgBioControl ( )

Destructor

Member Functions Documentation

AddMenuItemL(CEikMenuPane &, TInt, TInt, TInt)

IMPORT_C void AddMenuItemL ( CEikMenuPane & aMenuPane,
TInt aStringRes,
TInt aCommandOffset,
TInt aPosition = 0
) [protected]

Adds a menu item to the menu pane which is given as a reference.

Parameters

CEikMenuPane & aMenuPane Reference to the menu pane.
TInt aStringRes The string resource id.
TInt aCommandOffset The offset of the command from the first free command.
TInt aPosition = 0 The inserting position. The default is at the top.

ConfirmationQueryL(const TDesC &)

IMPORT_C TBool ConfirmationQueryL ( const TDesC & aText ) [static]

Pops a confirmation query. The result is given by the return value. The standard resource must have been loaded using LoadStandardBioResourceL() .

Parameters

const TDesC & aText The text that is to be used in the query.

ConfirmationQueryL(TInt)

IMPORT_C TBool ConfirmationQueryL ( TInt aStringResource ) [static]

Pops a confirmation query. The result is given by the return value. The standard resource must have been loaded using LoadStandardBioResourceL() . Your resource must also be loaded, for eg. with LoadResourceL() . CCoeEnv must exist.

Parameters

TInt aStringResource The string resource id.

FileHandle()

IMPORT_C const RFile & FileHandle ( ) const [protected]
Deprecated* Handle is valid only at contsruction phase!! To be removed. Returns input file handle.
Exceptions
Panics

if the control is not file based.

FileName()

IMPORT_C const TFileName & FileName ( ) const [protected]

Deprecated*

Returns name of input file.
Exceptions
Panics

if the control is not file based.

IsCursorLocation(TMsgCursorLocation)

IMPORT_C TBool IsCursorLocation ( TMsgCursorLocation aLocation ) const

Tells whether the cursor is in the topmost or bottom position. It is used by the scrolling framework.

Parameters

TMsgCursorLocation aLocation Specifies either top or bottom.

IsEditor()

IMPORT_C TBool IsEditor ( ) const [protected]

Returns true if the control has been launched as editor, and false if it was launched as viewer.

IsFileBased()

IMPORT_C TBool IsFileBased ( ) const [protected]

Is the Bio Control file based or not.

IsNear(TInt, TInt)

TBool IsNear ( TInt aLafPos,
TInt aPos
) const [private]

Parameters

TInt aLafPos
TInt aPos

LoadResourceL(const TDesC &)

IMPORT_C void LoadResourceL ( const TDesC & aFile ) [protected]

Loads a resource file from /system/data/ into eikon env. This function should be used for loading the Bio Control resources. The resources are unloaded in the destructor of this class. The offsets are kept in iResourceOffsets.

Parameters

const TDesC & aFile File name mask, for eg. "vcalbc.r??".

LoadResourceL(const TDesC &, const TDesC &)

IMPORT_C void LoadResourceL ( const TDesC & aFile,
const TDesC & aSearchPath
) [protected]

Loads a resource file into eikon env. The resources are unloaded in the destructor of this class. (the offsets are kept in iResourceOffsets).

Parameters

const TDesC & aFile File name mask, for eg. "vcalbc.r??".
const TDesC & aSearchPath Search path, for eg. "\\System\\libs\\".

LoadStandardBioResourceL()

IMPORT_C void LoadStandardBioResourceL ( ) [protected]

This loads the msgeditorutils.rsc resource, which is needed by the dialogs and notes of this class.

MsvSession()

IMPORT_C CMsvSession & MsvSession ( ) const [protected]
Accessor for MsvSession. The session exists only if the Bio Control has been created as message server based.
Exceptions
Panics

if there is no session.

NotifyEditorViewL(TMsgBioControlEventRequest, TInt)

IMPORT_C TBool NotifyEditorViewL ( TMsgBioControlEventRequest aRequest,
TInt aDelta = 0
) [protected]

Notify editor view. This is used by the Bio Control for notifying the Editor Base framework of an event, and usually for requesting something to be done.

Parameters

TMsgBioControlEventRequest aRequest
TInt aDelta = 0

NotifyViewEvent(TMsgViewEvent, TInt)

IMPORT_C void NotifyViewEvent ( TMsgViewEvent aEvent,
TInt aParam
)
Prepares control for viewing.
Since
3.2

Parameters

TMsgViewEvent aEvent The event type
TInt aParam Event related parameters

OptionMenuPermissionsL()

IMPORT_C TUint32 OptionMenuPermissionsL ( ) const

The application can get the option menu recommendations using this function. The function comes from MMsgBioControl . This is the default implementation which returns the flags EMsgBioCallBack | EMsgBioDelete | EMsgBioMessInfo | EMsgBioMove | EMsgBioCreateCC | EMsgBioSend | EMsgBioAddRecipient | EMsgBioSave | EMsgBioSendingOpt | EMsgBioHelp | EMsgBioExit. Bio Controls should override this if it is not ok.

ScrollL(TInt, TMsgScrollDirection)

IMPORT_C TInt ScrollL ( TInt aPixelsToScroll,
TMsgScrollDirection aDirection
)
Performs the internal scrolling of control if needed. Default implementation does not perform any scrolling and returns that zero pixels were scrolled.
Since
3.2

Parameters

TInt aPixelsToScroll Amount of pixels to scroll.
TMsgScrollDirection aDirection Scrolling direction.

SetBioBodyControl(MMsgBioBodyControl *)

void SetBioBodyControl ( MMsgBioBodyControl * aBioBodyControl ) [private]

Sets the bio body control reference. Used only by CMsgBioBodyControl .

Parameters

MMsgBioBodyControl * aBioBodyControl Address of the bio body control.

SetExtension(MMsgBioControlExtension *)

IMPORT_C void SetExtension ( MMsgBioControlExtension * aExt ) [protected]

Call from base class if extension interface is supported.

Parameters

MMsgBioControlExtension * aExt

VirtualHeight()

IMPORT_C TInt VirtualHeight ( )

Gives the height of the text in pixels. It is used by the scrolling framework.

VirtualVisibleTop()

IMPORT_C TInt VirtualVisibleTop ( )

Gives the cursor position in pixels. It is used by the scrolling framework.

operator=(const CMsgBioControl &)

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

Assignment operator prohibited.

Parameters

const CMsgBioControl & aSource

Member Data Documentation

TUint8 iBCFiller

TUint8 iBCFiller [private]

TInt iBCStatusFlags

TInt iBCStatusFlags [private]

MMsgBioBodyControl * iBioBodyControl

MMsgBioBodyControl * iBioBodyControl [private]

MMsgBioControlObserver & iBioControlObserver

MMsgBioControlObserver & iBioControlObserver [protected]

MMsgBioControlExtension * iExt

MMsgBioControlExtension * iExt [private]

A pointer to Bio control extension interface. It is not owned here.

const RFile * iFile

const RFile * iFile [private]

* Deprecated -> To be removed* Handle is valid only during contruction phase. A pointer to the handle of the input file, not owned. Accessed using FileHandle() . See also function FileBased().

TMsvId iId

TMsvId iId [protected]

TMsgBioMode iMode

TMsgBioMode iMode [private]

CMsvSession * iMsvSession

CMsvSession * iMsvSession [private]

Pointer to Message Server session. It is NOT owned here. The reason for using pointer type is that the session is optional. It can be NULL without implying any error. This session is accessed using the function MsvSession() .

CArrayFixFlat< TInt > * iResourceOffsets

CArrayFixFlat < TInt > * iResourceOffsets [private]