chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
Quintiq file version 2.0
#parent: CustomDrawComponentRoutingConfigurator/CustomDrawDataLayerOperationInputGroup
Response OnDrawObject (
  OperationInputGroup object
) id:Response_CustomDrawComponentRoutingConfigurator_CustomDrawDataLayerOperationInputGroup_OnDrawObject
{
  #keys: '[124808.0.1235006012]'
  Body:
  [*
    // Draw operation input group
    
    //Initialize borders
    surface.Pen().Style( PenSpecification::StyleSolid() );
    surface.Pen().Width( 1 )
    surface.Pen().Color( ColorScheme.Outline() );
    
    colorstart := ColorScheme.RoutingConfigurator_OperationInputGroup1()
    colorend := ColorScheme.RoutingConfigurator_OperationInputGroup2();
    
    // Set color to black if operation is being disabled
    if( not object.Operation().IsEnabled() )
    {
      colorstart := ColorScheme.RoutingConfiguratorDisabled();
      colorend := ColorScheme.RoutingConfiguratorDisabled();
    }
    
    surface.Brush().LinearGradient( region, colorstart, colorend, 0.0 )
    surface.Fill( region );
    surface.Draw( region );
    
    //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.Left(), region.Top(), region.Width(), region.Height(), text, textformat );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrawObject'
  Precondition:
  [*
    return not isnull( DataHolderRCView.Data() );
  *]
}