1 /* |
|
2 * Copyright (c) 2005 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 GS plugin containers. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GSBASECONTAINER_H |
|
20 #define GSBASECONTAINER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <coeccntx.h> |
|
24 #include <eikclb.h> |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * Base class for GS view containers. Use not necessary. |
|
30 * |
|
31 * @lib GSFramework.lib |
|
32 * @since Series60_3.1 |
|
33 */ |
|
34 class CGSBaseContainer : public CCoeControl |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * Symbian OS default constructor. |
|
40 */ |
|
41 IMPORT_C virtual void ConstructL( const TRect& aRect ) = 0; |
|
42 |
|
43 /** |
|
44 * Constructs all common parts of the container. |
|
45 * |
|
46 * @param aRect Listbox control's rect. |
|
47 * @param aResTitleId Resource id for title. |
|
48 * @param aResLbxId Resource id for listbox. |
|
49 */ |
|
50 IMPORT_C void BaseConstructL( const TRect& aRect, |
|
51 TInt aResTitleId, |
|
52 TInt aResLbxId ); |
|
53 |
|
54 /** |
|
55 * Constructor. |
|
56 */ |
|
57 IMPORT_C CGSBaseContainer(); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 IMPORT_C virtual ~CGSBaseContainer(); |
|
63 |
|
64 public: // New |
|
65 |
|
66 /** |
|
67 * Sets selected item in the listbox. |
|
68 * @param aIndex Index of the item. |
|
69 */ |
|
70 IMPORT_C virtual void SetSelectedItem( TInt aIndex ); |
|
71 |
|
72 /** |
|
73 * Returns selected item in the listbox. |
|
74 * @return Seleced item index or 0 if no valid lbx. |
|
75 */ |
|
76 IMPORT_C virtual TInt SelectedItem(); |
|
77 |
|
78 /** |
|
79 * Set focus on the selected listbox. For animated skins feature. |
|
80 */ |
|
81 IMPORT_C void FocusChanged( TDrawNow aDrawNow ); |
|
82 |
|
83 public: // From CCoeControl |
|
84 |
|
85 /** |
|
86 * See base class. |
|
87 */ |
|
88 IMPORT_C void HandleResourceChange( TInt aType ); |
|
89 |
|
90 protected: // New |
|
91 |
|
92 /** |
|
93 * Constructs listbox. |
|
94 * @param aResLbxId Resource id for listbox. |
|
95 */ |
|
96 virtual void ConstructListBoxL( TInt aResLbxId ); |
|
97 |
|
98 private: // From CCoeControl |
|
99 |
|
100 /** |
|
101 * See base class. |
|
102 */ |
|
103 IMPORT_C void SizeChanged(); |
|
104 |
|
105 /** |
|
106 * See base class. |
|
107 */ |
|
108 IMPORT_C TInt CountComponentControls() const; |
|
109 |
|
110 /** |
|
111 * See base class. |
|
112 */ |
|
113 IMPORT_C CCoeControl* ComponentControl( TInt /*aIndex*/ ) const; |
|
114 |
|
115 /** |
|
116 * See base class. |
|
117 */ |
|
118 IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
119 TEventCode aType ); |
|
120 |
|
121 public: // Data |
|
122 |
|
123 // Pointer to newly created list box. |
|
124 CEikTextListBox* iListBox; |
|
125 |
|
126 protected: // Data |
|
127 |
|
128 // European look and feel. |
|
129 TBool iElaf; |
|
130 }; |
|
131 |
|
132 #endif // GSBASECONTAINER_H |
|
133 // End of File |
|