00001 /* 00002 * ============================================================================ 00003 * Name : AknPopupField.h 00004 * Part of : Avkon 00005 * 00006 * Description: 00007 * Represents a combo box type control, used to implement the Series 60 00008 * pop-up field. 00009 * 00010 * Version: 00011 * 00012 * Copyright © 2002 Nokia Corporation. 00013 * This material, including documentation and any related 00014 * computer programs, is protected by copyright controlled by 00015 * Nokia Corporation. All rights are reserved. Copying, 00016 * including reproducing, storing, adapting or translating, any 00017 * or all of this material requires the prior written consent of 00018 * Nokia Corporation. This material also contains confidential 00019 * information which may not be disclosed to others without the 00020 * prior written consent of Nokia Corporation. 00021 * ============================================================================ 00022 */ 00023 00024 #ifndef AKNPOPUPFIELD_H 00025 #define AKNPOPUPFIELD_H 00026 00027 #include <eikcmobs.h> 00028 #include <eiklbx.h> 00029 #include <eikbctrl.h> 00030 #include <eikcmbut.h> 00031 #include <bamdesca.h> 00032 00033 #include <AknDesCArrayDecorator.h> 00034 #include <AknListBoxLayoutDecorator.h> 00035 #include <aknnotedialog.h> 00036 00037 class TResourceReader; 00038 class CEikLabel; 00039 class CEikCommandButton; 00040 class CAknFormGraphicStyleListBox; 00041 class MAknQueryValue; 00042 00043 class CAknPopupField; 00044 class CAknPopupFieldExtension; 00045 00050 class MAknPopupFieldObserver 00051 { 00052 public: 00053 enum TAknPopupFieldEvent 00054 { 00055 EAknPopupFieldEventModeChange, 00056 EAknPopupFieldEventValueChange 00057 }; 00058 public: 00068 virtual void HandlePopupFieldEventL(CAknPopupField* aPopupField, 00069 TAknPopupFieldEvent aEventType, 00070 TInt aHint)=0; 00071 }; 00072 00077 class CAknPopupField : 00078 public CEikBorderedControl, 00079 public MCoeControlObserver, 00080 public MEikCommandObserver, 00081 public MEikListBoxObserver 00082 { 00083 protected: 00087 class CAknPopupFieldBitmapButton : public CEikBitmapButton 00088 { 00089 public: 00093 CAknPopupFieldBitmapButton(); 00094 }; 00095 #start_choice IN_3_1_SDK 00096 public: 00097 #end_choice IN_3_1_SDK 00098 00102 enum EAknPopupFieldSelectionMode 00103 { 00110 EAknPopupFieldLabelMode, 00111 00116 EAknPopupFieldSelectionListMode 00117 }; 00118 00123 enum EAknFormMode 00124 { 00126 EAknFormModeView, 00127 00129 EAknFormModeEdit, 00130 00132 EAknFormModeViewWideWithGraphic, 00133 00135 EAknFormModeViewWideWithoutGraphic, 00136 00138 EAknFormModeEditWideWithGraphic, 00139 00141 EAknFormModeEditWideWithoutGraphic 00142 }; 00143 public: 00144 #start_since SINCE_3_1_SDK 00145 00148 EAknPopupFieldSelectionMode SelectionMode() const { return iSelectionMode; } 00152 EAknFormMode FormMode() const { return iFormMode; } 00153 #end_since SINCE_3_1_SDK 00154 00158 IMPORT_C CAknPopupField(); 00159 00163 IMPORT_C ~CAknPopupField(); 00164 00168 IMPORT_C void ConstructL(); 00169 00177 IMPORT_C void SetAllowsUserDefinedEntry(TBool aAllows); 00178 00185 IMPORT_C void ActivateSelectionListL(); 00186 00193 IMPORT_C void SetQueryValueL(MAknQueryValue* aValue); 00194 00201 IMPORT_C void SetFont(const CFont* aFont); 00202 00209 IMPORT_C void SetShowIndicatorsL(TBool aShowIndicators); 00210 00218 IMPORT_C TInt NumLines() const; 00219 00226 IMPORT_C void SetPopupFieldObserver(MAknPopupFieldObserver* aObserver); 00227 00236 IMPORT_C void SetEmptyListNoteL(TInt aResourceId, 00237 CAknNoteDialog::TTimeout aTimeout = CAknNoteDialog::EShortTimeout, 00238 CAknNoteDialog::TTone aTone = CAknNoteDialog::ENoTone); 00239 00246 IMPORT_C void SetEmptyTextL(const TDesC& aEmptyText); 00247 00254 IMPORT_C void SetOtherTextL(const TDesC& aOtherText); 00255 00262 IMPORT_C void SetInvalidTextL(const TDesC &aInvalidText); 00263 00264 00265 public: // from CCoeControl 00266 00276 IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); 00277 00285 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); 00286 00294 IMPORT_C TSize MinimumSize(); 00295 00303 IMPORT_C void HandleResourceChange(TInt aType); 00304 00312 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00313 public: 00320 00329 00341 00352 00364 00375 00385 00393 00403 00413 00423 00432 00444 00451 00457 00463 00469 00475 00481 00489 00495 00501 00507 00512 00519 00525 00532 00539 00545 00557 00563 00575 00581 00587 00594 00600 00606 00612 00617 00623 00629 00636 00641 00648 00654 00660 00665 00670 00675 00680 00685