CurrentObjectsManagement.c File Reference

#include "CurrentObjectsManagement.h"
#include "Xcall1.h"
#include "BuildObjects.h"
#include "GetProperty.h"
#include "SetProperty.h"
#include "ObjectSelection.h"

Include dependency graph for CurrentObjectsManagement.c:

Go to the source code of this file.

Functions

int get_cf_type (void)
void set_cf_type (int val)
sciPointObjsciGetCurrentFigure (void)
int sciInitCurrentFigure (sciPointObj *mafigure)
int sciSetCurrentFigure (sciPointObj *mafigure)
sciPointObjsciGetCurPointedFigure (void)
BCGsciGetCurrentScilabXgc (void)
sciPointObjsciGetCurrentObj (void)
void sciSetCurrentObj (sciPointObj *pobj)
long sciGetCurrentHandle (void)
sciPointObjsciGetCurrentFrame (void)
int sciInitCurrentFrame (sciPointObj *pFrame)
int sciSetCurrentFrame (sciPointObj *pFrame)
sciPointObjsciGetCurrentWindow (void)
sciPointObjsciGetCurrentWindowFrame (void)
sciPointObjsciGetCurrentScreen (void)
sciPointObjsciGetCurrentSubWin (void)
sciPointObjsciGetCurrentConsole (void)

Variables

static sciPointObjsciScreenRoot = NULL
static sciPointObjsciCurrentObject = NULL
static int cf_type = 1


Function Documentation

int get_cf_type ( void   ) 

To know if the current figure is a graphic one.

Definition at line 23 of file CurrentObjectsManagement.c.

References cf_type.

00024 {
00025   return cf_type ;
00026 }

sciPointObj* sciGetCurPointedFigure ( void   ) 

as sciGetCurrentFigure but do not create any figure if none exists.

Definition at line 85 of file CurrentObjectsManagement.c.

References BCG::mafigure, NULL, and sciGetCurrentScilabXgc().

00086 {
00087   if ( sciGetCurrentScilabXgc() != NULL )
00088   {
00089     return sciGetCurrentScilabXgc()->mafigure ;
00090   }
00091   else
00092   {
00093     return NULL ;
00094   }
00095 }

Here is the call graph for this function:

sciPointObj* sciGetCurrentConsole ( void   ) 

Definition at line 151 of file CurrentObjectsManagement.c.

References SCI_CONSOLE, sciGetCurrentFrame(), and sciGetFirstTypedSelectedSon().

00152 {
00153   return sciGetFirstTypedSelectedSon( sciGetCurrentFrame(), SCI_CONSOLE ) ;
00154 }

Here is the call graph for this function:

sciPointObj* sciGetCurrentFigure ( void   ) 

Returns the pointer to the current selected figure.

Definition at line 33 of file CurrentObjectsManagement.c.

References ConstructFigure(), ConstructSubWin(), BCG::CurWindow, BCG::mafigure, NULL, sciGetCurrentScilabXgc(), sciSetCurrentObj(), sciSetOriginalSubWin(), and set_cf_type().

Referenced by callXstringL(), champg(), CheckClickedSubwin(), CleanPlots(), fec(), get_current_figure_property(), I3dRotation(), Nsetscale2d(), Objarc(), Objdrawaxis(), Objfpoly(), Objplot3d(), Objpoly(), Objrect(), Objsegs(), Objstring(), Objtitle(), plot2dn(), sci_drawlater(), sci_drawnow(), sci_newaxes(), sci_show_window(), sci_UImenu(), sci_xend(), sci_xfpoly(), sci_xfpolys(), sci_xget(), sci_xgrid(), sci_xname(), sci_xpoly(), sci_xpolys(), sci_xrect(), sci_xrects(), sci_xsegs(), sci_xset(), sciDrawFigure(), scig_toPs(), sciGetCurrentSubWin(), sciGetScreenPosition(), sciInitdrawmode(), sciInitFigureIconify(), sciIsExistingSubWin(), sciRedrawFigure(), sciSetColormap(), sciSetDefaultValues(), sciSetdrawmode(), sciXbasc(), sciXclear(), unzoom(), unzoom_one_axes(), xgetg(), xgray(), xgray1(), xgray2(), xsetg(), and zoom_box().

