- First define the data types needed.
Widget contour, contour_zoom;
Object *obj_list;
int object_count;
int x, y, width, height;
- Next, create a zoom of the contour widget.
contour_zoom = (Widget) XintContourZoom(contour, parent, cb, 2.5, 2.5);
x = cb->x_start;
y = cb->y_start;
width = cb->x_end - x;
height = cb->y_end - y;
/*Where cb is a pointer to an XintGridAreaSelectionCallbackStruct
structure which defines the area to be zoomed. */
- Now retrieve a list of the objects that intersect with the given rectangle.
obj_list = XintEditObjectGetIntersectList(contour, x, y, width, height,
&object_count);
- Then create a ViewPort object for each object in the list. Afterward the
list can be freed.
for (i=0; i<object_count; i++)
XtVaCreateWidget("vp", (WidgetClass) xintViewPortObjectClass,
contour_zoom, XmNobject, obj_list[i], NULL);
XtFree((char *) obj_list);