3
#include <X11/Intrinsic.h>
5
#include <X11/StringDefs.h>
6
#include <X11/Xaw/Form.h>
7
#include <X11/Xaw/Command.h>
8
#include <X11/Xaw/AsciiText.h>
10
#include "metaconst.h"
14
extern void GetMetanetGeometry();
16
#define STRINGLEN 100000
21
static char Str[STRINGLEN];
23
void TextClose(w,shell,callData)
28
XtPopdown((Widget)shell);
29
XtDestroyWidget((Widget)shell);
38
void AddText(description)
41
sprintf(&Str[iStr],description);
47
Widget text, textclose;
51
XtCallbackRec callbacks[2];
55
if(iText++ > 4) iText = 1;
56
GetMetanetGeometry(&x,&y,&w,&h);
58
callbacks[1].callback = NULL;
59
callbacks[1].closure = NULL;
61
XtSetArg(args[iargs], XtNx, x + iText * incX); iargs++;
62
XtSetArg(args[iargs], XtNy, y + iText * incY); iargs++;
63
XtSetArg(args[iargs], XtNfont, theG.metafont); iargs++;
64
sprintf(name,"Metanet Text %d",iText);
65
shell = XtCreatePopupShell(name,transientShellWidgetClass,toplevel,
69
XtSetArg(args[iargs], XtNfont, theG.metafont); iargs++;
70
text = XtCreateManagedWidget("text",formWidgetClass,shell,args,iargs);
72
callbacks[0].callback = (XtCallbackProc)TextClose;
73
callbacks[0].closure = (caddr_t)shell;
75
XtSetArg(args[iargs], XtNlabel, "Close" ); iargs++;
76
XtSetArg(args[iargs], XtNcallback, callbacks); iargs++;
77
XtSetArg(args[iargs], XtNfont, theG.metafont); iargs++;
78
XtSetArg(args[iargs], XtNbottom, XawChainTop); iargs++;
79
XtSetArg(args[iargs], XtNtop, XawChainTop); iargs++;
80
XtSetArg(args[iargs], XtNleft, XawChainLeft); iargs++;
81
XtSetArg(args[iargs], XtNright, XawChainLeft); iargs++;
82
textclose = XtCreateManagedWidget("textcommand",commandWidgetClass,
86
XtSetArg(args[iargs], XtNstring, Str); iargs++;
87
XtSetArg(args[iargs], XtNborderWidth, 1); iargs++;
88
XtSetArg(args[iargs], XtNeditType, XawtextRead); iargs++;
89
XtSetArg(args[iargs], XtNwrap, XawtextWrapWord); iargs++;
90
XtSetArg(args[iargs], XtNscrollVertical, XawtextScrollWhenNeeded); iargs++;
91
XtSetArg(args[iargs], XtNwidth, metaWidth/2); iargs++;
92
XtSetArg(args[iargs], XtNheight, metaHeight/2); iargs++;
93
XtSetArg(args[iargs], XtNfont, theG.metafont); iargs++;
94
XtSetArg(args[iargs], XtNfromVert, textclose); iargs++;
95
XtCreateManagedWidget("asciitext",asciiTextWidgetClass,
98
XtPopup(shell,XtGrabNone);