00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
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:
00123
00130 IMPORT_C void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
00131
00132 public:
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:
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;
00210
00211 TRect iOutlineRect;
00212
00213 CCoeControl *iField;
00214 CAknsFrameBackgroundControlContext *iPopupFindCC;
00215 CAknsFrameBackgroundControlContext *iInputContext;
00216 TAknsItemID iIconSkinID;
00217 CAknsBasicBackgroundControlContext *iPopupListCC;
00218
00219
00220
00221 TAknLayoutRect iUnUsed1;
00222 TAknLayoutRect iUnUsed2;
00223 TAknLayoutRect iUnused3;
00224 TAknLayoutRect iUnused4;
00225 TAknLayoutRect iUnused5;
00226 TAknLayoutRect iUnused6;
00227
00228 TAny* iSpare;
00229 TAny* iSpare2;
00230
00231 HBufC* iFileName;
00232 TInt iBitmapId;
00233 TInt iMaskId;
00234
00235 };
00236
00237
00238 #endif
00239
00240
00241