FACT++  1.0
Widget create_selection_dialog ( char *  ok,
char *  apply,
char *  cancel,
char *  list,
char *  sel,
long  tag,
int  items 
)

Definition at line 3279 of file did.c.

References cancel_pop_up(), create_str(), did_default_font, did_small_font, ok_pop_up(), and toplevel_widget.

Referenced by create_client_dialog(), create_node_selection(), create_send_command(), create_server_dialog(), and create_service_selection().

3281 {
3282 Widget sd;
3283 XmString xmOk, xmApply, xmCancel, xmList, xmSelection;
3284 Arg ar[20];
3285 int n;
3286 
3287  xmList = create_str(list);
3288  xmOk = create_str(ok);
3289  xmApply = create_str(apply);
3290  xmCancel = create_str (cancel);
3291  xmSelection = create_str (sel);
3292 
3293  n = 0;
3294  /*
3295  XtSetArg(ar[n],XmNdialogStyle,XmDIALOG_FULL_APPLICATION_MODAL); n++;
3296  XtSetArg(ar[n],XmNmwmFunctions,MWM_FUNC_MOVE); n++;
3297  */
3298  XtSetArg(ar[n],XmNtitle,"Selection"); n++;
3299  XtSetArg(ar[n],XmNlabelFontList, did_default_font); n++;
3300  XtSetArg(ar[n],XmNbuttonFontList, did_default_font); n++;
3301  XtSetArg(ar[n],XmNtextFontList, did_small_font); n++;
3302  XtSetArg(ar[n],XmNborderWidth, 1); n++;
3303  XtSetArg(ar[n],XmNlistLabelString, xmList); n++;
3304  XtSetArg(ar[n],XmNlistVisibleItemCount,items); n++;
3305  if(ok[0])
3306  {
3307  XtSetArg(ar[n],XmNokLabelString, xmOk); n++;
3308  }
3309  if(apply[0])
3310  {
3311  XtSetArg(ar[n],XmNapplyLabelString, xmApply); n++;
3312  }
3313  if(cancel[0])
3314  {
3315  XtSetArg(ar[n],XmNcancelLabelString, xmCancel); n++;
3316  }
3317  if(sel[0])
3318  {
3319  XtSetArg(ar[n],XmNselectionLabelString, xmSelection); n++;
3320  }
3321  sd = XmCreateSelectionDialog ( toplevel_widget, "Selection", ar, (Cardinal)n );
3322  XmStringFree(xmList);
3323  XmStringFree(xmOk);
3324  XmStringFree(xmApply);
3325  XmStringFree(xmCancel);
3326  XmStringFree(xmSelection);
3327  if(tag >= 0)
3328  {
3329  XtAddCallback ( sd, XmNcancelCallback,
3330  (XtCallbackProc)cancel_pop_up, (XtPointer)tag );
3331  XtAddCallback ( sd, XmNapplyCallback,
3332  (XtCallbackProc)ok_pop_up, (XtPointer)tag );
3333  XtAddCallback ( sd, XmNokCallback,
3334  (XtCallbackProc)ok_pop_up, (XtPointer)tag );
3335  }
3336  return(sd);
3337 }
void ok_pop_up()
static XmFontList did_default_font
Definition: did.c:40
static XmFontList did_small_font
Definition: did.c:40
Widget toplevel_widget
Definition: did.h:39
void cancel_pop_up()
XmString create_str()

+ Here is the call graph for this function:

+ Here is the caller graph for this function: