Defining a Graphic Model for Links
To represent links, the user can also define a graphic model. To set the link graphic model, use the following method as indicated, after having defined the model:
gantt->setLinkGraphicModel(CreateDoubleLinkGraphicModel(display));
In the month example, a new class (DoubleLink class) is defined for a specific kind of link and this new class is used as the Gantt link model.
This model is the result of the local function CreateDoubleLinkGraphicModel:
// --------------------------------------------------------------------------
IlvGraphic*
CreateDoubleLinkGraphicModel(IlvDisplay* display)
{
IlvColor* red = display->getColor("red");
IlvColor* black = display->getColor("black");
IlvPalette* palette = display->getPalette(black, red);
palette->lock();
IlvGraphic* model = new DoubleLink(display, IlTrue, 0,0, palette);
palette->unLock();
return model;
}
Version 5.6
Copyright © 2012, Rogue Wave Software, Inc. All Rights Reserved.