Lines Matching refs:dialog

27    CDKDIALOG *dialog    = 0;  in newCDKDialog()  local
40 || (dialog = newCDKObject (CDKDIALOG, &my_funcs)) == 0 in newCDKDialog()
41 || (dialog->info = typeCallocN (chtype *, rows + 1)) == 0 in newCDKDialog()
42 || (dialog->infoLen = typeCallocN (int, rows + 1)) == 0 in newCDKDialog()
43 || (dialog->infoPos = typeCallocN (int, rows + 1)) == 0 in newCDKDialog()
44 || (dialog->buttonLabel = typeCallocN (chtype *, buttonCount + 1)) == 0 in newCDKDialog()
45 || (dialog->buttonLen = typeCallocN (int, buttonCount + 1)) == 0 in newCDKDialog()
46 || (dialog->buttonPos = typeCallocN (int, buttonCount + 1)) == 0) in newCDKDialog()
48 destroyCDKObject (dialog); in newCDKDialog()
52 setCDKDialogBox (dialog, Box); in newCDKDialog()
53 boxHeight = rows + 2 * BorderOf (dialog) + separator + 1; in newCDKDialog()
58 dialog->info[x] = char2Chtype (mesg[x], in newCDKDialog()
59 &dialog->infoLen[x], in newCDKDialog()
60 &dialog->infoPos[x]); in newCDKDialog()
61 maxmessagewidth = MAXIMUM (maxmessagewidth, dialog->infoLen[x]); in newCDKDialog()
68 dialog->buttonLabel[x] = char2Chtype (buttonLabel[x], in newCDKDialog()
69 &dialog->buttonLen[x], in newCDKDialog()
71 buttonwidth += dialog->buttonLen[x] + 1; in newCDKDialog()
78 boxWidth = boxWidth + 2 + 2 * BorderOf (dialog); in newCDKDialog()
84 ScreenOf (dialog) = cdkscreen; in newCDKDialog()
85 dialog->parent = cdkscreen->window; in newCDKDialog()
86 dialog->win = newwin (boxHeight, boxWidth, ypos, xpos); in newCDKDialog()
87 dialog->shadowWin = 0; in newCDKDialog()
88 dialog->buttonCount = buttonCount; in newCDKDialog()
89 dialog->currentButton = 0; in newCDKDialog()
90 dialog->messageRows = rows; in newCDKDialog()
91 dialog->boxHeight = boxHeight; in newCDKDialog()
92 dialog->boxWidth = boxWidth; in newCDKDialog()
93 dialog->highlight = highlight; in newCDKDialog()
94 dialog->separator = separator; in newCDKDialog()
95 initExitType (dialog); in newCDKDialog()
96 ObjOf (dialog)->acceptsFocus = TRUE; in newCDKDialog()
97 ObjOf (dialog)->inputWindow = dialog->win; in newCDKDialog()
98 dialog->shadow = shadow; in newCDKDialog()
101 if (dialog->win == 0) in newCDKDialog()
103 destroyCDKObject (dialog); in newCDKDialog()
106 keypad (dialog->win, TRUE); in newCDKDialog()
112 dialog->buttonPos[x] = buttonadj; in newCDKDialog()
113 buttonadj = buttonadj + dialog->buttonLen[x] + BorderOf (dialog); in newCDKDialog()
119 dialog->infoPos[x] = justifyString (boxWidth - 2 * BorderOf (dialog), in newCDKDialog()
120 dialog->infoLen[x], in newCDKDialog()
121 dialog->infoPos[x]); in newCDKDialog()
127 dialog->shadowWin = newwin (boxHeight, boxWidth, ypos + 1, xpos + 1); in newCDKDialog()
131 registerCDKObject (cdkscreen, vDIALOG, dialog); in newCDKDialog()
134 return (dialog); in newCDKDialog()
140 int activateCDKDialog (CDKDIALOG *dialog, chtype *actions) in activateCDKDialog() argument
147 drawCDKDialog (dialog, ObjOf (dialog)->box); in activateCDKDialog()
150 writeChtypeAttrib (dialog->win, in activateCDKDialog()
151 dialog->buttonPos[dialog->currentButton], in activateCDKDialog()
152 dialog->boxHeight - 1 - BorderOf (dialog), in activateCDKDialog()
153 dialog->buttonLabel[dialog->currentButton], in activateCDKDialog()
154 dialog->highlight, in activateCDKDialog()
156 0, dialog->buttonLen[dialog->currentButton]); in activateCDKDialog()
157 wrefresh (dialog->win); in activateCDKDialog()
163 input = (chtype)getchCDKObject (ObjOf (dialog), &functionKey); in activateCDKDialog()
166 ret = injectCDKDialog (dialog, input); in activateCDKDialog()
167 if (dialog->exitType != vEARLY_EXIT) in activateCDKDialog()
181 ret = injectCDKDialog (dialog, actions[x]); in activateCDKDialog()
182 if (dialog->exitType != vEARLY_EXIT) in activateCDKDialog()
190 setExitType (dialog, 0); in activateCDKDialog()
320 CDKDIALOG *dialog = (CDKDIALOG *)object; in _moveCDKDialog() local
322 int currentX = getbegx (dialog->win); in _moveCDKDialog()
323 int currentY = getbegy (dialog->win); in _moveCDKDialog()
335 xpos = getbegx (dialog->win) + xplace; in _moveCDKDialog()
336 ypos = getbegy (dialog->win) + yplace; in _moveCDKDialog()
340 alignxy (WindowOf (dialog), &xpos, &ypos, dialog->boxWidth, dialog->boxHeight); in _moveCDKDialog()
347 moveCursesWindow (dialog->win, -xdiff, -ydiff); in _moveCDKDialog()
348 moveCursesWindow (dialog->shadowWin, -xdiff, -ydiff); in _moveCDKDialog()
351 refreshCDKWindow (WindowOf (dialog)); in _moveCDKDialog()
356 drawCDKDialog (dialog, ObjOf (dialog)->box); in _moveCDKDialog()
365 CDKDIALOG *dialog = (CDKDIALOG *)object; in _drawCDKDialog() local
369 if (dialog->shadowWin != 0) in _drawCDKDialog()
371 drawShadow (dialog->shadowWin); in _drawCDKDialog()
377 drawObjBox (dialog->win, ObjOf (dialog)); in _drawCDKDialog()
381 for (x = 0; x < dialog->messageRows; x++) in _drawCDKDialog()
383 writeChtype (dialog->win, in _drawCDKDialog()
384 dialog->infoPos[x] + BorderOf (dialog), x + BorderOf (dialog), in _drawCDKDialog()
385 dialog->info[x], in _drawCDKDialog()
387 dialog->infoLen[x]); in _drawCDKDialog()
391 drawCDKDialogButtons (dialog); in _drawCDKDialog()
393 wrefresh (dialog->win); in _drawCDKDialog()
403 CDKDIALOG *dialog = (CDKDIALOG *)object; in _destroyCDKDialog() local
405 CDKfreeChtypes (dialog->info); in _destroyCDKDialog()
406 freeChecked (dialog->infoLen); in _destroyCDKDialog()
407 freeChecked (dialog->infoPos); in _destroyCDKDialog()
409 CDKfreeChtypes (dialog->buttonLabel); in _destroyCDKDialog()
410 freeChecked (dialog->buttonLen); in _destroyCDKDialog()
411 freeChecked (dialog->buttonPos); in _destroyCDKDialog()
414 deleteCursesWindow (dialog->win); in _destroyCDKDialog()
415 deleteCursesWindow (dialog->shadowWin); in _destroyCDKDialog()
418 cleanCDKObjectBindings (vDIALOG, dialog); in _destroyCDKDialog()
421 unregisterCDKObject (vDIALOG, dialog); in _destroyCDKDialog()
432 CDKDIALOG *dialog = (CDKDIALOG *)object; in _eraseCDKDialog() local
434 eraseCursesWindow (dialog->win); in _eraseCDKDialog()
435 eraseCursesWindow (dialog->shadowWin); in _eraseCDKDialog()
442 void setCDKDialog (CDKDIALOG *dialog, chtype highlight, boolean separator, boolean Box) in setCDKDialog() argument
444 setCDKDialogHighlight (dialog, highlight); in setCDKDialog()
445 setCDKDialogSeparator (dialog, separator); in setCDKDialog()
446 setCDKDialogBox (dialog, Box); in setCDKDialog()
452 void setCDKDialogHighlight (CDKDIALOG *dialog, chtype highlight) in setCDKDialogHighlight() argument
454 dialog->highlight = highlight; in setCDKDialogHighlight()
456 chtype getCDKDialogHighlight (CDKDIALOG *dialog) in getCDKDialogHighlight() argument
458 return dialog->highlight; in getCDKDialogHighlight()
464 void setCDKDialogSeparator (CDKDIALOG *dialog, boolean separator) in setCDKDialogSeparator() argument
466 dialog->separator = separator; in setCDKDialogSeparator()
468 boolean getCDKDialogSeparator (CDKDIALOG *dialog) in getCDKDialogSeparator() argument
470 return dialog->separator; in getCDKDialogSeparator()
476 void setCDKDialogBox (CDKDIALOG *dialog, boolean Box) in setCDKDialogBox() argument
478 ObjOf (dialog)->box = Box; in setCDKDialogBox()
479 ObjOf (dialog)->borderSize = Box ? 1 : 0; in setCDKDialogBox()
481 boolean getCDKDialogBox (CDKDIALOG *dialog) in getCDKDialogBox() argument
483 return ObjOf (dialog)->box; in getCDKDialogBox()
502 void drawCDKDialogButtons (CDKDIALOG *dialog) in drawCDKDialogButtons() argument
506 for (x = 0; x < dialog->buttonCount; x++) in drawCDKDialogButtons()
508 writeChtype (dialog->win, in drawCDKDialogButtons()
509 dialog->buttonPos[x], in drawCDKDialogButtons()
510 dialog->boxHeight - 1 - BorderOf (dialog), in drawCDKDialogButtons()
511 dialog->buttonLabel[x], in drawCDKDialogButtons()
513 dialog->buttonLen[x]); in drawCDKDialogButtons()
517 if (dialog->separator) in drawCDKDialogButtons()
519 chtype boxattr = BXAttrOf (dialog); in drawCDKDialogButtons()
521 for (x = 1; x < dialog->boxWidth - 1; x++) in drawCDKDialogButtons()
523 (void)mvwaddch (dialog->win, in drawCDKDialogButtons()
524 dialog->boxHeight - 2 - BorderOf (dialog), in drawCDKDialogButtons()
528 (void)mvwaddch (dialog->win, in drawCDKDialogButtons()
529 dialog->boxHeight - 2 - BorderOf (dialog), in drawCDKDialogButtons()
532 (void)mvwaddch (dialog->win, in drawCDKDialogButtons()
533 dialog->boxHeight - 2 - BorderOf (dialog), in drawCDKDialogButtons()
534 getmaxx (dialog->win) - 1, in drawCDKDialogButtons()
537 writeChtypeAttrib (dialog->win, in drawCDKDialogButtons()
538 dialog->buttonPos[dialog->currentButton], in drawCDKDialogButtons()
539 dialog->boxHeight - 1 - BorderOf (dialog), in drawCDKDialogButtons()
540 dialog->buttonLabel[dialog->currentButton], in drawCDKDialogButtons()
541 dialog->highlight, in drawCDKDialogButtons()
543 dialog->buttonLen[dialog->currentButton]); in drawCDKDialogButtons()