Skip to Content
Volume 7A: XView Programming Manual
book

Volume 7A: XView Programming Manual

by Dan Heller
October 1994
Intermediate 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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Volume 6A: Motif Programming Manual

Volume 6A: Motif Programming Manual

David Brennan, Dan Heller, Paula Ferguson

Publisher Resources

ISBN: 9780937175873