26
|
1 |
/*
|
|
2 |
* Copyright (c) 2003-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: Declares container control for application.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef APPMNGR2MIDLETSETTINGSCONTAINER_H
|
|
20 |
#define APPMNGR2MIDLETSETTINGSCONTAINER_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include "appmngr2midletsettingsview.h" // CAppMngr2MidletSettingsView
|
|
24 |
#include "appmngr2midletsettingsutil.h"
|
|
25 |
|
|
26 |
|
|
27 |
// FORWARD DECLARATIONS
|
|
28 |
class CAppMngr2MidletSettingsView;
|
|
29 |
|
|
30 |
// CONSTANTS
|
|
31 |
|
|
32 |
// CLASS DECLARATION
|
|
33 |
|
|
34 |
/**
|
|
35 |
* MIDlet suite settings container control class.
|
|
36 |
*
|
|
37 |
* @lib appmngr2midletplugin.dll
|
|
38 |
* @since S60 v9.2
|
|
39 |
*/
|
|
40 |
class CAppMngr2MidletSettingsContainer : public CCoeControl
|
|
41 |
{
|
|
42 |
public: // Constructors and destructor
|
|
43 |
|
|
44 |
/**
|
|
45 |
* C++ constructor.
|
|
46 |
*/
|
|
47 |
CAppMngr2MidletSettingsContainer(CAppMngr2MidletSettingsView& aView);
|
|
48 |
|
|
49 |
/**
|
|
50 |
* EPOC default constructor.
|
|
51 |
* @param aRect Frame rectangle for container.
|
|
52 |
*/
|
|
53 |
void ConstructL(const TRect& aRect);
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Destructor.
|
|
57 |
*/
|
|
58 |
virtual ~CAppMngr2MidletSettingsContainer();
|
|
59 |
|
|
60 |
public: // New functions
|
|
61 |
/**
|
|
62 |
* Return pointer to the listbox
|
|
63 |
*/
|
|
64 |
inline CEikTextListBox* ListBox() const
|
|
65 |
{
|
|
66 |
return iListbox;
|
|
67 |
};
|
|
68 |
|
|
69 |
/**
|
|
70 |
* Initializes the contents of the list box
|
|
71 |
*/
|
|
72 |
void InitListBoxContentL(const std::vector<ListItem>& aListItems);
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Refreshes the contents of the listbox
|
|
76 |
*/
|
|
77 |
void RefreshListBoxContentL(int aListBoxContentIndex, int aSelectedItemIndex);
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Refreshes the contents of the listbox
|
|
81 |
*/
|
|
82 |
void RefreshListBoxContentL(int aListBoxContentIndex, int aSelectedItemIndex, const ListItem& aListItem);
|
|
83 |
|
|
84 |
/**
|
|
85 |
* Refreshes the contents of the listbox
|
|
86 |
*/
|
|
87 |
void RefreshListBoxContentL(int aListBoxContentIndex, int aSelectedItemIndex, bool aAllEnabled);
|
|
88 |
|
|
89 |
/**
|
|
90 |
* Refreshes the contents of the listbox
|
|
91 |
*/
|
|
92 |
void RefreshListBoxContentL(const ListItem& aOldItem, const ListItem& aNewItem);
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Getter for a single list box item
|
|
96 |
*/
|
|
97 |
const ListItem& GetListBoxItem(int aListBoxItemIndex);
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Setter for a single list box item
|
|
101 |
*/
|
|
102 |
void SetListBoxItemValue(int aListBoxItemIndex, int aValue);
|
|
103 |
|
|
104 |
public: // Functions from base classes
|
|
105 |
|
|
106 |
/**
|
|
107 |
* From CCoeControl
|
|
108 |
*/
|
|
109 |
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
|
|
110 |
|
|
111 |
private: // Functions from base classes
|
|
112 |
|
|
113 |
/**
|
|
114 |
* From CoeControl,SizeChanged.
|
|
115 |
*/
|
|
116 |
void SizeChanged();
|
|
117 |
|
|
118 |
/**
|
|
119 |
* From CoeControl,FocusChanged.
|
|
120 |
*/
|
|
121 |
void FocusChanged(TDrawNow aDrawNow);
|
|
122 |
|
|
123 |
/**
|
|
124 |
* From CoeControl,CountComponentControls.
|
|
125 |
*/
|
|
126 |
TInt CountComponentControls() const;
|
|
127 |
|
|
128 |
/**
|
|
129 |
* From CCoeControl,ComponentControl.
|
|
130 |
*/
|
|
131 |
CCoeControl* ComponentControl(TInt aIndex) const;
|
|
132 |
|
|
133 |
/**
|
|
134 |
* From CCoeControl
|
|
135 |
* Get the help context for this control.
|
|
136 |
*/
|
|
137 |
void GetHelpContext(TCoeHelpContext& aContext) const;
|
|
138 |
|
|
139 |
/**
|
|
140 |
* From CCoeControl
|
|
141 |
*/
|
|
142 |
void HandleResourceChange(TInt aType);
|
|
143 |
|
|
144 |
private: //data
|
|
145 |
|
|
146 |
/**
|
|
147 |
* MIDlet suite settings view
|
|
148 |
* Not owned
|
|
149 |
*/
|
|
150 |
CAppMngr2MidletSettingsView& iView;
|
|
151 |
|
|
152 |
/**
|
|
153 |
* List box
|
|
154 |
* Owned
|
|
155 |
*/
|
|
156 |
CAknSettingStyleListBox* iListbox;
|
|
157 |
|
|
158 |
/**
|
|
159 |
* List box content
|
|
160 |
* Owned
|
|
161 |
*/
|
|
162 |
std::vector<ListItem> iListBoxContent;
|
|
163 |
public:
|
|
164 |
};
|
|
165 |
|
|
166 |
#endif // APPMNGR2MIDLETSETTINGSCONTAINER_H
|
|
167 |
|
|
168 |
// End of File
|