CNotepadApi Class Reference
class CNotepadApi : public CBase |
APIs of Notepad library. CNotepadApi provides APIs for other modules.
NpdLib.lib
Public Member Functions |
---|
| ~CNotepadApi() |
IMPORT_C void | AddContentL(const TDesC &) |
IMPORT_C void | CreateListDialogL(TInt) |
IMPORT_C void | CreateModelL(TInt) |
IMPORT_C void | CreateViewerDialogL(const TDesC &, const TDesC *, const TBool, TBool, TUint) |
IMPORT_C void | CreateViewerDialogL(RFile &, const TDesC *, const TBool, TBool, TUint) |
IMPORT_C void | CreateViewerDialogL(const TBool) |
IMPORT_C CEikDialog * | Dialog() |
IMPORT_C TInt | ExecFileViewerL(const TDesC &, const TDesC *, const TBool, TBool, TUint) |
IMPORT_C TInt | ExecFileViewerL(RFile &, const TDesC *, const TBool, TBool, TUint) |
IMPORT_C TInt | ExecReadOnlyTextViewerL(const TDesC &, const TDesC &, const TDesC &) |
IMPORT_C TInt | ExecTemplatesL() |
IMPORT_C HBufC * | ExecTextEditorL(TInt &, const TDesC &, const TDesC &, const TDesC &) |
IMPORT_C HBufC * | ExecTextViewerL(TInt &, const TDesC &, const TDesC &, const TDesC &) |
IMPORT_C TBool | ExistsMemoL(const TInt) |
IMPORT_C HBufC * | FetchMemoL(const TDesC *) |
IMPORT_C HBufC * | FetchTemplateL(const TDesC *) |
IMPORT_C CNotepadModel * | Model() |
IMPORT_C CNotepadApi * | NewL() |
IMPORT_C CNotepadApi * | NewLC() |
IMPORT_C TInt | NumberOfTemplates() |
IMPORT_C TBool | ProbeMemoL(const TInt) |
IMPORT_C void | SaveFileAsMemoL(const TDesC &) |
IMPORT_C void | SaveFileAsMemoL(RFile &) |
IMPORT_C void | SaveFileAsMemoL(const TDesC &, const TUint) |
IMPORT_C void | SaveFileAsMemoL(RFile &, const TUint) |
Private Member Functions |
---|
| CNotepadApi() |
IMPORT_C void | CNotepadApi_Reserved() |
IMPORT_C void | CNotepadApi_Reserved_Static() |
IMPORT_C void | CreateTextEditorDialogL(HBufC **, TInt &, const TDesC &, const TDesC &, const TDesC &) |
IMPORT_C void | CreateTextViewerDialogL(HBufC **, TInt &, TBool, const TDesC &, const TDesC &, const TDesC &) |
HBufC * | DoPopupListL(const TDesC *, TInt, TInt, TInt) |
Constructor & Destructor Documentation
~CNotepadApi()
IMPORT_C | ~CNotepadApi | ( | ) | [virtual] |
Destructor. Remove a resource file of NpdLib.
Member Functions Documentation
AddContentL(const TDesC &)
IMPORT_C void | AddContentL | ( | const TDesC & | aText | ) | [static] |
Parameters
const TDesC & aText | memo text to save. |
CNotepadApi_Reserved()
IMPORT_C void | CNotepadApi_Reserved | ( | ) | [private, virtual] |
CNotepadApi_Reserved_Static()
IMPORT_C void | CNotepadApi_Reserved_Static | ( | ) | [private, static] |
CreateListDialogL(TInt)
IMPORT_C void | CreateListDialogL | ( | TInt | aResId | ) | |
Parameters
TInt aResId | resource id of type NOTEPAD_LIST_DIALOG. |
CreateModelL(TInt)
IMPORT_C void | CreateModelL | ( | TInt | aResId | ) | |
Parameters
TInt aResId | resource id of type NOTEPAD_MODEL. |
CreateTextEditorDialogL(HBufC **, TInt &, const TDesC &, const TDesC &, const TDesC &)
Creates text editor dialog
Parameters
HBufC ** aContentPointer | |
TInt & aReturnStatus | KErrGeneral (-1) if document was deleted, KErrNone otherwise. |
const TDesC & aText =
KNullDesC
| descriptor that holds the initial text. If null, editor starts empty |
const TDesC & aTitle =
KNullDesC
| Title of the editor dialog. If null, application default is used instead. |
const TDesC & aDeleteConfirmationText =
KNullDesC
| Confirmation text shown if user chooses to delete the document |
CreateTextViewerDialogL(HBufC **, TInt &, TBool, const TDesC &, const TDesC &, const TDesC &)
Creates text viewer dialog for editable text
Parameters
HBufC ** aContentPointer | |
TInt & aReturnStatus | KErrGeneral (-1) if the text was deleted. KErrNone otherwise |
TBool aReadOnly | indicates whether text is readonly or editable |
const TDesC & aText | the text to be viewed |
const TDesC & aTitle =
KNullDesC
| Title of the viewer dialog. If null, application default is used instead. |
const TDesC & aDeleteConfirmationText =
KNullDesC
| Confirmation text shown if user chooses to delete the document |
CreateViewerDialogL(const TDesC &, const TDesC *, const TBool, TBool, TUint)
Parameters
const TDesC & aFileName | filename to view. |
const TDesC * aTitle | title pane (if NULL, filename is used). |
const TBool aDoWait | create waiting dialog if ETrue. |
TBool aGuessEncoding = EFalse | guess encoding if ETrue (ignore aEncoding). |
TUint aEncoding =
KCharacterSetIdentifierIso88591
| encoding of the File (default ISO-8859-1. This is ignored if aGuessEncoding is ETrue). |
CreateViewerDialogL(RFile &, const TDesC *, const TBool, TBool, TUint)
Parameters
RFile & aFile | file handle. |
const TDesC * aTitle | title pane (if NULL, filename is used). |
const TBool aDoWait | create waiting dialog if ETrue. |
TBool aGuessEncoding = EFalse | guess encoding if ETrue (ignore aEncoding). |
TUint aEncoding =
KCharacterSetIdentifierIso88591
| encoding of the File (default ISO-8859-1. This is ignored if aGuessEncoding is ETrue). |
CreateViewerDialogL(const TBool)
IMPORT_C void | CreateViewerDialogL | ( | const TBool | aDoWait | ) | |
Parameters
const TBool aDoWait | create waiting dialog if ETrue. |
Dialog()
Return internal Dialog object. (Internal to NpdLib)
DoPopupListL(const TDesC *, TInt, TInt, TInt)
HBufC * | DoPopupListL | ( | const TDesC * | aTitle, |
| TInt | aModelResId, |
| TInt | aPromptResId, |
| TInt | aEmptyTextResId = 0 |
| ) | [private] |
Parameters
const TDesC * aTitle | title of popup list. |
TInt aModelResId | resource id of type NOTEPAD_MODEL. |
TInt aPromptResId | resource id of prompt text, which is used when aTitle is NULL. |
TInt aEmptyTextResId = 0 | resource id of empty text. |
ExecFileViewerL(const TDesC &, const TDesC *, const TBool, TBool, TUint)
Execute a file viewer dialog.
Parameters
const TDesC & aFileName | text file to view. |
const TDesC * aTitle = NULL | TitlePane string (if NULL, Title will be FileName). |
const TBool aDoWait = ETrue | Use wait dialog if ETrue. |
TBool aGuessEncoding = EFalse | guess encoding if ETrue (ignore aEncoding). |
TUint aEncoding =
KCharacterSetIdentifierIso88591
| encoding of the File (default ISO-8859-1. This is ignored if aGuessEncoding is ETrue). |
ExecFileViewerL(RFile &, const TDesC *, const TBool, TBool, TUint)
Execute a file viewer dialog.
Parameters
RFile & aFile | file handle. |
const TDesC * aTitle = NULL | TitlePane string (if NULL, Title will be FileName). |
const TBool aDoWait = ETrue | Use wait dialog if ETrue. |
TBool aGuessEncoding = EFalse | guess encoding if ETrue (ignore aEncoding). |
TUint aEncoding =
KCharacterSetIdentifierIso88591
| encoding of the File (default ISO-8859-1. This is ignored if aGuessEncoding is ETrue). |
ExecReadOnlyTextViewerL(const TDesC &, const TDesC &, const TDesC &)
Execute text viewer dialog for read only text
Parameters
const TDesC & aText | the text to be viewed. |
const TDesC & aTitle =
KNullDesC
| Title of the viewer dialog. If null, application default is used instead. |
const TDesC & aDeleteConfirmationText =
KNullDesC
| Confirmation text shown if user chooses to delete the document |
ExecTemplatesL()
IMPORT_C TInt | ExecTemplatesL | ( | ) | [static] |
Execute MCE's "List of templates".
ExecTextEditorL(TInt &, const TDesC &, const TDesC &, const TDesC &)
Execute text editor dialog
Parameters
TInt & aReturnStatus | KErrGeneral (-1) if document was deleted, KErrNone otherwise. |
const TDesC & aText =
KNullDesC
| descriptor that holds the initial text. If null, editor starts empty |
const TDesC & aTitle =
KNullDesC
| Title of the editor dialog. If null, application default is used instead. |
const TDesC & aDeleteConfirmationText =
KNullDesC
| Confirmation text shown if user chooses to delete the document |
ExecTextViewerL(TInt &, const TDesC &, const TDesC &, const TDesC &)
Execute text viewer dialog for editable text
Parameters
TInt & aReturnStatus | KErrGeneral (-1) if the text was deleted. KErrNone otherwise |
const TDesC & aText | the text to be viewed |
const TDesC & aTitle =
KNullDesC
| Title of the viewer dialog. If null, application default is used instead. |
const TDesC & aDeleteConfirmationText =
KNullDesC
| Confirmation text shown if user chooses to delete the document |
ExistsMemoL(const TInt)
IMPORT_C TBool | ExistsMemoL | ( | const TInt | aKey | ) | [static] |
Probe a memo (API for Pinboard).
Parameters
const TInt aKey | a serial number of memo. |
FetchMemoL(const TDesC *)
IMPORT_C HBufC * | FetchMemoL | ( | const TDesC * | aTitle = NULL | ) | [static] |
Fetch a memo.
No need for a pre-allocated buffer. Return NULL if the popup list is canceled or there is no memo. Caller owns the returned HBufC object.
Parameters
const TDesC * aTitle = NULL | Optional title text. |
FetchTemplateL(const TDesC *)
IMPORT_C HBufC * | FetchTemplateL | ( | const TDesC * | aTitle = NULL | ) | [static] |
Fetch a template.
No need for a pre-allocated buffer. Return NULL if the popup list is canceled or there is no template. Caller owns the returned HBufC object.
Parameters
const TDesC * aTitle = NULL | Optional title text. |
Model()
Return internal Model object. (Internal to NpdLib)
NewL()
Constructor. Add a resource file of NpdLib.
NewLC()
Constructor, returned value is also kept on the CleanupStack. Add a resource file of NpdLib.
NumberOfTemplates()
IMPORT_C TInt | NumberOfTemplates | ( | ) | [static] |
Get number of templates.
Return an error code (less than zero) if any trouble.
ProbeMemoL(const TInt)
Probe a memo (API for Pinboard). This method is more efficient than ExistsMemoL when it is neccessary to probe many memos at a time.
Parameters
const TInt aKey | a serial number of memo. |
SaveFileAsMemoL(const TDesC &)
IMPORT_C void | SaveFileAsMemoL | ( | const TDesC & | aFileName | ) | [static] |
Save contents of a specified file as a memo.
Parameters
const TDesC & aFileName | the name of a file to be saved. |
SaveFileAsMemoL(RFile &)
IMPORT_C void | SaveFileAsMemoL | ( | RFile & | aFile | ) | [static] |
Save contents of a specified file as a memo.
Parameters
RFile & aFile | the file handle. |
SaveFileAsMemoL(const TDesC &, const TUint)
IMPORT_C void | SaveFileAsMemoL | ( | const TDesC & | aFileName, |
| const TUint | aEncoding |
| ) | [static] |
Save contents of a specified file as a memo.
Parameters
const TDesC & aFileName | the name of a file to be saved. |
const TUint aEncoding | The character encoding used in the file. |
SaveFileAsMemoL(RFile &, const TUint)
IMPORT_C void | SaveFileAsMemoL | ( | RFile & | aFile, |
| const TUint | aEncoding |
| ) | [static] |
Save contents of a specified file as a memo.
Parameters
RFile & aFile | the file handle. |
const TUint aEncoding | The character encoding used in the file. |
Member Enumerations Documentation
Enum anonymous
Enumerators
ENpdDataEdited = 0 | |
ENpdDataDeleted | |
ENpdDataErased | |
Member Data Documentation
RConeResourceLoader iResourceLoader
RConeResourceLoader | iResourceLoader | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.