Quintiq file version 2.0
|
#parent: CustomDrawComponent/CustomDrawDataLayerNode
|
Response OnDrawObject (
|
Node object
|
) id:Response_CustomDrawComponent_CustomDrawDataLayerNode_OnDrawObject
|
{
|
#keys: '[11660.0.305008485]'
|
Body:
|
[*
|
// Draw node
|
img := object.IconName();
|
|
if( img = '' )
|
{
|
if( object.istype( UnitNode ) )
|
{
|
img := GlobalParameters_MP::GetDefaultUnitIcon();
|
}
|
else if( object.istype( StockingPointNode ) )
|
{
|
img := GlobalParameters_MP::GetDefaultStockingPointIcon();
|
}
|
else if( object.istype( ProductNode ) )
|
{
|
img := GlobalParameters_MP::GetDefaultProductIcon();
|
}
|
|
}
|
|
minsize := minvalue ( object.Height(), object.Width() );
|
surface.Image( region.Left(), region.Top(), minsize, minsize, img + '(32)' );
|
|
/*
|
If we are dragging an object which are not initially highlighted and some objects are already
|
highlighted. We will flush all objects in DataHolderHighlight, then highlight the selected
|
object and add it to DataHolderHighlight.
|
*/
|
if( exists( DataHolderHighlight.Data(), Elements, u,u = object ) )
|
{
|
surface.Pen().Color( ColorScheme.Outline() );
|
surface.Pen().Style( PenSpecification::StyleSolid() );
|
surface.Pen().Width( 1 );
|
surface.Draw( region );
|
}
|
*]
|
DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrawObject'
|
Precondition:
|
[*
|
return not isnull( DataHolderView.Data() );
|
*]
|
}
|