00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __AKNSELECTIONLIST_H__
00021 #define __AKNSELECTIONLIST_H__
00022
00023 #include <aknform.h>
00024 #include <aknview.h>
00025 #include <aknutils.h>
00026 #include <aknpopup.h>
00027 #include <avkon.rsg>
00028
00029 class CAknSelectionListDialogExtension;
00030 class CAknMarkableListDialogExtension;
00031
00147 class CAknSelectionListDialog : public CAknDialog, public MEikListBoxObserver
00148 {
00149 public:
00160 IMPORT_C static CAknSelectionListDialog *NewL( TInt &aOpenedItem, MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aCommand = 0 );
00161
00172 IMPORT_C static CAknSelectionListDialog *NewLC( TInt &aOpenedItem, MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aCommand = 0 );
00173
00179 IMPORT_C void ConstructL(TInt aMenuTitleResourceId);
00180
00181 public:
00186 enum TFindType
00187 {
00189 ENoFind,
00191 EFixedFind,
00193 EPopupFind,
00195 EAdaptiveFind
00196 };
00197
00206 IMPORT_C void SetupFind(TFindType aType);
00207
00220 IMPORT_C CArrayPtr<CGulIcon>* IconArray() const;
00221
00234 IMPORT_C void SetIconArrayL(CArrayPtr<CGulIcon>* aIcons);
00235
00241 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00242
00243 protected:
00247 IMPORT_C CAknSelectionListDialog( TInt &aIndex, MDesCArray *aArray, MEikCommandObserver *aCommand );
00251 IMPORT_C ~CAknSelectionListDialog();
00252
00253 protected:
00260 IMPORT_C virtual void SelectionListProcessCommandL(TInt aCommand);
00261
00322 IMPORT_C virtual TBool IsAcceptableListBoxType(TInt aControlType, TBool &aIsFormattedCellList) const;
00323 protected:
00328 IMPORT_C void ProcessCommandL( TInt aCommandId );
00329
00333 IMPORT_C void PreLayoutDynInitL();
00334
00338 IMPORT_C void PostLayoutDynInitL();
00339
00345 IMPORT_C void SetSizeAndPosition(const TSize &aSize);
00346
00352 IMPORT_C TBool OkToExitL( TInt aButtonId );
00353
00360 IMPORT_C void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
00361
00365 IMPORT_C TInt CountComponentControls() const;
00366
00370 IMPORT_C CCoeControl* ComponentControl( TInt aIndex ) const;
00371
00375 IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
00376
00397 IMPORT_C SEikControlInfo CreateCustomControlL(TInt aControlType);
00398 protected:
00403 IMPORT_C virtual CEikListBox *ListBox() const;
00404
00409 IMPORT_C CAknSearchField *FindBox() const;
00410
00417 IMPORT_C TBool IsFormattedCellListBox() const;
00418
00422 IMPORT_C void Draw(const TRect&) const;
00423 private:
00427 IMPORT_C void* ExtensionInterface( TUid aInterface );
00428 private:
00429 IMPORT_C virtual void CEikDialog_Reserved_1();
00430 IMPORT_C virtual void CEikDialog_Reserved_2();
00431 private:
00432 IMPORT_C virtual void CAknDialog_Reserved();
00433 private:
00434 IMPORT_C virtual void CAknSelectionListDialog_Reserved();
00435 protected:
00440 TBool iEnterKeyPressed;
00441 protected:
00449 static TInt ExitViaIdle(TAny* aSelectionList );
00450 private:
00451 CAknSelectionListDialogExtension *iExtension;
00452 private:
00453 CAknSearchField *iFindBox;
00454 TFindType iFindType;
00455 TInt *iSelectedItem;
00456 MDesCArray *iArray;
00457 MEikCommandObserver *iCmdObserver;
00458 TInt iDialogResourceId;
00459 TInt iSpare[4];
00460 };
00461
00569 class CAknMarkableListDialog : public CAknSelectionListDialog
00570 {
00571 public:
00588 IMPORT_C static CAknMarkableListDialog *NewL( TInt &aOpenedItem,
00589 CArrayFix<TInt> *aSelectedItems,
00590 MDesCArray *aArray,
00591 TInt aMenuBarResourceId,
00592 TInt aOkMenuBarId,
00593 MEikCommandObserver *aObserver =0 );
00594
00612 IMPORT_C static CAknMarkableListDialog *NewLC( TInt &aOpenedItem,
00613 CArrayFix<TInt> *aSelectedItems,
00614 MDesCArray *aArray,
00615 TInt aMenuBarResourceId,
00616 TInt aOkMenuBarId,
00617 MEikCommandObserver *aObserver =0 );
00618
00623 IMPORT_C void ConstructL( TInt aMenuTitleResourceId );
00624
00625
00626
00627
00628 IMPORT_C ~CAknMarkableListDialog();
00629
00630 public:
00635 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00636
00637 protected:
00653 IMPORT_C CAknMarkableListDialog( TInt &aOpenedItem,
00654 CArrayFix<TInt> *aSelectedItems,
00655 MDesCArray *aArray,
00656 TInt aMenuBarResourceId,
00657 TInt aOkMenuBarResourceId,
00658 MEikCommandObserver *aObserver );
00662 IMPORT_C void PreLayoutDynInitL();
00663
00667 IMPORT_C void PostLayoutDynInitL();
00668
00675 IMPORT_C void SelectionListProcessCommandL(TInt aCommand);
00676
00681 IMPORT_C void ProcessCommandL(TInt aCommand);
00682
00688 IMPORT_C void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
00689
00696 IMPORT_C void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
00697
00701 IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
00702
00708 IMPORT_C TBool OkToExitL(TInt aButtonId);
00709
00710 private:
00711 CArrayFix<TInt> *iSelectionIndexArray;
00712
00713 protected:
00717 TInt iMenuBarResourceId;
00718
00722 TInt iOkMenuBarResourceId;
00723
00724 public:
00728 IMPORT_C static CAknMarkableListDialog *NewL(TInt &aOpenedItem, CArrayFix<TInt> *aSelectedItems,
00729 MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aObserver =0);
00733 IMPORT_C static CAknMarkableListDialog *NewLC(TInt &aOpenedItem, CArrayFix<TInt> *aSelectedItems,
00734 MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aObserver =0);
00735 protected:
00739 IMPORT_C CAknMarkableListDialog(TInt &aValue, CArrayFix<TInt> *aSelectedItems, MDesCArray *aArray, MEikCommandObserver *aObserver);
00740
00741 private:
00745 IMPORT_C void* ExtensionInterface( TUid aInterface );
00746 private:
00747 IMPORT_C virtual void CEikDialog_Reserved_1();
00748 IMPORT_C virtual void CEikDialog_Reserved_2();
00749 private:
00750 IMPORT_C virtual void CAknDialog_Reserved();
00751 private:
00752 IMPORT_C virtual void CAknSelectionListDialog_Reserved();
00753 private:
00754 CAknMarkableListDialogExtension *iMarkableExtension;
00755 private:
00756 TInt iSpare[2];
00757 };
00758
00759
00760 typedef CAknSelectionListDialog CAknSelectionGridDialog;
00761 typedef CAknMarkableListDialog CAknMarkableGridDialog;
00762
00763
00764 #endif