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
00108 public:
00109
00116 IMPORT_C void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
00117
00118 public:
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:
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;
00197
00198 TRect iOutlineRect;
00199
00200 CCoeControl *iField;
00201 CAknsFrameBackgroundControlContext *iPopupFindCC;
00202 CAknsFrameBackgroundControlContext *iInputContext;
00203 TAknsItemID iIconSkinID;
00204 CAknsBasicBackgroundControlContext *iPopupListCC;
00205
00206
00207
00208 TAknLayoutRect iUnUsed1;
00209 TAknLayoutRect iUnUsed2;
00210 TAknLayoutRect iUnused3;
00211 TAknLayoutRect iUnused4;
00212 TAknLayoutRect iUnused5;
00213 TAknLayoutRect iUnused6;
00214
00215 TAny* iSpare;
00216 TAny* iSpare2;
00217
00218 HBufC* iFileName;
00219 TInt iBitmapId;
00220 TInt iMaskId;
00221 };
00222
00223
00224 #endif
00225
00226
00227