uifw/AvKon/src/AknIndicatorContainer.cpp
branchRCL_3
changeset 16 71dd06cfe933
parent 10 9f56a4e1b8ab
child 18 0aa5fbdfbc30
equal deleted inserted replaced
15:08e69e956a8c 16:71dd06cfe933
   833     AknsUtils::RegisterControlPosition( this );
   833     AknsUtils::RegisterControlPosition( this );
   834     }
   834     }
   835 
   835 
   836 EXPORT_C TInt CAknIndicatorContainer::CountComponentControls() const
   836 EXPORT_C TInt CAknIndicatorContainer::CountComponentControls() const
   837     {
   837     {
   838     TInt n = CountShownIndicator();
   838     return  iIndicators->Count();
   839     //__ASSERT_DEBUG ( n == iIndicatorsShown, User::Panic(_L( "indicatorshow"),n ) );
       
   840     return n;
       
   841     }
   839     }
   842 
   840 
   843 TInt CAknIndicatorContainer::CountShownIndicator() const
   841 TInt CAknIndicatorContainer::CountShownIndicator() const
   844     {
   842     {
   845     TInt count = iIndicators->Count();
   843     TInt count = iIndicators->Count();
   855     }
   853     }
   856 
   854 
   857 
   855 
   858 EXPORT_C CCoeControl* CAknIndicatorContainer::ComponentControl(TInt aIndex) const
   856 EXPORT_C CCoeControl* CAknIndicatorContainer::ComponentControl(TInt aIndex) const
   859     {
   857     {
   860     TInt count = iIndicators->Count();
   858     return iIndicators->At(aIndex);
   861 
       
   862     TInt ii = 0;
       
   863     for (ii = 0; (ii < count) && (aIndex >= 0); ii++)
       
   864         {
       
   865         if ( iIndicators->At(ii)->IndicatorState() && (iIndicators->At(ii)->Priority() != KIndicatorNotShown))
       
   866             {
       
   867             aIndex--;
       
   868             }
       
   869         }
       
   870 
       
   871     if ( ii > 0 )
       
   872         {
       
   873         return iIndicators->At(--ii);
       
   874         }
       
   875     else
       
   876         {
       
   877         return NULL;
       
   878         }
       
   879     }
   859     }
   880 
   860 
   881 
   861 
   882 EXPORT_C void CAknIndicatorContainer::Draw( const TRect& aRect ) const
   862 EXPORT_C void CAknIndicatorContainer::Draw( const TRect& aRect ) const
   883     {
   863     {
   884     if ( iExtension->iStatusPane && 
   864     if ( iExtension->iStatusPane && 
   885          iExtension->iStatusPane->IsTransparent() )
   865          iExtension->iStatusPane->IsTransparent() &&
       
   866          ( iIndicatorContext != EQueryEditorIndicators ) )
   886         {
   867         {
   887         CWindowGc& gc = SystemGc();
   868         CWindowGc& gc = SystemGc();
   888         TRgb rgb(TRgb::Color16MA(0));
   869         TRgb rgb(TRgb::Color16MA(0));
   889         gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
   870         gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
   890         gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
   871         gc.SetBrushStyle(CGraphicsContext::ESolidBrush);