00034 {
00035   /* debug F.Leray 22.07.04 */
00036   struct BCG * moncurScilabXgc = NULL;
00037   sciPointObj * pfigure = NULL;
00038 
00039 
00040   static sciPointObj *mafigure;
00041   static sciPointObj *masousfen;  
00042 
00043   moncurScilabXgc = sciGetCurrentScilabXgc();
00044   if(moncurScilabXgc == (struct BCG *) NULL)
00045     return (sciPointObj *) NULL;
00046 
00047   pfigure = (sciPointObj *) (moncurScilabXgc->mafigure);
00048 
00049   if(pfigure == (sciPointObj *) NULL )
00050   {
00051     /* it would mean that we have change the driver to GIF,Pos or PPM and perform a xinit F.Leray 22.07.04 */
00052     /* for now, no higher entities than figure */
00053     if ((mafigure = ConstructFigure( NULL, moncurScilabXgc)) != NULL)
00054     {
00055       sciSetCurrentObj (mafigure); 
00056       moncurScilabXgc->mafigure = mafigure;
00057       if ((masousfen = ConstructSubWin (mafigure, moncurScilabXgc->CurWindow)) != NULL) {
00058         sciSetCurrentObj (masousfen);
00059         sciSetOriginalSubWin (mafigure, masousfen);
00060         set_cf_type(1);/* current figure is a graphic one */
00061       }
00062     }
00063   }
00064 
00065   return sciGetCurrentScilabXgc()->mafigure  ;
00066 }

Here is the call graph for this function:

Here is the caller graph for this function:

sciPointObj* sciGetCurrentFrame ( void   ) 

Definition at line 121 of file CurrentObjectsManagement.c.

References NULL.

Referenced by sciGetCurrentConsole().

00122 {
00123   return NULL ;
00124 }

Here is the caller graph for this function:

long sciGetCurrentHandle ( void   ) 

Return the handle on the current object

Definition at line 116 of file CurrentObjectsManagement.c.

References sciGetCurrentObj(), and sciGetHandle().

00117 {
00118   return sciGetHandle( sciGetCurrentObj() );
00119 }

Here is the call graph for this function:

sciPointObj* sciGetCurrentObj ( void   ) 

Get the current Object

Definition at line 106 of file CurrentObjectsManagement.c.

References sciCurrentObject.

Referenced by champg(), fec(), get_current_entity_property(), Objarc(), Objdrawaxis(), Objfpoly(), Objplot3d(), Objpoly(), Objsegs(), Objstring(), Objtitle(), plot2dn(), sci_delete(), sci_draw(), sci_get(), sci_glue(), sci_set(), sci_xfpoly(), sci_xfpolys(), sci_xpoly(), sci_xpolys(), sci_xrect(), sci_xrects(), sci_xsegs(), sciGetCurrentHandle(), xgray(), xgray1(), and xgray2().

00107 {
00108   return sciCurrentObject ;
00109 }

Here is the caller graph for this function:

struct BCG* sciGetCurrentScilabXgc ( void   ) 

Return the Bcg of the currently selected figure

Definition at line 97 of file CurrentObjectsManagement.c.

References C2F, dr(), L, NULL, PD0, and PI0.

Referenced by plot2dn(), sciGetCurPointedFigure(), sciGetCurrentFigure(), sciInitCurrentFigure(), and sciInitIs3d().

00098 {
00099   int verbose = 0 ;
00100   double * XGC = NULL ;
00101 
00102   C2F(dr)("xget","gc",&verbose,PI0,PI0,PI0,PI0,PI0,(double*)&XGC,PD0,PD0,PD0,5L,10L) ;
00103   return (struct BCG *) XGC;
00104 }

Here is the call graph for this function:

Here is the caller graph for this function:

sciPointObj* sciGetCurrentScreen ( void   ) 

Definition at line 140 of file CurrentObjectsManagement.c.

References sciScreenRoot.

Referenced by sciGetCurrentWindowFrame().

00141 {
00142   /* the screen */
00143   return sciScreenRoot ;
00144 }

Here is the caller graph for this function:

sciPointObj* sciGetCurrentSubWin ( void   ) 

Definition at line 146 of file CurrentObjectsManagement.c.

References SCI_SUBWIN, sciGetCurrentFigure(), and sciGetFirstTypedSelectedSon().

