00001 /* 00002 * ============================================================================ 00003 * Name : aknindicatorcontainer.h 00004 * Part of : AVKON 00005 * 00006 * Description: 00007 * A default control in the status pane's small indicator pane. 00008 * Editor indicators uses also same control in the navigation pane and 00009 * in queries. 00010 * Version: 00011 * 00012 * Copyright © 2002 Nokia Corporation. 00013 * This material, including documentation and any related 00014 * computer programs, is protected by copyright controlled by 00015 * Nokia Corporation. All rights are reserved. Copying, 00016 * including reproducing, storing, adapting or translating, any 00017 * or all of this material requires the prior written consent of 00018 * Nokia Corporation. This material also contains confidential 00019 * information which may not be disclosed to others without the 00020 * prior written consent of Nokia Corporation. 00021 * ============================================================================ 00022 */ 00023 00024 #ifndef AKNINDICATORCONTAINER_H 00025 #define AKNINDICATORCONTAINER_H 00026 00027 // INCLUDES 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 public: 00043 00044 enum TLayoutOrientation 00045 { 00046 EVertical, 00047 EHorizontal 00048 }; 00049 00050 enum TIndicatorAlignment 00051 { 00052 ELeft, 00053 ERight 00054 }; 00055 00056 enum TIndicatorContext 00057 { 00058 EUniversalIndicators = 0, 00059 ENaviPaneEditorIndicators, 00060 EQueryEditorIndicators, 00061 EFindIndicators 00062 }; 00063 00064 enum TIndicatorPosition 00065 { 00066 ELeftSide, 00067 ERightSide, 00068 EMiddle 00069 }; 00070 00071 #start_since SINCE_3_1_SDK 00072 00075 enum TCustomIndicatorFlags 00076 { 00077 EMultiColorIndicator = 0x1, 00078 EIndicatorPositionInverted = 0x2 00079 }; 00080 00084 enum TLayoutMode 00085 { 00086 ELayoutModeUsual, 00087 ELayoutModeWide 00088 }; 00089 #end_since SINCE_3_1_SDK 00090 00091 public: 00095 IMPORT_C CAknIndicatorContainer(); 00096 00103 IMPORT_C CAknIndicatorContainer(TInt aIndicatorContext); 00104 00108 IMPORT_C ~CAknIndicatorContainer(); 00109 00113 IMPORT_C void ConstructL(); 00114 00124 IMPORT_C void SetIndicatorState(TUid aIndicatorId, TInt aState, TBool aDrawNow = ETrue); 00125 00132 IMPORT_C TInt IndicatorState(TUid aIndicatorId); 00133 00141 IMPORT_C void SetIndicatorValueL(TUid aIndicatorId, const TDesC& aString); 00142 00148 IMPORT_C void SetIncallBubbleFlags(const TInt& aFlags); 00149 00155 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); 00156 00162 IMPORT_C TInt IndicatorContext() const; 00163 00164 00165 public: // From MEikStatusPaneObserver 00172 IMPORT_C void HandleStatusPaneSizeChange(); 00173 00174 public: // From CCoeControl 00179 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00180 00181 protected: // From CCoeControl 00182 00189 IMPORT_C virtual void HandleResourceChange(TInt aType); 00190 00194 IMPORT_C virtual void SizeChanged(); 00195 00199 IMPORT_C virtual void PositionChanged(); 00200 00205 IMPORT_C virtual TInt CountComponentControls() const; 00206 00212 IMPORT_C virtual CCoeControl* ComponentControl(TInt aIndex) const; 00213 00214 private: // From CCoeControl 00215 IMPORT_C virtual void Draw(const TRect& aRect) const; 00216 private: 00220 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00221 00222 private: 00223 virtual void Reserved_1(); 00224 void PrioritizeIndicatorsL(); 00225 00226 static TInt TickerCallback(TAny* aThis); 00227 TInt DoTick(); 00228 00229 void IncallBubbleSizeChanged(TBool aAllowIdleStateBubble); 00230 00236 TInt AutolockState(); 00237 00238 void SizeChangedInSmallStatusPane(); 00239 00240 void SizeChangedInNormalStatusPane(); 00241 00242 void SizeChangedInStaconPane(); 00243 00244 void SizeChangedInFlatStatusPane(); 00245 00246 void SizeChangedInExtendedStatusPane(); 00247 00248 void SizeChangedInIdleExtendedStatusPane(); 00249 00250 void SizeChangedInIdleVertical(); 00251 00252 void SetContainerWindowNonFading(TBool aNonFading); 00253 00254 void SetupIndicatorLayoutModes(); 00255 00256 TInt SelectIndicatorLayoutMode(); 00257 void CreateIndicatorFromPaneResourceL(TUid aUid, TInt aIndicatorPaneResourceId, TInt aCustomIndicatorFlags); 00258 TBool IndicatorExists(TUid aUid) const; 00259 void CreateIncallBubbleL(); 00260 00261 public: 00262 00274 IMPORT_C void SetIndicatorValue(TUid aIndicatorId, TInt aValue, TInt aMaxValue); 00275 00279 void DrawPictographArea(); 00280 00285 CAknPictographInterface* PictographInterface() const; 00286 00287 00299 IMPORT_C void SetIncallBubbleAllowedInIdle(TBool aAllowed); 00300 00312 IMPORT_C void SetIncallBubbleAllowedInUsual(TBool aAllowed); 00313 00314 00321 IMPORT_C void SetIndicatorObserver(MAknIndicatorObserver* aIndicatorObserver, TUid aIndicatorUid); 00322 00323 #start_since SINCE_3_1_SDK 00324 00347 IMPORT_C TUid CreateIndicatorFromResourceL(TInt aIndicatorResourceId, TInt aCustomIndicatorFlags); 00348 #end_since SINCE_3_1_SDK 00349 00350 #start_since SINCE_3_1_SDK 00351 00365 IMPORT_C void ReplaceIndicatorIconL(TUid aIndicator, TInt aState, TInt aLayoutMode, CFbsBitmap* aIconBitmap, CFbsBitmap* aIconMask, TInt aIconIndex = 0); 00366 #end_since SINCE_3_1_SDK 00367 00368 private: 00369 00370 typedef CArrayPtrFlat<CAknIndicator> CAknIndicatorQueue; 00371 CAknIndicatorQueue* iIndicators; 00372 TLayoutOrientation iLayoutOrientation; 00373 TLayoutOrientation iPreviousLayoutOrientation; 00374 00375 TIndicatorAlignment iAlignment; 00376 00377 TInt iIndicatorsShown; 00378 TInt iAnimatedIndicatorsShown; 00379 CAknIndicatorContainerExtension* iExtension; 00380 TInt iIndicatorContext; 00381 00382 CPeriodic* iTicker; 00383 TBool iSpare2; // Reserved for future use. 00384 TInt iSynchronizingValue; 00385 00386 CIncallStatusBubble* iIncallBubble; 00387 }; 00388 00389 00390 // AKNINDICATORCONTAINER_H 00391 #endif 00392 00393 // End of File