IliDbGantt
The IliDbGantt Hierarchy and Example Gadget
The
IliDbGantt gadget lets you specify data sources for resources, activities, constraints, precedences, breaks and work load curve. It displays the information contained in these data sources in the form of a Gantt chart.
Customizing a DbGantt Gadget
A DbGantt gadget can be customized with callbacks (or corresponding virtual functions).
The getScaleNumericLabel member function lets you specify a callback that is called when the end user needs to compute a label for a numeric scale label.
Here is an example:
static void
MyComputeLabel(IlvGraphic* g,IlAny any) {
IliDbGantt* dbg = (IliDbGantt*)g;
IliString s;
s << dbg->getScaleNumericValue();
s << "$";
dbg->setScaleNumericLabel(s);
}
int main() {
IliDbGantt* dbg;
...
dbg->addCallback(IliDbGantt::ScaleNumericLabelSymbol,
MyComputeLabel,0);
...
}
The isActivePeriod member function lets you specify a callback that is called when the end user needs to determinate if a period is active or not. By default, a period is active. This is why this callback is used to indicate the periods which are not active.
Here is an example:
static void
MyComputePeriod(IlvGraphic* g,IlvAny any) {
IliDbGantt* dbg = (IliDbGantt*)g;
if (dbg->getActivePeriodInfo(IliScaleDateWeekDay) == IliDbGanttSunday)
dbg->setInactivePeriod();
}
int main() {
IliDbGantt* dbg;
...
dbg->addCallback(IliDbGantt::IsActivePeriodSymbol,
MyComputePeriod,0);
...
}
Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.