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 ) |
Public Member Enumerations | |
---|---|
enum | anonymous { ENpdDataEdited = 0, ENpdDataDeleted , ENpdDataErased } |
Private Attributes | |
---|---|
CEikDialog * | iDialog |
CCoeEnv * | iEnv |
CNotepadModel * | iModel |
RConeResourceLoader | iResourceLoader |
IMPORT_C void | AddContentL | ( | const TDesC & | aText | ) | [static] |
Save text as a memo.
const TDesC & aText | memo text to save. |
IMPORT_C void | CNotepadApi_Reserved | ( | ) | [private, virtual] |
Reserved API entry.
IMPORT_C void | CNotepadApi_Reserved_Static | ( | ) | [private, static] |
Reserved API entry.
IMPORT_C void | CreateListDialogL | ( | TInt | aResId | ) |
Create CNotepadListDialog .
TInt aResId | resource id of type NOTEPAD_LIST_DIALOG. |
IMPORT_C void | CreateModelL | ( | TInt | aResId | ) |
Create CNotepadModel .
TInt aResId | resource id of type NOTEPAD_MODEL. |
IMPORT_C void | CreateTextEditorDialogL | ( | HBufC ** | aContentPointer, |
TInt & | aReturnStatus, | |||
const TDesC & | aText = KNullDesC , | |||
const TDesC & | aTitle = KNullDesC , | |||
const TDesC & | aDeleteConfirmationText = KNullDesC | |||
) | [private] |
Creates text editor dialog
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 |
IMPORT_C void | CreateTextViewerDialogL | ( | HBufC ** | aContentPointer, |
TInt & | aReturnStatus, | |||
TBool | aReadOnly, | |||
const TDesC & | aText, | |||
const TDesC & | aTitle = KNullDesC , | |||
const TDesC & | aDeleteConfirmationText = KNullDesC | |||
) | [private] |
Creates text viewer dialog for editable text
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 |
IMPORT_C void | CreateViewerDialogL | ( | const TDesC & | aFileName, |
const TDesC * | aTitle, | |||
const TBool | aDoWait, | |||
TBool | aGuessEncoding = EFalse, | |||
TUint | aEncoding = KCharacterSetIdentifierIso88591 | |||
) |
Create CNotepadViewerDialog .
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). |
IMPORT_C void | CreateViewerDialogL | ( | RFile & | aFile, |
const TDesC * | aTitle, | |||
const TBool | aDoWait, | |||
TBool | aGuessEncoding = EFalse, | |||
TUint | aEncoding = KCharacterSetIdentifierIso88591 | |||
) |
Create CNotepadViewerDialog .
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). |
IMPORT_C void | CreateViewerDialogL | ( | const TBool | aDoWait | ) |
Create CNotepadViewerDialog .
const TBool aDoWait | create waiting dialog if ETrue. |
HBufC * | DoPopupListL | ( | const TDesC * | aTitle, |
TInt | aModelResId, | |||
TInt | aPromptResId, | |||
TInt | aEmptyTextResId = 0 | |||
) | [private] |
Show PopupList.
IMPORT_C TInt | ExecFileViewerL | ( | const TDesC & | aFileName, |
const TDesC * | aTitle = NULL, | |||
const TBool | aDoWait = ETrue, | |||
TBool | aGuessEncoding = EFalse, | |||
TUint | aEncoding = KCharacterSetIdentifierIso88591 | |||
) | [static] |
Execute a file viewer dialog.
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). |
IMPORT_C TInt | ExecFileViewerL | ( | RFile & | aFile, |
const TDesC * | aTitle = NULL, | |||
const TBool | aDoWait = ETrue, | |||
TBool | aGuessEncoding = EFalse, | |||
TUint | aEncoding = KCharacterSetIdentifierIso88591 | |||
) | [static] |
Execute a file viewer dialog.
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). |
IMPORT_C TInt | ExecReadOnlyTextViewerL | ( | const TDesC & | aText, |
const TDesC & | aTitle = KNullDesC , | |||
const TDesC & | aDeleteConfirmationText = KNullDesC | |||
) | [static] |
Execute text viewer dialog for read only text
IMPORT_C HBufC * | ExecTextEditorL | ( | TInt & | aReturnStatus, |
const TDesC & | aText = KNullDesC , | |||
const TDesC & | aTitle = KNullDesC , | |||
const TDesC & | aDeleteConfirmationText = KNullDesC | |||
) | [static] |
Execute text editor dialog
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 |
IMPORT_C HBufC * | ExecTextViewerL | ( | TInt & | aReturnStatus, |
const TDesC & | aText, | |||
const TDesC & | aTitle = KNullDesC , | |||
const TDesC & | aDeleteConfirmationText = KNullDesC | |||
) | [static] |
Execute text viewer dialog for editable text
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 |
IMPORT_C TBool | ExistsMemoL | ( | const TInt | aKey | ) | [static] |
Probe a memo (API for Pinboard).
const TInt aKey | a serial number of memo. |
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.
const TDesC * aTitle = NULL | Optional title text. |
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.
const TDesC * aTitle = NULL | Optional title text. |
IMPORT_C CNotepadApi * | NewLC | ( | ) | [static] |
Constructor, returned value is also kept on the CleanupStack . Add a resource file of NpdLib.
IMPORT_C TInt | NumberOfTemplates | ( | ) | [static] |
Get number of templates.
Return an error code (less than zero) if any trouble.
IMPORT_C TBool | ProbeMemoL | ( | const TInt | aKey | ) |
Probe a memo (API for Pinboard). This method is more efficient than ExistsMemoL when it is neccessary to probe many memos at a time.
const TInt aKey | a serial number of memo. |
IMPORT_C void | SaveFileAsMemoL | ( | const TDesC & | aFileName | ) | [static] |
Save contents of a specified file as a memo.
const TDesC & aFileName | the name of a file to be saved. |
IMPORT_C void | SaveFileAsMemoL | ( | RFile & | aFile | ) | [static] |
Save contents of a specified file as a memo.
RFile & aFile | the file handle. |
IMPORT_C void | SaveFileAsMemoL | ( | const TDesC & | aFileName, |
const TUint | aEncoding | |||
) | [static] |
Save contents of a specified file as a memo.
IMPORT_C void | SaveFileAsMemoL | ( | RFile & | aFile, |
const TUint | aEncoding | |||
) | [static] |
Save contents of a specified file as a memo.
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.