akninfrm.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknInfrm.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description:
00007 *  Version:
00008 *
00009 *  Copyright © 2002 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing,  adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 * ============================================================================
00019 */
00020 
00021 // INCLUDES
00022 #ifndef __AKNINFRM_H__
00023 #define __AKNINFRM_H__
00024 
00025 
00026 #include <eikdef.h>
00027 #include <eikbctrl.h>
00028 #include <gulicon.h>
00029 #include <eiklabel.h>
00030 #include <aknutils.h>
00031 #include <avkon.rsg>
00032 
00033 class CAknsFrameBackgroundControlContext;
00034 class CAknsBasicBackgroundControlContext;
00035 // CLASS DECLARATION
00041 NONSHARABLE_CLASS(CAknInputFrame) : public CEikBorderedControl, public MCoeControlObserver
00042     {
00043 public:
00044     
00048     CAknInputFrame();
00049     
00054     IMPORT_C ~CAknInputFrame();
00055         
00067     IMPORT_C static CAknInputFrame* NewL(CCoeControl* aField,TBool aComponentOwner,
00068                                          const TDesC& aBitmapfile, TInt aBitmapId, TInt aMaskId,
00069                                          TUint32 aFlags = 0 );
00079     IMPORT_C static CAknInputFrame* NewL(CCoeControl* aField,TBool aComponentOwner,
00080                                          CGulIcon* aIcon, TUint32 aFlags = 0 );
00085     IMPORT_C CCoeControl* Field() const;
00086         
00092     IMPORT_C void SetInfoTextL(const TDesC& aText);
00093         
00099     IMPORT_C void SetLineState(TBool aLineVisible);
00100         
00106     void SetIcon(CGulIcon* aIcon);
00107 
00108 public: //from MCoeControlObserver
00109 
00116     IMPORT_C void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
00117 
00118 public: //from CCoeControl
00119 
00127     IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
00128         
00133     IMPORT_C TSize MinimumSize();
00134         
00139     IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); 
00140         
00147     IMPORT_C void SetInputContext(CAknsFrameBackgroundControlContext* aContext);
00148 
00153         void HandleResourceChange( TInt aType );
00154 
00155 
00156 private: // From CCoeControl
00157     void SizeChanged();
00158     void FocusChanged(TDrawNow aDrawNow); 
00159     void Draw(const TRect& aRect) const;
00160     void PrepareForFocusLossL();
00161 
00162 private:
00163     void BaseConstructL(CCoeControl* aField, TBool aOwner, TUint32 aFlags);
00164     void ConstructL(CCoeControl* aField, TBool aOwner, const TDesC& aFileName, TInt aBitmapId, TInt aMaskId, TUint32 aFlags);
00165     void ConstructL(CCoeControl* aField, TBool aOwner, CGulIcon* aIcon, TUint32 aFlags);
00166     void CreateIconL();
00167 
00168 public:
00170     enum TInputFrameFlags
00171         {
00173         EOwnsField=0x40,
00175         EPopupLayout=0x80,
00177         EPinbLayout=0x100,
00179         EClockAppLayout=0x200,
00181         EFixedFindWithoutLine   = 0x400,
00183         EShowIndicators         = 0x800,
00185         EPopupWindowLayout=0x1000
00186         };
00187     
00188 private:
00189     enum TInfrmPrivateFlags
00190         {
00191         EOwnsInputContext = 0x2000
00192         };
00193 
00194     CGulIcon*               iIcon;
00195     TUint32                 iFlags;
00196     TAknLayoutRect          iMagnIconPos;  // position of the looking glass icon
00197     // sizeof(Taknlayoutrect)=20 sizeof(TRect)=16 sizeof(CCoeControl*)=4 sizeof TAknsItemID=8 
00198     TRect                   iOutlineRect; // was first 16 bytes of TAknLayoutRect  iOutlineRect;
00199 
00200     CCoeControl             *iField;                           // bytes 0..3   of TAknLayoutRect iUnused7;
00201     CAknsFrameBackgroundControlContext *iPopupFindCC;          // bytes 4..7   of TAknLayoutRect iUnused7;
00202     CAknsFrameBackgroundControlContext *iInputContext;         // bytes 8..11  of TAknLayoutRect iUnused7;
00203     TAknsItemID             iIconSkinID;                       // bytes 12..19 of TAknLayoutRect iUnused7;
00204     CAknsBasicBackgroundControlContext *iPopupListCC;          // was TAny*   iExtension; // not used
00205 
00206 
00207     // these are unused
00208     TAknLayoutRect          iUnUsed1;
00209     TAknLayoutRect          iUnUsed2;
00210     TAknLayoutRect          iUnused3;
00211     TAknLayoutRect          iUnused4;
00212     TAknLayoutRect          iUnused5;
00213     TAknLayoutRect          iUnused6;
00214 
00215     TAny*                   iSpare;     // WAS CEikLabel* iInfoText;
00216     TAny*                   iSpare2;    // was last 4 bytes of TAknLayoutRect  iOutlineRect;
00217     
00218     HBufC*                          iFileName; 
00219     TInt                    iBitmapId;
00220     TInt                    iMaskId;
00221     };
00222 
00223 
00224 #endif
00225 
00226 
00227 

Copyright © Nokia Corporation 2001-2008
Back to top