Actions.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int scig_3drot (integer win_num)
int scig_2dzoom (integer win_num)
void scig_unzoom (integer win_num)
void scig_erase (integer win_num)
void scig_sel (integer win_num)
void scig_replay (integer win_num)
void scig_loadsg (int win_num, char *filename)
void scig_expose (integer win_num)
void scig_resize (integer win_num)
void scig_raise (integer win_num)


Function Documentation

int scig_2dzoom ( integer  win_num  ) 

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:

int scig_3drot ( integer  win_num  ) 

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,&macroCallLength,&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_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:


Generated on Sun Mar 4 15:19:51 2007 for Scilab [trunk] by  doxygen 1.5.1