DestroyObjects.h File Reference

#include "ObjectStructure.h"
#include "HandleManagement.h"

Include dependency graph for DestroyObjects.h:

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

Go to the source code of this file.

Defines

#define SciGerase()   { if( C2F(scigerase)() !=0 ) { Scierror(999,"%s :Requested figure cannot be created \r\n",fname) ; return 0 ; } }

Functions

int DestroyAllGraphicsSons (sciPointObj *pthis)
void AllGraphWinDelete (void)
int C2F() scigerase (void)
int DestroyFigure (sciPointObj *pthis)
int DestroyStatusBar (sciPointObj *pthis)
int DestroySubWin (sciPointObj *pthis)
int DestroyScrollV (sciPointObj *pthis)
int DestroyScrollH (sciPointObj *pthis)
int deallocateText (sciPointObj *pthis)
int DestroyText (sciPointObj *pthis)
int DestroyTitle (sciPointObj *pthis)
int DestroyLegend (sciPointObj *pthis)
int DestroyPolyline (sciPointObj *pthis)
int DestroyArc (sciPointObj *pthis)
int DestroyRectangle (sciPointObj *pthis)
int DestroySurface (sciPointObj *pthis)
int DestroyMerge (sciPointObj *pthis)
int DestroyGrayplot (sciPointObj *pthis)
int DestroyAxes (sciPointObj *pthis)
int DestroyFec (sciPointObj *pthis)
int DestroySegs (sciPointObj *pthis)
int DestroyCompound (sciPointObj *pthis)
void DeleteObjs (int win)
int sciUnCompound (sciPointObj *pobj)
int sciDelGraphicObj (sciPointObj *pthis)
int DestroyLabel (sciPointObj *pthis)
int DestroyUimenu (sciPointObj *pthis)
int sciDestroyConsole (sciPointObj *pthis)
int sciDestroyFrame (sciPointObj *pThis)
int sciDestroyWindow (sciPointObj *pThis)
int sciDestroyWindowFrame (sciPointObj *pThis)
int sciDestroyScreen (sciPointObj *pThis)
int sciDelLabelsMenu (sciPointObj *pthis)
int DestroyMenuContext (sciPointObj *pthis)
int DestroySciMenu (sciPointObj *pthis)
void delete_sgwin_entities (int win_num)
void clearUserData (sciPointObj *pObj)
void sciDeleteWindow (int winNum)
int updateMerge (sciPointObj *pSubwin)
void CleanPlots (char *unused, integer *winnumber, integer *v3, integer *v4, integer *v5, integer *v6, integer *v7, double *dx1, double *dx2, double *dx3, double *dx4)
int sciStandardDestroyOperations (sciPointObj *pThis)


Define Documentation

 
#define SciGerase (  )     { if( C2F(scigerase)() !=0 ) { Scierror(999,"%s :Requested figure cannot be created \r\n",fname) ; return 0 ; } }

Definition at line 27 of file DestroyObjects.h.

Referenced by sci_champ_G(), sci_fec(), sci_grayplot(), sci_matplot(), sci_param3d(), sci_param3d1(), sci_plot2d(), and sci_plot3d().


Function Documentation

void AllGraphWinDelete ( void   ) 

Definition at line 838 of file DestroyObjects.c.

References C2F, deletewin(), FREE, i, iflag, MALLOC, NULL, num, and sciGetIdFigure().

Referenced by closeGraphicModule().

00839 {
00840 
00841   integer iflag=0,num=0;
00842   int *ArrayWGraph=NULL;
00843 
00844   sciGetIdFigure (ArrayWGraph,&num,&iflag);
00845 
00846   if (num > 0)
00847   {
00848     int i=0;
00849     ArrayWGraph=(int*)MALLOC(sizeof(int)*num);
00850 
00851     iflag = 1;
00852     sciGetIdFigure (ArrayWGraph,&num,&iflag);
00853 
00854     for (i=0;i<num;i++)
00855     {
00856       C2F (deletewin) (&ArrayWGraph[i]);
00857       FREE (ArrayWGraph);
00858     }
00859     ArrayWGraph=NULL;
00860   }
00861 }

Here is the call graph for this function:

Here is the caller graph for this function:

void CleanPlots ( char *  unused,
integer winnumber,
integer v3,
integer v4,
integer v5,
integer v6,
integer v7,
double *  dx1,
double *  dx2,
double *  dx3,
double *  dx4 
)

Definition at line 863 of file DestroyObjects.c.

References Cscale2default(), del_window_scale(), sciGetCurrentFigure(), sciGetNum(), and set_window_scale_with_default().

Referenced by xcall_in_word_set().

00864 {
00865   
00866   /* we remove scales in window number i */
00867   del_window_scale(*winnumber);
00868   /* if *winnumber is also the current window we reset Cscale to default value */
00869   if ( *winnumber == sciGetNum(sciGetCurrentFigure()) ) 
00870   {
00871     Cscale2default();
00872   }
00873   else
00874   {
00875     set_window_scale_with_default(*winnumber);
00876   }
00877 }

Here is the call graph for this function:

Here is the caller graph for this function:

void clearUserData ( sciPointObj pObj  ) 

Definition at line 791 of file DestroyObjects.c.

References FREE, NULL, and sciGetPointerToUserData().

Referenced by initsubwin(), and sciStandardDestroyOperations().

