2
* Copyright 1994, Integrated Computer Solutions, Inc.
12
/**************************************************************
14
**************************************************************/
22
#include <Xm/ToggleB.h>
25
/**************************************************************
27
**************************************************************/
30
/**************************************************************
31
* FORWARD DECLARATIONS
32
**************************************************************/
33
Widget CreateDemoForm(Widget);
35
/**************************************************************
37
**************************************************************/
39
/**************************************************************
41
**************************************************************/
42
static String fallbacks[] = {
44
* General fallback resources.
46
"*fontList: -*-helvetica-medium-r-*-*-*-140-*-*-*-*-*-*",
47
"*hype_label*fontList: -*-helvetica-bold-r-*-*-*-140-*-*-*-*-*-*",
48
"*hype_label.marginWidth: 10",
49
"*hype_label.marginHeight: 10",
50
"*show_font_tog.labelString: Show Font on Widget",
51
"*explain_showfont.labelString: Explain...",
52
"*cur_font_pb.labelString: Show Current Font...",
53
"*explain_curfont.labelString: Explain...",
54
"*other_pb.labelString: Other Resources...",
55
"*quit_pb.labelString: Quit",
56
"*resform*rgbFileLabel.labelString: XmNrgbFile",
60
/**************************************************************
61
* PUBLIC (GLOBAL) CODE
62
**************************************************************/
65
* Function Name: InitializeDemoForm
72
InitializeDemoForm(Widget form)
76
w = XtNameToWidget(form, "*show_font_tog");
78
fprintf(stderr, "InitializeDemoForm: cannot find show_font_tog\n");
82
XmToggleButtonSetState(w, False, False);
84
/* Set the global variable */
85
G_font = XtNameToWidget(form, "*fontsel");
87
fprintf(stderr, "InitializeDemoForm: cannot find fontsel\n");
95
* Arguments: the usual suspects
106
Widget top, demowindow;
110
XtSetArg(args[argcnt], XmNtitle, "Font Selector Demo"); argcnt++;
111
XtSetArg(args[argcnt], XmNiconName, "Font Selector Demo"); argcnt++;
112
XtSetArg(args[argcnt], XmNallowShellResize, True); argcnt++;
113
top = XtAppInitialize(&app, "ColorSelector", NULL, 0,
114
&argc, argv, fallbacks, args, argcnt);
116
demowindow = CreateDemoForm(top);
117
XtManageChild(demowindow);
119
InitializeDemoForm(demowindow);
121
XtRealizeWidget(top);