aknpopup.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknPopup.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description:
00007 * Support for Avkon Popped-up lists
00008 *
00009 *  Version:
00010 *
00011 *  Copyright © 2002 Nokia Corporation.
00012 *  This material, including documentation and any related 
00013 *  computer programs, is protected by copyright controlled by 
00014 *  Nokia Corporation. All rights are reserved. Copying, 
00015 *  including reproducing, storing,  adapting or translating, any 
00016 *  or all of this material requires the prior written consent of 
00017 *  Nokia Corporation. This material also contains confidential 
00018 *  information which may not be disclosed to others without the 
00019 *  prior written consent of Nokia Corporation.
00020 * ============================================================================
00021 */
00022 
00023 #if !defined(__AKNPOPUP_H__)
00024 #define __AKNPOPUP_H__
00025 
00026 #include <coecntrl.h>
00027 #include <eikcmobs.h>
00028 #include <eiklbx.h>
00029 #include <aknpopuplayout.h>
00030 #include <aknintermediate.h>
00031 #include <aknpopupfader.h>
00032 
00033 class CAknPopupHeadingPane;
00034 class CEikButtonGroupContainer;
00035 class CEikListBox;
00036 class CAknSearchField;
00037 class CAknPopupListExtension;
00038 
00072 class CAknPopupList : public CEikBorderedControl,
00073                       public MEikCommandObserver,
00074                       public MEikListBoxObserver,
00075                       public MCoeControlObserver,
00076                       public MAknIntermediateState,
00077                       public MAknFadedComponent
00078     {
00079 public:
00080 
00091     IMPORT_C static CAknPopupList* NewL( 
00092        CEikListBox* aListBox, 
00093        TInt aCbaResource,
00094        AknPopupLayouts::TAknPopupLayouts aType = AknPopupLayouts::EMenuWindow);
00095 
00103         IMPORT_C TBool ExecuteLD();
00104 
00110     IMPORT_C void SetTitleL(const TDesC& aTitle);
00111 
00116         IMPORT_C void CancelPopup();
00117 public: // Access methods
00118 
00124         IMPORT_C CEikButtonGroupContainer* ButtonGroupContainer();
00130         IMPORT_C CAknPopupHeadingPane* Heading();
00131 
00137         IMPORT_C CAknPopupHeadingPane* Heading() const;
00138 
00144         IMPORT_C CEikListBox* ListBox();
00145         
00151         IMPORT_C void SetMaximumHeight(TInt aItems);
00152 
00159     IMPORT_C TBool EnableFind(TBool aEnable=ETrue);
00160 
00166     IMPORT_C CAknSearchField* FindBox() const;
00167 public:
00175     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00176 protected:
00185     IMPORT_C void ProcessCommandL(TInt aCommandId);
00186 
00196     IMPORT_C void HandleListBoxEventL(CEikListBox* aListBox, 
00197                                       TListBoxEvent aEventType);
00206     IMPORT_C void HandleControlEventL(CCoeControl* aControl,
00207                                       TCoeEvent aEventType);
00208 protected:
00209 
00213     IMPORT_C CAknPopupList();
00214 
00218     IMPORT_C ~CAknPopupList();
00219 
00227     IMPORT_C void ConstructL(CEikListBox* aListBox, 
00228                              TInt aCbaResource,
00229                              AknPopupLayouts::TAknPopupLayouts aType );
00230 
00237     IMPORT_C virtual void AttemptExitL(TBool aAccept);
00238 
00245     IMPORT_C virtual void SetupWindowLayout(
00246                                      AknPopupLayouts::TAknPopupLayouts aType);
00247 
00253     IMPORT_C CEikListBox* ListBox() const;
00254 
00261     IMPORT_C const TAknPopupWindowLayoutDef& Layout() const;
00262 
00269     IMPORT_C TAknPopupWindowLayoutDef& Layout();
00270 
00271 protected:
00272 
00282     IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
00283 
00284 protected:
00285 
00293     IMPORT_C void HandleResourceChange(TInt aType);
00294 
00295 protected:
00296         IMPORT_C void FadeBehindPopup(TBool aFade);
00297 
00298 
00299 
00300 private:
00301         // the following needs to be imported, because they need to be
00302         // used in virtual table of any derived class.
00303         IMPORT_C TSize MinimumSize();
00304         IMPORT_C CCoeControl* ComponentControl(TInt aIndex) const;
00305         IMPORT_C TInt CountComponentControls() const;
00306         IMPORT_C void Draw(const TRect& aRect) const;
00307         IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
00308                                              TEventCode aType);
00309         IMPORT_C void FocusChanged(TDrawNow aDrawNow);
00310 
00311         IMPORT_C void CloseState();
00312         // From MAknFadedComponent
00313         IMPORT_C virtual TInt CountFadedComponents();
00314         IMPORT_C virtual CCoeControl* FadedComponent(TInt aIndex);
00315 
00316 private:
00320     IMPORT_C void* ExtensionInterface( TUid aInterface );
00321 
00322 private:
00323         void RemoveFindFiltering();
00324 
00325 protected: // these are protected to allow overriding virtual functions.
00326         CEikListBox*                            iListBox;
00327     
00332     CEikButtonGroupContainer* iPopoutCba;
00333     
00338     CAknPopupHeadingPane* iTitle;
00339     
00341     TBool* iReturn;
00342     
00344     TBool iMarkable;
00345     
00347     TInt iCurrentResource;
00348     
00350         AknPopupLayouts::TAknPopupLayouts iWindowType;
00351     
00355     TAknPopupWindowLayoutDef iLayout;
00356 
00357 
00359     TBool iAppBroughtForwards;
00360     
00362     TAknPopupFader iPopupFader;
00363     
00365     CIdle *iIdle;
00366 
00367 
00369         CActiveSchedulerWait iWait;             // owned, safe to use as direct member data.
00370 private:
00371     CAknPopupListExtension* iPopupListExtension;    // owned
00372         };
00373 
00374 #endif
00375 
00376 
00377 

Copyright © Nokia Corporation 2001-2008
Back to top