00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MSGBIOCONTROL_H
00020 #define MSGBIOCONTROL_H
00021
00022
00023
00024 #include <msvstd.h>
00025 #include <coecntrl.h>
00026 #include <mmsgbiocontrol.h>
00027 #include <badesca.h>
00028 #include <aknglobalnote.h>
00029 #include <MsgEditor.hrh>
00030
00031
00032
00033 class MMsgBioControlObserver;
00034 class CMsvSession;
00035 class MMsgBioControlExtension;
00036
00037
00038
00039
00043 class CMsgBioControl : public CCoeControl, public MMsgBioControl
00044 {
00045
00046 public:
00047
00056 IMPORT_C CMsgBioControl(
00057 MMsgBioControlObserver& aObserver,
00058 CMsvSession* aSession,
00059 TMsvId aId,
00060 TMsgBioMode aEditorOrViewerMode,
00061 const RFile* aFile);
00062
00066 IMPORT_C ~CMsgBioControl();
00067
00068 public:
00069
00077 IMPORT_C static TBool ConfirmationQueryL(const TDesC& aText);
00078
00088 IMPORT_C static TBool ConfirmationQueryL(TInt aStringResource);
00089
00090 public:
00091
00104 IMPORT_C TUint32 OptionMenuPermissionsL() const;
00105
00111 IMPORT_C TInt VirtualHeight();
00112
00118 IMPORT_C TInt VirtualVisibleTop();
00119
00126 IMPORT_C TBool IsCursorLocation(TMsgCursorLocation aLocation) const;
00127
00128 public:
00129
00140 IMPORT_C TInt ScrollL( TInt aPixelsToScroll, TMsgScrollDirection aDirection );
00141
00148 IMPORT_C void NotifyViewEvent( TMsgViewEvent aEvent, TInt aParam );
00149
00150
00151 protected:
00152
00158 IMPORT_C TBool IsEditor() const;
00159
00164 IMPORT_C TBool IsFileBased() const;
00165
00172 IMPORT_C CMsvSession& MsvSession() const;
00173
00181 IMPORT_C const TFileName& FileName() const;
00182
00190 IMPORT_C const RFile& FileHandle() const;
00191
00199 IMPORT_C void LoadResourceL(const TDesC& aFile);
00200
00208 IMPORT_C void LoadResourceL(const TDesC& aFile,
00209 const TDesC& aSearchPath);
00210
00215 IMPORT_C void LoadStandardBioResourceL();
00216
00225 IMPORT_C void AddMenuItemL(CEikMenuPane& aMenuPane, TInt aStringRes,
00226 TInt aCommandOffset, TInt aPosition = 0);
00227
00234 IMPORT_C TBool NotifyEditorViewL(
00235 TMsgBioControlEventRequest aRequest,
00236 TInt aDelta = 0);
00237
00242 IMPORT_C void SetExtension(MMsgBioControlExtension* aExt);
00243
00244
00245 private:
00246
00252 void SetBioBodyControl( MMsgBioBodyControl* aBioBodyControl );
00253
00255 TBool IsNear(TInt aLafPos, TInt aPos) const;
00256
00257 private:
00258
00262 CMsgBioControl();
00263
00267 CMsgBioControl(const CMsgBioControl& aSource);
00268
00272 const CMsgBioControl& operator=(const CMsgBioControl& aSource);
00273
00274 protected:
00275
00277 MMsgBioControlObserver& iBioControlObserver;
00278
00280 TMsvId iId;
00281
00282 private:
00283
00290 CMsvSession* iMsvSession;
00291
00293 TMsgBioMode iMode;
00294
00302 const RFile* iFile;
00303
00307 MMsgBioControlExtension* iExt;
00308
00309
00310
00311 TUint8 iBCFiller[sizeof(TFileName) - sizeof(TFileName*) - sizeof(MMsgBioControlExtension*)];
00312
00313
00315 CArrayFixFlat<TInt>* iResourceOffsets;
00316
00318 MMsgBioBodyControl* iBioBodyControl;
00319
00321 TInt iBCStatusFlags;
00322
00323 private:
00324
00325 friend class CMsgBioBodyControl;
00326
00327 };
00328
00329
00330 #endif
00331
00332