aknpopupfield.h

Go to the documentation of this file.
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 public:
00099     enum EAknPopupFieldSelectionMode
00100         {
00107         EAknPopupFieldLabelMode,
00108                 
00113                 EAknPopupFieldSelectionListMode
00114                 };
00115 
00119         enum EAknFormMode
00120         {
00122         EAknFormModeView,
00123 
00125         EAknFormModeEdit,
00126 
00128         EAknFormModeViewWideWithGraphic,
00129 
00131         EAknFormModeViewWideWithoutGraphic,
00132 
00134         EAknFormModeEditWideWithGraphic,
00135 
00137                 EAknFormModeEditWideWithoutGraphic
00138                 };
00139 public: 
00140         EAknPopupFieldSelectionMode SelectionMode() const { return iSelectionMode; }
00141         EAknFormMode FormMode() const { return iFormMode; }
00145         IMPORT_C CAknPopupField();
00146 
00150         IMPORT_C ~CAknPopupField();
00151 
00155         IMPORT_C void ConstructL();
00156 
00164         IMPORT_C void SetAllowsUserDefinedEntry(TBool aAllows);
00165 
00172         IMPORT_C void ActivateSelectionListL();
00173 
00180         IMPORT_C void SetQueryValueL(MAknQueryValue* aValue);
00181 
00188         IMPORT_C void SetFont(const CFont* aFont);
00189 
00196         IMPORT_C void SetShowIndicatorsL(TBool aShowIndicators);
00197 
00205         IMPORT_C TInt NumLines() const;
00206 
00213         IMPORT_C void SetPopupFieldObserver(MAknPopupFieldObserver* aObserver);
00214 
00223         IMPORT_C void SetEmptyListNoteL(TInt aResourceId,
00224                                                                         CAknNoteDialog::TTimeout aTimeout = CAknNoteDialog::EShortTimeout,
00225                                                                         CAknNoteDialog::TTone aTone = CAknNoteDialog::ENoTone);
00226 
00233     IMPORT_C void SetEmptyTextL(const TDesC& aEmptyText);
00234 
00241         IMPORT_C void SetOtherTextL(const TDesC& aOtherText);
00242 
00249         IMPORT_C void SetInvalidTextL(const TDesC &aInvalidText);
00250 
00251 
00252 public: // from CCoeControl
00253 
00263         IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
00264 
00272         IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
00273 
00281         IMPORT_C TSize MinimumSize();
00282 
00290         IMPORT_C void HandleResourceChange(TInt aType);
00291 
00299     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00300 public:
00307 
00316 
00328 
00339 
00351 
00362 
00372 
00380 
00390 
00400 
00410 
00419 
00431 
00438 
00444 
00450 
00456 
00462 
00468 
00476 
00482 
00488 
00494 
00499 
00506 
00512 
00519 
00526 
00532 
00544 
00550 
00562 
00568 
00574 
00581 
00587 
00593 
00599 
00604 
00610 
00616 
00623 
00628 
00635 
00641 
00647 
00652 
00657 
00662 
00667 
00672 

Copyright © Nokia Corporation 2001-2008
Back to top