menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp
changeset 2 08c6ee43b396
parent 1 5315654608de
child 4 4d54b72983ae
equal deleted inserted replaced
1:5315654608de 2:08c6ee43b396
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:
    14 * Description:
    15 *  Version     : %version: MM_71.1.17.1.44 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: MM_71.1.17.1.47 % << Don't touch! Updated by Synergy at check-out.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #include <e32keys.h>
    20 #include <e32keys.h>
   132 
   132 
   133 // -----------------------------------------------------------------------------
   133 // -----------------------------------------------------------------------------
   134 //
   134 //
   135 // -----------------------------------------------------------------------------
   135 // -----------------------------------------------------------------------------
   136 //
   136 //
       
   137 EXPORT_C void CMmWidgetContainer::EnableLongTapAnimation( TBool aEnable )
       
   138     {
       
   139     if ( iLongTapDetector )
       
   140         {
       
   141         iLongTapDetector->EnableLongTapAnimation( aEnable );
       
   142         }
       
   143     }
       
   144 
       
   145 // -----------------------------------------------------------------------------
       
   146 //
       
   147 // -----------------------------------------------------------------------------
       
   148 //
   137 void CMmWidgetContainer::SizeChanged()
   149 void CMmWidgetContainer::SizeChanged()
   138     {
   150     {
   139     if ( iWidget && iWidgetRect != Rect() )
   151     if ( iWidget && iWidgetRect != Rect() )
   140         {
   152         {
   141     	CMmTemplateLibrary * templateLibrary =
   153     	CMmTemplateLibrary * templateLibrary =
   220     {
   232     {
   221     if ( aType == KEikDynamicLayoutVariantSwitch ||
   233     if ( aType == KEikDynamicLayoutVariantSwitch ||
   222             aType == KAknsMessageSkinChange )
   234             aType == KAknsMessageSkinChange )
   223         {
   235         {
   224         static_cast<CMmListBoxItemDrawer*>( iDrawer )->InvalidateCache();
   236         static_cast<CMmListBoxItemDrawer*>( iDrawer )->InvalidateCache();
       
   237         CMmTemplateLibrary * templateLibrary =
       
   238         static_cast<CMmListBoxItemDrawer*>( iDrawer )->TemplateLibrary();
       
   239         templateLibrary->CleanAndClearCache();
   225         }
   240         }
   226 
   241 
   227     CCoeControl::HandleResourceChange( aType );
   242     CCoeControl::HandleResourceChange( aType );
       
   243 
       
   244 	if ( aType == KEikDynamicLayoutVariantSwitch && !IsHighlightVisible() )
       
   245 		{
       
   246 		SetDefaultHighlightL( EFalse );
       
   247 		}
   228     }
   248     }
   229 
   249 
   230 // -----------------------------------------------------------------------------
   250 // -----------------------------------------------------------------------------
   231 //
   251 //
   232 // -----------------------------------------------------------------------------
   252 // -----------------------------------------------------------------------------
   634 		HandlePointerEventsInEditModeL(aPointerEvent, abortAnimation);
   654 		HandlePointerEventsInEditModeL(aPointerEvent, abortAnimation);
   635     	}
   655     	}
   636 
   656 
   637     if ( iLongTapDetector )
   657     if ( iLongTapDetector )
   638     	{
   658     	{
       
   659     	if ( !itemExists )
       
   660     	    {
       
   661     	    iLongTapDetector->EnableLongTapAnimation( EFalse );
       
   662     	    }
   639     	TPointerEvent longTapPointerEvent = aPointerEvent;
   663     	TPointerEvent longTapPointerEvent = aPointerEvent;
   640         if ( aPointerEvent.iType == TPointerEvent::EButtonRepeat )
   664         if ( aPointerEvent.iType == TPointerEvent::EButtonRepeat )
   641         	{
   665         	{
   642         	longTapPointerEvent.iType = TPointerEvent::EDrag;
   666         	longTapPointerEvent.iType = TPointerEvent::EDrag;
   643         	}
   667         	}