AknIndicatorContainer.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : AknIndicatorContainer.h
00004 *  Part of     : UI Framework Core / AVKON
00005 *  Description : A default control in the status pane's small indicator pane.
00006 *                Editor indicators uses also same control in the navigation
00007 *                pane and in queries.
00008 *  Version     : %version: be1s60pr#33.1.3.1.1 %
00009 *
00010 *  Copyright ?2002-2008 Nokia.  All rights reserved.
00011 *  This material, including documentation and any related computer
00012 *  programs, is protected by copyright controlled by Nokia.  All
00013 *  rights are reserved.  Copying, including reproducing, storing,
00014 *  adapting or translating, any or all of this material requires the
00015 *  prior written consent of Nokia.  This material also contains
00016 *  confidential information which may not be disclosed to others
00017 *  without the prior written consent of Nokia.
00018 * ============================================================================
00019 */
00020 
00021 #ifndef AKNINDICATORCONTAINER_H
00022 #define AKNINDICATORCONTAINER_H
00023 
00024 //  INCLUDES
00025 #include <akncontrol.h>
00026 #include <eikspane.h>
00027 
00028 class CIncallStatusBubble;
00029 class CAknIndicator;
00030 class CAknIndicatorContainerExtension;
00031 class CAknPictographInterface;
00032 class MAknIndicatorObserver;
00033 
00039 class CAknIndicatorContainer : public CAknControl, public MEikStatusPaneObserver
00040         {
00041 friend class CAknIndicatorContainerExtension;
00042 friend class CAknIndicatorDataObserver;
00043 public:
00044 
00050     enum TLayoutOrientation
00051         {
00052         EVertical,  
00053         EHorizontal 
00054         };
00055 
00057     enum TIndicatorAlignment
00058         {
00059         ELeft,   
00060         ERight   
00061         };
00062 
00068     enum TIndicatorContext
00069         {
00070         EUniversalIndicators = 0,   
00071         ENaviPaneEditorIndicators,  
00072         EQueryEditorIndicators,     
00073         EFindIndicators             
00074         };
00075 
00081     enum TIndicatorPosition
00082         {
00083         ELeftSide,  
00084         ERightSide, 
00085         EMiddle     
00086         };
00087 
00089     enum TCustomIndicatorFlags
00090         {
00091         EMultiColorIndicator       = 0x1, 
00092         EIndicatorPositionInverted = 0x2  
00093         };
00094 
00096     enum TLayoutMode
00097                 {
00098                 ELayoutModeUsual, 
00099                 ELayoutModeWide   
00100                 };
00101 
00102 public:
00103 
00108     IMPORT_C CAknIndicatorContainer();
00109 
00116     IMPORT_C CAknIndicatorContainer( TInt aIndicatorContext );
00117 
00121     IMPORT_C ~CAknIndicatorContainer();
00122 
00126     IMPORT_C void ConstructL();
00127 
00143     IMPORT_C void SetIndicatorState( TUid aIndicatorId,
00144                                      TInt aState,
00145                                      TBool aDrawNow = ETrue );
00146 
00153     IMPORT_C TInt IndicatorState( TUid aIndicatorId );
00154 
00162     IMPORT_C void SetIndicatorValueL( TUid aIndicatorId, const TDesC& aString );
00163 
00170     IMPORT_C void SetIncallBubbleFlags( const TInt& aFlags );
00171 
00177     IMPORT_C void ConstructFromResourceL( TResourceReader& aReader );
00178 
00184     IMPORT_C TInt IndicatorContext() const;
00185 
00186 
00187 public: // From base class @c MEikStatusPaneObserver.
00188 
00195     IMPORT_C void HandleStatusPaneSizeChange();
00196 
00197 public: // From base class @c CCoeControl.
00198 
00204     IMPORT_C void HandlePointerEventL( const TPointerEvent& aPointerEvent );
00205 
00206 protected: // From base class @c CCoeControl.
00207 
00215         IMPORT_C virtual void HandleResourceChange( TInt aType );
00216 
00220     IMPORT_C virtual void SizeChanged();
00221 
00225     IMPORT_C virtual void PositionChanged();
00226 
00232     IMPORT_C virtual TInt CountComponentControls() const;
00233 
00240     IMPORT_C virtual CCoeControl* ComponentControl( TInt aIndex ) const;
00241 
00242 private: // From base class @c CCoeControl.
00243 
00244     IMPORT_C virtual void Draw(const TRect& aRect) const;
00245 
00246 private: // From base class @c CAknControl.
00247 
00248     IMPORT_C void* ExtensionInterface( TUid aInterface );
00249 
00250 private:
00251 
00252     virtual void Reserved_1();
00253     void PrioritizeIndicatorsL();
00254 
00255         static TInt TickerCallback( TAny* aThis );
00256     TInt DoTick();
00257 
00258     void IncallBubbleSizeChanged( TBool aAllowIdleStateBubble );
00259 
00260     void SizeChangedInSmallStatusPane();
00261 
00262     void SizeChangedInNormalStatusPane();
00263 
00264     void SizeChangedInStaconPane();
00265 
00266     void SizeChangedInFlatStatusPane();
00267 
00268     void SizeChangedInExtendedStatusPane();
00269 
00270     void SizeChangedInIdleExtendedStatusPane();
00271 
00272         void SizeChangedInIdleVertical();
00273 
00274     void SetContainerWindowNonFading( TBool aNonFading );
00275 
00276     void SetupIndicatorLayoutModes();
00277 
00278     TInt SelectIndicatorLayoutMode();
00279 
00280         void CreateIndicatorFromPaneResourceL( TUid aUid,
00281                                                TInt aIndicatorPaneResourceId,
00282                                                TInt aCustomIndicatorFlags );
00283 
00284         TBool IndicatorExists( TUid aUid ) const;
00285 
00286         void CreateIncallBubbleL();
00287 
00288         TBool UpdateSmallLayoutL();
00289 
00290         void SetIncallBubbleDisabled( TBool aDisabled );
00291 
00292         void ResetAnimTicker( TBool bForeground );
00293 
00294 public:
00295 
00307     IMPORT_C void SetIndicatorValue( TUid aIndicatorId,
00308                                      TInt aValue,
00309                                      TInt aMaxValue );
00310 
00314     void DrawPictographArea();
00315 
00320     CAknPictographInterface* PictographInterface() const;
00321 
00322 
00335     IMPORT_C void SetIncallBubbleAllowedInIdle( TBool aAllowed );
00336 
00347     IMPORT_C void SetIncallBubbleAllowedInUsual( TBool aAllowed );
00348 
00349 
00356     IMPORT_C void SetIndicatorObserver( MAknIndicatorObserver* aIndicatorObserver,
00357                                         TUid aIndicatorUid );
00358 
00388         IMPORT_C TUid CreateIndicatorFromResourceL( TInt aIndicatorResourceId,
00389                                                     TInt aCustomIndicatorFlags );
00390 
00391 
00411         IMPORT_C void ReplaceIndicatorIconL( TUid aIndicator,
00412                                              TInt aState,
00413                                              TInt aLayoutMode,
00414                                              CFbsBitmap* aIconBitmap,
00415                                              CFbsBitmap* aIconMask,
00416                                              TInt aIconIndex = 0 );
00417 
00418 private:
00419 
00421         typedef CArrayPtrFlat<CAknIndicator> CAknIndicatorQueue;
00422     CAknIndicatorQueue* iIndicators;
00423 
00425     TLayoutOrientation iLayoutOrientation;
00426     TLayoutOrientation iPreviousLayoutOrientation;
00427 
00429     TIndicatorAlignment iAlignment;
00430 
00432     TInt iIndicatorsShown;
00433 
00435     TInt iAnimatedIndicatorsShown;
00436 
00438     CAknIndicatorContainerExtension* iExtension;
00439 
00441     TInt iIndicatorContext;
00442 
00444         CPeriodic* iTicker;
00445 
00447     TBool iSpare2;
00448 
00450     TInt iSynchronizingValue;
00451 
00453     CIncallStatusBubble* iIncallBubble;
00454     };
00455 
00456 #endif // AKNINDICATORCONTAINER_H
00457 
00458 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top