00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef AKNINDICATORCONTAINER_H
00025 #define AKNINDICATORCONTAINER_H
00026
00027
00028 #include <AknControl.h>
00029 #include <eikspane.h>
00030
00031 class CIncallStatusBubble;
00032 class CAknIndicator;
00033 class CAknIndicatorContainerExtension;
00034 class CAknPictographInterface;
00035 class MAknIndicatorObserver;
00036
00040 class CAknIndicatorContainer : public CAknControl, public MEikStatusPaneObserver
00041 {
00042 friend class CAknIndicatorDataObserver;
00043 public:
00044
00045 enum TLayoutOrientation
00046 {
00047 EVertical,
00048 EHorizontal
00049 };
00050
00051 enum TIndicatorAlignment
00052 {
00053 ELeft,
00054 ERight
00055 };
00056
00057 enum TIndicatorContext
00058 {
00059 EUniversalIndicators = 0,
00060 ENaviPaneEditorIndicators,
00061 EQueryEditorIndicators,
00062 EFindIndicators
00063 };
00064
00065 enum TIndicatorPosition
00066 {
00067 ELeftSide,
00068 ERightSide,
00069 EMiddle
00070 };
00071
00072 enum TCustomIndicatorFlags
00073 {
00074 EMultiColorIndicator = 0x1,
00075 EIndicatorPositionInverted = 0x2
00076 };
00077
00078 enum TLayoutMode
00079 {
00080 ELayoutModeUsual,
00081 ELayoutModeWide
00082 };
00083
00084
00085 public:
00089 IMPORT_C CAknIndicatorContainer();
00090
00097 IMPORT_C CAknIndicatorContainer(TInt aIndicatorContext);
00098
00102 IMPORT_C ~CAknIndicatorContainer();
00103
00107 IMPORT_C void ConstructL();
00108
00118 IMPORT_C void SetIndicatorState(TUid aIndicatorId, TInt aState, TBool aDrawNow = ETrue);
00119
00126 IMPORT_C TInt IndicatorState(TUid aIndicatorId);
00127
00135 IMPORT_C void SetIndicatorValueL(TUid aIndicatorId, const TDesC& aString);
00136
00142 IMPORT_C void SetIncallBubbleFlags(const TInt& aFlags);
00143
00149 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
00150
00156 IMPORT_C TInt IndicatorContext() const;
00157
00158
00159 public:
00166 IMPORT_C void HandleStatusPaneSizeChange();
00167
00168 public:
00173 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00174
00175 protected:
00176
00183 IMPORT_C virtual void HandleResourceChange(TInt aType);
00184
00188 IMPORT_C virtual void SizeChanged();
00189
00193 IMPORT_C virtual void PositionChanged();
00194
00199 IMPORT_C virtual TInt CountComponentControls() const;
00200
00206 IMPORT_C virtual CCoeControl* ComponentControl(TInt aIndex) const;
00207
00208 private:
00209 IMPORT_C virtual void Draw(const TRect& aRect) const;
00210 private:
00214 IMPORT_C void* ExtensionInterface( TUid aInterface );
00215
00216 private:
00217 virtual void Reserved_1();
00218 void PrioritizeIndicatorsL();
00219
00220 static TInt TickerCallback(TAny* aThis);
00221 TInt DoTick();
00222
00223 void IncallBubbleSizeChanged(TBool aAllowIdleStateBubble);
00224
00225 void SizeChangedInSmallStatusPane();
00226
00227 void SizeChangedInNormalStatusPane();
00228
00229 void SizeChangedInStaconPane();
00230
00231 void SizeChangedInFlatStatusPane();
00232
00233 void SizeChangedInExtendedStatusPane();
00234
00235 void SizeChangedInIdleExtendedStatusPane();
00236
00237 void SizeChangedInIdleVertical();
00238
00239 void SetContainerWindowNonFading(TBool aNonFading);
00240
00241 void SetupIndicatorLayoutModes();
00242 TInt SelectIndicatorLayoutMode();
00243 void CreateIndicatorFromPaneResourceL(TUid aUid, TInt aIndicatorPaneResourceId, TInt aCustomIndicatorFlags);
00244 TBool IndicatorExists(TUid aUid) const;
00245 void CreateIncallBubbleL();
00246
00247 TBool UpdateSmallLayoutL();
00248
00249 public:
00250
00262 IMPORT_C void SetIndicatorValue(TUid aIndicatorId, TInt aValue, TInt aMaxValue);
00263
00267 void DrawPictographArea();
00268
00273 CAknPictographInterface* PictographInterface() const;
00274
00275
00287 IMPORT_C void SetIncallBubbleAllowedInIdle(TBool aAllowed);
00288
00300 IMPORT_C void SetIncallBubbleAllowedInUsual(TBool aAllowed);
00301
00302
00309 IMPORT_C void SetIndicatorObserver(MAknIndicatorObserver* aIndicatorObserver, TUid aIndicatorUid);
00310
00333 IMPORT_C TUid CreateIndicatorFromResourceL(TInt aIndicatorResourceId, TInt aCustomIndicatorFlags);
00334
00335
00349 IMPORT_C void ReplaceIndicatorIconL(TUid aIndicator, TInt aState, TInt aLayoutMode, CFbsBitmap* aIconBitmap, CFbsBitmap* aIconMask, TInt aIconIndex = 0);
00350
00351 private:
00352
00353 typedef CArrayPtrFlat<CAknIndicator> CAknIndicatorQueue;
00354 CAknIndicatorQueue* iIndicators;
00355 TLayoutOrientation iLayoutOrientation;
00356 TLayoutOrientation iPreviousLayoutOrientation;
00357
00358 TIndicatorAlignment iAlignment;
00359
00360 TInt iIndicatorsShown;
00361 TInt iAnimatedIndicatorsShown;
00362 CAknIndicatorContainerExtension* iExtension;
00363 TInt iIndicatorContext;
00364
00365 CPeriodic* iTicker;
00366 TBool iSpare2;
00367 TInt iSynchronizingValue;
00368
00369 CIncallStatusBubble* iIncallBubble;
00370 };
00371
00372
00373
00374 #endif
00375
00376