|
1 /* |
|
2 * Copyright (c) 2007 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: A non-focusing popup menu to show candidates. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #ifndef __AKN_FEP_CANDIDATE_POPUP_H |
|
30 #define __AKN_FEP_CANDIDATE_POPUP_H |
|
31 |
|
32 // MACROS |
|
33 //To congigure the number of candidates in list |
|
34 const TInt KPredictiveListCandidateMax = 16; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 class MAknFepCandidatePopup |
|
38 { |
|
39 public: // methods |
|
40 |
|
41 /** |
|
42 * destructor |
|
43 */ |
|
44 virtual ~MAknFepCandidatePopup() = 0; |
|
45 |
|
46 /** |
|
47 * Getter for the currently active word |
|
48 * @return The currently active word as pointer descriptor |
|
49 */ |
|
50 virtual TPtrC ActiveWord() const = 0; |
|
51 |
|
52 /** |
|
53 * Getter for the exact word (the word with ordinal 0) |
|
54 * @return The exact word as pointer descriptor. |
|
55 */ |
|
56 virtual TPtrC ExactWord() const = 0; |
|
57 |
|
58 /** |
|
59 * Makes the pop-up selection list visible and blocks until the dialog has been dismissed. |
|
60 * @param aInlineEditorRect Tells the place of the inline editor. If possible, the popup is opened |
|
61 * so that it does not hide the inline editor. |
|
62 * @param aSelectedIdx Output argument for the selected index. |
|
63 * @param aLastKeyEvent The last key event received by the popup. On return this is the event |
|
64 * which closed the popup. |
|
65 * @param aRightToLeftLanguage Direction of the candidate language.ETrue is right to left. EFalse otherwise |
|
66 * @param aKeyboard Keyboard type in use (TPtiKeyboardType) |
|
67 * |
|
68 * @return The command id used to close the window. EAknFepSoftkeySpell, EAknSoftkeyCancel, or EAknSoftkeySelect |
|
69 */ |
|
70 virtual TInt ExecutePopupL( const TRect& aInlineEditorRect, TInt& aSelectedIdx, TKeyEvent& aLastKeyEvent, TBool aRightToLeftLanguage, TInt aKeyboard ) = 0; |
|
71 |
|
72 /** |
|
73 * Function called when the dialog is dismissed. Among other things, this hides the dialog |
|
74 * and deblocks the thread. Unlike in the base class, the instance is not destroyed here. |
|
75 * The same popup instance can be reused by calling ExecutePopupL() again. |
|
76 * @param aAccept EFalse if the dialog was cancelled. |
|
77 * ETrue otherwise. |
|
78 */ |
|
79 virtual void AttemptExitL(TBool aAccept) = 0; |
|
80 |
|
81 /** |
|
82 * Removes the focus from the candidate list and makes the editor to be in focus. |
|
83 */ |
|
84 virtual void UnFocus() = 0; |
|
85 /** |
|
86 * Changes the position where the candidate list is shown. The position of the candidate list is choosen by the |
|
87 * candidate list itself but can be controlled by the inline text rectangle. |
|
88 * @param aRect The inline text rect. |
|
89 */ |
|
90 virtual void ShowAtNewPosition(TRect aRect) = 0; |
|
91 |
|
92 /** |
|
93 * Revert back the candidate focus, and add the candidate list to the control stack reducing |
|
94 * the control priority. Usually, this function can be called after void UnFocus(). |
|
95 */ |
|
96 virtual void SetFocusAddStackReducePriorityL() = 0; |
|
97 |
|
98 |
|
99 }; |
|
100 |
|
101 #endif // __AKN_FEP_CANDIDATE_POPUP_ H |
|
102 |