00792 {
00793   int ** pUserData ;
00794   int *  pSizeUD   ;
00795   sciGetPointerToUserData( pObj, &pUserData, &pSizeUD ) ;
00796   if ( pUserData != NULL && *pUserData != NULL )
00797   {
00798     FREE( *pUserData ) ;
00799     *pUserData = NULL ;
00800     *pSizeUD = 0 ;
00801   }
00802 }

Here is the call graph for this function:

Here is the caller graph for this function:

int deallocateText ( sciPointObj pthis  ) 

free the structure used by the text object but does not remove the relationship links.

Definition at line 365 of file DestroyObjects.c.

References deleteMatrix(), FREE, pTEXT_FEATURE, sciGetFontContext(), and sciGetPointerToFeature().

Referenced by ConstructLabel(), ConstructText(), DestroyLabel(), and initLabel().

00366 {
00367   deleteMatrix( pTEXT_FEATURE(pthis)->pStrings ) ;
00368   FREE (pTEXT_FEATURE (pthis)->user_data);
00369   pTEXT_FEATURE (pthis)->size_of_user_data = 0;
00370 
00371   FREE (sciGetFontContext(pthis)->pfontname);
00372   FREE (sciGetPointerToFeature (pthis));
00373   FREE (pthis);
00374 
00375   return 0;
00376 }

Here is the call graph for this function:

Here is the caller graph for this function:

void delete_sgwin_entities ( int  win_num  ) 

delete_sgwin_entities(int win_num) This function is to be called after window deletion

Definition at line 758 of file DestroyObjects.c.

Referenced by C2F(), and Delete().

00759 {
00760   double dv=0;
00761   double *XGC;
00762   struct BCG *CurrentScilabXgc; 
00763   int v=0;
00764   /* Need to reset the new current figure returned by sciGetCurrentFigure */
00765   sciHandleTab *hdl = NULL;
00766   sciPointObj  *pobj= NULL;
00767 
00768   C2F(dr)("xget","gc",&v,&v,&v,&v,&v,&v,(double *)&XGC,&dv,&dv,&dv,5L,10L); /* ajout cast ???*/
00769   CurrentScilabXgc=(struct BCG *)XGC;
00770 
00771 
00772   hdl = sciGetpendofhandletab();
00773 
00774   if(CurrentScilabXgc != NULL)
00775     while (hdl != NULL)
00776     {
00777       pobj=(sciPointObj *) sciGetPointerFromHandle (hdl->index);
00778       if (sciGetEntityType(pobj) == SCI_FIGURE && sciGetNum(pobj) == CurrentScilabXgc->CurWindow ) /* Adding F.Leray 19.04.04 */
00779       {
00780         sciSetCurrentFigure(pobj);
00781         sciSetCurrentObj(pobj); /* The current object will always be the figure too. */
00782         break;
00783 
00784       }
00785       hdl = hdl->pprev;
00786     }
00787 }

Here is the caller graph for this function:

void DeleteObjs ( int  win  ) 

Referenced by C2F(), and Delete().

Here is the caller graph for this function:

int DestroyAllGraphicsSons ( sciPointObj pthis  ) 

Definition at line 55 of file DestroyObjects.c.

References DestroyAllGraphicsSons(), DestroyArc(), DestroyAxes(), DestroyCompound(), DestroyFec(), DestroyGrayplot(), DestroyLabel(), DestroyLegend(), DestroyMenuContext(), DestroyMerge(), DestroyPolyline(), DestroyRectangle(), DestroySciMenu(), DestroyScrollH(), DestroyScrollV(), DestroySegs(), DestroyStatusBar(), DestroySubWin(), DestroySurface(), DestroyText(), DestroyTitle(), DestroyUimenu(), NULL, tagSons::pointobj, SCI_AGREG, SCI_ARC, SCI_AXES, SCI_CONSOLE, SCI_FEC, SCI_FIGURE, SCI_FRAME, SCI_GRAYPLOT, SCI_LABEL, SCI_LEGEND, SCI_LIGHT, SCI_MENU, SCI_MENUCONTEXT, SCI_MERGE, SCI_PANNER, SCI_POLYLINE, SCI_RECTANGLE, SCI_SBH, SCI_SBV, SCI_SCREEN, SCI_SEGS, SCI_STATUSB, SCI_SUBWIN, SCI_SURFACE, SCI_TEXT, SCI_TITLE, SCI_UIMENU, SCI_WINDOW, SCI_WINDOWFRAME, sciDestroyConsole(), sciDestroyFrame(), sciDestroyScreen(), sciDestroyWindow(), sciDestroyWindowFrame(), sciGetEntityType(), sciGetSons(), and sciprint().

Referenced by clearSubWin(), DeleteObjs(), DestroyAllGraphicsSons(), destroyDefaultObjects(), sci_xend(), sciDelGraphicObj(), and sciXbasc().

