Skip to Main Content
Volume 7A: XView Programming Manual
book

Volume 7A: XView Programming Manual

by Dan Heller
October 1994
Intermediate to advanced content levelIntermediate to advanced
770 pages
22h 58m
English
O'Reilly Media, Inc.
Content preview from Volume 7A: XView Programming Manual
25.11.6 The Wizzy Set Method
The code for the set method is as follows:
Pkg_private Xv_opaque
wizzy_set_avlist(item, avlist)
Panel_item item; /* this object */
Attr_avlist avlist; /* attribute list */
{
Wizzy_private *dp = WIZZY_PRIVATE(item);
Xv_opaque result;
Rect value_rect;
Attr_attribute *attrs;
/* Parse panel item generic attributes before parsing Wizzy
* specific attributes and prevent panel_redisplay_item() from
* being called in item_set_avlist()
*/
if (*avlist != XV_END_CREATE) {
xv_set( dp->panel, PANEL_NO_REDISPLAY_ITEM, TRUE, NULL);
result = xv_super_avlist( item, &xv_wizzy_panel_pkg, avlist);
xv_set( dp->panel, PANEL_NO_REDISPLAY_ITEM, FALSE, NULL);
if (result != XV_OK)
return (result);
}
for ( attrs = avlist; *avlist; attrs = attr_next(attrs)) {
switch ( (int)attrs[0 ] ) {
case WIZZY_OFFSET:
dp->offset = attrs[1];
break;
case WIZZY_FLAG:
dp->flag = attrs[1];
break;
case XV_END_CREATE:
value_rect = *(Rect *)xv_get(item, PANEL_ITEM_VALUE_RECT);
rect_construct(&dp->block,
value_rect.r_left + dp->offset,
value_rect.r_top,
BLOCK_WIDTH, BLOCK_HEIGHT);
value_rect = rect_bounding(&value_rect, &dp->block);
/* Note: setting the value rect will cause the item
* item rect to be recalculated as the enclosing rect
* containing both the label and value rects.
*/
xv_set( item, PANEL_ITEM_VALUE_RECT, &value_rect,
624 XView Programming Manual
NULL);
break;
default:
break;
}
}
return XV_OK; /* return XV_ERROR if something wen
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 6A: Motif Programming Manual

Volume 6A: Motif Programming Manual

David Brennan, Dan Heller, Paula Ferguson
Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Alejandro Terrazas, John Ostuni, Michael Barlow

Publisher Resources

ISBN: 9780937175873