idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp
branchRCL_3
changeset 17 b8fae6b8a148
parent 12 9674c1a575e9
child 18 d05a55b217df
equal deleted inserted replaced
12:9674c1a575e9 17:b8fae6b8a148
  7123                 CXnNodeAppIf& tooltipNode( node->AppIfL() );
  7123                 CXnNodeAppIf& tooltipNode( node->AppIfL() );
  7124                 CXnPopup* popup( NULL );
  7124                 CXnPopup* popup( NULL );
  7125 
  7125 
  7126                 XnComponentInterface::MakeInterfaceL( popup, tooltipNode );
  7126                 XnComponentInterface::MakeInterfaceL( popup, tooltipNode );
  7127 
  7127 
  7128                 if ( popup )
  7128                 if ( popup && aSource != XnEventSource::EStylus )
  7129                     {
  7129                     {
  7130                     if ( aSource == XnEventSource::EStylus )
  7130                     popup->ShowPopupL( aRect );
  7131                         {
       
  7132                         const TTimeIntervalMicroSeconds32 delay( 1000 * 100 );                       
       
  7133                         const TTimeIntervalMicroSeconds32 display( 1000 * 1000 * 6 );                                                
       
  7134                         
       
  7135                         popup->ShowPopupL( aRect, delay, display );
       
  7136                         }
       
  7137                     else
       
  7138                         {
       
  7139                         popup->ShowPopupL( aRect );
       
  7140                         }
       
  7141                     }
  7131                     }
  7142                 }
  7132                 }
  7143             }
  7133             }
  7144         }
  7134         }
  7145     }
  7135     }
  9078             target = i;
  9068             target = i;
  9079             }
  9069             }
  9080         }
  9070         }
  9081     if ( source != -1 && target != -1 )
  9071     if ( source != -1 && target != -1 )
  9082         {
  9072         {
       
  9073         TBool swap = EFalse;
       
  9074         CXnPluginData* data( aTarget->UiEngine()->ViewManager()->
       
  9075                 ActiveViewData().Plugin( aTarget ) );
       
  9076         if ( data && !data->Occupied() )
       
  9077             {
       
  9078             // target is empty widget, swap widget places
       
  9079             swap = ETrue;
       
  9080             }
       
  9081         
  9083         if ( target < source )
  9082         if ( target < source )
  9084             {
  9083             {
  9085             iChildren.InsertL( aSource, target );
  9084             iChildren.InsertL( aSource, target );
  9086             iChildren.Remove( source + 1 );
  9085             iChildren.Remove( source + 1 );
       
  9086             if ( swap )
       
  9087                 {
       
  9088                 iChildren.Remove( target + 1 );
       
  9089                 iChildren.InsertL( aTarget, source );
       
  9090                 }
  9087             }
  9091             }
  9088         else if ( source < target )
  9092         else if ( source < target )
  9089             {
  9093             {
  9090             iChildren.Remove( source );
  9094             iChildren.Remove( source );
  9091             iChildren.InsertL( aSource, target );
  9095             iChildren.InsertL( aSource, target );
       
  9096             if ( swap )
       
  9097                 {
       
  9098                 iChildren.Insert( aTarget, source );
       
  9099                 iChildren.Remove( target );
       
  9100                 }
  9092             }
  9101             }
  9093 
  9102 
  9094         // put the locked nodes to the original places
  9103         // put the locked nodes to the original places
  9095         TInt lockedNodeCount = lockedNodes.Count();
  9104         TInt lockedNodeCount = lockedNodes.Count();
  9096         TInt lockedIndexCount = lockedNodeIndex.Count();
  9105         TInt lockedIndexCount = lockedNodeIndex.Count();