Quintiq file version 2.0
|
#parent: CustomDrawComponentRoutingConfigurator/CustomDrawDataLayerOperationInputEdgeRCVHidden
|
Response OnDrawObject (
|
PISPOperationInputEdge object
|
) id:Response_CustomDrawComponentRoutingConfigurator_CustomDrawDataLayerOperationInputEdgeRCVHidden_OnDrawObject
|
{
|
#keys: '[124808.0.1288719471]'
|
Body:
|
[*
|
// Draw PISP Operation Input Edge
|
|
rcv := DataHolderRCView.Data();
|
|
// Adjust line based on its orientations
|
topdown := object.FromY() < object.ToY();
|
leftright := object.FromX() < object.ToX();
|
padding := 6;
|
|
fromy := region.Top() + padding;
|
toy := region.Height() - padding;
|
|
if( topdown )
|
{
|
if( not leftright )
|
{
|
fromy := region.Top() + padding;
|
toy := region.Height() - padding;
|
}
|
}
|
else
|
{
|
if( leftright )
|
{
|
fromy := region.Height() - padding;
|
toy := region.Top() + padding;
|
}
|
}
|
|
// Highlight operation input outputs related to this edge
|
operationinputs := selectset( DataHolderHighlightOperationInputOutputNode.Data(),
|
Elements.astype( OperationInput ),
|
e,
|
true,
|
true );
|
|
surface.Brush().Reset(); // strange. without this line, the arrow head will not be filled.
|
surface.Brush().Color( Color::LightGray() ); // to paint the solid arrowhead
|
surface.Pen().Color( Color::Color( 255, 255, 255, 0.3 ) );
|
|
highlight := object.IsLinkOf( DataHolderHighlightPISPNodeInRouting.Data() )
|
or object.IsLinkOf( operationinputs );
|
|
if( highlight )
|
{
|
surface.Brush().Reset(); // strange. without this line, the arrow head will not be filled.
|
surface.Pen().Color( Color::DarkGreen() );
|
surface.Brush().Color( Color::DarkGreen() ); // to paint the solid arrowhead
|
}
|
|
surface.Pen().Style( PenSpecification::StyleSolid() );
|
surface.Pen().Width( rcv.EdgeThickness() );
|
|
// Draw the directional line
|
line := GraphicalLine::LineTo( region.Left(), fromy, region.Width(), toy );
|
line.ArrowToEnd( true ).ArrowPos( GraphicalLine::ArrowPosMiddle() );
|
surface.Draw( line );
|
*]
|
CanBindMultiple: false
|
DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrawObject'
|
Precondition:
|
[*
|
return not isnull( DataHolderRCView.Data() );
|
*]
|
}
|