This sets up the visual appearance of a document window. It generates the tool palette and other widgets in the main window, and then it combines them using Expander, Matte, VBox, and Scroller into a composite VObject, which it returns as the content.
VObject *IconDocument::DoMakeContent()
{
Box *tools= new OneOfCluster(cTOOLS+IconEditRange(), eVObjHLeft, gPoint0,
new VObjectButton(0, new ImageItem(new Bitmap(select))),
new VObjectButton(8, new ImageItem(new Bitmap(pipette))),
new VObjectButton(1, new ImageItem(new Bitmap(bits))),
[ ... other tools ... ]
);
[ ... create other widgets ... ]
return
new Expander(cIdNone, eHor, gPoint0,
new Matte(Point(4,0),
new VBox(10, (VObjAlign)(eVObjHLeft|eVObjHEqual|eVObjVTop|eVObjVExpand),
tools,
new Scroller(small, gInkNone, Point(100)),
new Scroller(colorview, gInkNone, Point(-1, 100)),
0
)
),
new Scroller(fat, Point(400, 500)),
0
);
}