CMsgBioControl Class Reference

API published in: S60 1st Ed

Link against: msgeditorutils.lib

Capability Information

Required Capabilities

LocalServices Location NetworkControl NetworkServices ReadDeviceData ReadUserData SwEvent UserEnvironment WriteDeviceData WriteUserData


#include <msgbiocontrol.h>

Inherits MMsgBioControl.


Detailed Description

The base class for Bio controls.

Public Member Functions

IMPORT_C  CMsgBioControl (MMsgBioControlObserver &aObserver, CMsvSession *aSession, TMsvId aId, TMsgBioMode aEditorOrViewerMode, const RFile *aFile)
  Constructor.
IMPORT_C  ~CMsgBioControl ()
  Destructor.
IMPORT_C TUint32  OptionMenuPermissionsL () const
  The application can get the option menu recommendations using this function.
IMPORT_C TInt  VirtualHeight ()
  Gives the height of the text in pixels.
IMPORT_C TInt  VirtualVisibleTop ()
  Gives the cursor position in pixels.
IMPORT_C TBool  IsCursorLocation (TMsgCursorLocation aLocation) const
  Tells whether the cursor is in the topmost or bottom 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.

Static Public Member Functions

static IMPORT_C TBool  ConfirmationQueryL (const TDesC &aText)
  Pops a confirmation query.
static IMPORT_C TBool  ConfirmationQueryL (TInt aStringResource)
  Pops a confirmation query.

Protected Member Functions

IMPORT_C TBool  IsEditor () const
  Returns true if the control has been launched as editor, and false if it was launched as viewer.
IMPORT_C TBool  IsFileBased () const
  Is the Bio Control file based or not.
IMPORT_C CMsvSession &  MsvSession () const
  Accessor for MsvSession.
IMPORT_C const TFileName &  FileName () const
  Deprecated*.
IMPORT_C const RFile &  FileHandle () const
  Deprecated* Handle is valid only at contsruction phase!! To be removed.
IMPORT_C void  LoadResourceL (const TDesC &aFile)
  Loads a resource file from /system/data/ into eikon env.
IMPORT_C void  LoadResourceL (const TDesC &aFile, const TDesC &aSearchPath)
  Loads a resource file into eikon env.
IMPORT_C void  LoadStandardBioResourceL ()
  This loads the msgeditorutils.rsc resource, which is needed by the dialogs and notes of this class.
IMPORT_C void  AddMenuItemL (CEikMenuPane &aMenuPane, TInt aStringRes, TInt aCommandOffset, TInt aPosition=0)
  Adds a menu item to the menu pane which is given as a reference.
IMPORT_C TBool  NotifyEditorViewL (TMsgBioControlEventRequest aRequest, TInt aDelta=0)
  Notify editor view.
IMPORT_C void  SetExtension (MMsgBioControlExtension *aExt)
  Call from base class if extension interface is supported.

Protected Attributes

MMsgBioControlObserver iBioControlObserver
  Reference to the MMsgBioControlObserver.
TMsvId  iId
  Id of the message in the server.

Friends

class  CMsgBioBodyControl

Constructor & Destructor Documentation

IMPORT_C CMsgBioControl::CMsgBioControl MMsgBioControlObserver aObserver,
CMsvSession *  aSession,
TMsvId  aId,
TMsgBioMode  aEditorOrViewerMode,
const RFile *  aFile
 

Constructor.

Call this from your Bio Control constructor.

Parameters:
aObserver  Reference to the Bio control observer.
aSession  Message Server session. Ownership not transferred.
aId  Id of the message in the server.
aEditorOrViewerMode  Sets Bio Control into editor or viewer mode.
aFile  Data file handle. Bio controls can also be file based. Not owned.
IMPORT_C CMsgBioControl::~CMsgBioControl  ) 
 

Destructor.


Member Function Documentation

IMPORT_C void CMsgBioControl::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:
aMenuPane  Reference to the menu pane.
aStringRes  The string resource id.
aCommandOffset  The offset of the command from the first free command.
aPosition  The inserting position. The default is at the top.
static IMPORT_C TBool CMsgBioControl::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:
aStringResource  The string resource id.
Returns:
A user confirmation results in ETrue, and vice versa.
static IMPORT_C TBool CMsgBioControl::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:
aText  The text that is to be used in the query.
Returns:
A user confirmation results in ETrue, and vice versa.
IMPORT_C const RFile& CMsgBioControl::FileHandle  )  const [protected]
 

Deprecated* Handle is valid only at contsruction phase!! To be removed.

Returns input file handle.

Returns:
handle of file.
Exceptions:
Panics  if the control is not file based.
IMPORT_C const TFileName& CMsgBioControl::FileName  )  const [protected]
 

Deprecated*.

Returns name of input file.

Returns:
Name of file.
Exceptions:
Panics  if the control is not file based.
IMPORT_C TBool CMsgBioControl::IsCursorLocation TMsgCursorLocation  aLocation  )  const [virtual]
 

Tells whether the cursor is in the topmost or bottom position.

It is used by the scrolling framework.

Parameters:
aLocation  Specifies either top or bottom.
Returns:
ETrue if the cursor is in the part specified by aLocation.

Implements MMsgBioControl.

IMPORT_C TBool CMsgBioControl::IsEditor  )  const [protected]
 

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

Returns:
ETrue or EFalse
IMPORT_C TBool CMsgBioControl::IsFileBased  )  const [protected]
 

Is the Bio Control file based or not.

Returns:
ETrue if is file based.
IMPORT_C void CMsgBioControl::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:
aFile  File name mask, for eg. "vcalbc.r??".
aSearchPath  Search path, for eg. "\\System\\libs\\".
IMPORT_C void CMsgBioControl::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:
aFile  File name mask, for eg. "vcalbc.r??".
IMPORT_C void CMsgBioControl::LoadStandardBioResourceL  )  [protected]
 

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

IMPORT_C CMsvSession& CMsgBioControl::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.
Returns:
CMsvSession&
IMPORT_C TBool CMsgBioControl::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.

IMPORT_C void CMsgBioControl::NotifyViewEvent TMsgViewEvent  aEvent,
TInt  aParam
 

Prepares control for viewing.

Parameters:
aEvent  The event type
aParam  Event related parameters
IMPORT_C TUint32 CMsgBioControl::OptionMenuPermissionsL  )  const [virtual]
 

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.

Returns:
The option menu permission flags. If the flag is off it means that the option menu command is not recommended with this Bio Control.

Implements MMsgBioControl.

IMPORT_C TInt CMsgBioControl::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.

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 and view should be moved.
IMPORT_C void CMsgBioControl::SetExtension MMsgBioControlExtension aExt  )  [protected]
 

Call from base class if extension interface is supported.

Parameters:
Interface  for bio control extension. Ownership is not taken.
IMPORT_C TInt CMsgBioControl::VirtualHeight  )  [virtual]
 

Gives the height of the text in pixels.

It is used by the scrolling framework.

Returns:
Height of the text in pixels.

Implements MMsgBioControl.

IMPORT_C TInt CMsgBioControl::VirtualVisibleTop  )  [virtual]
 

Gives the cursor position in pixels.

It is used by the scrolling framework.

Returns:
Cursor position in pixels.

Implements MMsgBioControl.


Friends And Related Function Documentation

friend class CMsgBioBodyControl [friend]
 

Field Documentation

MMsgBioControlObserver& CMsgBioControl::iBioControlObserver [protected]
 

Reference to the MMsgBioControlObserver.

TMsvId CMsgBioControl::iId [protected]
 

Id of the message in the server.


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

Copyright © Nokia Corporation 2001-2008
Back to top