00056 {
00057   /* to destroy only the sons put the while into the switch !*/
00058   sciSons *toto = NULL;
00059  
00060   toto = sciGetSons (pthis);
00061   while ((toto != (sciSons *) NULL) &&
00062          (toto->pointobj != (sciPointObj *) NULL))
00063     {
00064       DestroyAllGraphicsSons (toto->pointobj);
00065       toto = sciGetSons (pthis);
00066     }
00067   switch (sciGetEntityType (pthis))
00068     {
00069 
00070     case SCI_FIGURE:
00071       return 0;
00072       break;
00073     case SCI_SUBWIN:
00074       DestroySubWin (pthis);
00075       return 0;
00076       break;
00077     case SCI_TEXT:
00078       DestroyText (pthis);
00079       return 0;
00080       break;
00081     case SCI_TITLE:
00082       DestroyTitle (pthis);
00083       return 0;
00084       break;
00085     case SCI_LEGEND:
00086       DestroyLegend (pthis);
00087       return 0;
00088       break;
00089     case SCI_ARC:
00090       DestroyArc (pthis);
00091       return 0; 
00092       break;
00093     case SCI_SEGS:
00094       DestroySegs (pthis);
00095       return 0;
00096       break;  
00097     case SCI_FEC:  
00098       DestroyFec (pthis);
00099       return 0;
00100       break; 
00101     case SCI_GRAYPLOT: 
00102       DestroyGrayplot (pthis);
00103       return 0;
00104       break; 
00105     case SCI_POLYLINE:
00106       DestroyPolyline (pthis);
00107       return 0;
00108       break;
00109     case SCI_RECTANGLE:
00110       DestroyRectangle (pthis);
00111       return 0;
00112       break;
00113     case SCI_SURFACE:
00114       DestroySurface (pthis);
00115       return 0;
00116       break;
00117     case SCI_LIGHT:
00118       break;
00119     case SCI_AXES:
00120       DestroyAxes (pthis);
00121       return 0;
00122       break;
00123     case SCI_PANNER:
00124       break;
00125     case SCI_SBH:
00126       DestroyScrollH (pthis);
00127       return 0;
00128       break;
00129     case SCI_SBV:
00130       DestroyScrollV (pthis);
00131       return 0;
00132       break;
00133     case SCI_MENU:
00134       DestroySciMenu (pthis);
00135       return 0;
00136       break;
00137     case SCI_MENUCONTEXT:
00138       DestroyMenuContext (pthis);
00139       return 0;
00140       break;
00141     case SCI_STATUSB:
00142       DestroyStatusBar (pthis);
00143       return 0;
00144       break;
00145     case SCI_AGREG:
00146       DestroyCompound (pthis);
00147       return 0;
00148       break; 
00149     case SCI_MERGE:
00150       DestroyMerge (pthis);
00151       return 0;
00152       break;
00153     case SCI_LABEL: /* F.Leray 28.05.04 */
00154       DestroyLabel (pthis);
00155       return 0;
00156       break;
00157     case SCI_UIMENU:
00158       DestroyUimenu (pthis);
00159       return 0;
00160       break;
00161     case SCI_CONSOLE:
00162       sciDestroyConsole( pthis ) ;
00163       return 0 ;
00164     case SCI_FRAME:
00165       sciDestroyFrame( pthis ) ;
00166       return 0 ;
00167     case SCI_WINDOW:
00168       sciDestroyWindow(pthis) ;
00169       return 0 ;
00170     case SCI_WINDOWFRAME:
00171       sciDestroyWindowFrame(pthis) ;
00172       return 0 ;
00173     case SCI_SCREEN:
00174       sciDestroyScreen(pthis) ;
00175       return 0 ;
00176     default:
00177       sciprint ("Entity with type %d cannot be destroyed\n",sciGetEntityType (pthis));
00178       return -1;
00179       break;
00180     }
00181 
00182   return 0;
00183 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyArc ( sciPointObj pthis  ) 

DestroyArc This function destroies Pacthc and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 447 of file DestroyObjects.c.

References FREE, pARC_FEATURE, and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00448 {
00449   FREE(pARC_FEATURE (pthis)->callback);
00450   return sciStandardDestroyOperations(pthis) ;
00451 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyAxes ( sciPointObj pthis  ) 

DestroyAxes This function destroies axes and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Definition at line 535 of file DestroyObjects.c.

References FREE, i, Max, pAXES_FEATURE, sciStandardDestroyOperations(), and str.

Referenced by DestroyAllGraphicsSons().

00536 {
00537   int i;
00538   char **str;
00539 
00540   FREE (pAXES_FEATURE(pthis)->vx);
00541   FREE (pAXES_FEATURE(pthis)->vy);
00542   str=pAXES_FEATURE(pthis)->str;
00543   for (i=Max(pAXES_FEATURE(pthis)->nx,pAXES_FEATURE(pthis)->ny)-1;i<0;i--) 
00544     FREE (pAXES_FEATURE(pthis)->str); 
00545   FREE (pAXES_FEATURE(pthis)->str);
00546   return sciStandardDestroyOperations(pthis) ;
00547 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyCompound ( sciPointObj pthis  ) 

DestroyCompound This function destroies the Compound and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Definition at line 600 of file DestroyObjects.c.

References sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons(), and sciUnCompound().

00601 {
00602   return sciStandardDestroyOperations(pthis) ;
00603 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyFec ( sciPointObj pthis  ) 

DestroyGrayplot This function destroies Grayplot and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity
Author:
Djalel ABDEMOUCHE
Version:
0.1
See also:

Definition at line 557 of file DestroyObjects.c.

References FREE, pFEC_FEATURE, and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00558 {
00559   FREE (pFEC_FEATURE (pthis)->pvecx);
00560   FREE (pFEC_FEATURE (pthis)->pvecy);
00561   FREE (pFEC_FEATURE (pthis)->pnoeud); 
00562   FREE (pFEC_FEATURE (pthis)->pfun); 
00563   FREE (pFEC_FEATURE (pthis)->zminmax);  
00564   FREE (pFEC_FEATURE (pthis)->colminmax);
00565   FREE (pFEC_FEATURE (pthis)->colout);
00566   return sciStandardDestroyOperations(pthis) ;
00567 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyFigure ( sciPointObj pthis  ) 

DestroyFigure This function destroies the parents window (manager) and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 269 of file DestroyObjects.c.

References FREE, pFIGURE_FEATURE, sciGetFontContext(), and sciStandardDestroyOperations().

Referenced by DeleteObjs(), destroyDefaultObjects(), and sci_xend().

00270 {
00271   /* This code has to be validated on all systems
00272    * because sciGetPointerToFeature returns a void
00273    */
00274   FREE ((sciGetFontContext(pthis))->pfontname);
00275   FREE(pFIGURE_FEATURE(pthis)->pcolormap);
00276   FREE( pFIGURE_FEATURE(pthis)->infoMessage ) ;
00277   sciStandardDestroyOperations(pthis) ;
00278   /* delete windows() */
00279   return 0;
00280 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyGrayplot ( sciPointObj pthis  ) 

DestroyGrayplot This function destroies Grayplot and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity Djalel ABDEMOUCHE

Definition at line 520 of file DestroyObjects.c.

References FREE, pGRAYPLOT_FEATURE, sciStandardDestroyOperations(), and type.

Referenced by DestroyAllGraphicsSons().

00521 {
00522   FREE (pGRAYPLOT_FEATURE (pthis)->pvecx);
00523   if (pGRAYPLOT_FEATURE (pthis)->type != 2)
00524     FREE (pGRAYPLOT_FEATURE (pthis)->pvecy);
00525   FREE (pGRAYPLOT_FEATURE (pthis)->pvecz);
00526   return sciStandardDestroyOperations(pthis) ;
00527 
00528 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyLabel ( sciPointObj pthis  ) 

DestroyTitle This function destroies the Subwindow (the Axe) and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 663 of file DestroyObjects.c.

References deallocateText(), FREE, NULL, pLABEL_FEATURE, sciDelHandle(), sciDelThisToItsParent(), sciGetParent(), sciUnselectSons(), and sciLabel::text.

Referenced by ConstructLabel(), ConstructSubWin(), DestroyAllGraphicsSons(), and initLabel().

00664 {
00665   sciLabel * ppLabel = pLABEL_FEATURE (pthis);
00666   int textStatus = -1 ;
00667   sciUnselectSons( pthis ) ;
00668   sciDelThisToItsParent( pthis, sciGetParent(pthis) ) ;
00669   if ( sciDelHandle(pthis) == -1 ) { return -1 ; }
00670   textStatus = deallocateText( ppLabel->text ) ;
00671   if ( textStatus != 0 )
00672   {
00673     return textStatus ;
00674   }
00675   ppLabel->text = NULL ;
00676   FREE(ppLabel) ;
00677   FREE(pthis) ;
00678   return 0 ;
00679 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyLegend ( sciPointObj pthis  ) 

DestroyLegend This function destroies legend and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 412 of file DestroyObjects.c.

References deleteMatrix(), FREE, pLEGEND_FEATURE, sciLegend::pptabofpointobj, sciText::pStrings, sciLegend::pstyle, sciGetFontContext(), sciStandardDestroyOperations(), and sciLegend::text.

Referenced by ConstructLegend(), and DestroyAllGraphicsSons().

00413 {
00414   sciLegend * ppLegend = pLEGEND_FEATURE (pthis) ;
00415   FREE ( ppLegend->pptabofpointobj );
00416   FREE ( ppLegend->pstyle ) ;
00417   deleteMatrix( ppLegend->text.pStrings ) ;
00418 
00419   FREE ((sciGetFontContext(pthis))->pfontname);
00420   return sciStandardDestroyOperations(pthis) ;
00421   /* on peut alors destroyer le parent */
00422 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyMenuContext ( sciPointObj pthis  ) 

DestroyMenuContext This function destroies menu context and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 733 of file DestroyObjects.c.

References sciDelLabelsMenu(), and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00734 {
00735   sciDelLabelsMenu (pthis);
00736   return sciStandardDestroyOperations(pthis) ;
00737 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyMerge ( sciPointObj pthis  ) 

Definition at line 504 of file DestroyObjects.c.

References FALSE, FREE, pMERGE_FEATURE, pSUBWIN_FEATURE, sciGetParentSubwin(), and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons(), Merge3d(), and updateMerge().

00505 {
00506   pSUBWIN_FEATURE (sciGetParentSubwin(pthis))->facetmerge = FALSE;
00507   FREE(pMERGE_FEATURE (pthis)->index_in_entity);
00508   FREE(pMERGE_FEATURE (pthis)->from_entity);
00509   return sciStandardDestroyOperations(pthis) ;
00510 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyPolyline ( sciPointObj pthis  ) 

DestroyPolyline This function destroies Polyline and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

DJ.Abdemouche 2003

Definition at line 431 of file DestroyObjects.c.

References FREE, NULL, pPOLYLINE_FEATURE, and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00432 {
00433   FREE (pPOLYLINE_FEATURE (pthis)->pvx);
00434   FREE (pPOLYLINE_FEATURE (pthis)->pvy);
00435 
00436   if (pPOLYLINE_FEATURE (pthis)->pvz != NULL) 
00437     FREE (pPOLYLINE_FEATURE (pthis)->pvz);
00438   return sciStandardDestroyOperations(pthis) ;
00439 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyRectangle ( sciPointObj pthis  ) 

DestroyRectangle This function destroies Rectangle and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 460 of file DestroyObjects.c.

References sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00461 {
00462   return sciStandardDestroyOperations(pthis) ;
00463 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroySciMenu ( sciPointObj pthis  ) 

DestroySciMenu This function destroies menu and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 746 of file DestroyObjects.c.

References FREE, sciDelLabelsMenu(), sciGetFontContext(), and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00747 {
00748   sciDelLabelsMenu (pthis);
00749   FREE ((sciGetFontContext(pthis))->pfontname);
00750   return sciStandardDestroyOperations(pthis) ;
00751 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyScrollH ( sciPointObj pthis  ) 

DestroyScrollH This function destroies the Subwindow (the Axe) and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 357 of file DestroyObjects.c.

References sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00358 {
00359   return sciStandardDestroyOperations(pthis) ;
00360 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyScrollV ( sciPointObj pthis  ) 

DestroyScrollV This function destroies the Subwindow (the Axe) and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 345 of file DestroyObjects.c.

References sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00346 {
00347    return sciStandardDestroyOperations(pthis) ;
00348 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroySegs ( sciPointObj pthis  ) 

DestroySegments This function destroies Grayplot and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity
Author:
Djalel ABDEMOUCHE
Version:
0.1
See also:

Definition at line 578 of file DestroyObjects.c.

References FREE, NULL, pSEGS_FEATURE, and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00579 {  
00580   FREE (pSEGS_FEATURE (pthis)->vx);
00581   FREE (pSEGS_FEATURE (pthis)->vy); 
00582   if (pSEGS_FEATURE (pthis)->vz != (double *)NULL) 
00583     FREE (pSEGS_FEATURE (pthis)->vz);  
00584   if (pSEGS_FEATURE (pthis)->ptype <=0) 
00585     {
00586       FREE(pSEGS_FEATURE (pthis)->pstyle);
00587     } 
00588   else 
00589     {
00590       FREE(pSEGS_FEATURE (pthis)->vfx); pSEGS_FEATURE (pthis)->vfx = NULL;
00591       FREE(pSEGS_FEATURE (pthis)->vfy); pSEGS_FEATURE (pthis)->vfy = NULL;
00592       FREE(pSEGS_FEATURE (pthis)->vfz); pSEGS_FEATURE (pthis)->vfz = NULL;
00593     } 
00594   return sciStandardDestroyOperations(pthis) ;
00595 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyStatusBar ( sciPointObj pthis  ) 

DestroyStatusBar This function destroies the StatusBar of Figure and the elementaries structures and returns pthis with NULL pointer and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 289 of file DestroyObjects.c.

References FREE, sciDelThisToItsParent(), sciGetFontContext(), sciGetParent(), and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00290 {
00291   sciDelThisToItsParent(pthis, sciGetParent (pthis));
00292   FREE ((sciGetFontContext(pthis))->pfontname);
00293   return sciStandardDestroyOperations(pthis) ;
00294 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroySubWin ( sciPointObj pthis  ) 

DestroySubWin This function destroies the Subwindow (the Axe) and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 303 of file DestroyObjects.c.

References sciSubWindow::axes, FREE, FreeUserLabels(), NULL, AXES::nxgrads, AXES::nygrads, AXES::nzgrads, pSUBWIN_FEATURE, sciGetCallback(), sciGetFontContext(), sciStandardDestroyOperations(), AXES::u_nxgrads, AXES::u_nygrads, AXES::u_nzgrads, AXES::u_xgrads, AXES::u_xlabels, AXES::u_ygrads, AXES::u_ylabels, AXES::u_zgrads, and AXES::u_zlabels.

Referenced by DestroyAllGraphicsSons().

00304 { 
00305   /* Add. grads arrays */ /* F.Leray 11.10.04 */
00306   /* specific user arrays */
00307   sciSubWindow * ppsubwin = pSUBWIN_FEATURE (pthis);
00308 
00309 
00310   FREE( ppsubwin->axes.u_xgrads); ppsubwin->axes.u_xgrads = (double *) NULL;
00311   FREE( ppsubwin->axes.u_ygrads); ppsubwin->axes.u_ygrads = (double *) NULL;
00312   FREE( ppsubwin->axes.u_zgrads); ppsubwin->axes.u_zgrads = (double *) NULL;
00313   ppsubwin->axes.u_xlabels = FreeUserLabels(ppsubwin->axes.u_xlabels, &ppsubwin->axes.u_nxgrads);
00314   ppsubwin->axes.u_ylabels = FreeUserLabels(ppsubwin->axes.u_ylabels, &ppsubwin->axes.u_nygrads);
00315   ppsubwin->axes.u_zlabels = FreeUserLabels(ppsubwin->axes.u_zlabels, &ppsubwin->axes.u_nzgrads);
00316 
00317   ppsubwin->axes.u_xlabels = NULL;
00318   ppsubwin->axes.u_ylabels = NULL;
00319   ppsubwin->axes.u_zlabels = NULL;
00320 
00321   ppsubwin->axes.u_nxgrads = 0;
00322   ppsubwin->axes.u_nygrads = 0;
00323   ppsubwin->axes.u_nzgrads = 0;
00324  
00325  
00326   /* auto (computed) arrays are defined with max. length == 20 */
00327   ppsubwin->axes.nxgrads = 0;
00328   ppsubwin->axes.nygrads = 0;
00329   ppsubwin->axes.nzgrads = 0;
00330   
00331   if ( sciGetCallback(pthis) != (char *)NULL)
00332     FREE(sciGetCallback(pthis));
00333 
00334   FREE ((sciGetFontContext(pthis))->pfontname);
00335   return sciStandardDestroyOperations(pthis) ;
00336 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroySurface ( sciPointObj pthis  ) 

DestroySurface This function destroies surface and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 472 of file DestroyObjects.c.

References sciSurface::color, FREE, sciSurface::inputCMoV, sciSurface::izcol, pSUBWIN_FEATURE, pSURFACE_FEATURE, sciSurface::pvecx, sciSurface::pvecy, sciSurface::pvecz, res, sciGetParentSubwin(), sciStandardDestroyOperations(), sciSubWindow::surfcounter, updateMerge(), and sciSurface::zcol.

Referenced by DestroyAllGraphicsSons().

00473 {
00474   sciPointObj * psubwin ;
00475   sciSubWindow * ppSubWin ;
00476   sciSurface * ppSurface = pSURFACE_FEATURE (pthis) ;
00477   int res = -1 ;
00478   
00479   psubwin  = sciGetParentSubwin(pthis) ;
00480   ppSubWin = pSUBWIN_FEATURE ( psubwin ) ;
00481 
00482   FREE(ppSurface->pvecz);
00483   FREE(ppSurface->pvecy);
00484   FREE(ppSurface->pvecx);
00485   FREE(ppSurface->inputCMoV); /* Adding F.Leray 24.03.04*/
00486   FREE(ppSurface->color); /* Adding F.Leray 18.03.05 */
00487   
00488   if ( ppSurface->izcol != 0 )
00489   { 
00490     FREE(ppSurface->zcol);
00491   }
00492   ppSubWin->surfcounter-- ;
00493   /* DJ.A 2003 */
00494   res = sciStandardDestroyOperations(pthis) ;
00495 
00496   /* delete the merge object if needed */
00497   /* Jb Silvy 07/2006 */
00498   updateMerge( psubwin ) ;
00499 
00500   return res;
00501 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyText ( sciPointObj pthis  ) 

DestroyText This function destroies Text structure and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 382 of file DestroyObjects.c.

References deleteMatrix(), FREE, pTEXT_FEATURE, sciGetFontContext(), and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00383 {
00384   deleteMatrix( pTEXT_FEATURE(pthis)->pStrings ) ;
00385   FREE ((sciGetFontContext(pthis))->pfontname);
00386   return sciStandardDestroyOperations(pthis) ;
00387 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyTitle ( sciPointObj pthis  ) 

DestroyTitle This function destroies the Subwindow (the Axe) and the elementaries structures and only this to destroy all sons use DelGraphicsSon

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 397 of file DestroyObjects.c.

References deleteMatrix(), FREE, pTITLE_FEATURE, sciGetFontContext(), and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00398 {
00399   deleteMatrix( pTITLE_FEATURE (pthis)->text.pStrings ) ;
00400   FREE ((sciGetFontContext(pthis))->pfontname);
00401   return sciStandardDestroyOperations(pthis) ;
00402 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DestroyUimenu ( sciPointObj pthis  ) 

Definition at line 681 of file DestroyObjects.c.

References deleteMatrix(), FREE, label, pUIMENU_FEATURE, and sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00682 {
00683   deleteMatrix( pUIMENU_FEATURE (pthis)->label.pStrings ) ;
00684   FREE (pUIMENU_FEATURE (pthis)->label.callback);
00685 
00686   return sciStandardDestroyOperations(pthis) ;
00687 }

Here is the call graph for this function:

Here is the caller graph for this function:

void sciDeleteWindow ( int  winNum  ) 

Close the figure with number winNum.

Definition at line 808 of file DestroyObjects.c.

References C2F, and deletewin().

Referenced by sci_delete(), and sci_xdel().

00809 {
00810   C2F(deletewin)( &winNum ) ;
00811 }

Here is the call graph for this function:

Here is the caller graph for this function:

int sciDelGraphicObj ( sciPointObj pthis  ) 

sciDelGraphicObj This function delete only users graphics object and its dependency limited to SCI_TITLE SCI_LEGEND SCI_ARC SCI_POLYLINE SCI_RECTANGLE SCI_SURFACE SCI_AXIS SCI_MENU SCI_MENUCONTEXT SCI_SUBWIN

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 194 of file DestroyObjects.c.

References DestroyAllGraphicsSons(), NULL, SCI_AGREG, SCI_ARC, SCI_AXES, SCI_CONSOLE, SCI_FEC, SCI_FIGURE, SCI_FRAME, SCI_GRAYPLOT, SCI_LABEL, SCI_LEGEND, SCI_LIGHT, SCI_MENU, SCI_MENUCONTEXT, SCI_MERGE, SCI_PANNER, SCI_POLYLINE, SCI_RECTANGLE, SCI_SBH, SCI_SBV, SCI_SCREEN, SCI_SEGS, SCI_STATUSB, SCI_SUBWIN, SCI_SURFACE, SCI_TEXT, SCI_TITLE, SCI_UIMENU, SCI_WINDOW, SCI_WINDOWFRAME, sciGetAxes(), sciGetEntityType(), sciGetParent(), sciprint(), and sciXbasc().

Referenced by sci_delete().

00195 {
00196   switch (sciGetEntityType (pthis))
00197     {
00198     case SCI_TITLE:
00199     case SCI_LEGEND:
00200     case SCI_ARC:
00201     case SCI_SEGS: 
00202     case SCI_FEC: 
00203     case SCI_GRAYPLOT: 
00204     case SCI_POLYLINE:
00205     case SCI_RECTANGLE:
00206     case SCI_SURFACE:
00207 
00208     case SCI_AXES:
00209     case SCI_MENU:
00210     case SCI_MENUCONTEXT:
00211     case SCI_AGREG:
00212     case SCI_TEXT:
00213     case SCI_MERGE: 
00214     case SCI_LABEL:
00215     case SCI_UIMENU:
00216     case SCI_FIGURE:
00217     case SCI_CONSOLE:
00218     case SCI_FRAME:
00219     case SCI_WINDOW:
00220     case SCI_WINDOWFRAME:
00221     case SCI_SCREEN:
00222       DestroyAllGraphicsSons (pthis);
00223       return 0;
00224       break;
00225     case SCI_SUBWIN:
00226       if (sciGetAxes (sciGetParent(pthis),pthis) == (sciPointObj *) NULL)
00227         sciXbasc();
00228       else
00229         DestroyAllGraphicsSons (pthis);
00230       return 0;
00231       break;         
00232     case SCI_LIGHT:
00233     case SCI_PANNER:
00234     case SCI_SBH:
00235     case SCI_SBV:
00236     case SCI_STATUSB:
00237     default:
00238       sciprint ("This object cannot be deleted\n");
00239       return -1;
00240       break;
00241     }
00242 
00243   return 0;
00244 }

Here is the call graph for this function:

Here is the caller graph for this function:

int sciDelLabelsMenu ( sciPointObj pthis  ) 

del sciDelLabelsMenu This function destroies ALL LABELS menu and the elementaries structures

Parameters:
sciPointObj * pthis: the pointer to the entity

Definition at line 696 of file DestroyObjects.c.

References FREE, NULL, tagLabelMenu::plabel, pMENU_FEATURE, pMENUCONTEXT_FEATURE, tagLabelMenu::pnextlabelmenu, SCI_AGREG, SCI_MENU, SCI_MENUCONTEXT, and sciGetEntityType().

Referenced by ConstructMenu(), DestroyMenuContext(), and DestroySciMenu().

00697 {
00698   sciLabelMenu *pscilabelmenutmp;
00699   sciLabelMenu *pscilabelmenutofree;
00700 
00701   switch (sciGetEntityType (pthis))
00702     {
00703     case SCI_MENU:
00704       pscilabelmenutmp = (sciLabelMenu *) (pMENU_FEATURE (pthis)->plabelmenu);
00705       break;
00706     case SCI_MENUCONTEXT:
00707       pscilabelmenutmp =
00708         (sciLabelMenu *) (pMENUCONTEXT_FEATURE (pthis)->plabelmenu);
00709       break;
00710     default:
00711     case SCI_AGREG:
00712       return -1;
00713       break;
00714     }
00715   while (pscilabelmenutmp != (sciLabelMenu *) NULL)
00716     {
00717       /* Il faut retirer tous les menus lies par la liste aussi */
00718       pscilabelmenutofree = pscilabelmenutmp;
00719       pscilabelmenutmp = pscilabelmenutmp->pnextlabelmenu;
00720       FREE (pscilabelmenutofree->plabel);
00721       FREE (pscilabelmenutofree);
00722     }
00723   return 0;
00724 }

Here is the call graph for this function:

Here is the caller graph for this function:

int sciDestroyConsole ( sciPointObj pthis  ) 

Definition at line 880 of file DestroyObjects.c.

References sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00881 {
00882   return sciStandardDestroyOperations( pThis ) ;
00883 }

Here is the call graph for this function:

Here is the caller graph for this function:

int sciDestroyFrame ( sciPointObj pThis  ) 

Definition at line 900 of file DestroyObjects.c.

References sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00901 {
00902   return sciStandardDestroyOperations( pThis ) ;
00903 }

Here is the call graph for this function:

Here is the caller graph for this function:

int sciDestroyScreen ( sciPointObj pThis  ) 

Definition at line 915 of file DestroyObjects.c.

References sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00916 {
00917   return sciStandardDestroyOperations( pThis ) ;
00918 }

Here is the call graph for this function:

Here is the caller graph for this function:

int sciDestroyWindow ( sciPointObj pThis  ) 

Definition at line 905 of file DestroyObjects.c.

References sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00906 {
00907   return sciStandardDestroyOperations( pThis ) ;
00908 }

Here is the call graph for this function:

Here is the caller graph for this function:

int sciDestroyWindowFrame ( sciPointObj pThis  ) 

Definition at line 910 of file DestroyObjects.c.

References sciStandardDestroyOperations().

Referenced by DestroyAllGraphicsSons().

00911 {
00912   return sciStandardDestroyOperations( pThis ) ;
00913 }

Here is the call graph for this function:

Here is the caller graph for this function:

int C2F() scigerase ( void   ) 

erase a graphic window if necessary.

Definition at line 250 of file DestroyObjects.c.

References bsiz, C2F, dr1(), L, lstr, na, str, v, and xgetg().

Referenced by sci_plot2d1_G().

00251 {
00252   integer verb=0,lstr,v,na,win;
00253   double dv;
00254   char str[4];
00255   C2F(xgetg)("auto clear",str,&lstr,11L,4L);
00256   if (strcmp(str,"on") == 0) {
00257     C2F(dr1)("xget","window",&verb,&win,&na,&v,&v,&v,&dv,&dv,&dv,&dv,5L,7L);
00258     C2F(dr1)("xclear",C2F(cha1).buf,&v,&v,&v,&v,&v,&v,&dv,&dv,&dv,&dv,7L,bsiz);
00259     C2F(dr1)("xstart",C2F(cha1).buf,&win,&v,&v,&v,&v,&v,&dv,&dv,&dv,&dv,7L,bsiz);
00260   }
00261   return 0;
00262 } 

Here is the call graph for this function:

Here is the caller graph for this function:

int sciStandardDestroyOperations ( sciPointObj pThis  ) 

Recurrent destroying actions for objects

Definition at line 888 of file DestroyObjects.c.

References clearUserData(), FREE, sciPointObj::pfeatures, res, sciDelHandle(), sciDelThisToItsParent(), sciGetParent(), and sciUnselectSons().

Referenced by DestroyArc(), DestroyAxes(), DestroyCompound(), DestroyFec(), DestroyFigure(), DestroyGrayplot(), DestroyLegend(), DestroyMenuContext(), DestroyMerge(), DestroyPolyline(), DestroyRectangle(), DestroySciMenu(), DestroyScrollH(), DestroyScrollV(), DestroySegs(), DestroyStatusBar(), DestroySubWin(), DestroySurface(), DestroyText(), DestroyTitle(), DestroyUimenu(), sciDestroyConsole(), sciDestroyFrame(), sciDestroyScreen(), sciDestroyWindow(), and sciDestroyWindowFrame().

00889 {
00890   int res = 0 ;
00891   clearUserData( pThis ) ;
00892   sciUnselectSons( pThis ) ;
00893   sciDelThisToItsParent( pThis, sciGetParent(pThis) ) ;
00894   if ( sciDelHandle(pThis) == -1 ) { res = -1 ; }
00895   FREE( pThis->pfeatures ) ;
00896   FREE( pThis ) ;
00897   return res ;
00898 }

Here is the call graph for this function:

Here is the caller graph for this function:

int sciUnCompound ( sciPointObj pobj  ) 

sciUnCompound This function destroies the Compound and and unpackes the elementaries structures to associates them to its parent

Definition at line 630 of file DestroyObjects.c.

References DestroyCompound(), NULL, tagSons::pointobj, tagSons::pprev, SCI_AGREG, sciAddThisToItsParent(), sciDelThisToItsParent(), sciGetEntityType(), sciGetLastSons(), sciGetParent(), and sciSetCurrentObj().

Referenced by sci_unglue().

00631 {
00632   sciPointObj *pparent, *pobjson;
00633   sciSons *psons = (sciSons *)NULL;
00634         
00635   if (sciGetEntityType(pobj) != SCI_AGREG)
00636     return -1;
00637 
00638   psons = sciGetLastSons(pobj);
00639   pobjson = psons->pointobj;
00640   pparent = sciGetParent(pobj);
00641   while ((psons != (sciSons *) NULL) && (pobjson != (sciPointObj *) NULL))
00642     {
00643       /* we delete this son to this */ 
00644       pobjson = psons->pointobj;
00645       /* take the previous sons before the current is freed */
00646       psons = psons->pprev;
00647       sciDelThisToItsParent (pobjson, pobj);
00648       /* and link to its old parent */
00649       sciAddThisToItsParent (pobjson, pparent);
00650     }
00651 
00652   sciSetCurrentObj(pparent); /* pparent is the new current object */
00653 
00654   DestroyCompound(pobj);
00655   return 0;
00656 }

Here is the call graph for this function:

Here is the caller graph for this function:

int updateMerge ( sciPointObj pSubwin  ) 

Update the merge object of a subwindow. If there is not anymore surface in the descendants then object is cleared. Otherwise a new merge3d is created. This function should be called after a modifications of the graphic hierarchy related with surfaces.

Returns:
0 if the call was successful, -1 otherwise.

Definition at line 819 of file DestroyObjects.c.

References DestroyMerge(), FALSE, Merge3d(), NULL, pSUBWIN_FEATURE, sciGetMerge(), and sciGetSubwinNbSurf().

Referenced by DestroySurface(), sci_delete(), sciRelocateObject(), and sciSwapObjects().

00820 {
00821   if ( sciGetSubwinNbSurf( pSubwin ) == 0 )
00822   {
00823     sciPointObj * merge = sciGetMerge( pSubwin ) ;
00824     if ( merge != NULL )
00825     {
00826       DestroyMerge( merge ) ;
00827     }
00828     pSUBWIN_FEATURE( pSubwin )->facetmerge = FALSE ;
00829   }
00830   else
00831   {
00832     /* the merge 3d is updated */
00833     Merge3d( pSubwin ) ;
00834   }
00835   return 0 ;
00836 }

Here is the call graph for this function:

Here is the caller graph for this function:


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