Referenced by Axes3dStrings2(), axis_draw(), axis_draw2(), box3d(), champg(), checkRedrawing(), ComputeC_format(), ConstructCompoundSeq(), ConstructSegs(), DrawAxesBackground(), DrawAxis(), fac3dn(), fec(), Gen3DPoints(), geom3d(), get_current_axes_property(), get_labels_arg(), Gr_Rescale(), I3dRotation(), initsubwin(), Nsetscale2d(), Objarc(), Objdrawaxis(), Objfpoly(), Objplot3d(), Objpoly(), Objrect(), Objsegs(), Objstring(), Objtitle(), Plo2d3RealToPixel(), plot2dn(), plot3dn(), sci_addcb(), Sci_Axis(), sci_draw(), sci_get(), sci_set(), sci_xarc(), sci_xarcs(), sci_xfpoly(), sci_xfpolys(), sci_xget(), sci_xgrid(), sci_xpoly(), sci_xpolys(), sci_xrect(), sci_xrects(), sci_xsegs(), sci_xset(), sci_xstringl(), sci_xtitle(), sciChamp2DRealToPixel(), sciXclear(), UpdateSubwinScale(), XDPi2R(), xgray(), xgray1(), xgray2(), XLogScale(), XPi2R(), XScale(), YDPi2R(), YLogScale(), YPi2R(), YScale(), Zoom3d_XPi2R(), Zoom3d_YPi2R(), and zoom_box().

00147 {
00148   return sciGetFirstTypedSelectedSon( sciGetCurrentFigure(), SCI_SUBWIN ) ;
00149 }

Here is the call graph for this function:

Here is the caller graph for this function:

sciPointObj* sciGetCurrentWindow ( void   ) 

Definition at line 130 of file CurrentObjectsManagement.c.

References SCI_WINDOW, sciGetCurrentWindowFrame(), and sciGetFirstTypedSelectedSon().

Here is the call graph for this function:

sciPointObj* sciGetCurrentWindowFrame ( void   ) 

Definition at line 135 of file CurrentObjectsManagement.c.

References SCI_WINDOWFRAME, sciGetCurrentScreen(), and sciGetFirstTypedSelectedSon().

Referenced by sciGetCurrentWindow().

Here is the call graph for this function:

Here is the caller graph for this function:

int sciInitCurrentFigure ( sciPointObj mafigure  ) 

Definition at line 68 of file CurrentObjectsManagement.c.

References BCG::mafigure, sciGetCurrentScilabXgc(), and set_cf_type().

00069 {
00070   sciGetCurrentScilabXgc()->mafigure = mafigure ;
00071   set_cf_type(1);/* current figure is a graphic one */
00072   return 0 ;
00073 }

Here is the call graph for this function:

int sciInitCurrentFrame ( sciPointObj pFrame  ) 

int sciSetCurrentFigure ( sciPointObj mafigure  ) 

Definition at line 75 of file CurrentObjectsManagement.c.

References BCG::mafigure, sciGetCurPointedFigure(), and sciInitCurrentFigure().

00076 {
00077   if ( sciGetCurPointedFigure() == mafigure )
00078   {
00079     /* nothing to do */
00080     return 1 ;
00081   }
00082   return sciInitCurrentFigure( mafigure ) ;
00083 }

Here is the call graph for this function:

int sciSetCurrentFrame ( sciPointObj pFrame  ) 

void sciSetCurrentObj ( sciPointObj pobj  ) 

Definition at line 111 of file CurrentObjectsManagement.c.

References sciCurrentObject.

Referenced by champg(), CloneArc(), ClonePolyline(), CloneRectangle(), CloneText(), delete_sgwin_entities(), fec(), Nsetscale2d(), Objarc(), Objdrawaxis(), Objfpoly(), Objplot3d(), Objpoly(), Objrect(), Objsegs(), Objstring(), Objtitle(), plot2dn(), sci_delete(), sci_glue(), sci_newaxes(), sci_xarcs(), sci_xfarcs(), sci_xfpolys(), sci_xpolys(), sci_xrects(), sci_xtitle(), sciGetCurrentFigure(), sciSwitchWindow(), sciUnCompound(), sciXbasc(), set_current_entity_property(), xgray(), xgray1(), and xgray2().

00112 {
00113   sciCurrentObject = pobj ;
00114 }

Here is the caller graph for this function:

void set_cf_type ( int  val  ) 

Definition at line 28 of file CurrentObjectsManagement.c.

References cf_type.

00029 {
00030   cf_type = val ;
00031 }


Variable Documentation

int cf_type = 1 [static]

Definition at line 21 of file CurrentObjectsManagement.c.

sciPointObj* sciCurrentObject = NULL [static]

Definition at line 19 of file CurrentObjectsManagement.c.

Referenced by sciGetCurrentObj(), and sciSetCurrentObj().

sciPointObj* sciScreenRoot = NULL [static]

Definition at line 18 of file CurrentObjectsManagement.c.

Referenced by sciGetCurrentScreen().


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