|
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: Encapsulates the Capture Setup Menu listbox.* |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef CAMCAPTURESETUPMENULISTBOX_H |
|
19 #define CAMCAPTURESETUPMENULISTBOX_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <eiklbx.h> |
|
23 //#include <aknlists.h> |
|
24 #include <avkon.hrh> |
|
25 // FORWARD DECLARATIONS |
|
26 class CCamCaptureSetupMenuListBoxModel; |
|
27 class CCamAppController; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Capture setup menu listbox |
|
33 * Main class of list box |
|
34 * |
|
35 */ |
|
36 class CCamCaptureSetupMenuListBox : public CEikListBox |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 * @since 2.8 |
|
43 * @param aParent the container for this list box |
|
44 * @param aReader the resource readerthat will be used to populate the list box. |
|
45 * @param aController used by the list box model to get list item values. |
|
46 * @param aSelectedItemIndex the index of the list item that should be highlighted. |
|
47 * @return pointer to the created list item. |
|
48 */ |
|
49 static CCamCaptureSetupMenuListBox* NewL( const CCoeControl* aParent, TResourceReader& aReader, CCamAppController& aController, TInt aSelectedItemIndex ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 * @since 2.8 |
|
54 */ |
|
55 ~CCamCaptureSetupMenuListBox(); |
|
56 |
|
57 public: // New functions |
|
58 |
|
59 /** |
|
60 * Returns the settings model id that corresponds with the |
|
61 * specified list item index. |
|
62 * @since 2.8 |
|
63 * @param aItemIndex the index of the list item. |
|
64 * @return the settings model id associated with the list item. |
|
65 */ |
|
66 TInt ItemSettingsId( TInt aItemIndex ); |
|
67 |
|
68 protected: // Functions from base class CEikListBox |
|
69 |
|
70 /** |
|
71 * Returns instance to view |
|
72 * @since 2.8 |
|
73 * @return Instance to CListBoxView |
|
74 */ |
|
75 virtual CListBoxView* MakeViewClassInstanceL(); |
|
76 |
|
77 public: // Functions from base class CEikListBox |
|
78 |
|
79 /** |
|
80 * Handles key events. If a control wishes to process key events, it should |
|
81 * implement this function. The implementation must ensure that the |
|
82 * function returns EKeyWasNotConsumed if it does not do anything in |
|
83 * response to a key event otherwise, other controls or dialogs may be |
|
84 * prevented from receiving the key event. If it is able to process the |
|
85 * event it should return EKeyWasConsumed. When a key event occurs, the |
|
86 * control framework calls this function for each control on the control |
|
87 * stack, until one of them can process the key event |
|
88 * (and returns EKeyWasConsumed). |
|
89 * @since 2.8 |
|
90 * @param aKeyEvent The key event |
|
91 * @param aType The type of key event: EEventKey, EEventKeyUp or EEventKeyDown |
|
92 * @return Indicates whether or not the key event was used by this control |
|
93 */ |
|
94 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
95 |
|
96 private: // Constructors |
|
97 |
|
98 /** |
|
99 * Constructor |
|
100 * @since 2.8 |
|
101 */ |
|
102 CCamCaptureSetupMenuListBox(); |
|
103 |
|
104 /** |
|
105 * 2nd phase constructor |
|
106 * @since 2.8 |
|
107 * @param aParent the container for this list box |
|
108 * @param aReader the resource readerthat will be used to populate the list box. |
|
109 * @param aController used by the list box model to get list item values. |
|
110 * @param aSelectedItemIndex the index of the list item that should be highlighted. |
|
111 */ |
|
112 void ConstructL( const CCoeControl* aParent, TResourceReader& aReader, |
|
113 CCamAppController& aController, TInt aSelectedItemIndex ); |
|
114 |
|
115 private: // New functions |
|
116 |
|
117 private: // Data |
|
118 }; |
|
119 |
|
120 #endif //CAMCAPTURESETUPMENULISTBOX_H |