next up previous contents index
Next: Graphic Up: Implementation of the Previous: Help Window

Confirmer

 

The file ui_confirmer.c consists mainly of the functions listed in [SUN86], p. 348 ff (prefix ui_cf_) for the construction of a confirmer package adapted to X windows. This package was enhanced only for the functions ui_confirmOk() and ui_confirmYes() to highlight the calls to the confirmer in the source code. Additionally an icon ( STOP or exclamation mark) is displayed in the confirmer.

  The intrinsics of X don't allow an interuption of XtAppMainLoop(). Therefore, a temporary event dispatch loop has to be programmed (see below). This loop is exited when a button in the confirmer is pressed, whose callback routine changes the variable ui_cf_exit to TRUE. Since XtGrabExklusive is set and the XGUI toplevel widget ui_toplevel is the parent of the confirmer, it blocks all events for SNNS-XGUI until it is destroyed.

ui_cf_exit = FALSE;
while (NOT ui_cf_exit) {
    XtAppNextEvent(ui_appContext, &event);
    (void) XtDispatchEvent(&event);
}


Niels Mache
Wed May 17 11:23:58 MET DST 1995