#include <stdio.h>#include <string.h>#include "math_graphics.h"#include "GetProperty.h"#include "SetProperty.h"#include "DrawObjects.h"#include "Xcall1.h"#include "WindowList.h"#include "MALLOC.h"#include "sciprint.h"#include "periScreen.h"Include dependency graph for Actions.c:

Go to the source code of this file.
Typedefs | |
| typedef int Scig_handler | __PARAMS ((int)) |
Functions | |
| int sciSwitchWindow | __PARAMS ((int *winnum)) |
| void sciGetIdFigure | __PARAMS ((int *vect, int *id, int *iflag)) |
| int C2F() | syncexec (char *str, int *ns, int *ierr, int *seq, long int str_len) |
| int | WithBackingStore () |
| int | I3dRotation (void) |
| void | reset_scig_handler (void) |
| int | scig_handler_none (int win_num) |
| void | scig_replay (integer win_num) |
| void | scig_erase (integer win_num) |
| int | scig_2dzoom (integer win_num) |
| void | scig_unzoom (integer win_num) |
| int | scig_3drot (integer win_num) |
| void | scig_sel (integer win_num) |
| void | scig_loadsg (int win_num, char *filename) |
| void | scig_savesg (int win_num, char *filename) |
| void | scig_expose (integer win_num) |
| void | scig_resize (integer win_num) |
| void | scig_raise (integer win_num) |
Variables | |
| int | xinitxend_flag |
| static int | scig_buzy = 0 |
| Scig_handler | scig_handler = scig_handler_none |
| int I3dRotation | ( | void | ) |
Definition at line 631 of file Plo3d.c.
References Abs, wcscalelist::alpha, sciSubWindow::axes, wcscalelist::bbox1, C2F, CheckClickedSubwin(), Cscale, sciSubWindow::cube_scaling, dbox(), dr(), dr1(), echelle2d(), AXES::flag, sciSubWindow::FRect, wcscalelist::frect, int, sciSubWindow::is3d, L, long, wcscalelist::metric3d, NULL, Obj_RedrawNewAngle(), PD0, pFIGURE_FEATURE, PI0, tagSons::pnext, tagSons::pointobj, pSUBWIN_FEATURE, ReleaseWinHdc(), SCI_SUBWIN, sciGetCurrentFigure(), sciGetCurrentSubWin(), sciGetEntityType(), sciGetLastSons(), sciGetSons(), SciMouseCapture(), SciMouseRelease(), sciRedrawFigure(), sciSetSelectedSubWin(), SetWinhdc(), wcscalelist::theta, TRUE, wininfo(), x, xr, y, and yr.
Referenced by scig_3drot().
00632 { 00633 integer pixmode,alumode,verbose=0,narg_,ww; 00634 double xx,yy; 00635 double theta0,alpha0; 00636 static int one=1; 00637 00638 static integer modes[]={1,0};/* for xgemouse only get mouse mouvement*/ 00639 sciSons *psonstmp; 00640 sciPointObj *psubwin, *tmpsubwin; 00641 sciPointObj *pold = NULL; 00642 /* sciPointObj *psurface; */ 00643 integer xr, yr; 00644 00645 00646 integer ibutton,in,iwait=0,istr=0; 00647 integer verbose_=0,ww_; 00648 double x0,yy0,x,y,xl,yl ; 00649 00650 C2F(dr1)("xget","window",&verbose,&ww,&narg_,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00651 00653 C2F(dr)("xget","pixmap",&verbose,&pixmode,&narg_,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00654 C2F(dr)("xget","alufunction",&verbose,&alumode,&narg_,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00655 00656 00657 #ifdef _MSC_VER 00658 SetWinhdc(); 00659 SciMouseCapture(); 00660 #endif 00661 C2F(dr)("xclick","one",&ibutton,&xr,&yr,&iwait,&istr,PI0,PD0,PD0,PD0,PD0,0L,0L); 00662 #ifdef _MSC_VER 00663 ReleaseWinHdc(); 00664 SciMouseRelease(); 00665 #endif 00666 theta=Cscale.theta ; 00667 alpha=Cscale.alpha ; 00668 theta0=theta; 00669 alpha0=alpha; 00670 00671 ibutton=-1; 00672 tmpsubwin = sciGetCurrentSubWin() ; 00673 if ( pFIGURE_FEATURE(sciGetCurrentFigure())->rotstyle == 0) 00674 { 00675 psubwin = CheckClickedSubwin(xr,yr); 00677 if( psubwin != NULL ) 00678 { 00679 sciSubWindow * ppSubWin = pSUBWIN_FEATURE(psubwin) ; 00680 sciSetSelectedSubWin (psubwin); 00681 00682 theta0 = ppSubWin-> theta; 00683 alpha0 = ppSubWin-> alpha; 00684 ppSubWin->is3d = TRUE; 00685 Cscale.metric3d = (long)(ppSubWin->axes.flag[1]+1)/2; 00686 00687 /* Modif. HERE F.Leray 24.05.04 : we take advantage of update_specification_bounds and update_3dbounds previous call */ 00688 /* brect variable should not exist any more.*/ 00689 Cscale.bbox1[0] = ppSubWin->FRect[0]; 00690 Cscale.bbox1[1] = ppSubWin->FRect[2]; 00691 Cscale.bbox1[2] = ppSubWin->FRect[1]; 00692 Cscale.bbox1[3] = ppSubWin->FRect[3]; 00693 Cscale.bbox1[4] = ppSubWin->FRect[4]; 00694 Cscale.bbox1[5] = ppSubWin->FRect[5]; 00695 00696 if( ppSubWin->cube_scaling ) 00697 { 00698 Cscale.bbox1[0] = 0.; 00699 Cscale.bbox1[1] = 1.; 00700 Cscale.bbox1[2] = 0.; 00701 Cscale.bbox1[3] = 1.; 00702 Cscale.bbox1[4] = 0.; 00703 Cscale.bbox1[5] = 1.; 00704 } 00705 } 00706 else 00707 { 00708 wininfo("No 3d object selected"); 00709 return 0; 00710 } 00711 } 00712 else 00713 { 00714 psonstmp = sciGetLastSons (sciGetCurrentFigure()); 00715 while (psonstmp != (sciSons *) NULL) 00716 { 00717 if(sciGetEntityType (psonstmp->pointobj) == SCI_SUBWIN) 00718 break; 00719 psonstmp = psonstmp->pnext; 00720 } 00721 sciSetSelectedSubWin (psonstmp->pointobj); 00722 } 00723 xx=1.0/Abs(Cscale.frect[0]-Cscale.frect[2]); 00724 yy=1.0/Abs(Cscale.frect[1]-Cscale.frect[3]); 00725 00726 C2F(echelle2d)(&x0,&yy0,&xr,&yr,&one,&one,"i2f",3L); 00727 x0=(x0-Cscale.frect[0])*xx; 00728 yy0=(yy0-Cscale.frect[1])*yy; 00729 x=x0;y=yy0; 00730 00731 #ifdef _MSC_VER 00732 SetWinhdc(); 00733 SciMouseCapture(); 00734 #endif 00735 00736 if ( pixmode == 0 ) C2F(dr1)("xset","alufunction",(in=6,&in),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00737 00738 while ( ibutton == -1 ) 00739 { 00740 /* dessin d'un rectangle */ 00741 theta= ((int)(theta0 - 180.0*(x-x0)) % 360); 00742 alpha= ((int)(alpha0 + 180.0*(y-yy0)) % 360); 00743 wininfo("alpha=%.1f,theta=%.1f",alpha,theta); 00744 if ( pixmode == 1) C2F(dr1)("xset","wwpc",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00745 dbox(); 00746 if ( pixmode == 1) C2F(dr1)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00747 C2F(dr1)("xgetmouse","one",&ibutton,&iwait,PI0,PI0,modes,PI0,&xl, &yl,PD0,PD0,0L,0L); 00748 if (ibutton==-100) return 1;/* window has been closed */ 00749 /* effacement du rectangle */ 00750 dbox(); 00751 xx=1.0/Abs(Cscale.frect[0]-Cscale.frect[2]); 00752 yy=1.0/Abs(Cscale.frect[1]-Cscale.frect[3]); 00753 x=(xl-Cscale.frect[0])*xx; 00754 y=(yl-Cscale.frect[1])*yy; 00755 } 00756 if ( pixmode == 0) C2F(dr1)("xset","alufunction",(in=3,&in),PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00757 C2F(dr1)("xget","window",&verbose_,&ww_,&narg_,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00758 C2F(dr1)("xset","alufunction",&alumode,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00759 #ifdef _MSC_VER 00760 ReleaseWinHdc(); 00761 SciMouseRelease(); 00762 #endif 00763 00764 if (pFIGURE_FEATURE((sciPointObj *)sciGetCurrentFigure())->rotstyle == 0){ 00765 pold = sciGetCurrentSubWin(); 00766 sciSetSelectedSubWin(psubwin); 00767 Obj_RedrawNewAngle(psubwin,theta,alpha); 00768 sciSetSelectedSubWin(pold); 00769 } 00770 else 00771 { 00772 psonstmp = sciGetSons (sciGetCurrentFigure()); 00773 while (psonstmp != (sciSons *) NULL) 00774 { 00775 if(sciGetEntityType (psonstmp->pointobj) == SCI_SUBWIN){ 00776 pold = sciGetCurrentSubWin(); 00777 sciSetSelectedSubWin(psonstmp->pointobj); 00778 Obj_RedrawNewAngle(psonstmp->pointobj,theta,alpha); 00779 sciSetSelectedSubWin(pold); 00780 } 00781 psonstmp = psonstmp->pnext; 00782 } 00783 } 00784 sciRedrawFigure(); 00785 wininfo("alpha=%.1f,theta=%.1f",alpha,theta); 00786 sciSetSelectedSubWin (tmpsubwin); 00787 return 0; 00788 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void reset_scig_handler | ( | void | ) |
2D Zoom
Definition at line 129 of file Actions.c.
References C2F, cur, dr(), GetDriver1(), L, na, name, PD0, PI0, and zoom().
Referenced by ON_WND_GRAPH_WM_COMMAND(), SendGraphMacro(), and Zoom().
00130 { 00131 char name[4]; 00132 int ret; 00133 integer verb=0,cur,na; 00134 00135 if ( scig_buzy == 1 ) return 0; ; 00136 scig_buzy =1; 00137 GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00138 00139 C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00140 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00141 ret=zoom(); 00142 if (cur != win_num) 00143 C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00144 C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00145 00146 scig_buzy = 0; 00147 return ret; 00148 }
Here is the call graph for this function:

Here is the caller graph for this function:

3d rotation function
Definition at line 166 of file Actions.c.
References C2F, cur, dr(), GetDriver1(), I3dRotation(), L, na, name, PD0, and PI0.
Referenced by ON_WND_GRAPH_WM_COMMAND(), Rot3D(), and SendGraphMacro().
00167 { 00168 integer verb=0,cur,na,ret; 00169 char name[4]; 00170 if ( scig_buzy == 1 ) return 0; 00171 scig_buzy =1; 00172 GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00173 00174 C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00175 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00176 ret=I3dRotation(); 00177 if (cur != win_num) 00178 C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00179 C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00180 scig_buzy = 0; 00181 return ret; 00182 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void scig_erase | ( | integer | win_num | ) |
clear window
Definition at line 108 of file Actions.c.
References C2F, cur, dr(), GetDriver(), GetDriver1(), L, na, name, PD0, PI0, sciXbasc(), and SetDriver().
Referenced by C2F(), Efface(), and SendGraphMacro().
00109 { 00110 integer verb=0,cur,na; 00111 char name[4]; 00112 if ( scig_buzy == 1 ) return ; 00113 scig_buzy =1; 00114 GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00115 if ( (GetDriver()) !='R') 00116 C2F(SetDriver)("Rec",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00117 C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00118 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00119 sciXbasc() ; 00120 C2F(dr)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00121 C2F(dr)("xstart","v",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00122 C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00123 C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00124 scig_buzy = 0; 00125 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void scig_expose | ( | integer | win_num | ) |
Definition at line 248 of file Actions.c.
References C2F, cur, dr(), GetDriver(), GetDriver1(), L, na, name, PD0, PI0, sciRedrawFigure(), SetDriver(), and WithBackingStore().
Referenced by EventProc1().
00249 { 00250 integer verb=0,cur,pix,na,backing; 00251 char name[4]; 00252 if ( scig_buzy == 1 ) return ; 00253 scig_buzy =1; 00254 GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00255 C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00256 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00257 C2F(dr)("xget","pixmap",&verb,&pix,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00258 00259 #if defined(_MSC_VER) 00260 backing = 0; 00261 #else 00262 backing = WithBackingStore(); 00263 #endif 00264 if (backing) 00265 { 00266 /* only used whith X11 were pixmap mode can be used for backing store 00267 * we are here in a case where the pixmap is used for backing store 00268 */ 00269 C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00270 } 00271 else 00272 { 00273 if (pix == 0) 00274 { 00275 if ( (GetDriver()) != 'R') 00276 C2F(SetDriver)("Rec",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00277 C2F(dr)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00278 sciRedrawFigure(); 00279 C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00280 } 00281 else 00282 { 00283 C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00284 } 00285 } 00286 C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00287 C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00288 scig_buzy = 0; 00289 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void scig_loadsg | ( | int | win_num, | |
| char * | filename | |||
| ) |
Reload a saved graphic
Definition at line 195 of file Actions.c.
References C2F, cur, dr(), FREE, L, MALLOC, NULL, PD0, PI0, sciprint(), and syncexec().
Referenced by SendGraphMacro().
00196 { 00197 integer verb = 0 ; 00198 int cur = 0 ; 00199 int narg = 0 ; 00200 int ierr = 0 ; 00201 int seq = 1 ; 00202 char * macroCall = NULL ; 00203 /* the sting is "xload('(1)')" where (1) is filemame */ 00204 /* Consequently we have 9 fixed character and two variable strings. */ 00205 int macroCallLength = 9 + strlen(filename) ; 00206 00207 if ( scig_buzy == 1 ) { return ; } 00208 scig_buzy = 1 ; 00209 00210 C2F(dr)("xget","window",&verb,&cur,&narg,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00211 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00212 00213 macroCall = MALLOC( (macroCallLength+1) * sizeof(char) ) ; /* +1 for the \0 terminating character */ 00214 sprintf(macroCall,"xload('%s')",filename); 00215 00216 C2F(syncexec)(macroCall,¯oCallLength,&ierr,&seq, macroCallLength ); 00217 00218 FREE( macroCall ) ; 00219 if(ierr != 0) { sciprint("Wrong plot file : %s\r\n",filename) ; } 00220 00221 C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00222 scig_buzy = 0; 00223 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void scig_raise | ( | integer | win_num | ) |
Definition at line 326 of file Actions.c.
References C2F, cur, dr(), iflag, L, n, na, PD0, PI0, sciGetIdFigure(), and sciSwitchWindow().
Referenced by SendCountRaise().
00327 { 00328 00329 int cur,n,na,verb=0,iflag=0; 00330 00331 sciGetIdFigure (PI0,&n,&iflag); 00332 if ( n > 0 ) 00333 { 00334 C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00335 if (win_num != cur) 00336 { 00337 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00338 sciSwitchWindow(&win_num); 00339 C2F(dr)("xselect","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00340 C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00341 } 00342 else 00343 { 00344 C2F(dr)("xselect","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00345 } 00346 } 00347 else 00348 { 00349 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00350 sciSwitchWindow(&win_num); 00351 } 00352 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void scig_replay | ( | integer | win_num | ) |
Basic Replay : redraw recorded graphics
Definition at line 66 of file Actions.c.
References C2F, cur, dr(), GetDriver(), GetDriver1(), L, na, name, PD0, PI0, sciRedrawFigure(), SetDriver(), and WithBackingStore().
Referenced by SendGraphMacro().
00067 { 00068 /* Modification Allan CORNET Mai 2004 */ 00069 integer verb=0,cur,pix,na,backing; 00070 char name[4]; 00071 if ( scig_buzy == 1 ) return ; 00072 scig_buzy =1; 00073 GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00074 C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00075 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00076 C2F(dr)("xget","pixmap",&verb,&pix,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00077 00078 #if defined(_MSC_VER) 00079 backing = 0; 00080 #else 00081 backing = WithBackingStore(); 00082 #endif 00083 if (backing) 00084 { 00085 C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00086 } 00087 else 00088 { 00089 if (pix == 0) 00090 { 00091 if ( (GetDriver()) != 'R') C2F(SetDriver)("Rec",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00092 C2F(dr)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00093 sciRedrawFigure(); 00094 C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00095 } 00096 else 00097 { 00098 C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00099 } 00100 } 00101 00102 C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00103 C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00104 scig_buzy = 0; 00105 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void scig_resize | ( | integer | win_num | ) |
Redraw graphic window win_num after resizing
Definition at line 295 of file Actions.c.
References C2F, CPixmapResize1(), cur, dr(), GetDriver(), GetDriver1(), L, na, name, PD0, PI0, sciRedrawFigure(), SetDriver(), and WithBackingStore().
Referenced by EventProc1().
00296 { 00297 integer verb=0,cur,na,pix,backing; 00298 char name[4]; 00299 if ( scig_buzy == 1 ) return ; 00300 scig_buzy =1; 00301 GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00302 if ( (GetDriver()) !='R') 00303 C2F(SetDriver)("Rec",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00304 C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00305 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00306 C2F(dr)("xget","pixmap",&verb,&pix,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00307 CPixmapResize1(); 00308 C2F(dr)("xclear","v",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00309 #if defined(_MSC_VER) 00310 backing = 0; 00311 #else 00312 backing = WithBackingStore(); 00313 #endif 00314 sciRedrawFigure(); 00315 if (backing && pix!=1 ) C2F(dr)("xset","wshow",PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00316 00317 C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00318 C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00319 scig_buzy = 0; 00320 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void scig_savesg | ( | int | win_num, | |
| char * | filename | |||
| ) |
Definition at line 225 of file Actions.c.
References C2F, FREE, GET_NB_DIGITS, MALLOC, NULL, and syncexec().
Referenced by SendGraphMacro().
00226 { 00227 integer ierr ; 00228 integer seq = 1 ; 00229 char * macroCall = NULL ; 00230 00231 /* the sting is "xsave('(1)',(2))" where (1) is filemame and (2) the string */ 00232 /* corresponding of win_num. Consequently we have 10 fixed character and two variable strings. */ 00233 int macroCallLength = 10 + strlen(filename) + GET_NB_DIGITS(win_num) ; 00234 00235 macroCall = MALLOC( (macroCallLength+1) * sizeof(char) ) ; /* +1 for the \0 terminating character */ 00236 00237 sprintf( macroCall, "xsave('%s',%d)", filename, win_num ) ; /* call xsave macro */ 00238 C2F(syncexec)(macroCall,¯oCallLength,&ierr,&seq, macroCallLength ); 00239 FREE( macroCall ) ; 00240 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void scig_sel | ( | integer | win_num | ) |
graphic Window selection
Definition at line 184 of file Actions.c.
References C2F, dr(), GetDriver(), L, PD0, PI0, sciSwitchWindow(), and v.
Referenced by Select(), SendCountSet(), SendGraphMacro(), and SetCurrentFigureWindows().
00185 { 00186 char c ; 00187 int v=1; 00188 if ((c=GetDriver())=='R' || c == 'X' || c == 'W') 00189 { 00190 C2F(dr)("xset","window",&win_num,&v,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00191 sciSwitchWindow(&win_num) ; 00192 } 00193 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void scig_unzoom | ( | integer | win_num | ) |
Unzoom function
Definition at line 150 of file Actions.c.
References C2F, cur, dr(), GetDriver1(), L, na, name, PD0, PI0, and unzoom().
Referenced by ON_WND_GRAPH_WM_COMMAND(), SendGraphMacro(), and UnZoom().
00151 { 00152 integer verb=0,cur,na; 00153 char name[4]; 00154 if ( scig_buzy == 1 ) return ; 00155 scig_buzy =1; 00156 GetDriver1(name,PI0,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0); 00157 C2F(dr)("xget","window",&verb,&cur,&na,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00158 C2F(dr)("xset","window",&win_num,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00159 unzoom(); 00160 if (cur != win_num) 00161 C2F(dr)("xset","window",&cur,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00162 C2F(dr)("xsetdr",name, PI0, PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00163 scig_buzy = 0; 00164 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1525 of file parse.c.
01526 { 01527 01528 /* Local variables */ 01529 int Pts, Tops; 01530 extern int C2F(iset)(); 01531 extern int C2F(callinterf)(), C2F(ref2val)(); 01532 static int iflagint; 01533 static int k; 01534 static int ir; 01535 01536 static int *Ids = C2F(recu).ids-nsiz-1; 01537 static int *Rstk = C2F(recu).rstk-1; 01538 static int *Lstk = C2F(vstk).lstk-1; 01539 static int *Infstk = C2F(vstk).infstk-1; 01540 01541 Pt = max(Pt,0);Pts=Pt; 01542 Top = max(Top,0);Tops=Top; 01543 C2F(basbrk).interruptible = *seq != 0; 01544 C2F(bexec)(str, ns, ierr, (*ns)); 01545 if (*ierr != 0) { 01546 goto L9998; 01547 } 01548 /* + */ 01549 if (Eptover(1)) { 01550 goto L9998; 01551 } 01552 Ids[1 + Pt * nsiz] = Lhs; 01553 Ids[2 + Pt * nsiz] = Rhs; 01554 Ids[3 + Pt * nsiz] = C2F(com).sym; 01555 Rstk[Pt] = 1002; 01556 ++C2F(recu).niv; 01557 C2F(com).fun = 0; 01558 C2F(recu).icall = 5; 01559 01560 /* code translated from callinterf.h */ 01561 L60: 01562 01563 C2F(parse)(); 01564 if (C2F(iop).err > 0) { 01565 goto L9999; 01566 } 01567 01568 if (C2F(com).fun == 99) { 01569 C2F(com).fun = 0; 01570 goto L200; 01571 } 01572 01573 if (Rstk[Pt] / 100 == 9) { 01574 ir = Rstk[Pt] - 900; 01575 if (ir == 1) { 01576 /* back to matsys */ 01577 k = 13; 01578 } else if (ir >= 2 && ir <= 9) { 01579 /* back to matio */ 01580 k = 5; 01581 } else if (ir == 10) { 01582 /* end of overloaded function */ 01583 goto L96; 01584 } else if (ir > 40) { 01585 /* back to gw_user2 */ 01586 k = 24; 01587 } else if (ir > 20) { 01588 /* back to gw_user */ 01589 k = 14; 01590 } else { 01591 goto L89; 01592 } 01593 iflagint = 0; 01594 goto L95; 01595 } 01596 01597 L89: 01598 if (Top < Rhs) { 01599 SciError(22); 01600 goto L9999; 01601 } 01602 if (Top - Rhs + Lhs + 1 >= C2F(vstk).bot) { 01603 SciError(18); 01604 goto L9999; 01605 } 01606 goto L91; 01607 01608 L90: 01609 if (C2F(iop).err > 0) { 01610 goto L9999; 01611 } 01612 L91: 01613 k = C2F(com).fun; 01614 C2F(com).fun = 0; 01615 if (k == C2F(recu).krec) { 01616 C2F(recu).krec = -1; 01617 SciError(22); 01618 goto L9999; 01619 } 01620 C2F(recu).krec = -1; 01621 if (k == 0) { 01622 goto L60; 01623 } 01624 L95: 01625 if (! C2F(allowptr)(&k)) { 01626 C2F(ref2val)(); 01627 } 01628 C2F(recu).krec = k; 01629 C2F(callinterf)(&k, &iflagint); 01630 /* if (k.eq.krec) krec=99999 */ 01631 C2F(recu).krec = -1; 01632 if (C2F(com).fun >= 0) { 01633 if (Top - Lhs + 1 > 0) { 01634 C2F(iset)(&Rhs, &c__0, &Infstk[Top - Lhs+1], &c__1); 01635 } 01636 goto L90; 01637 } 01638 /* called interface ask for a scilab function to perform the function (fun=-1) */ 01639 /* the function name is given in ids(1,pt+1) */ 01640 C2F(ref2val)(); 01641 C2F(com).fun = 0; 01642 C2F(funs)(&Ids[1 + (Pt + 1) * nsiz]); 01643 if (C2F(iop).err > 0) { 01644 goto L9999; 01645 } 01646 if (C2F(com).fun > 0) { 01647 goto L91; 01648 } 01649 if (C2F(com).fin == 0) { 01650 SciError(246); 01651 if (C2F(iop).err > 0) { 01652 goto L9999; 01653 } 01654 goto L90; 01655 } 01656 ++Pt; 01657 C2F(com).fin = Lstk[C2F(com).fin]; 01658 Rstk[Pt] = 910; 01659 C2F(recu).icall = 5; 01660 C2F(com).fun = 0; 01661 /* *call* macro */ 01662 goto L60; 01663 L96: 01664 --Pt; 01665 goto L90; 01666 /* End of callinterf.h code */ 01667 01668 L200: 01669 Lhs = Ids[1 + Pt * nsiz]; 01670 Rhs = Ids[2 + Pt * nsiz]; 01671 C2F(com).sym = Ids[3 + Pt * nsiz]; 01672 --Pt; 01673 --Top; 01674 /* + */ 01675 --C2F(recu).niv; 01676 *ierr = 0; 01677 C2F(recu).icall = 0; 01678 C2F(com).fin = 3; 01679 C2F(basbrk).interruptible = TRUE_; 01680 return 0; 01681 L9998: 01682 *ierr = 1; 01683 Pt=Pts;Top=Tops; 01684 C2F(basbrk).interruptible = TRUE_; 01685 01686 return 0; 01687 L9999: 01688 /* Err == 9999999 arises if abort has been used to terminate the callback execution */ 01689 if (Err != 9999999) *ierr = 1; 01690 --Top; 01691 --C2F(recu).niv; 01692 Pt=Pts;Top=Tops; 01693 C2F(basbrk).interruptible = TRUE_; 01694 return 0; 01695 } /* syncexec */
| int WithBackingStore | ( | ) |
Definition at line 294 of file periX11.c.
References BCG::Cdrawable, and ScilabXgc.
Referenced by scig_expose(), scig_replay(), and scig_resize().
Here is the caller graph for this function:

| Scig_handler scig_handler = scig_handler_none |
1.5.1