IliDbGantt
The IliDbGantt Hierarchy and Example Gadget
The IliDbGantt
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);
...
}