admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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
50
51
52
Quintiq file version 2.0
#parent: CustomDrawComponentRoutingConfigurator/CustomDrawDataLayerOperationInput
Response OnDrawObject (
  OperationInput object
) id:Response_CustomDrawComponentRoutingConfigurator_CustomDrawDataLayerOperationInput_OnDrawObject
{
  #keys: '[110994.0.1918845886]'
  Body:
  [*
    // Draw operation input
    
    //Initialize borders
    surface.Pen().Style( PenSpecification::StyleSolid() );
    surface.Pen().Width( 1 )
    surface.Pen().Color( ColorScheme.Outline() );
    
    colorstart := ColorScheme.RoutingConfigurator_OperationInputOutput1();
    colorend := ColorScheme.RoutingConfigurator_OperationInputOutput2();
    
    // Set color to black if operation is being disabled
    if( not object.Operation().IsEnabled() )
    {
      colorstart := ColorScheme.RoutingConfiguratorDisabled();
      colorend := ColorScheme.RoutingConfiguratorDisabled();
    }
    else if( object.IsFloating() )
    {
      colorstart := ColorScheme.RoutingConfigurator_FloatingProduct();
      colorend := ColorScheme.RoutingConfigurator_FloatingProduct();
    }
    
    surface.Brush().LinearGradient( region, colorstart, colorend, 0.0 )
    surface.Fill( region );
    surface.Rect( region.Left(), region.Top(), region.Width(), region.Height(), Color::Black() );
    
    //Initialize text
    rcv := DataHolderRCView.Data();
    surface.Font().Name( rcv.FontName() );
    surface.Font().Size( rcv.FontSize() );
    surface.TextColor( Color::Black() );
    
    textformat := TextFormat::Construct( TextFormat::AlignCenter(), TextFormat::AlignMiddle() );
    surface.Text( region, text, textformat );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrawObject'
  Precondition:
  [*
    return not isnull( DataHolderRCView.Data() )
           and not object.IsElementOfInputGroup();
  *]
}