00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
00081 DECLARE_TYPE_ID(0x20018439)
00082
00083 public:
00084
00095 IMPORT_C static CAknPopupList* NewL(
00096 CEikListBox* aListBox,
00097 TInt aCbaResource,
00098 AknPopupLayouts::TAknPopupLayouts aType = AknPopupLayouts::EMenuWindow);
00099
00107 IMPORT_C TBool ExecuteLD();
00108
00114 IMPORT_C void SetTitleL(const TDesC& aTitle);
00115
00120 IMPORT_C void CancelPopup();
00121 public:
00122
00128 IMPORT_C CEikButtonGroupContainer* ButtonGroupContainer();
00134 IMPORT_C CAknPopupHeadingPane* Heading();
00135
00141 IMPORT_C CAknPopupHeadingPane* Heading() const;
00142
00148 IMPORT_C CEikListBox* ListBox();
00149
00155 IMPORT_C void SetMaximumHeight(TInt aItems);
00156
00163 IMPORT_C TBool EnableFind(TBool aEnable=ETrue);
00164
00172 IMPORT_C TBool EnableAdaptiveFind(TBool aEnable=ETrue);
00173
00179 IMPORT_C CAknSearchField* FindBox() const;
00180 public:
00188 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00189 protected:
00198 IMPORT_C void ProcessCommandL(TInt aCommandId);
00199
00209 IMPORT_C void HandleListBoxEventL(CEikListBox* aListBox,
00210 TListBoxEvent aEventType);
00219 IMPORT_C void HandleControlEventL(CCoeControl* aControl,
00220 TCoeEvent aEventType);
00221 protected:
00222
00226 IMPORT_C CAknPopupList();
00227
00231 IMPORT_C ~CAknPopupList();
00232
00240 IMPORT_C void ConstructL(CEikListBox* aListBox,
00241 TInt aCbaResource,
00242 AknPopupLayouts::TAknPopupLayouts aType );
00243
00250 IMPORT_C virtual void AttemptExitL(TBool aAccept);
00251
00258 IMPORT_C virtual void SetupWindowLayout(
00259 AknPopupLayouts::TAknPopupLayouts aType);
00260
00266 IMPORT_C CEikListBox* ListBox() const;
00267
00274 IMPORT_C const TAknPopupWindowLayoutDef& Layout() const;
00275
00282 IMPORT_C TAknPopupWindowLayoutDef& Layout();
00283
00284 protected:
00285
00295 IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
00296
00297 protected:
00298
00306 IMPORT_C void HandleResourceChange(TInt aType);
00307
00308 protected:
00309 IMPORT_C void FadeBehindPopup(TBool aFade);
00310
00311
00312
00313 private:
00314
00315
00316 IMPORT_C TSize MinimumSize();
00317 IMPORT_C CCoeControl* ComponentControl(TInt aIndex) const;
00318 IMPORT_C TInt CountComponentControls() const;
00319 IMPORT_C void Draw(const TRect& aRect) const;
00320 IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
00321 TEventCode aType);
00322 IMPORT_C void FocusChanged(TDrawNow aDrawNow);
00323
00324 IMPORT_C void CloseState();
00325
00326 IMPORT_C virtual TInt CountFadedComponents();
00327 IMPORT_C virtual CCoeControl* FadedComponent(TInt aIndex);
00328
00329 private:
00333 IMPORT_C void* ExtensionInterface( TUid aInterface );
00334
00335 private:
00336 void RemoveFindFiltering();
00337
00338 protected:
00339 CEikListBox* iListBox;
00340
00345 CEikButtonGroupContainer* iPopoutCba;
00346
00351 CAknPopupHeadingPane* iTitle;
00352
00354 TBool* iReturn;
00355
00357 TBool iMarkable;
00358
00360 TInt iCurrentResource;
00361
00363 AknPopupLayouts::TAknPopupLayouts iWindowType;
00364
00368 TAknPopupWindowLayoutDef iLayout;
00369
00370
00372 TBool iAppBroughtForwards;
00373
00375 TAknPopupFader iPopupFader;
00376
00378 CIdle *iIdle;
00379
00380
00382 CActiveSchedulerWait iWait;
00383 private:
00384 CAknPopupListExtension* iPopupListExtension;
00385 };
00386
00387 #endif
00388
00389
00390