module widgets {
interface canvas : hush::widget {
widgets::canvas create( in hush::widget anc, in string path );
hush::item circle( in long x, in long y, in long radius, in string options );
// other items ...
};
interface message : hush::widget {
message create( in hush::widget anc, in string path );
void text(in string txt);
};
interface factory : hush::factory {
widgets::canvas canvas(in string name, in string options);
widgets::message message(in string name, in string options);
};
interface dot : hush::dot {
widgets::canvas canvas(in string name);
widgets::message message(in string name);
widgets::factory widgets(in string name);
};
};
slide: module widgets
Note that each widget type has a method create,
with which an actual widget of that type can be created.
In effect this means that each widget object may act as a factory
for widget objects of that type.
(The server may however refuse to create such objects!)
In addition to the specific gadget interfaces, the widgets module
provides a factory and dot interface,
extending the respective hush interfaces.
[]
introduction,
legacy,
interfaces,
examples,
conclusions,
references,
appendix