|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Inline functions of Notepad Editor Dialog class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <txtetext.h> |
|
20 |
|
21 #include "NpdEdwin.h" |
|
22 #include "NpdUtil.h" |
|
23 #include "NpdApi.h" |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CNotepadEditorDialog::IsEmpty |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 inline TBool CNotepadEditorDialog::IsEmpty() const |
|
30 { |
|
31 return NotepadUtil::IsEmpty( |
|
32 iEditor->Text()->Read(0, iEditor->Text()->DocumentLength()) ); |
|
33 } |
|
34 |
|
35 // ----------------------------------------------------------------------------- |
|
36 // CNotepadListDialog::QueryDeleteSingleResId |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 inline TInt CNotepadEditorDialog::QueryDeleteSingleResId() const |
|
40 { |
|
41 return IsNotepad() ? R_NOTEPAD_QUERY_DELETE_MEMO : |
|
42 R_NOTEPAD_QUERY_DELETE_TEMPLATE; |
|
43 } |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CNotepadEditorDialog::IsModeAdding |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 inline TBool CNotepadEditorDialog::IsModeAdding() const |
|
50 { |
|
51 return iKey == KNotepadPseudoKeyIdForNewNote; |
|
52 } |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CNotepadEditorDialog::IsModeEditing |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 inline TBool CNotepadEditorDialog::IsModeEditing() const |
|
59 { |
|
60 return iKey != KNotepadPseudoKeyIdForNewNote; |
|
61 } |
|
62 |
|
63 // End of file |