version 1.11, 2000/11/09 02:30:44 |
version 1.14, 2002/01/30 08:31:34 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c,v 1.10 2000/11/09 01:51:12 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c,v 1.13 2001/12/25 02:39:07 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
|
|
#include <X11/Xaw/MenuButton.h> |
#include <X11/Xaw/MenuButton.h> |
#include <X11/Xaw/Paned.h> |
#include <X11/Xaw/Paned.h> |
|
|
|
/* XXX : these lines are in plotg.c, but ld says they are not defined */ |
|
#if __DARWIN__ |
|
int stream; |
|
|
|
DISPLAY *display; |
|
CURSOR normalcur,runningcur,errorcur; |
|
|
|
#if defined(VISUAL) |
|
POINT start_point, end_point; |
|
SIZE cansize; |
|
#else |
|
Window rootwin; |
|
GC drawGC,dashGC,hlGC,scaleGC,clearGC,xorGC,colorGC,cdrawGC; |
|
XFontStruct *sffs; |
|
#endif |
|
|
|
struct canvas *canvas[MAXCANVAS]; |
|
struct canvas *current_can; |
|
#endif /* __DARWIN__ */ |
|
|
#ifdef ABS |
#ifdef ABS |
#undef ABS |
#undef ABS |
#define ABS(a) ((a)>0?(a):-(a)) |
#define ABS(a) ((a)>0?(a):-(a)) |
Line 64 static char *dname; |
|
Line 84 static char *dname; |
|
static int remotes; |
static int remotes; |
static int depth,scrn; |
static int depth,scrn; |
|
|
extern jmp_buf ox_env; |
extern JMP_BUF ox_env; |
static Widget toplevel; |
static Widget toplevel; |
static XtAppContext app_con; |
static XtAppContext app_con; |
|
|
Line 643 static XtResource resources[] = { |
|
Line 663 static XtResource resources[] = { |
|
offset(DashPixel),XtRPixel,(XtPointer)&dashPixel}, |
offset(DashPixel),XtRPixel,(XtPointer)&dashPixel}, |
}; |
}; |
|
|
init_plot_display(argc,argv) |
int init_plot_display(argc,argv) |
int argc; |
int argc; |
char **argv; |
char **argv; |
{ |
{ |
|
|
unsigned int tmp; |
unsigned int tmp; |
|
|
for ( ac = argc, av = argv; ac; ac--, av++ ) |
for ( ac = argc, av = argv; ac; ac--, av++ ) |
if ( index(*av,':') ) |
if ( !strcmp(*av,"nox") ) |
|
return 0; |
|
else if ( index(*av,':') ) |
dname = *av; |
dname = *av; |
XtToolkitInitialize(); |
XtToolkitInitialize(); |
app_con = XtCreateApplicationContext(); |
app_con = XtCreateApplicationContext(); |
|
|
options,XtNumber(options),&argc,argv); |
options,XtNumber(options),&argc,argv); |
if ( !display ) { |
if ( !display ) { |
fprintf(stderr,"Can't open display\n"); |
fprintf(stderr,"Can't open display\n"); |
exit(1); |
return 0; |
} |
} |
toplevel = XtAppCreateShell(0,"Plot",applicationShellWidgetClass, |
toplevel = XtAppCreateShell(0,"Plot",applicationShellWidgetClass, |
display,0,0); |
display,0,0); |
|
|
create_gc(); |
create_gc(); |
create_font(); |
create_font(); |
create_cursors(); |
create_cursors(); |
|
return 1; |
} |
} |
|
|
static char *scalefont = "*-8-80-*"; |
static char *scalefont = "*-8-80-*"; |