version 1.30, 2013/11/05 02:55:03 |
version 1.32, 2014/06/27 07:58:29 |
|
|
* 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.29 2007/01/30 03:25:52 saito Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c,v 1.31 2014/05/12 16:54:41 saito Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 198 void motion(Widget w,struct canvas *can,XMotionEvent * |
|
Line 198 void motion(Widget w,struct canvas *can,XMotionEvent * |
|
void release(Widget w,struct canvas *can,XButtonEvent *ev) |
void release(Widget w,struct canvas *can,XButtonEvent *ev) |
{ |
{ |
POINT e; |
POINT e; |
|
|
switch ( ev->button ) { |
switch ( ev->button ) { |
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 |
if(!busy |
&& can->mode != MODE_INTERACTIVE |
&& can->mode != modeNO(INTERACTIVE) |
&& can->mode != MODE_POLARPLOT) { |
&& can->mode != modeNO(POLARPLOT)) plot_resize(can,spos,e); |
if ( can->mode == MODE_PLOT ) |
|
plot_resize(can,spos,e); |
|
else |
|
ifplot_resize(can,spos,e); |
|
} |
|
break; |
break; |
default: |
default: |
break; |
break; |
Line 589 void create_canvas(struct canvas *can) |
|
Line 583 void create_canvas(struct canvas *can) |
|
XtAddEventHandler(canvas,StructureNotifyMask,False,(XtEventHandler)structure,can); |
XtAddEventHandler(canvas,StructureNotifyMask,False,(XtEventHandler)structure,can); |
XtAddEventHandler(canvas,ExposureMask,False,(XtEventHandler)structure,can); |
XtAddEventHandler(canvas,ExposureMask,False,(XtEventHandler)structure,can); |
|
|
if ( can->mode == MODE_CONPLOT ) { |
if ( can->mode == modeNO(CONPLOT) ) { |
XtSetArg(arg[0],XtNwidth,LABELWIDTH); |
XtSetArg(arg[0],XtNwidth,LABELWIDTH); |
can->level = XtCreateManagedWidget("level",labelWidgetClass, |
can->level = XtCreateManagedWidget("level",labelWidgetClass, |
commands,arg,1); |
commands,arg,1); |
Line 604 void create_canvas(struct canvas *can) |
|
Line 598 void create_canvas(struct canvas *can) |
|
XtAddEventHandler(can->ydone,ButtonReleaseMask,False,(XtEventHandler)lrelease_m,can); |
XtAddEventHandler(can->ydone,ButtonReleaseMask,False,(XtEventHandler)lrelease_m,can); |
} |
} |
} |
} |
if ( can->mode != MODE_IFPLOT || !qpcheck((Obj)can->formula) ) |
if ( can->mode != modeNO(IFPLOT) || !qpcheck((Obj)can->formula) ) |
XtSetSensitive(precise,False); |
XtSetSensitive(precise,False); |
XtPopup(can->shell,XtGrabNone); |
XtPopup(can->shell,XtGrabNone); |
SetWM_Proto(can->shell); |
SetWM_Proto(can->shell); |
Line 844 void reset_busy(struct canvas *can) |
|
Line 838 void reset_busy(struct canvas *can) |
|
if ( can->window ) { |
if ( can->window ) { |
XtSetSensitive(can->wideb,True); |
XtSetSensitive(can->wideb,True); |
XtSetSensitive(can->noaxisb,True); |
XtSetSensitive(can->noaxisb,True); |
if ( can->mode == MODE_IFPLOT && qpcheck((Obj)can->formula) ) |
if ( can->mode == modeNO(IFPLOT) && qpcheck((Obj)can->formula) ) |
XtSetSensitive(can->preciseb,True); |
XtSetSensitive(can->preciseb,True); |
XFlush(display); |
XFlush(display); |
} |
} |