00001
00002
00003
00004
00005
00006 #if !defined(__EIKPROGI_H__)
00007 #define __EIKPROGI_H__
00008
00009 #if !defined(__EIKBCTRL_H__)
00010 #include <eikbctrl.h>
00011 #endif
00012
00013 #if !defined(__EIKON_HRH__)
00014 #include <eikon.hrh>
00015 #endif
00016
00017 class TGulBorder;
00018 class CEikProgressInfoExtension;
00019
00034 class CEikProgressInfo : public CEikBorderedControl
00035 {
00036
00037 public:
00038
00042 struct SInfo
00043 {
00048 TEikProgressTextType iTextType;
00049
00054 TInt iSplitsInBlock;
00055
00060 TInt iFinalValue;
00061
00063 TInt iWidth;
00064
00066 TInt iHeight;
00067 };
00068
00072 struct SLayout
00073 {
00079 TRgb iFillColor;
00080
00086 TRgb iEmptyColor;
00087
00093 TRgb iFillTextColor;
00094
00100 TRgb iEmptyTextColor;
00101
00106 const CFont* iFont;
00107
00112 TInt iGapBetweenBlocks;
00113 };
00114
00118 IMPORT_C ~CEikProgressInfo();
00119
00123 IMPORT_C CEikProgressInfo();
00124
00132 IMPORT_C CEikProgressInfo(const SInfo& aProgInfo);
00133
00140 IMPORT_C void IncrementAndDraw(TInt aInc);
00141
00148 IMPORT_C void SetAndDraw(TInt aValue);
00149
00158 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
00159
00165 IMPORT_C void SetLayout(const SLayout& aLayout);
00166
00172 IMPORT_C void SetBorder(const TGulBorder& aBorder);
00173
00181 IMPORT_C void SetFinalValue(TInt aFinalValue);
00182
00186 IMPORT_C void ConstructL();
00187
00195 inline const SInfo& Info() const { return(iInfo); }
00196
00203 inline const SLayout& Layout() const { return(iLayout); }
00204
00210 inline TInt CurrentValue() const { return(iCurrentValue); }
00211
00212 protected:
00213
00224 IMPORT_C virtual const TDesC* EvaluateText(TDes& aTextBuf) const;
00225
00226 public:
00227
00233 IMPORT_C void ActivateL();
00234
00242 IMPORT_C TSize MinimumSize();
00243
00249 IMPORT_C void SizeChanged();
00250
00260 IMPORT_C virtual void GetColorUseListL(
00261 CArrayFix<TCoeColorUse>& aColorUseList) const;
00262
00270 IMPORT_C virtual void HandleResourceChange(TInt aType);
00271
00288 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00289
00290 protected:
00291
00302 IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const;
00303
00304 private:
00305
00306 IMPORT_C void Draw(const TRect& aRect) const;
00307 IMPORT_C void Reserved_2();
00308
00309 private:
00310
00314 IMPORT_C void* ExtensionInterface( TUid aInterface );
00315
00316 private:
00317
00318 void Construct();
00319 void CheckSizeCalculated();
00320 void DrawPartial()const;
00321 void DrawProgressBarForeground(CWindowGc& aGc) const;
00322 void DrawProgressBarBackground(CWindowGc& aGc) const;
00323 TInt FilledWidth() const;
00324
00325 private:
00326
00327 SInfo iInfo;
00328 SLayout iLayout;
00329 TInt iCurrentValue;
00330 TBool iHeightWasSupplied;
00331 CFbsBitmap* iBitmap;
00332 CFbsBitmap* iBackgroundBitmap;
00333 CFbsBitmap* iBitmapMask;
00334
00335 CEikProgressInfoExtension* iExtension;
00336
00337 private:
00338
00339 void LoadBitmapsL();
00340 void SetBitmapSizes();
00341 void DeleteBitmaps();
00342 };
00343
00344
00345 #endif // __EIKPROGI_H__