version 1.18, 2002/07/20 02:28:08 |
version 1.22, 2002/08/02 08:59:47 |
|
|
* 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.17 2002/07/12 00:14:40 takayama Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c,v 1.21 2002/08/02 02:28:29 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 72 XFontStruct *sffs; |
|
Line 72 XFontStruct *sffs; |
|
#endif |
#endif |
|
|
struct canvas *canvas[MAXCANVAS]; |
struct canvas *canvas[MAXCANVAS]; |
|
struct canvas *closed_canvas[MAXCANVAS]; |
struct canvas *current_can; |
struct canvas *current_can; |
#endif /* __DARWIN__ */ |
#endif /* __DARWIN__ */ |
|
|
Line 81 struct canvas *current_can; |
|
Line 82 struct canvas *current_can; |
|
#endif |
#endif |
|
|
static char *dname; |
static char *dname; |
static int remotes; |
|
static int depth,scrn; |
static int depth,scrn; |
|
|
extern JMP_BUF ox_env; |
extern JMP_BUF ox_env; |
Line 171 XButtonEvent *ev; |
|
Line 171 XButtonEvent *ev; |
|
case Button1: |
case Button1: |
e.x = ev->x; e.y = ev->y; |
e.x = ev->x; e.y = ev->y; |
draw_frame0(can->window,spos,e); |
draw_frame0(can->window,spos,e); |
if ( !busy && can->mode != MODE_INTERACTIVE ) { |
if ( !busy |
|
&& can->mode != MODE_INTERACTIVE |
|
&& can->mode != MODE_POLARPLOT) { |
if ( can->mode == MODE_PLOT ) |
if ( can->mode == MODE_PLOT ) |
plot_resize(can,spos,e); |
plot_resize(can,spos,e); |
else |
else |
Line 359 search_active_canvas() |
|
Line 361 search_active_canvas() |
|
return -1; |
return -1; |
} |
} |
|
|
|
void popup_canvas(index) |
|
{ |
|
clear_pixmap(canvas[index]); |
|
XtPopup(canvas[index]->shell,XtGrabNone); |
|
copy_to_canvas(canvas[index]); |
|
} |
|
|
void destroy_canvas(w,can,calldata) |
void destroy_canvas(w,can,calldata) |
Widget w; |
Widget w; |
Line 367 struct canvas *can; |
|
Line 374 struct canvas *can; |
|
XtPointer calldata; |
XtPointer calldata; |
{ |
{ |
XtPopdown(can->shell); |
XtPopdown(can->shell); |
XtDestroyWidget(can->shell); |
/* XtDestroyWidget(can->shell); */ |
XFlush(display); |
XFlush(display); |
if ( can == current_can ) { |
if ( can == current_can ) { |
reset_busy(can); current_can = 0; |
reset_busy(can); current_can = 0; |
} |
} |
|
if ( closed_canvas[can->index] ) |
|
XtDestroyWidget(closed_canvas[can->index]->shell); |
|
closed_canvas[can->index] = can; |
canvas[can->index] = 0; |
canvas[can->index] = 0; |
} |
} |
|
|
Line 530 struct canvas *can; |
|
Line 540 struct canvas *can; |
|
|
|
width = can->width; height = can->height; |
width = can->width; height = can->height; |
|
|
sprintf(buf,"%s : %d/%d", can->wname?can->wname:"Plot", |
sprintf(buf,"%s : %d", can->wname?can->wname:"Plot",can->index); |
remotes,can->index); |
|
XtSetArg(arg[0],XtNiconName,buf); |
XtSetArg(arg[0],XtNiconName,buf); |
can->shell = |
can->shell = |
XtCreatePopupShell("shell",topLevelShellWidgetClass,toplevel,arg,1); |
XtCreatePopupShell("shell",topLevelShellWidgetClass,toplevel,arg,1); |