|
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: Declaration of Notepad Application UI class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NPDAPPUI_H |
|
20 #define NPDAPPUI_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknappui.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CNotepadListDialog; |
|
27 class CNotepadApi; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * Notepad application UI class. |
|
32 * Notepad Application UI class using CNotepadApi. |
|
33 */ |
|
34 class CNotepadAppUi : public CAknAppUi |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * second phase constructor. |
|
40 */ |
|
41 void ConstructL(); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~CNotepadAppUi(); |
|
47 |
|
48 private: // Functions from base classes |
|
49 |
|
50 /** |
|
51 * From CEikAppUi. |
|
52 * |
|
53 * @param aCommand command to be handled. |
|
54 */ |
|
55 void HandleCommandL(TInt aCommand); |
|
56 |
|
57 /** |
|
58 * From CEikAppUi. |
|
59 * Command line processing. |
|
60 * |
|
61 * When Notepad is launched by Shell, aTail is not set. |
|
62 * And Notepad normally starts in list mode. |
|
63 * |
|
64 * When Pinboard.app opens a short-cut of a memo |
|
65 * while Notepad is not running, Pinboard tries to launch Notepad |
|
66 * with the memo's KEY number on the command line (aTail). |
|
67 * When Notepad is launched by Pinboard, Notepad must start |
|
68 * in edit mode. |
|
69 * |
|
70 * So this function looks at aTail parameter and set initial mode |
|
71 * properly. |
|
72 * |
|
73 * @param aCommand command. |
|
74 * @param aDocumentName Filename. |
|
75 * @param aTail optional command line parampeter. |
|
76 * @return ETrue if aDocumentName file exists. |
|
77 */ |
|
78 TBool ProcessCommandParametersL( |
|
79 TApaCommand aCommand, |
|
80 TFileName& aDocumentName, |
|
81 const TDesC8& aTail ); |
|
82 |
|
83 /** |
|
84 * From MCoeMessageObserver. |
|
85 * Message processing. |
|
86 * |
|
87 * While Notepad is running, Notepad may receive a message |
|
88 * from Pinboard, whose parameter contains a memo Key number. |
|
89 * If Notepad receive a such message, it should be forced to |
|
90 * switch edit mode with the specified memo. |
|
91 * |
|
92 * @param aClientHandleOfTargetWindowGroup client handle. |
|
93 * @param aMessageUid Uid. |
|
94 * @param aMessageParameters message containing a memo Key number. |
|
95 * @return ETrue if aDocumentName file exists. |
|
96 */ |
|
97 MCoeMessageObserver::TMessageResponse HandleMessageL( |
|
98 TUint32 aClientHandleOfTargetWindowGroup, |
|
99 TUid aMessageUid, |
|
100 const TDesC8& aMessageParameters); |
|
101 |
|
102 /** |
|
103 * From CCoeAppUiBase. |
|
104 * Prepares the application to exit. Called after the exiting from |
|
105 * the application's event loop but before the control environment |
|
106 * active scheduler is stopped and the control environment destroyed. |
|
107 */ |
|
108 void PrepareToExit(); |
|
109 |
|
110 private: // Data |
|
111 |
|
112 CNotepadListDialog* iDialog; // never own |
|
113 CNotepadApi* iApi; // own |
|
114 }; |
|
115 |
|
116 #endif // NPDAPPUI_H |
|
117 |
|
118 // End of File |