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
00146 class CAknSelectionListDialog : public CAknDialog, public MEikListBoxObserver
00147 {
00148 public:
00159 IMPORT_C static CAknSelectionListDialog *NewL( TInt &aOpenedItem, MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aCommand = 0 );
00160
00171 IMPORT_C static CAknSelectionListDialog *NewLC( TInt &aOpenedItem, MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aCommand = 0 );
00172
00178 IMPORT_C void ConstructL(TInt aMenuTitleResourceId);
00179
00180 public:
00185 enum TFindType
00186 {
00188 ENoFind,
00190 EFixedFind,
00192 EPopupFind
00193 };
00194
00203 IMPORT_C void SetupFind(TFindType aType);
00204
00217 IMPORT_C CArrayPtr<CGulIcon>* IconArray() const;
00218
00231 IMPORT_C void SetIconArrayL(CArrayPtr<CGulIcon>* aIcons);
00232
00238 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00239
00240 protected:
00244 IMPORT_C CAknSelectionListDialog( TInt &aIndex, MDesCArray *aArray, MEikCommandObserver *aCommand );
00248 IMPORT_C ~CAknSelectionListDialog();
00249
00250 protected:
00257 IMPORT_C virtual void SelectionListProcessCommandL(TInt aCommand);
00258
00319 IMPORT_C virtual TBool IsAcceptableListBoxType(TInt aControlType, TBool &aIsFormattedCellList) const;
00320 protected:
00325 IMPORT_C void ProcessCommandL( TInt aCommandId );
00326
00330 IMPORT_C void PreLayoutDynInitL();
00331
00335 IMPORT_C void PostLayoutDynInitL();
00336
00342 IMPORT_C void SetSizeAndPosition(const TSize &aSize);
00343
00349 IMPORT_C TBool OkToExitL( TInt aButtonId );
00350
00357 IMPORT_C void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
00358
00362 IMPORT_C TInt CountComponentControls() const;
00363
00367 IMPORT_C CCoeControl* ComponentControl( TInt aIndex ) const;
00368
00372 IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
00373
00394 IMPORT_C SEikControlInfo CreateCustomControlL(TInt aControlType);
00395 protected:
00400 IMPORT_C virtual CEikListBox *ListBox() const;
00401
00406 IMPORT_C CAknSearchField *FindBox() const;
00407
00414 IMPORT_C TBool IsFormattedCellListBox() const;
00415
00419 IMPORT_C void Draw(const TRect&) const;
00420 private:
00424 IMPORT_C void* ExtensionInterface( TUid aInterface );
00425 private:
00426 IMPORT_C virtual void CEikDialog_Reserved_1();
00427 IMPORT_C virtual void CEikDialog_Reserved_2();
00428 private:
00429 IMPORT_C virtual void CAknDialog_Reserved();
00430 private:
00431 IMPORT_C virtual void CAknSelectionListDialog_Reserved();
00432 protected:
00437 TBool iEnterKeyPressed;
00438 protected:
00446 static TInt ExitViaIdle(TAny* aSelectionList );
00447 private:
00448 CAknSelectionListDialogExtension *iExtension;
00449 private:
00450 CAknSearchField *iFindBox;
00451 TFindType iFindType;
00452 TInt *iSelectedItem;
00453 MDesCArray *iArray;
00454 MEikCommandObserver *iCmdObserver;
00455 TInt iDialogResourceId;
00456 TInt iSpare[4];
00457 };
00458
00565 class CAknMarkableListDialog : public CAknSelectionListDialog
00566 {
00567 public:
00584 IMPORT_C static CAknMarkableListDialog *NewL( TInt &aOpenedItem,
00585 CArrayFix<TInt> *aSelectedItems,
00586 MDesCArray *aArray,
00587 TInt aMenuBarResourceId,
00588 TInt aOkMenuBarId,
00589 MEikCommandObserver *aObserver =0 );
00590
00608 IMPORT_C static CAknMarkableListDialog *NewLC( TInt &aOpenedItem,
00609 CArrayFix<TInt> *aSelectedItems,
00610 MDesCArray *aArray,
00611 TInt aMenuBarResourceId,
00612 TInt aOkMenuBarId,
00613 MEikCommandObserver *aObserver =0 );
00614
00619 IMPORT_C void ConstructL( TInt aMenuTitleResourceId );
00620
00621
00622
00623
00624 IMPORT_C ~CAknMarkableListDialog();
00625
00626 public:
00631 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00632
00633 protected:
00649 IMPORT_C CAknMarkableListDialog( TInt &aOpenedItem,
00650 CArrayFix<TInt> *aSelectedItems,
00651 MDesCArray *aArray,
00652 TInt aMenuBarResourceId,
00653 TInt aOkMenuBarResourceId,
00654 MEikCommandObserver *aObserver );
00658 IMPORT_C void PreLayoutDynInitL();
00659
00663 IMPORT_C void PostLayoutDynInitL();
00664
00671 IMPORT_C void SelectionListProcessCommandL(TInt aCommand);
00672
00677 IMPORT_C void ProcessCommandL(TInt aCommand);
00678
00684 IMPORT_C void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
00685
00692 IMPORT_C void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
00693
00697 IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
00698
00704 IMPORT_C TBool OkToExitL(TInt aButtonId);
00705
00706 private:
00707 CArrayFix<TInt> *iSelectionIndexArray;
00708
00709 protected:
00713 TInt iMenuBarResourceId;
00714
00718 TInt iOkMenuBarResourceId;
00719
00720 public:
00724 IMPORT_C static CAknMarkableListDialog *NewL(TInt &aOpenedItem, CArrayFix<TInt> *aSelectedItems,
00725 MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aObserver =0);
00729 IMPORT_C static CAknMarkableListDialog *NewLC(TInt &aOpenedItem, CArrayFix<TInt> *aSelectedItems,
00730 MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aObserver =0);
00731 protected:
00735 IMPORT_C CAknMarkableListDialog(TInt &aValue, CArrayFix<TInt> *aSelectedItems, MDesCArray *aArray, MEikCommandObserver *aObserver);
00736
00737 private:
00741 IMPORT_C void* ExtensionInterface( TUid aInterface );
00742 private:
00743 IMPORT_C virtual void CEikDialog_Reserved_1();
00744 IMPORT_C virtual void CEikDialog_Reserved_2();
00745 private:
00746 IMPORT_C virtual void CAknDialog_Reserved();
00747 private:
00748 IMPORT_C virtual void CAknSelectionListDialog_Reserved();
00749 private:
00750 CAknMarkableListDialogExtension *iMarkableExtension;
00751 private:
00752 TInt iSpare[2];
00753 };
00754
00755
00756 typedef CAknSelectionListDialog CAknSelectionGridDialog;
00757 typedef CAknMarkableListDialog CAknMarkableGridDialog;
00758
00759
00760 #endif