Quintiq file version 2.0 
 | 
#parent: CustomDrawComponentRoutingConfigurator/CustomDrawDataLayerRoutingConfiguratorBackground 
 | 
Response OnDrawObject ( 
 | 
  Routing object 
 | 
) id:Response_CustomDrawComponentRoutingConfigurator_CustomDrawDataLayerRoutingConfiguratorBackground_OnDrawObject 
 | 
{ 
 | 
  #keys: '[113694.1.1940375548]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Draw background image 
 | 
     
 | 
    surface.Pen().Color( ColorScheme.Grid() ); 
 | 
     
 | 
    width := DataHolderRCView.Data().GridWidth(); 
 | 
    height := DataHolderRCView.Data().GridHeight(); 
 | 
    grid := DataHolderRCView.Data().GridPointDistance(); 
 | 
     
 | 
    for ( x := 0; x < width; x := x + grid ) 
 | 
    { 
 | 
      surface.Line( x, 0, x, height ); 
 | 
    } 
 | 
     
 | 
    for ( y := 0; y < height; y := y + grid ) 
 | 
    { 
 | 
      surface.Line( 0, y, width, y ); 
 | 
    } 
 | 
     
 | 
     
 | 
    //draw operation drop here! 
 | 
    if( not object.HasStep() ) 
 | 
    { 
 | 
      rcv := DataHolderRCView.Data(); 
 | 
      surface.Font().Size( rcv.FontSize() ); 
 | 
      surface.Font().Name(  DataHolderRCView.Data().FontName() ); 
 | 
      surface.TextColor( ColorScheme.RoutingConfigurator_DropHereHelp() ); 
 | 
     
 | 
      surface.Pen().Style( PenSpecification::StyleDashed() ); 
 | 
      surface.Pen().Color( ColorScheme.RoutingConfigurator_DropHereHelp() ); 
 | 
      surface.Pen().Width( rcv.EdgeThickness() ) 
 | 
     
 | 
      // xy positions of the step 
 | 
      stepX := rcv.OffsetX() 
 | 
             + rcv.PISPWidth() + rcv.GridPointDistance() * 2; 
 | 
     
 | 
      stepY := rcv.OffsetY(); 
 | 
     
 | 
      stepW := maxvalue( rcv.OperationWidth(), rcv.RoutingStepMinimumWidth() ); 
 | 
     
 | 
      value := ( 2 * rcv.OperationInputOutputHeight() ) 
 | 
               + rcv.OperationHeight() 
 | 
               + 2 * rcv.OperationOffsetY(); 
 | 
     
 | 
      stepH := maxvalue( value, rcv.RoutingStepMinimumHeight() ); 
 | 
     
 | 
      rect := Shape::Rect( stepX , stepY, stepW, stepH ); 
 | 
      surface.Draw( rect ); 
 | 
     
 | 
      textformat := TextFormat::Construct( TextFormat::AlignCenter(), TextFormat::AlignMiddle() ); 
 | 
      surface.Text( stepX , stepY, stepW, stepH, Translations::MP_Routing_DropHereUnit(), textformat ); 
 | 
    } 
 | 
  *] 
 | 
  DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrawObject' 
 | 
  Precondition: 
 | 
  [* 
 | 
    return guard( DataHolderRCView.Data().IsGridVisible(), false ) 
 | 
           and DataHolderRCView.Data().GridPointDistance() > 0; //prevent infinite loop 
 | 
  *] 
 | 
} 
 |