1.1 --- a/epoc32/include/mw/aknlistquerycontrol.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/aknlistquerycontrol.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,177 @@
1.4 -aknlistquerycontrol.h
1.5 +/*
1.6 +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +#ifndef __AKN_LIST_QUERY_CONTROL_H
1.25 +#define __AKN_LIST_QUERY_CONTROL_H
1.26 +
1.27 +#include <AknControl.h>
1.28 +
1.29 +#include <aknpopupheadingpane.h>
1.30 +#include <aknmessagequerycontrol.h>
1.31 +
1.32 +class CEikFormattedCellListBox;
1.33 +struct TAknPopupWindowLayoutDef;
1.34 +
1.35 +/**
1.36 + * List query control class.
1.37 + */
1.38 +class CAknListQueryControl : public CAknControl
1.39 + {
1.40 + public:
1.41 + /**
1.42 + * Constructor
1.43 + */
1.44 + IMPORT_C CAknListQueryControl();
1.45 +
1.46 + /**
1.47 + * Constructs control from resources
1.48 + */
1.49 + IMPORT_C void ConstructFromResourceL(TResourceReader& aRes);
1.50 +
1.51 + /**
1.52 + * Destructor
1.53 + */
1.54 + IMPORT_C virtual ~CAknListQueryControl();
1.55 +
1.56 + /**
1.57 + * From CCoeControl
1.58 + *
1.59 + * @return Minimum size of the control
1.60 + */
1.61 + IMPORT_C TSize MinimumSize();
1.62 +
1.63 + /**
1.64 + * From CCoeControl
1.65 + * Returns number of controls inside the query control
1.66 + * @return Number of component controls
1.67 + */
1.68 + IMPORT_C TInt CountComponentControls() const;
1.69 +
1.70 + /**
1.71 + * From CCoeControl
1.72 + * Returns a control determined by control id
1.73 + * @param anIndex Index of a control to be returned
1.74 + * @return CCoeControl Pointer to control
1.75 + */
1.76 + IMPORT_C CCoeControl* ComponentControl(TInt anIndex) const;
1.77 +
1.78 + /**
1.79 + * From CCoeControl
1.80 + * Handles key events - Gets called by CONE
1.81 + * @param aKeyEvent The key event
1.82 + * @param aType The type of the event
1.83 + * @return Indicates whether or not the key event was
1.84 + * used by this control
1.85 + */
1.86 + IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
1.87 +
1.88 + /**
1.89 + * From CCoeControl
1.90 + * Draws the control
1.91 + * @param aRect The region of the control to be redrawn
1.92 + */
1.93 + IMPORT_C void Draw(const TRect& aRect) const;
1.94 +
1.95 + /**
1.96 + * Sets layout for list query control
1.97 + * @param aLayout Layout to be set
1.98 + */
1.99 + IMPORT_C void SetLayout(TAknPopupWindowLayoutDef* aLayout);
1.100 +
1.101 + IMPORT_C void FocusChanged(TDrawNow aDrawNow);
1.102 +
1.103 + /**
1.104 + * Returns pointer to listbox
1.105 + * @return Pointer to CEikFormattedCellListBox
1.106 + */
1.107 + inline CEikFormattedCellListBox* Listbox() const;
1.108 +
1.109 + /**
1.110 + * Returns pointer to heading
1.111 + * @return Pointer to CAknPopupHeadingPane
1.112 + */
1.113 + inline CAknPopupHeadingPane* Heading() const;
1.114 +
1.115 + /**
1.116 + * Return type of the list
1.117 + * @return Type of the list
1.118 + */
1.119 + inline TInt Listtype() const;
1.120 +
1.121 + /**
1.122 + * From CCoeControl.
1.123 + * Handles pointer events
1.124 + */
1.125 + IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1.126 +
1.127 + /**
1.128 + * Get pointer to messageControl if such exists.
1.129 + * @since 3.0
1.130 + */
1.131 + CAknMessageQueryControl* MessageBox() const;
1.132 +
1.133 + private:
1.134 + /**
1.135 + * From CAknControl
1.136 + */
1.137 + IMPORT_C void* ExtensionInterface( TUid aInterface );
1.138 +
1.139 + private:
1.140 + CEikFormattedCellListBox* iListBox;
1.141 + CAknPopupHeadingPane* iHeading;
1.142 + TInt iListType;
1.143 + TAknPopupWindowLayoutDef* iLayout;
1.144 + CAknMessageQueryControl* iMessageBox;
1.145 +
1.146 + TInt iSpare[1];
1.147 +
1.148 + public:
1.149 +
1.150 + /**
1.151 + * Deprecated - do not use
1.152 + */
1.153 + inline CEikFormattedCellListBox* listbox() const;
1.154 + };
1.155 +
1.156 +inline CEikFormattedCellListBox *CAknListQueryControl::Listbox() const
1.157 + {
1.158 + return iListBox;
1.159 + }
1.160 +
1.161 +inline CAknPopupHeadingPane *CAknListQueryControl::Heading() const
1.162 + {
1.163 + if ( iHeading && iHeading->Prompt() )
1.164 + return iHeading;
1.165 + return 0;
1.166 + }
1.167 +
1.168 +inline TInt CAknListQueryControl::Listtype() const
1.169 + {
1.170 + return iListType;
1.171 + }
1.172 +
1.173 +/**
1.174 + * Deprecated methods
1.175 + */
1.176 +inline CEikFormattedCellListBox* CAknListQueryControl::listbox() const
1.177 + {
1.178 + return Listbox();
1.179 + }
1.180 +
1.181 +#endif