2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: selectxlfd.c /main/3 1996/10/14 14:45:17 barstow $ */
25 * All Rights Reserved, Copyright (c) FUJITSU LIMITED 1995
34 #include <sys/types.h>
48 #include <Xm/SeparatoG.h>
50 #include <Xm/ToggleB.h>
51 #include <Xm/MessageB.h>
55 #include "selectxlfd.h"
58 char *shell_n[] = { "pop0", "pop1", "pop2", "pop3" } ;
59 char *list_n[] = { "list0", "list1", "list2", "list3" } ;
63 #define Dprintf fprintf
69 * There is no public header file for this function (only an
70 * internal header XmStringI.h).
72 extern XtPointer _XmStringUngenerate (XmString string,
75 XmTextType output_type);
83 extern char *maintitle;
92 char *fullPathName = NULL ;
94 FalFontDataList *font_L ;
95 FalxCodeList *CodeList ;
96 FalxStyleList *StyleList ;
97 FalxSizeList *SizeList ;
98 FalxUdcArea *UdcArea ;
103 FalxFontDataBuff KeyBuff ;
106 void PopupSelectXLFD() ;
108 Widget xlfdDialog, xlfdWform,
109 slctBLabel[BUTTONITEMS],slctBText[BUTTONITEMS], slctButton[BUTTONITEMS],
110 listPop[BUTTONITEMS], listW[BUTTONITEMS],
111 separatorW, errorMD, msgBox ;
112 extern Widget cpyDialog ;
114 extern Widget toplevel;
121 int fontcheck(char *fontfile, char *mode)
123 * If fontfile can't be opend, return -1.
124 * If fontfile is editted by other UDC client, return 1.
130 if (strcmp(mode, "r") == 0) {
131 if ((chk_fd = open(fontfile, O_RDONLY)) < 0) {
134 } else if (strcmp(mode, "w") == 0) {
135 if ((chk_fd = open(fontfile, O_RDWR)) < 0) {
139 if (isLock(chk_fd) == 1) {
147 void setallcode(ListData *ld)
149 int i, code, codenum;
154 for (i = 0; i < UdcAreaCount; i++) {
155 codenum += (abs(UdcArea[i].udc_end - UdcArea[i].udc_start) + 1);
158 ld->allcode = (int *) calloc(codenum, sizeof(int));
159 ld->allcode_num = codenum;
161 for (i = 0; i < UdcAreaCount; i++) {
162 code1 = smaller(UdcArea[i].udc_start, UdcArea[i].udc_end);
163 code2 = bigger(UdcArea[i].udc_start, UdcArea[i].udc_end);
164 for (code = code1; code <= code2; code++) {
173 int protect_key = FAL_FONT_DISPLAY;
178 codeset = font_L->list[0].cd_set;
179 if ((fontid = FalOpenFont(fullPathName, protect_key, codeset))
181 fprintf(stderr, "FalOpenFont error\n");
182 return ((FalFontID) NULL);
187 void makelist(ListData *ld)
191 int *existcodep, *allcodep;
194 /* FalFontinfo fontinfo;*/
196 /* FalQueryFont(fid, &fontinfo);*/
198 ld->existcode = (int *) calloc(ld->allcode_num, sizeof(int));
199 existcodep = ld->existcode ;
200 allcodep = ld->allcode;
202 for (i = 0; i < ld->allcode_num; i++) {
204 pattern = FalReadFont(fid, code, NULL, NULL);
205 if (fal_utyexists == 0) {
206 *existcodep = *allcodep;
212 ld->existcode_num = existcode_num;
215 void setexistcode(ListData *ld)
217 int *codep, *allcodep;
235 if ((0 <= num) && (num <= 9))
237 else if ((10 <= num) && (num <= 15))
238 c = 'a' + (num - 10);
240 fprintf(stderr,"error in i2c\n");
260 buf[i] = i2c(tmp % 16);
264 number = (char *) calloc(len+3, sizeof(char));
268 for (i = len - 1; i >= 0; i--) {
276 void setexistcode_c(ListData *ld)
282 if (ld->existcode_num == 0) {
286 ld->existcode_c = (char **) calloc(ld->existcode_num, sizeof(char *));
287 code_cp = ld->existcode_c;
288 codep = ld->existcode;
289 for (i = 0; i < ld->existcode_num; i++) {
290 *code_cp = i2s(*codep);
296 void getexistcode(ListData *ld)
305 /****************************************************************
307 ***************************************************************/
310 * pop up and down dialog box
317 if (! XtIsManaged(w))
320 XRaiseWindow(XtDisplayOfObject(w), XtWindow(XtParent(w)));
337 GetPixelWidth( w, columns, width )
343 XtSetArg( args[0], XmNwidth, width ) ;
344 XtGetValues( w , args, 1 ) ;
345 return( *width / (Dimension)columns ) ;
349 /****************************************************************
351 ***************************************************************/
353 void quit(w, client_data, call_data)
355 caddr_t *client_data, *call_data;
360 msg = GETMESSAGE(6, 2, "Do you want to terminate udcexchange?");
362 AskUser(ed->toplevel, ed, msg, &ans, "question");
363 if (ans == 1) {/* terminate ok */
364 FalxFreeCodeList( CodeList ) ;
365 FalxFreeStyleList( StyleList ) ;
366 FalxFreeSizeList( SizeList ) ;
367 FalxFreeFontList( font_L ) ;
377 ClearText( num, slctBText )
382 /* toggle button unset */
383 for( i=0; i<BUTTONITEMS; i++ ){
385 XmTextSetString( slctBText[i], "" );
392 ClearButtons( num, slctButton )
399 /* toggle button unset */
400 for( i=0; i<BUTTONITEMS; i++ ){
403 XtSetArg( args[cnt], XmNset, &isSet ); cnt++;
404 XtGetValues( slctButton[i], args, cnt );
407 XtSetArg( args[cnt], XmNset, False ); cnt++;
408 XtSetValues( slctButton[i], args, cnt );
418 * get text field position
421 GetPositionOfLists( num, xlfdDialog, listPop, slctBText, x, y )
430 Position tbx, tby, tx, ty ;
435 XtSetArg(args[i], XmNx, &tbx ); i++;
436 XtSetArg(args[i], XmNy, &tby ); i++;
437 XtGetValues( xlfdDialog, args, i);
439 XtSetArg(args[i], XmNx, &tx ); i++;
440 XtSetArg(args[i], XmNy, &ty ); i++;
441 XtSetArg(args[i], XmNheight, &theight ); i++;
442 if( num==BUTTONITEMS-1 )
443 XtGetValues( slctBText[num], args, i ) ;
445 XtGetValues( XtParent(slctBText[num]), args, i ) ; /* ScrolledText */
446 /* determine the position of list */
448 if( num==BUTTONITEMS-1 ){
449 *y = ty + tby + (Position)theight + 14 + CY ;
451 *y = ty + tby + (Position)theight + CY ;
454 for( i=0; i<BUTTONITEMS; i++ ){
455 if( XtIsManaged( listPop[i] ) ) XtUnmanageChild( listPop[i] );
457 if( !XtIsManaged( listPop[num] ) ) XtManageChild( listPop[num] );
465 void listEH(w, num, event)
470 int i, j, ITEM_COUNT;
482 rtn = GetItemsToDisplay( num, &ITEM_COUNT, &xms ) ;
485 fprintf( stderr, "There are no fonts that was required.\n" ) ;
486 XmTextSetString( slctBText[0], " " );
487 ClearText( -1, slctBText ) ;
488 FalxFreeDataBuff( FALX_ALL, &KeyBuff ) ;
494 fprintf( stderr, "GetItemsToDisplay() error.\n" ) ;
498 if( num == 0 && ITEM_COUNT == 1 ){
500 str = (char *) _XmStringUngenerate((XmString) xms[0], NULL,
501 XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
503 XmTextSetString(slctBText[num], str );
506 if( ITEM_COUNT < 0 ){
512 * get text field position
514 GetPositionOfLists( num, xlfdDialog, listPop, slctBText, &x, &y ) ;
517 XtSetArg(args[i], XmNx, x ) ; i++;
518 XtSetArg(args[i], XmNy, y ) ; i++;
519 XtSetValues(listPop[num], args, i );
525 XtSetArg (args[i], XmNitems, xms ); i++;
526 XtSetArg (args[i], XmNitemCount, ITEM_COUNT ); i++;
527 XtSetValues(listW[num], args, i );
532 XtPopup( listPop[num], XtGrabNone );
539 void listPrintCB(w, num, call_data)
542 XmListCallbackStruct *call_data;
546 /* clear text fields and unset buttons */
547 ClearButtons( num, slctButton ) ;
550 str = (char *) _XmStringUngenerate((XmString) call_data->item, NULL,
551 XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
553 XmTextSetString(slctBText[num], str);
558 if( SetKeyBuff( num, str ) ){
563 if( XtIsManaged( listPop[num] ) ) XtUnmanageChild( listPop[num] );
571 void OpenWindow(w, client_data, call_data)
573 caddr_t client_data, *call_data;
582 char *str, buff[512] ;
584 msg = GETMESSAGE(6, 4, "No UDCs exist in this font");
585 msg1 = GETMESSAGE(6, 6, "XLFD name isn't selected");
586 msg2 = GETMESSAGE(6, 8, "Can't open the font file");
587 msg3 = GETMESSAGE(6, 10, "The font file is used by other UDC client.");
589 /* get font file name (str: XLFD name) */
590 str = XmTextGetString( slctBText[0] );
591 if (( str == NULL ) || (strcmp(str, "") == 0)) {
592 AskUser(w, ed, msg1, &ans, "error");
595 if( fullPathName != NULL ){
596 free( fullPathName ) ;
598 SelectedOffset = FalxSearchFontFileName( str, font_L, buff ) ;
599 if( SelectedOffset < 0 ){
602 if( (fullPathName = strdup( buff )) == NULL ){
605 UdcAreaCount = FalxGetGlyphIndexInfo( str, font_L, &UdcArea ) ;
606 if( UdcAreaCount < 0 ){
610 if( fullPathName != NULL ){
611 Dprintf( stderr, "OpenWindow() : full path name = %s\n", fullPathName );
613 for( i=0; i<UdcAreaCount; i++ ){
614 Dprintf( stderr, "OpenWindow() : start(%d) = 0x%x\n", i, UdcArea[i].udc_start );
615 Dprintf( stderr, "OpenWindow() : end (%d) = 0x%x\n", i, UdcArea[i].udc_end );
617 if ((ed->xlfdname = strdup(str)) == NULL) {
620 if ((ed->fontfile = strdup(fullPathName)) == NULL) {
625 if ((ld = (ListData *) malloc(sizeof(ListData))) == NULL) {
626 excerror(ed, EXCERRMALLOC, "selcharcd", "exit");
628 memset(ld, 0x00, sizeof(ListData));
631 if (ed->function == EXPORT) {
632 r = fontcheck(ed->fontfile, "r");
633 if (r == -1) { /* file open error */
634 AskUser(ld->ed->toplevel, ld->ed, msg2, &ans, "error");
636 } else if (r == 1) { /* file is being editted by other UDC client */
637 AskUser(ld->ed->toplevel, ld->ed, msg3, &ans, "error");
640 /* get existing UDC code */
642 if (ld->existcode_num == 0) {
643 AskUser(ld->ed->toplevel, ld->ed, msg, &ans, "error");
646 XtUnmanageChild(xlfdDialog);
648 } else if (ed->function == IMPORT) {
649 r = fontcheck(ed->fontfile, "w");
650 if (r == -1) { /* file open error */
651 AskUser(ld->ed->toplevel, ld->ed, msg2, &ans, "error");
653 } else if (r == 1) { /* file is being editted by other UDC client */
654 AskUser(ld->ed->toplevel, ld->ed, msg3, &ans, "error");
657 /* get existing UDC code */
660 XtUnmanageChild(xlfdDialog);
667 /****************************************************************
668 * functions for create window view
669 ****************************************************************/
671 #define SetLabel( cnt ){ \
673 case 0 : buf = resource.xlfd_label ; break ; \
674 case 1 : buf = resource.code_label ; break ; \
675 case 2 : buf = resource.style_label; break ; \
676 case 3 : buf = resource.size_label ; break ; \
678 xms = XmStringCreateLocalized( buf ); \
683 CreateXLFDLabelAndText( owner, slctBLabel, slctBText, slctButton )
702 XtSetArg( args[i], XmNx, 20 ) ; i++ ;
703 XtSetArg( args[i], XmNheight, 20 ) ; i++ ;
704 XtSetArg( args[i], XmNtopAttachment, XmATTACH_FORM ) ; i++ ;
705 XtSetArg( args[i], XmNtopOffset, 20 ) ; i++ ;
707 _slctBLabel = XmCreateLabelGadget( owner , "xlfdlabel", args, i );
709 _slctBLabel = XmCreateLabel( owner , "xlfdlabel", args, i );
711 XtManageChild( _slctBLabel );
714 * create text fields to display XLFD font name
717 XtSetArg( args[i], XmNleftAttachment, XmATTACH_FORM ) ; i++ ;
718 XtSetArg( args[i], XmNleftOffset, 20 ) ; i++ ;
719 XtSetArg( args[i], XmNtopAttachment, XmATTACH_WIDGET ); i++ ;
720 XtSetArg( args[i], XmNtopOffset, 5 ) ; i++ ;
721 XtSetArg (args[i], XmNtopWidget, _slctBLabel ); i++;
722 XtSetArg( args[i], XmNcolumns, XLFD_COLUMNS ) ; i++ ;
723 XtSetArg( args[i], XmNspacing, 0 ) ; i++ ;
724 XtSetArg( args[i], XmNeditMode, XmSINGLE_LINE_EDIT ) ; i++ ;
725 XtSetArg( args[i], XmNscrollBarDisplayPolicy, XmAS_NEEDED ) ; i++ ;
726 XtSetArg( args[i], XmNscrollingPolicy, XmAPPLICATION_DEFINED ) ; i++ ;
728 XtSetArg( args[i], XmNscrollingPolicy, XmAUTOMATIC ) ; i++ ;
729 XtSetArg( args[i], XmNlistSizePolicy, XmCONSTANT ) ; i++ ;
731 XtSetArg( args[i], XmNwidth, 600 ) ; i++ ;
732 XtSetArg( args[i], XmNfontList, fixed ) ; i++ ;
733 XtSetArg( args[i], XmNeditable, True ) ; i++ ;
734 XtSetArg( args[i], XmNlistSizePolicy, XmVARIABLE ) ; i++ ;
736 _slctBText = XmCreateScrolledText( owner , "xlfdtext", args, i );
738 XtManageChild( _slctBText );
741 * create XLFD select buttons
744 XtSetArg( args[i], XmNindicatorType, XmONE_OF_MANY ) ; i++ ;
745 XtSetArg (args[i], XmNtopWidget, _slctBText ); i++;
746 XtSetArg( args[i], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET ) ; i++ ;
747 XtSetArg( args[i], XmNtopOffset, 15 ) ; i++ ;
748 XtSetArg( args[i], XmNleftAttachment, XmATTACH_WIDGET ) ; i++ ;
749 XtSetArg( args[i], XmNleftWidget, _slctBText ) ; i++ ;
750 XtSetArg( args[i], XmNleftOffset, 5 ) ; i++ ; /* WIDTH */
751 XtSetArg( args[i], XmNrightAttachment, XmATTACH_FORM ) ; i++ ;
752 XtSetArg( args[i], XmNrightOffset, 5 ) ; i++ ; /* WIDTH */
753 xms = XmStringCreateLocalized( "" );
754 XtSetArg( args[i], XmNlabelString, xms ) ; i++ ;
756 _slctButton = XmCreateToggleButtonGadget( owner , "xlfdbtn", args, i);
758 _slctButton = XmCreateToggleButton( owner , "xlfdbtn", args, i);
760 XtManageChild( _slctButton );
762 *slctBLabel = _slctBLabel ;
763 *slctBText = _slctBText ;
764 *slctButton = _slctButton ;
772 CreateOtherLabelAndText( num, owner, baseForm,
773 slctBLabel, topW, slctBText, slctButton )
792 if( num < 1 ) return(0) ;
798 XtSetArg ( args[i], XmNtopWidget,
799 (num==1) ? baseForm : topW ); i++;
800 XtSetArg( args[i], XmNx, 20 ) ; i++ ;
801 XtSetArg( args[i], XmNheight, 20 ) ; i++ ;
802 XtSetArg( args[i], XmNtopAttachment, XmATTACH_WIDGET ) ; i++ ;
804 XtSetArg( args[i], XmNtopOffset, 20 ) ; i++ ;
806 XtSetArg( args[i], XmNtopOffset, 36 ) ; i++ ;
808 XtSetArg( args[i], XmNlabelString, xms ) ; i++ ;
810 _slctBLabel = XmCreateLabelGadget( owner , "label", args, i);
812 _slctBLabel = XmCreateLabel( owner , "label", args, i);
814 XtManageChild( _slctBLabel );
817 * create text fields to display selected keys
820 XtSetArg( args[i], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET ) ; i++ ;
821 XtSetArg( args[i], XmNtopOffset, -5 ) ; i++ ;
822 XtSetArg (args[i], XmNtopWidget, _slctBLabel ); i++;
823 XtSetArg( args[i], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET ) ; i++ ;
824 XtSetArg( args[i], XmNrightOffset, 0 ) ; i++ ;
825 XtSetArg (args[i], XmNrightWidget, baseForm ); i++;
826 XtSetArg( args[i], XmNcolumns, KEY_COLUMNS ) ; i++ ;
827 XtSetArg( args[i], XmNspacing, 0 ) ; i++ ;
828 XtSetArg( args[i], XmNeditMode, XmSINGLE_LINE_EDIT ) ; i++ ;
829 XtSetArg( args[i], XmNscrollBarDisplayPolicy, XmAS_NEEDED ) ; i++ ;
830 XtSetArg( args[i], XmNscrollingPolicy, XmAPPLICATION_DEFINED ) ; i++ ;
832 XtSetArg( args[i], XmNscrollingPolicy, XmAUTOMATIC ) ; i++ ;
833 XtSetArg( args[i], XmNlistSizePolicy, XmCONSTANT ) ; i++ ;
835 XtSetArg( args[i], XmNfontList, fixed ) ; i++ ;
836 XtSetArg( args[i], XmNlistSizePolicy, XmVARIABLE ) ; i++ ;
838 if( num==BUTTONITEMS-1 )
839 _slctBText = XmCreateText( owner , "text" , args, i );
841 _slctBText = XmCreateScrolledText( owner , "text" , args, i );
843 XtManageChild( _slctBText );
846 * create select buttons
849 XtSetArg( args[i], XmNindicatorType, XmONE_OF_MANY ) ; i++ ;
850 XtSetArg( args[i], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET ) ; i++ ;
851 XtSetArg( args[i], XmNtopOffset, 5 ) ; i++ ;
852 XtSetArg (args[i], XmNtopWidget, _slctBLabel ); i++;
853 XtSetArg( args[i], XmNleftAttachment, XmATTACH_WIDGET ) ; i++ ;
854 XtSetArg( args[i], XmNleftWidget, _slctBText ) ; i++ ;
855 XtSetArg( args[i], XmNleftOffset, 5 ) ; i++ ; /* WIDTH */
856 xms = XmStringCreateLocalized( "" );
857 XtSetArg( args[i], XmNlabelString, xms ) ; i++ ;
859 _slctButton = XmCreateToggleButtonGadget( owner , "button", args, i);
861 _slctButton = XmCreateToggleButton( owner , "button", args, i);
863 XtManageChild( _slctButton );
865 *slctBLabel = _slctBLabel ;
866 *slctBText = _slctBText ;
867 *slctButton = _slctButton ;
873 * create pop up lists
878 xlfdCreateScrolledList ( owner, name, args, n )
886 XtSetArg( args[n], XmNselectionPolicy, XmSINGLE_SELECT ) ;n++ ;
887 XtSetArg( args[n], XmNlistSpacing, 4 ) ; n++ ;
888 XtSetArg( args[n], XmNlistSizePolicy, XmCONSTANT ) ; n++ ;
889 XtSetArg( args[n], XmNscrollBarDisplayPolicy, XmAS_NEEDED ) ; n++ ;
890 listW = XmCreateScrolledList( owner, name, args, n );
892 XtManageChild( listW );
901 * create selection window view
904 PopupSelectXLFD( top )
912 Dimension pix, xwidth, kwidth ;
914 if( xlfdDialog == NULL ){
919 XtSetArg( args[n], XmNautoUnmanage, False ) ; n++ ;
920 XtSetArg( args[n], XmNtitle, maintitle ) ; n++ ;
921 XtSetArg( args[n], XmNnoResize, True ) ; n++ ;
922 xms = XmStringCreateLocalized( resource.exec_label ) ;
923 XtSetArg( args[n], XmNokLabelString, xms ) ; n++ ;
924 xms = XmStringCreateLocalized( resource.quit_label) ;
925 XtSetArg( args[n], XmNhelpLabelString, xms ) ; n++ ;
926 Dprintf( stdout, "(PopupSelectXLFD)XmCreateTemplateDialog: start\n" ) ;
927 xlfdDialog = XmCreateTemplateDialog( top, "SelectDialog", args, n );
928 Dprintf( stdout, "(PopupSelectXLFD)XmCreateTemplateDialog: end\n" ) ;
931 xlfdWform = XmCreateForm( xlfdDialog, "BaseForm", args, n );
932 XtManageChild( xlfdWform );
936 * create XLFD columns
938 Dprintf( stdout, "(PopupSelectXLFD)CreateXLFDLabelAndText : start\n" ) ;
939 CreateXLFDLabelAndText( xlfdWform ,
940 &slctBLabel[0], &slctBText[0], &slctButton[0] ) ;
943 XtSetArg( args[n], XmNlabelString, xms ) ; n++ ;
944 XtSetValues( slctBLabel[0], args, n ) ;
945 Dprintf( stdout, "(PopupSelectXLFD)CreateXLFDLabelAndText : end\n" ) ;
948 * create other key columns
950 Dprintf( stdout, "(PopupSelectXLFD)CreateOtherLabelAndText :start\n" ) ;
951 for( j=1; j<BUTTONITEMS; j++ ){
952 CreateOtherLabelAndText( j, xlfdWform, slctBText[0],
953 &slctBLabel[j], slctBLabel[j-1], &slctBText[j], &slctButton[j] ) ;
955 Dprintf( stdout, "(PopupSelectXLFD)CreateOtherLabelAndText : end\n" ) ;
957 /* set bottom offsets */
959 XtSetArg( args[n], XmNbottomAttachment, XmATTACH_FORM ) ; n++ ;
960 XtSetArg( args[n], XmNbottomOffset, 36 ) ; n++ ;
961 XtSetValues( slctBLabel[BUTTONITEMS-1], args, n ) ;
964 pix = GetPixelWidth( slctBText[0], XLFD_COLUMNS, &xwidth ) ;
965 /* xwidth += pix / 2 ; */
966 kwidth = pix * KEY_COLUMNS + pix / 2 ;
969 * create popup shells
971 for( j=0; j<BUTTONITEMS; j++ ) {
973 listPop[j] = XtCreatePopupShell( shell_n[j], overrideShellWidgetClass,
974 xlfdWform , args, n );
980 for( j=0; j<BUTTONITEMS; j++ ) {
982 XtSetArg( args[n], XmNvisibleItemCount, (j==0)? 10 : 5 ) ; n++ ;
984 XtSetArg( args[n], XmNwidth, xwidth ) ; n++ ;
986 XtSetArg( args[n], XmNwidth, kwidth ) ; n++ ;
987 XtSetArg( args[n], XmNlistMarginWidth, 0 ) ; n++ ;
989 listW[j] = xlfdCreateScrolledList( listPop[j], list_n[j], args, n );
997 XtSetArg( args[n], XmNokLabelString, "OK" ) ; n++ ;
998 XtSetArg( args[n], XmNcancelLabelString,"Cancel" ) ; n++ ;
999 errorMD = XmCreateMessageDialog(toplevel, "ed0", NULL, 0);
1001 msgBox = XmMessageBoxGetChild(errorMD, XmDIALOG_HELP_BUTTON);
1002 XtUnmanageChild(msgBox);
1008 for( i=0; i<BUTTONITEMS; i++ )
1009 XtAddEventHandler( slctButton[i], ButtonReleaseMask, False, (XtEventHandler) listEH, (XtPointer) i );
1011 for( i=0; i<BUTTONITEMS; i++ )
1012 XtAddCallback(listW[i], XmNsingleSelectionCallback, (XtCallbackProc) listPrintCB, (XtPointer) i );
1014 XtAddCallback( xlfdDialog, XmNokCallback, (XtCallbackProc) OpenWindow, NULL );
1015 XtAddCallback( xlfdDialog, XmNhelpCallback,(XtCallbackProc) quit,NULL );
1018 XtAddCallback( errorMD, XmNcancelCallback, (XtCallbackProc) quit, NULL);
1023 * pop up select window
1025 Dprintf( stdout, "(PopupSelectXLFD)xlfdPopupDialog : start\n" ) ;
1026 xlfdPopupDialog( xlfdDialog );
1027 Dprintf( stdout, "(PopupSelectXLFD)xlfdPopupDialog : end\n" ) ;
1028 Dprintf( stdout, " : end\n" ) ;