#include <stdio.h>#include <math.h>#include "math_graphics.h"#include "machine.h"#include <X11/Xatom.h>#include <X11/Intrinsic.h>#include <X11/StringDefs.h>#include <X11/Shell.h>#include <X11/Xaw3d/AsciiText.h>#include <X11/Xaw3d/Box.h>#include <X11/Xaw3d/Command.h>#include <X11/Xaw3d/Dialog.h>#include <X11/Xaw3d/Form.h>#include <X11/Xaw3d/Label.h>#include <X11/Xaw3d/List.h>#include <X11/Xaw3d/MenuButton.h>#include <X11/Xaw3d/SimpleMenu.h>#include <X11/Xaw3d/SmeBSB.h>#include <X11/Xaw3d/SmeLine.h>#include <X11/Xaw3d/Paned.h>#include <X11/Xaw3d/Toggle.h>#include <X11/Xaw3d/Viewport.h>#include <X11/Xaw3d/Cardinals.h>#include "Xcall1.h"#include "xwidgets.h"Include dependency graph for xwidgets.c:

Go to the source code of this file.
Data Structures | |
| struct | TestOpTab |
Defines | |
| #define | streq(a, b) ( strcmp((a), (b)) == 0 ) |
Functions | |
| static void | MenuSelect (Widget w, XtPointer junk, XtPointer garbage) |
| void | AddNewMenu (Widget parent, Widget drawbox) |
Variables | |
| TestOpTab | GraphicTestTab [] |
| XtAppContext | app_con |
| void AddNewMenu | ( | Widget | parent, | |
| Widget | drawbox | |||
| ) |
Definition at line 92 of file xwidgets.c.
References args, GraphicTestTab, i, menuButtonWidgetClass, MenuSelect(), n, name, NULL, simpleMenuWidgetClass, smeBSBObjectClass, XtNfromHoriz, and ZERO.
Referenced by AddNewWin().
00093 { 00094 Widget button,menu,entry; 00095 static Arg args[1] ; 00096 Cardinal n=0; 00097 int i=0; 00098 XtSetArg(args[n], XtNfromHoriz,drawbox ); n++; 00099 button = XtCreateManagedWidget("menuButton", menuButtonWidgetClass, parent, 00100 args,n); 00101 n=0; 00102 menu = XtCreatePopupShell("menu", simpleMenuWidgetClass, button,args,n); 00103 while ( GraphicTestTab[i].name != (char *) NULL) 00104 { 00105 entry= XtCreateManagedWidget(GraphicTestTab[i].name, smeBSBObjectClass, menu, 00106 args, ZERO); 00107 XtAddCallback(entry,XtNcallback,MenuSelect,(XtPointer) NULL); 00108 i++; 00109 } 00110 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static void MenuSelect | ( | Widget | w, | |
| XtPointer | junk, | |||
| XtPointer | garbage | |||
| ) | [static] |
Definition at line 54 of file xwidgets.c.
References C2F, dr(), firstentry, TestOpTab::fonc, GraphicTestTab, i, L, name, NULL, num, PD0, PI0, SetDriver(), and streq.
Referenced by AddNewMenu().
00058 { 00059 static int firstentry=0; 00060 integer i; 00061 if (firstentry==0) 00062 { 00063 integer verbose=0,ww,narg; 00064 C2F(SetDriver)("Rec",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00065 C2F(dr)("xget","window",&verbose,&ww,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00066 C2F(dr)("xset","window",&ww,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00067 firstentry++; 00068 } 00069 else 00070 { 00071 integer num=0; 00072 C2F(dr)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00073 C2F(dr)("xstart","v",&num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00074 } 00075 i=0; 00076 while ( GraphicTestTab[i].name != (char *) NULL) 00077 { 00078 if (streq(XtName(w), GraphicTestTab[i].name)) 00079 { 00080 (*(GraphicTestTab[i].fonc))(); 00081 } 00082 i++; 00083 } 00084 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.5.1