陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Quintiq file version 2.0
#parent: CustomDrawRC/CustomDrawDataLayerMacroPlan
Response OnDrawObject (
  MacroPlan object
) id:Response_CustomDrawRC_CustomDrawDataLayerMacroPlan_OnDrawObject
{
  #keys: '[139394.0.1649356434]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebCustomDrawDataLayer_OnDrawObject'
  QuillAction
  {
    Body:
    [*
      // This customdraw is only for message 
      // when there is no routing define, providing 
      // instruction to drop a unit here and create routing
      rcv := object.RoutingConfiguratorView();
      
      surface.Font().Size( rcv.FontSize() );
      surface.Font().Name(  rcv.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::AlignCentered(), TextFormat::WrapWords() );
      surface.TextZoom( stepX , stepY, stepW, stepH, Translations::MP_Routing_DropFirstUnitHere(), textformat );
    *]
    GroupServerCalls: false
  }
}