1 /* |
|
2 * Copyright (c) 2005-2006 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 Psln plugin containers. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_PSLNFWBASECONTAINER_H |
|
20 #define C_PSLNFWBASECONTAINER_H |
|
21 |
|
22 #include <coeccntx.h> |
|
23 #include <eikclb.h> |
|
24 #include <mpslnfwmsklabelobserver.h> |
|
25 |
|
26 /** |
|
27 * Base class for Psln view containers. |
|
28 * |
|
29 * @lib PslnFramework.lib |
|
30 * @since S60 3.1 |
|
31 */ |
|
32 class CPslnFWBaseContainer : public CCoeControl |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Symbian OS default constructor. |
|
39 */ |
|
40 IMPORT_C virtual void ConstructL( const TRect& aRect ) = 0; |
|
41 |
|
42 /** |
|
43 * Constructs all common parts of the container. |
|
44 * |
|
45 * @param aRect Listbox control's rect. |
|
46 * @param aResTitleId Resource id for title. |
|
47 * @param aResLbxId Resource id for listbox. |
|
48 */ |
|
49 IMPORT_C void BaseConstructL( const TRect& aRect, |
|
50 TInt aResTitleId, |
|
51 TInt aResLbxId ); |
|
52 |
|
53 /** |
|
54 * Constructor. |
|
55 */ |
|
56 IMPORT_C CPslnFWBaseContainer(); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 IMPORT_C virtual ~CPslnFWBaseContainer(); |
|
62 |
|
63 /** |
|
64 * Sets the middle softkey label observer. |
|
65 * @param aObserver observer for msk label updations. |
|
66 * @since S60 v3.1 |
|
67 */ |
|
68 IMPORT_C void CPslnFWBaseContainer::SetMiddleSoftkeyObserver( |
|
69 MPslnFWMSKObserver* aObserver ); |
|
70 |
|
71 protected: |
|
72 |
|
73 /** |
|
74 * Constructs listbox. |
|
75 * @param aResLbxId Resource id for listbox. |
|
76 */ |
|
77 virtual void ConstructListBoxL( TInt aResLbxId ); |
|
78 |
|
79 private: |
|
80 |
|
81 /** |
|
82 * From CCoeControl. |
|
83 * Handles a change to the control's resources. |
|
84 * @param aType type of change. |
|
85 */ |
|
86 IMPORT_C void HandleResourceChange( TInt aType ); |
|
87 |
|
88 /** |
|
89 * From CCoeControl. |
|
90 * Responds to changes to the size and position of the contents |
|
91 * of this control. |
|
92 */ |
|
93 IMPORT_C void SizeChanged(); |
|
94 |
|
95 /** |
|
96 * From CCoeControl. |
|
97 * Gets the number of controls contained in a compound control. |
|
98 * @return the number of controls this component contains. |
|
99 */ |
|
100 IMPORT_C TInt CountComponentControls() const; |
|
101 |
|
102 /** |
|
103 * From CCoeControl. |
|
104 * Gets an indexed component of a compound control. |
|
105 */ |
|
106 IMPORT_C CCoeControl* ComponentControl( TInt /*aIndex*/ ) const; |
|
107 |
|
108 /** |
|
109 * From CCoeControl. |
|
110 * Handles key events. |
|
111 * @param aKeyEvent key event. |
|
112 * @param aType type of key event. |
|
113 */ |
|
114 IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
115 TEventCode aType ); |
|
116 |
|
117 /** |
|
118 * From CCoeControl. |
|
119 * Responds to a change in focus. |
|
120 * @param aDrawNow Contains the value that was passed to it by SetFocus(). |
|
121 */ |
|
122 IMPORT_C void FocusChanged( TDrawNow aDrawNow ); |
|
123 |
|
124 public: // data |
|
125 |
|
126 /** |
|
127 * Pointer to newly created list box. |
|
128 * Owned. |
|
129 */ |
|
130 CEikTextListBox* iListBox; |
|
131 |
|
132 /** |
|
133 * Observer for middle softkey label changes. |
|
134 * Owned. |
|
135 */ |
|
136 MPslnFWMSKObserver* iMSKObserver; |
|
137 |
|
138 }; |
|
139 |
|
140 #endif // C_PSLNFWBASECONTAINER_H |
|
141 |
|
142 // End of File |
|