uifw/AvKon/src/akntabgrp.cpp
changeset 14 3320e4e6e8bb
parent 0 2f259fa3e83a
equal deleted inserted replaced
0:2f259fa3e83a 14:3320e4e6e8bb
  1257     }
  1257     }
  1258 
  1258 
  1259 void CAknTab::SetTotalAmountOfTabs( TInt aAmount )
  1259 void CAknTab::SetTotalAmountOfTabs( TInt aAmount )
  1260     {
  1260     {
  1261     iExtension->iNumberOfTabsInTabGroup = aAmount;
  1261     iExtension->iNumberOfTabsInTabGroup = aAmount;
  1262     
  1262     LoadColorBitmapL();
  1263     if ( !iColorBitmaps )
       
  1264     	{
       
  1265       LoadColorBitmapL();
       
  1266       }
       
  1267     }
  1263     }
  1268 
  1264 
  1269 void CAknTab::SetNarrowTabLayout( TBool aNarrow )
  1265 void CAknTab::SetNarrowTabLayout( TBool aNarrow )
  1270     {
  1266     {
  1271     iExtension->iNarrowTabLayout = aNarrow;
  1267     iExtension->iNarrowTabLayout = aNarrow;
  2879                 TBool isActiveTab = iTabArray->At( ConvertTabIndex( ConvertTabIndex( newTab ) ) )->Active();
  2875                 TBool isActiveTab = iTabArray->At( ConvertTabIndex( ConvertTabIndex( newTab ) ) )->Active();
  2880                 TTouchFeedbackType type = static_cast<TTouchFeedbackType>(ETouchFeedbackAudio | ETouchFeedbackVibra);
  2876                 TTouchFeedbackType type = static_cast<TTouchFeedbackType>(ETouchFeedbackAudio | ETouchFeedbackVibra);
  2881                 if ( feedback && !isActiveTab )
  2877                 if ( feedback && !isActiveTab )
  2882                     {
  2878                     {
  2883                     feedback->InstantFeedback( this,
  2879                     feedback->InstantFeedback( this,
  2884                         ETouchFeedbackTab, 
  2880                         ETouchFeedbackBasic, 
  2885                         type,
  2881                         type,
  2886                         aPointerEvent );
  2882                         aPointerEvent );
  2887                     }
  2883                     }
  2888                 }
  2884                 }
  2889             if ( !tabBackgroundUsed )
  2885             if ( !tabBackgroundUsed )
  2906                 // Use two convertTabIndex to cancel the mirror effects, because the newTab is always the phsical index.
  2902                 // Use two convertTabIndex to cancel the mirror effects, because the newTab is always the phsical index.
  2907                 TBool isActiveTab = iTabArray->At( ConvertTabIndex( ConvertTabIndex( newTab ) ) )->Active();
  2903                 TBool isActiveTab = iTabArray->At( ConvertTabIndex( ConvertTabIndex( newTab ) ) )->Active();
  2908                 if ( feedback && !isActiveTab )
  2904                 if ( feedback && !isActiveTab )
  2909                     {
  2905                     {
  2910                     feedback->InstantFeedback( this,
  2906                     feedback->InstantFeedback( this,
  2911                         ETouchFeedbackTab, 
  2907                         ETouchFeedbackBasic, 
  2912                         ETouchFeedbackVibra,
  2908                         ETouchFeedbackVibra,
  2913                         aPointerEvent );
  2909                         aPointerEvent );
  2914                     }
  2910                     }
  2915                 }
  2911                 }
  2916             if ( !tabBackgroundUsed )
  2912             if ( !tabBackgroundUsed )
  2919                 // pointer position.
  2915                 // pointer position.
  2920                 newTab = -1;
  2916                 newTab = -1;
  2921                 }
  2917                 }
  2922 
  2918 
  2923             // if the button up event occurs ouside tabgroup, ignore it.
  2919             // if the button up event occurs ouside tabgroup, ignore it.
  2924             if ( !Rect().Contains( aPointerEvent.iPosition ) || iExtension->iPointerDownTab != newTab )
  2920             if ( !Rect().Contains( aPointerEvent.iPosition ) )
  2925                 {
  2921                 {
  2926                 iExtension->iPointerDownTab       = -1;
  2922                 iExtension->iPointerDownTab       = -1;
  2927                 iExtension->iPointerDownXPosition = -1;
  2923                 iExtension->iPointerDownXPosition = -1;
  2928                 return ;
  2924                 return ;
  2929                 }
  2925                 }