aknlistquerydialog.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknListQueryDialog.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description:
00007 *   Implementation of CAknListQueryDialog
00008 *  Version:
00009 *
00010 *  Copyright © 2002 Nokia Corporation.
00011 *  This material, including documentation and any related 
00012 *  computer programs, is protected by copyright controlled by 
00013 *  Nokia Corporation. All rights are reserved. Copying, 
00014 *  including reproducing, storing,  adapting or translating, any 
00015 *  or all of this material requires the prior written consent of 
00016 *  Nokia Corporation. This material also contains confidential 
00017 *  information which may not be disclosed to others without the 
00018 *  prior written consent of Nokia Corporation.
00019 */
00020 
00021 #ifndef AKNLISTQUERYDIALOG_H
00022 #define AKNLISTQUERYDIALOG_H
00023 
00024 #include <aknquerydialog.h>
00025 
00026 class CAknMessageQueryControl;
00027 class CAknListQueryMediatorObserver;
00028 
00034 class CAknListQueryDialog : public CAknQueryDialog,
00035                             public MEikListBoxObserver, 
00036                             public MAknIntermediateState
00037         {
00038     public:
00045             IMPORT_C CAknListQueryDialog(TInt* aIndex);
00046 
00053         IMPORT_C CAknListQueryDialog(
00054                   CListBoxView::CSelectionIndexArray* aSelectionIndexArray);
00055 
00059             IMPORT_C virtual ~CAknListQueryDialog();
00060 
00068         IMPORT_C void SetSizeAndPosition(const TSize &aSize);
00069 
00084         IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, 
00085                                              TEventCode aType);
00086             
00095         IMPORT_C void HandleListBoxEventL(CEikListBox* aListBox, 
00096                                           TListBoxEvent aEventType);
00097 
00103         IMPORT_C void SetItemTextArray(MDesCArray* aItemTextArray);
00104 
00110         IMPORT_C void SetOwnershipType(
00111                         TListBoxModelItemArrayOwnership aOwnershipType);
00112 
00119         IMPORT_C void SetIconArrayL(CArrayPtr<CGulIcon>* aIcons);
00120 
00126         IMPORT_C CEikListBox* ListBox() const;
00127 
00134         IMPORT_C CAknListQueryControl* ListControl() const;
00135 
00142         IMPORT_C CAknMessageQueryControl* MessageBox() const;
00143 
00150         IMPORT_C CAknPopupHeadingPane* QueryHeading() const;
00151 
00157         IMPORT_C void ActivateL();
00158 
00178         IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00179 
00180     protected:
00188         IMPORT_C void PreLayoutDynInitL(void);
00189 
00197         IMPORT_C void PostLayoutDynInitL();
00198 
00211         IMPORT_C TBool OkToExitL(TInt aButtonId);
00212 
00218         IMPORT_C TInt BorderStyle();
00219 
00220     protected:
00226         IMPORT_C void CloseState();
00227 
00228     private:
00237         static TInt ClosePopup(TAny *aObj);
00238 
00247         static TInt ClosePopupAcceptingChanges(TAny *aObj);
00248 
00249     private:
00253         IMPORT_C void* ExtensionInterface( TUid aInterface );
00254         private: 
00255                 IMPORT_C virtual void CEikDialog_Reserved_1();
00256                 IMPORT_C virtual void CEikDialog_Reserved_2();  
00257         private: 
00258                 IMPORT_C virtual void CAknDialog_Reserved();
00259         private:
00260                 IMPORT_C virtual void CAknQueryDialog_Reserved();
00261     private:
00262         // Will hold the index of the selected item
00263         TInt *iIndex;
00264         // Will hold the selected items' indexes
00265         CListBoxView::CSelectionIndexArray *iSelectionIndexArray;
00266         // Was the enter key pressed
00267             TBool iEnterKeyPressed;
00268         // Idle object to close the query if it there's no items to show
00269             CIdle *iIdle;
00270         // Layout for List query control
00271             TAknPopupWindowLayoutDef iLayout;
00272 
00273         CAknListQueryMediatorObserver* iMediatorObs;
00274 
00275         TInt iSpare;
00276 
00277     protected:
00284         IMPORT_C CAknSearchField* FindBox() const;
00285         
00286     public:
00292             IMPORT_C void SetTone(TInt aTone);
00293             
00294             IMPORT_C void HandleResourceChange(TInt aType);
00295             
00296             
00309             IMPORT_C void PublishDialogL(TInt aDialogIndex, TUid aCatUid = KNullUid,  CArrayFixFlat<TInt>* aItemIds = 0);
00310  
00311         
00312        /* 
00313             * Instantiates mediator support and passes possible feedback to given intance.
00314             * If no observer is set, dialog tries to handle feedback by it self.
00315             *
00316             * Please note that no commands will be instantiated unless command identifiers are 
00317             * are set using PublishDialogL
00318             *
00319             * @param  aObserver pointer to instance implementing MAknDialogMediatorObserver API
00320             *         Can be NULL
00321             * @return void 
00322             */
00323             IMPORT_C void SetMediatorObserver(MAknDialogMediatorObserver* aObserver);       
00324         };
00325 
00326 //  AKNLISTQUERYDIALOG_H
00327 #endif
00328 
00329 
00330 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top