|
1 /* |
|
2 * Copyright (c) 2008 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: base class for search ui builder |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MVIMPSTSEARCHUIBUILDER_H |
|
20 #define MVIMPSTSEARCHUIBUILDER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32def.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CCoeControl; |
|
27 class CEikCaptionedControl; |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * search field UI builder interface. |
|
32 */ |
|
33 class MVIMPSTSearchUiBuilder |
|
34 { |
|
35 public: // Interface |
|
36 |
|
37 /** |
|
38 * create a new line |
|
39 * @param aCaption, caption of field line |
|
40 * @param aControlId, control id |
|
41 * @param aControlType, control type |
|
42 * @return A new instance of CCoeControl. |
|
43 */ |
|
44 virtual CCoeControl* CreateLineL( |
|
45 const TDesC& aCaption, |
|
46 TInt aControlId, |
|
47 TInt aControlType ) = 0; |
|
48 |
|
49 |
|
50 /** |
|
51 * Return the control corresponding to given id. |
|
52 * @param aControlId Id of the control. |
|
53 * @return The control or NULL if the control does not exist. |
|
54 */ |
|
55 virtual CCoeControl* Control( |
|
56 TInt aControlId ) const = 0; |
|
57 |
|
58 /** |
|
59 * Returns the control line corresponding to given id. |
|
60 * @param aControlId Id of the control. |
|
61 * @return Line control. |
|
62 */ |
|
63 virtual CEikCaptionedControl* LineControl( |
|
64 TInt aControlId ) const = 0; |
|
65 |
|
66 |
|
67 /** |
|
68 * Try to change the focus to given control. |
|
69 * @param aControlId Id of the control. |
|
70 */ |
|
71 virtual void TryChangeFocusL( |
|
72 TInt aControlId ) = 0; |
|
73 |
|
74 /** |
|
75 * Change the line controls caption in the UI. |
|
76 * @param aText The caption to set. |
|
77 */ |
|
78 virtual void SetCurrentLineCaptionL( |
|
79 const TDesC& aText ) = 0; |
|
80 |
|
81 /** |
|
82 * Sets the field to editable state. |
|
83 * @param aState ETrue to set editable, EFalse otherwise. |
|
84 */ |
|
85 virtual void SetEditableL( |
|
86 TBool aState ) = 0; |
|
87 |
|
88 |
|
89 protected: // Disabled functions |
|
90 |
|
91 virtual ~MVIMPSTSearchUiBuilder() |
|
92 {}; |
|
93 }; |
|
94 |
|
95 #endif // MVIMPSTSEARCHUIBUILDER_H |
|
96 |
|
97 // End of File |