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 
00113     TUint Flags() const;
00114 
00120     void SetFlags( TUint aNewFlags );
00121 
00122 public: //from MCoeControlObserver
00123 
00130     IMPORT_C void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
00131 
00132 public: //from CCoeControl
00133 
00141     IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
00142         
00147     IMPORT_C TSize MinimumSize();
00148         
00153     IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); 
00154         
00161     IMPORT_C void SetInputContext(CAknsFrameBackgroundControlContext* aContext);
00162 
00167         void HandleResourceChange( TInt aType );
00168 
00169 private: // From CCoeControl
00170     void SizeChanged();
00171     void FocusChanged(TDrawNow aDrawNow); 
00172     void Draw(const TRect& aRect) const;
00173     void PrepareForFocusLossL();
00174 
00175 private:
00176     void BaseConstructL(CCoeControl* aField, TBool aOwner, TUint32 aFlags);
00177     void ConstructL(CCoeControl* aField, TBool aOwner, const TDesC& aFileName, TInt aBitmapId, TInt aMaskId, TUint32 aFlags);
00178     void ConstructL(CCoeControl* aField, TBool aOwner, CGulIcon* aIcon, TUint32 aFlags);
00179     void CreateIconL();
00180 
00181 public:
00183     enum TInputFrameFlags
00184         {
00186         EOwnsField=0x40,
00188         EPopupLayout=0x80,
00190         EPinbLayout=0x100,
00192         EClockAppLayout=0x200,
00194         EFixedFindWithoutLine   = 0x400,
00196         EShowIndicators         = 0x800,
00198         EPopupWindowLayout=0x1000
00199         };
00200     
00201 private:
00202     enum TInfrmPrivateFlags
00203         {
00204         EOwnsInputContext = 0x2000
00205         };
00206 
00207     CGulIcon*               iIcon;
00208     TUint32                 iFlags;
00209     TAknLayoutRect          iMagnIconPos;  // position of the looking glass icon
00210     // sizeof(Taknlayoutrect)=20 sizeof(TRect)=16 sizeof(CCoeControl*)=4 sizeof TAknsItemID=8 
00211     TRect                   iOutlineRect; // was first 16 bytes of TAknLayoutRect  iOutlineRect;
00212 
00213     CCoeControl             *iField;                           // bytes 0..3   of TAknLayoutRect iUnused7;
00214     CAknsFrameBackgroundControlContext *iPopupFindCC;          // bytes 4..7   of TAknLayoutRect iUnused7;
00215     CAknsFrameBackgroundControlContext *iInputContext;         // bytes 8..11  of TAknLayoutRect iUnused7;
00216     TAknsItemID             iIconSkinID;                       // bytes 12..19 of TAknLayoutRect iUnused7;
00217     CAknsBasicBackgroundControlContext *iPopupListCC;          // was TAny*   iExtension; // not used
00218 
00219 
00220     // these are unused
00221     TAknLayoutRect          iUnUsed1;
00222     TAknLayoutRect          iUnUsed2;
00223     TAknLayoutRect          iUnused3;
00224     TAknLayoutRect          iUnused4;
00225     TAknLayoutRect          iUnused5;
00226     TAknLayoutRect          iUnused6;
00227 
00228     TAny*                   iSpare;     // WAS CEikLabel* iInfoText;
00229     TAny*                   iSpare2;    // was last 4 bytes of TAknLayoutRect  iOutlineRect;
00230     
00231     HBufC*                          iFileName; 
00232     TInt                    iBitmapId;
00233     TInt                    iMaskId;
00234 
00235     };
00236 
00237 
00238 #endif
00239 
00240 
00241 

Copyright © Nokia Corporation 2001-2007
Back to top