2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
20 #ifndef __AKN_LIST_QUERY_CONTROL_H
21 #define __AKN_LIST_QUERY_CONTROL_H
23 #include <AknControl.h>
25 #include <aknPopupHeadingPane.h>
26 #include <aknmessagequerycontrol.h>
28 class CEikFormattedCellListBox;
29 struct TAknPopupWindowLayoutDef;
32 * List query control class.
34 class CAknListQueryControl : public CAknControl
40 IMPORT_C CAknListQueryControl();
43 * Constructs control from resources
45 IMPORT_C void ConstructFromResourceL(TResourceReader& aRes);
50 IMPORT_C virtual ~CAknListQueryControl();
55 * @return Minimum size of the control
57 IMPORT_C TSize MinimumSize();
61 * Returns number of controls inside the query control
62 * @return Number of component controls
64 IMPORT_C TInt CountComponentControls() const;
68 * Returns a control determined by control id
69 * @param anIndex Index of a control to be returned
70 * @return CCoeControl Pointer to control
72 IMPORT_C CCoeControl* ComponentControl(TInt anIndex) const;
76 * Handles key events - Gets called by CONE
77 * @param aKeyEvent The key event
78 * @param aType The type of the event
79 * @return Indicates whether or not the key event was
80 * used by this control
82 IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
87 * @param aRect The region of the control to be redrawn
89 IMPORT_C void Draw(const TRect& aRect) const;
92 * Sets layout for list query control
93 * @param aLayout Layout to be set
95 IMPORT_C void SetLayout(TAknPopupWindowLayoutDef* aLayout);
97 IMPORT_C void FocusChanged(TDrawNow aDrawNow);
100 * Returns pointer to listbox
101 * @return Pointer to CEikFormattedCellListBox
103 inline CEikFormattedCellListBox* Listbox() const;
106 * Returns pointer to heading
107 * @return Pointer to CAknPopupHeadingPane
109 inline CAknPopupHeadingPane* Heading() const;
112 * Return type of the list
113 * @return Type of the list
115 inline TInt Listtype() const;
119 * Handles pointer events
121 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
124 * Get pointer to messageControl if such exists.
127 CAknMessageQueryControl* MessageBox() const;
133 IMPORT_C void* ExtensionInterface( TUid aInterface );
136 CEikFormattedCellListBox* iListBox;
137 CAknPopupHeadingPane* iHeading;
139 TAknPopupWindowLayoutDef* iLayout;
140 CAknMessageQueryControl* iMessageBox;
147 * Deprecated - do not use
149 inline CEikFormattedCellListBox* listbox() const;
152 inline CEikFormattedCellListBox *CAknListQueryControl::Listbox() const
157 inline CAknPopupHeadingPane *CAknListQueryControl::Heading() const
159 if ( iHeading && iHeading->Prompt() )
164 inline TInt CAknListQueryControl::Listtype() const
172 inline CEikFormattedCellListBox* CAknListQueryControl::listbox() const