#include "ObjectStructure.h"#include "HandleManagement.h"Include dependency graph for CloneObjects.h:

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

Go to the source code of this file.
Functions | |
| double * | sciCloneColormap (sciPointObj *pobj) |
| sciPointObj * | CloneText (sciPointObj *pthis) |
| sciPointObj * | sciCloneObj (sciPointObj *pobj) |
| sciPointObj * | CloneRectangle (sciPointObj *pthis) |
| sciPointObj * | ClonePolyline (sciPointObj *pthis) |
| sciPointObj * | CloneArc (sciPointObj *pthis) |
| sciPointObj * | sciCloneConsole (sciPointObj *pthis) |
| sciPointObj * | sciCloneFrame (sciPointObj *pthis) |
| sciPointObj * | sciCloneWindow (sciPointObj *pthis) |
| sciPointObj * | sciCloneWindowFrame (sciPointObj *pthis) |
| sciPointObj * | sciCloneScreen (sciPointObj *pthis) |
| sciPointObj * | sciCopyObj (sciPointObj *pobj, sciPointObj *psubwinparenttarget) |
| int | cloneGraphicContext (sciPointObj *pObjSource, sciPointObj *pObjDest) |
| int | cloneFontContext (sciPointObj *pObjSource, sciPointObj *pObjDest) |
| int | cloneUserData (sciPointObj *pObjSource, sciPointObj *pObjDest) |
| sciPointObj* CloneArc | ( | sciPointObj * | pthis | ) |
CloneArc This function destroies Text structure and only this to destroy all sons use DelGraphicsSon
| sciPointObj | * pthis: the pointer to the entity |
Definition at line 327 of file CloneObjects.c.
References ConstructArc(), height, MALLOC, memcpy(), NULL, pARC_FEATURE, SCI_SUBWIN, sciGetBackground(), sciGetEntityType(), sciGetFillStyle(), sciGetForeground(), sciGetIsFilled(), sciGetIsLine(), sciGetLineStyle(), sciGetLineWidth(), sciGetParent(), sciprint(), sciSetBackground(), sciSetCurrentObj(), sciSetFillStyle(), sciSetForeground(), sciSetIsFilled(), sciSetLineStyle(), sciSetLineWidth(), size, width, x, and y.
Referenced by sciCloneObj().
00328 { 00329 sciPointObj * pobj, *subwinparent; 00330 00331 int foreground = sciGetForeground(pthis); 00332 int background = sciGetBackground(pthis); 00333 00334 subwinparent = pthis; 00335 00336 00337 while ((sciGetEntityType(subwinparent = sciGetParent(subwinparent)) != SCI_SUBWIN) 00338 && ((int)sciGetEntityType(subwinparent) != -1)); 00339 if ((int)sciGetEntityType(subwinparent) == -1) 00340 return (sciPointObj *)NULL; 00341 if (!(pobj = ConstructArc (subwinparent, pARC_FEATURE(pthis)->x, 00342 pARC_FEATURE(pthis)->y, pARC_FEATURE(pthis)->height,pARC_FEATURE(pthis)->width, 00343 pARC_FEATURE(pthis)->alphabegin, pARC_FEATURE(pthis)->alphaend, 00344 &foreground,&background,sciGetIsFilled(pthis),sciGetIsLine(pthis)))){ 00345 return (sciPointObj *)NULL; 00346 } 00347 else { 00348 sciSetCurrentObj(pobj);}; /* F.Leray Adding 26.03.04*/ 00349 if (sciSetBackground(pobj, sciGetBackground (pthis)) == -1) 00350 return (sciPointObj *)NULL; 00351 if (sciSetForeground(pobj, sciGetForeground (pthis)) == -1) 00352 return (sciPointObj *)NULL; 00353 if (sciSetLineStyle(pobj, sciGetLineStyle (pthis)) == -1) 00354 return (sciPointObj *)NULL; 00355 if (sciSetFillStyle(pobj, sciGetFillStyle (pthis)) == -1) 00356 return (sciPointObj *)NULL; 00357 if (sciSetLineWidth(pobj, sciGetLineWidth (pthis)) == -1) 00358 return (sciPointObj *)NULL; 00359 if (sciSetIsFilled(pobj, sciGetIsFilled (pthis)) == -1) 00360 return (sciPointObj *)NULL; 00361 00362 if((pARC_FEATURE (pthis)->size_of_user_data != 0) && (pARC_FEATURE (pthis)->user_data != (int *) NULL)) 00363 { 00364 int size = pARC_FEATURE (pthis)->size_of_user_data; 00365 00366 if((pARC_FEATURE (pobj)->user_data = (int *) MALLOC(size*sizeof(int)))==NULL){ 00367 sciprint("Can not allocate user_data for cloned object.\n"); 00368 pARC_FEATURE (pobj)->user_data = (int *) NULL; 00369 pARC_FEATURE (pobj)->size_of_user_data = 0; 00370 } 00371 else{ 00372 memcpy(pARC_FEATURE (pobj)->user_data, pARC_FEATURE (pthis)->user_data, size); 00373 pARC_FEATURE (pobj)->size_of_user_data = pARC_FEATURE (pthis)->size_of_user_data; 00374 } 00375 } 00376 00377 return (sciPointObj *)pobj; 00378 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int cloneFontContext | ( | sciPointObj * | pObjSource, | |
| sciPointObj * | pObjDest | |||
| ) |
copy the fontContext of an object to another.
| pObjSource | the object from which the FC is taken | |
| pObjDest | the object in which the FC is paste |
Definition at line 433 of file CloneObjects.c.
References sciFont::backgroundcolor, sciFont::fontdeciwidth, sciFont::fontnamelen, sciFont::fonttype, sciFont::foregroundcolor, FREE, MALLOC, NULL, sciFont::pfontname, sciGetFontContext(), and sciFont::textorientation.
Referenced by initFCfromCopy().
00434 { 00435 00436 /* struct affectation, doesn't copy the font name */ 00437 /* *(sciGetFontContext(pObjDest)) = *(sciGetFontContext(pObjSource)) ; */ 00438 00439 sciFont * sourceFC = sciGetFontContext( pObjSource ) ; 00440 sciFont * destFC = sciGetFontContext( pObjDest ) ; 00441 00442 if ( destFC->fontnamelen != 0 ) 00443 { 00444 FREE( destFC->pfontname ) ; 00445 destFC->pfontname = NULL ; 00446 } 00447 00448 /* copy the font name */ 00449 if ( sourceFC->fontnamelen != 0 ) 00450 { 00451 destFC->pfontname = MALLOC( sourceFC->fontnamelen * sizeof( char ) ) ; 00452 if ( destFC->pfontname == NULL ) 00453 { 00454 return -1 ; 00455 } 00456 strcpy( destFC->pfontname, sourceFC->pfontname ) ; 00457 } 00458 00459 destFC->fontnamelen = sourceFC->fontnamelen ; 00460 destFC->backgroundcolor = sourceFC->backgroundcolor ; 00461 destFC->foregroundcolor = sourceFC->foregroundcolor ; 00462 destFC->fonttype = sourceFC->fonttype ; 00463 destFC->fontdeciwidth = sourceFC->fontdeciwidth ; 00464 destFC->textorientation = sourceFC->textorientation ; 00465 return 0 ; 00466 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int cloneGraphicContext | ( | sciPointObj * | pObjSource, | |
| sciPointObj * | pObjDest | |||
| ) |
copy the graphicontext of an object to another
| pObjSource | the object from which the GC is taken | |
| pObjDest | the object in which the GC is paste |
Definition at line 396 of file CloneObjects.c.
References sciGetGraphicContext().
Referenced by ConstructSubWin(), and sciInitGraphicContext().
00397 { 00398 /* struct affectation */ 00399 *(sciGetGraphicContext(pObjDest)) = *(sciGetGraphicContext(pObjSource)) ; 00400 return 0 ; 00401 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sciPointObj* ClonePolyline | ( | sciPointObj * | pthis | ) |
ClonePolyline This function destroies Text structure and only this to destroy all sons use DelGraphicsSon
| sciPointObj | * pthis: the pointer to the entity |
Definition at line 262 of file CloneObjects.c.
References ConstructPolyline(), MALLOC, memcpy(), n1, n2, NULL, plot(), pPOLYLINE_FEATURE, SCI_SUBWIN, sciGetBackground(), sciGetEntityType(), sciGetFillStyle(), sciGetForeground(), sciGetIsFilled(), sciGetIsLine(), sciGetIsMark(), sciGetLineStyle(), sciGetLineWidth(), sciGetMarkBackground(), sciGetMarkForeground(), sciGetMarkStyle(), sciGetParent(), sciprint(), sciSetBackground(), sciSetCurrentObj(), sciSetFillStyle(), sciSetForeground(), sciSetLineStyle(), sciSetLineWidth(), and size.
Referenced by sciCloneObj().
00263 { 00264 sciPointObj * pobj, *subwinparent; 00265 int foreground = sciGetForeground(pthis); 00266 int background = sciGetBackground(pthis); 00267 int mark_foreground = sciGetMarkForeground(pthis); 00268 int mark_background = sciGetMarkBackground(pthis); 00269 int mark_style = sciGetMarkStyle(pthis); 00270 00271 subwinparent = pthis; 00272 00273 while ((sciGetEntityType(subwinparent = sciGetParent(subwinparent)) != SCI_SUBWIN) 00274 && ((int)sciGetEntityType(subwinparent) != -1)); 00275 if ((int)sciGetEntityType(subwinparent) == -1) 00276 return (sciPointObj *)NULL; 00277 /* DJ.A 2003 */ 00278 if (!(pobj = ConstructPolyline (subwinparent, pPOLYLINE_FEATURE(pthis)->pvx, pPOLYLINE_FEATURE(pthis)->pvy,pPOLYLINE_FEATURE(pthis)->pvz, 00279 pPOLYLINE_FEATURE(pthis)->closed, pPOLYLINE_FEATURE(pthis)->n1,pPOLYLINE_FEATURE(pthis)->n2,pPOLYLINE_FEATURE(pthis)->plot, 00280 &foreground, &background, 00281 &mark_style, &mark_foreground, &mark_background, 00282 sciGetIsLine(pthis), sciGetIsFilled(pthis), 00283 sciGetIsMark(pthis),pPOLYLINE_FEATURE(pthis)->isinterpshaded))){ 00284 return (sciPointObj *)NULL; 00285 } 00286 else { 00287 sciSetCurrentObj(pobj);}; /* F.Leray Adding 26.03.04*/ 00288 00289 00290 pPOLYLINE_FEATURE(pobj)->dim_icv = pPOLYLINE_FEATURE(pthis)->dim_icv; /* copy the dimension of the interp. color vector */ 00291 00292 if (sciSetBackground(pobj, sciGetBackground (pthis)) == -1) 00293 return (sciPointObj *)NULL; 00294 if (sciSetForeground(pobj, sciGetForeground (pthis)) == -1) 00295 return (sciPointObj *)NULL; 00296 if (sciSetLineStyle(pobj, sciGetLineStyle (pthis)) == -1) 00297 return (sciPointObj *)NULL; 00298 if (sciSetFillStyle(pobj, sciGetFillStyle (pthis)) == -1) 00299 return (sciPointObj *)NULL; 00300 if (sciSetLineWidth(pobj, sciGetLineWidth (pthis)) == -1) 00301 return (sciPointObj *)NULL; 00302 00303 if((pPOLYLINE_FEATURE (pthis)->size_of_user_data != 0) && (pPOLYLINE_FEATURE (pthis)->user_data != (int *) NULL)) 00304 { 00305 int size = pPOLYLINE_FEATURE (pthis)->size_of_user_data; 00306 00307 if((pPOLYLINE_FEATURE (pobj)->user_data = (int *) MALLOC(size*sizeof(int)))==NULL){ 00308 sciprint("Can not allocate user_data for cloned object.\n"); 00309 pPOLYLINE_FEATURE (pobj)->user_data = (int *) NULL; 00310 pPOLYLINE_FEATURE (pobj)->size_of_user_data = 0; 00311 } 00312 else{ 00313 memcpy(pPOLYLINE_FEATURE (pobj)->user_data, pPOLYLINE_FEATURE (pthis)->user_data, size); 00314 pPOLYLINE_FEATURE (pobj)->size_of_user_data = pPOLYLINE_FEATURE (pthis)->size_of_user_data; 00315 } 00316 } 00317 00318 return (sciPointObj *)pobj; 00319 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sciPointObj* CloneRectangle | ( | sciPointObj * | pthis | ) |
CloneRectangle This function destroies Text structure and only this to destroy all sons use DelGraphicsSon
| sciPointObj | * pthis: the pointer to the entity |
Definition at line 204 of file CloneObjects.c.
References ConstructRectangle(), height, MALLOC, memcpy(), NULL, pRECTANGLE_FEATURE, SCI_SUBWIN, sciGetBackground(), sciGetEntityType(), sciGetFillStyle(), sciGetForeground(), sciGetIsFilled(), sciGetIsLine(), sciGetLineStyle(), sciGetLineWidth(), sciGetParent(), sciprint(), sciSetBackground(), sciSetCurrentObj(), sciSetFillStyle(), sciSetForeground(), sciSetIsFilled(), sciSetLineStyle(), sciSetLineWidth(), size, width, x, and y.
Referenced by sciCloneObj().
00205 { 00206 sciPointObj * pobj, *subwinparent; 00207 int foreground = sciGetForeground(pthis); 00208 int background = sciGetBackground(pthis); 00209 00210 subwinparent = pthis; 00211 00212 00213 while ((sciGetEntityType(subwinparent = sciGetParent(subwinparent)) != SCI_SUBWIN) 00214 && ((int)sciGetEntityType(subwinparent) != -1)); 00215 if ((int)sciGetEntityType(subwinparent) == -1) 00216 return (sciPointObj *)NULL; 00217 if (!(pobj = ConstructRectangle (subwinparent, pRECTANGLE_FEATURE(pthis)->x, 00218 pRECTANGLE_FEATURE(pthis)->y, pRECTANGLE_FEATURE(pthis)->height,pRECTANGLE_FEATURE(pthis)->width, 00219 pRECTANGLE_FEATURE(pthis)->horzcurvature, pRECTANGLE_FEATURE(pthis)->vertcurvature, 00220 &foreground,&background,sciGetIsFilled(pthis),sciGetIsLine(pthis),0,pRECTANGLE_FEATURE(pthis)->flagstring))){ 00221 return (sciPointObj *)NULL; 00222 } 00223 else { 00224 sciSetCurrentObj(pobj);}; /* F.Leray Adding 26.03.04*/ 00225 if (sciSetBackground(pobj, sciGetBackground (pthis)) == -1) 00226 return (sciPointObj *)NULL; 00227 if (sciSetForeground(pobj, sciGetForeground (pthis)) == -1) 00228 return (sciPointObj *)NULL; 00229 if (sciSetLineStyle(pobj, sciGetLineStyle (pthis)) == -1) 00230 return (sciPointObj *)NULL; 00231 if (sciSetFillStyle(pobj, sciGetFillStyle (pthis)) == -1) 00232 return (sciPointObj *)NULL; 00233 if (sciSetLineWidth(pobj, sciGetLineWidth (pthis)) == -1) 00234 return (sciPointObj *)NULL; 00235 if (sciSetIsFilled(pobj, sciGetIsFilled (pthis)) == -1) 00236 return (sciPointObj *)NULL; 00237 00238 if((pRECTANGLE_FEATURE (pthis)->size_of_user_data != 0) && (pRECTANGLE_FEATURE (pthis)->user_data != (int *) NULL)) 00239 { 00240 int size = pRECTANGLE_FEATURE (pthis)->size_of_user_data; 00241 00242 if((pRECTANGLE_FEATURE (pobj)->user_data = (int *) MALLOC(size*sizeof(int)))==NULL){ 00243 sciprint("Can not allocate user_data for cloned object.\n"); 00244 pRECTANGLE_FEATURE (pobj)->user_data = (int *) NULL; 00245 pRECTANGLE_FEATURE (pobj)->size_of_user_data = 0; 00246 } 00247 else{ 00248 memcpy(pRECTANGLE_FEATURE (pobj)->user_data, pRECTANGLE_FEATURE (pthis)->user_data, size); 00249 pRECTANGLE_FEATURE (pobj)->size_of_user_data = pRECTANGLE_FEATURE (pthis)->size_of_user_data; 00250 } 00251 } 00252 00253 return (sciPointObj *)pobj; 00254 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sciPointObj* CloneText | ( | sciPointObj * | pthis | ) |
CloneText
| sciPointObj | * pthis: the pointer to the entity |
Definition at line 59 of file CloneObjects.c.
References ConstructText(), getStrMatData(), MALLOC, memcpy(), NULL, pTEXT_FEATURE, SCI_SUBWIN, sciGetAlignment(), sciGetAutoSize(), sciGetBackground(), sciGetEntityType(), sciGetFontDeciWidth(), sciGetFontName(), sciGetFontNameLength(), sciGetFontOrientation(), sciGetFontStyle(), sciGetForeground(), sciGetIsFilled(), sciGetIsLine(), sciGetParent(), sciGetText(), sciGetTextPosX(), sciGetTextPosY(), sciGetTextSize(), sciprint(), sciSetBackground(), sciSetCurrentObj(), sciSetFontDeciWidth(), sciSetFontName(), sciSetFontOrientation(), sciSetFontStyle(), sciSetForeground(), size, sciText::size_of_user_data, sciText::user_data, and sciText::userSize.
Referenced by sciCloneObj().
00060 { 00061 sciPointObj * pobj ; 00062 sciPointObj * subwinparent; 00063 sciText * ppThisText ; 00064 sciText * ppCopyText ; 00065 int foreground = sciGetForeground(pthis); 00066 int background = sciGetBackground(pthis); 00067 int nbRow ; 00068 int nbCol ; 00069 00070 subwinparent = pthis; 00071 00072 while ((sciGetEntityType(subwinparent = sciGetParent(subwinparent)) != SCI_SUBWIN) 00073 && ((int) sciGetEntityType(subwinparent) != -1)); 00074 if ((int) sciGetEntityType(subwinparent) == -1) 00075 { 00076 return (sciPointObj *)NULL; 00077 } 00078 00079 sciGetTextSize( pthis, &nbRow, &nbCol ) ; 00080 00081 if (!(pobj = ConstructText (subwinparent, getStrMatData( sciGetText(pthis) ), nbRow, nbCol, 00082 sciGetTextPosX(pthis), sciGetTextPosY(pthis),sciGetAutoSize(pthis), 00083 pTEXT_FEATURE(pthis)->userSize,pTEXT_FEATURE(pthis)->centeredPos, 00084 &foreground,&background,pTEXT_FEATURE(pthis)->isboxed, 00085 sciGetIsLine(pthis), sciGetIsFilled(pthis), sciGetAlignment(pthis)))) 00086 { 00087 return (sciPointObj *)NULL; 00088 } 00089 else 00090 { 00091 sciSetCurrentObj(pobj); 00092 } /* F.Leray Adding 26.03.04*/ 00093 00094 if (sciSetBackground(pobj, sciGetBackground (pthis)) == -1) 00095 return (sciPointObj *)NULL; 00096 00097 if (sciSetForeground(pobj, sciGetForeground (pthis)) == -1) 00098 return (sciPointObj *)NULL; 00099 00100 if (sciSetFontDeciWidth(pobj, sciGetFontDeciWidth (pthis)) == -1) 00101 return (sciPointObj *)NULL; 00102 00103 if (sciSetFontOrientation(pobj, sciGetFontOrientation (pthis)) == -1) 00104 return (sciPointObj *)NULL; 00105 00106 if (sciSetFontStyle(pobj,sciGetFontStyle (pthis)) == -1) 00107 return (sciPointObj *)NULL; 00108 00109 if (sciSetFontName(pobj, sciGetFontName (pthis), sciGetFontNameLength(pthis)) == -1) 00110 return (sciPointObj *)NULL; 00111 00112 /* get the pointer on features */ 00113 ppThisText = pTEXT_FEATURE( pthis ) ; 00114 ppCopyText = pTEXT_FEATURE( pobj ) ; 00115 00116 ppCopyText->userSize[0] = ppThisText->userSize[0]; 00117 ppCopyText->userSize[1] = ppThisText->userSize[1]; 00118 00119 00120 if((ppThisText->size_of_user_data != 0) && (ppThisText->user_data != (int *) NULL)) 00121 { 00122 int size = ppThisText->size_of_user_data; 00123 00124 if((ppCopyText->user_data = (int *) MALLOC(size*sizeof(int)))==NULL){ 00125 sciprint("Can not allocate user_data for cloned object.\n"); 00126 ppCopyText->user_data = (int *) NULL; 00127 ppCopyText->size_of_user_data = 0; 00128 } 00129 else{ 00130 memcpy(ppCopyText->user_data, ppThisText->user_data, size); 00131 ppCopyText->size_of_user_data = pTEXT_FEATURE (pthis)->size_of_user_data; 00132 } 00133 } 00134 00135 return (sciPointObj *)pobj; 00136 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int cloneUserData | ( | sciPointObj * | pObjSource, | |
| sciPointObj * | pObjDest | |||
| ) |
copy the user data of an object to an other.
Definition at line 403 of file CloneObjects.c.
References FREE, MALLOC, memcpy(), NULL, sciGetPointerToUserData(), and sciprint().
Referenced by sciCloneConsole(), sciCloneFrame(), sciCloneScreen(), sciCloneWindow(), and sciCloneWindowFrame().
00404 { 00405 int ** srcUserData ; 00406 int * srcSize ; 00407 int ** dstUserData ; 00408 int * dstSize ; 00409 sciGetPointerToUserData( pObjSource, &srcUserData, &srcSize ) ; 00410 sciGetPointerToUserData( pObjDest , &dstUserData, &dstSize ) ; 00411 if ( *srcSize > 0 ) 00412 { 00413 *dstSize = *srcSize ; 00414 if ( *dstUserData != NULL ) { FREE(*dstUserData) ; } 00415 *dstUserData = MALLOC( *srcSize * sizeof(int) ) ; 00416 if ( *dstUserData == NULL ) 00417 { 00418 sciprint("Error allocating user_data, memory full.\n") ; 00419 *dstSize = 0 ; 00420 *srcUserData = NULL ; 00421 return -1 ; 00422 } 00423 memcpy( *dstUserData, *srcUserData, *srcSize ) ; 00424 } 00425 else 00426 { 00427 *dstSize = 0 ; 00428 *srcUserData = NULL ; 00429 } 00430 return 0 ; 00431 }
Here is the call graph for this function:

Here is the caller graph for this function:

| double* sciCloneColormap | ( | sciPointObj * | pobj | ) |
sciCloneColormap This function clone a colormap from the figure. It must be FREE a lesat. It's the same for all sons Setting the colormap rgbmat must be a m x 3 double RGB matrix: a[i] = RED, a[i+m] = GREEN, a[i+2*m] = BLUE
Definition at line 37 of file CloneObjects.c.
References m, MALLOC, NULL, sciGetColormap(), and sciGetNumColors().
00038 { 00039 double *rgbmat; 00040 int m = sciGetNumColors (pobj); 00041 00042 if ((rgbmat = MALLOC (m * 3 * sizeof (double))) == NULL) 00043 { 00044 return NULL; 00045 } 00046 00047 sciGetColormap( pobj, rgbmat ) ; 00048 00049 return rgbmat; 00050 }
Here is the call graph for this function:

| sciPointObj* sciCloneConsole | ( | sciPointObj * | pthis | ) |
Definition at line 468 of file CloneObjects.c.
References cloneUserData(), NULL, sciConstructConsole(), sciGetParent(), sciGetScreenPosition(), sciGetVisibility(), sciInitScreenPosition(), and sciInitVisibility().
Referenced by sciCloneObj().
00469 { 00470 sciPointObj * newObj = NULL ; 00471 int posX ; 00472 int posY ; 00473 00474 newObj = sciConstructConsole( sciGetParent(pthis) ) ; 00475 00476 sciInitVisibility( newObj, sciGetVisibility(pthis) ) ; 00477 sciGetScreenPosition( pthis, &posX, &posY ) ; 00478 sciInitScreenPosition( newObj, posX, posY ) ; 00479 00480 /* copy user_data */ 00481 cloneUserData( pthis, newObj ) ; 00482 00483 return newObj ; 00484 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sciPointObj* sciCloneFrame | ( | sciPointObj * | pthis | ) |
Definition at line 486 of file CloneObjects.c.
References cloneUserData(), NULL, sciConstructFrame(), sciGetParent(), sciGetScreenPosition(), sciGetVisibility(), sciInitScreenPosition(), and sciInitVisibility().
Referenced by sciCloneObj().
00487 { 00488 sciPointObj * newObj = NULL ; 00489 int posX ; 00490 int posY ; 00491 00492 newObj = sciConstructFrame( sciGetParent(pthis) ) ; 00493 00494 sciInitVisibility( newObj, sciGetVisibility(pthis) ) ; 00495 sciGetScreenPosition( pthis, &posX, &posY ) ; 00496 sciInitScreenPosition( newObj, posX, posY ) ; 00497 00498 /* copy user_data */ 00499 cloneUserData( pthis, newObj ) ; 00500 00501 return newObj ; 00502 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sciPointObj* sciCloneObj | ( | sciPointObj * | pobj | ) |
sciCloneObj
Definition at line 143 of file CloneObjects.c.
References CloneArc(), ClonePolyline(), CloneRectangle(), CloneText(), 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_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, sciCloneConsole(), sciCloneFrame(), sciCloneScreen(), sciCloneWindow(), sciCloneWindowFrame(), sciGetEntityType(), and sciprint().
Referenced by sciCopyObj().
00144 { 00145 switch (sciGetEntityType (pobj)) 00146 { 00147 case SCI_TEXT: 00148 return CloneText(pobj); 00149 break; 00150 case SCI_POLYLINE: 00151 return ClonePolyline(pobj); 00152 break; 00153 case SCI_ARC: 00154 return CloneArc(pobj); 00155 break; 00156 case SCI_RECTANGLE: 00157 return CloneRectangle(pobj); 00158 break; 00159 case SCI_CONSOLE: 00160 return sciCloneConsole(pobj) ; 00161 case SCI_FRAME: 00162 return sciCloneFrame(pobj) ; 00163 case SCI_WINDOW: 00164 return sciCloneWindow(pobj) ; 00165 case SCI_WINDOWFRAME: 00166 return sciCloneWindowFrame(pobj) ; 00167 case SCI_SCREEN: 00168 return sciCloneScreen(pobj) ; 00169 case SCI_AGREG: 00170 00171 case SCI_SEGS: 00172 case SCI_FEC: 00173 case SCI_GRAYPLOT: 00174 case SCI_FIGURE: 00175 case SCI_SUBWIN: 00176 case SCI_LEGEND: 00177 case SCI_TITLE: 00178 case SCI_SURFACE: 00179 case SCI_LIGHT: 00180 case SCI_AXES: 00181 case SCI_PANNER: 00182 case SCI_SBH: 00183 case SCI_SBV: 00184 case SCI_MENU: 00185 case SCI_MENUCONTEXT: 00186 case SCI_STATUSB: 00187 case SCI_LABEL: /* F.Leray 28.05.04 */ 00188 case SCI_UIMENU: 00189 default: 00190 sciprint ("This object cannot be cloned !\n"); 00191 return (sciPointObj *)NULL; 00192 break; 00193 } 00194 return (sciPointObj *)NULL; 00195 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sciPointObj* sciCloneScreen | ( | sciPointObj * | pthis | ) |
Definition at line 540 of file CloneObjects.c.
References cloneUserData(), NULL, sciConstructScreen(), sciGetParent(), sciGetScreenPosition(), sciGetVisibility(), sciInitScreenPosition(), and sciInitVisibility().
Referenced by sciCloneObj().
00541 { 00542 sciPointObj * newObj = NULL ; 00543 int posX ; 00544 int posY ; 00545 00546 newObj = sciConstructScreen( sciGetParent(pthis) ) ; 00547 00548 sciInitVisibility( newObj, sciGetVisibility(pthis) ) ; 00549 sciGetScreenPosition( pthis, &posX, &posY ) ; 00550 sciInitScreenPosition( newObj, posX, posY ) ; 00551 00552 /* copy user_data */ 00553 cloneUserData( pthis, newObj ) ; 00554 00555 return newObj ; 00556 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sciPointObj* sciCloneWindow | ( | sciPointObj * | pthis | ) |
Definition at line 504 of file CloneObjects.c.
References cloneUserData(), NULL, sciConstructWindow(), sciGetParent(), sciGetScreenPosition(), sciGetVisibility(), sciInitScreenPosition(), and sciInitVisibility().
Referenced by sciCloneObj().
00505 { 00506 sciPointObj * newObj = NULL ; 00507 int posX ; 00508 int posY ; 00509 00510 newObj = sciConstructWindow( sciGetParent(pthis) ) ; 00511 00512 sciInitVisibility( newObj, sciGetVisibility(pthis) ) ; 00513 sciGetScreenPosition( pthis, &posX, &posY ) ; 00514 sciInitScreenPosition( newObj, posX, posY ) ; 00515 00516 /* copy user_data */ 00517 cloneUserData( pthis, newObj ) ; 00518 00519 return newObj ; 00520 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sciPointObj* sciCloneWindowFrame | ( | sciPointObj * | pthis | ) |
Definition at line 522 of file CloneObjects.c.
References cloneUserData(), NULL, sciConstructWindowFrame(), sciGetParent(), sciGetScreenPosition(), sciGetVisibility(), sciInitScreenPosition(), and sciInitVisibility().
Referenced by sciCloneObj().
00523 { 00524 sciPointObj * newObj = NULL ; 00525 int posX ; 00526 int posY ; 00527 00528 newObj = sciConstructWindowFrame( sciGetParent(pthis) ) ; 00529 00530 sciInitVisibility( newObj, sciGetVisibility(pthis) ) ; 00531 sciGetScreenPosition( pthis, &posX, &posY ) ; 00532 sciInitScreenPosition( newObj, posX, posY ) ; 00533 00534 /* copy user_data */ 00535 cloneUserData( pthis, newObj ) ; 00536 00537 return newObj ; 00538 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sciPointObj* sciCopyObj | ( | sciPointObj * | pobj, | |
| sciPointObj * | psubwinparenttarget | |||
| ) |
sciCopyObj
Definition at line 385 of file CloneObjects.c.
References sciAddThisToItsParent(), sciCloneObj(), sciDelThisToItsParent(), and sciGetParent().
Referenced by sci_copy().
00386 { 00387 sciPointObj *pcopyobj; 00388 00389 pcopyobj = sciCloneObj ((sciPointObj *)pobj); 00390 sciDelThisToItsParent ((sciPointObj *)pcopyobj, (sciPointObj *)sciGetParent(pcopyobj)); 00391 sciAddThisToItsParent ((sciPointObj *)pcopyobj, (sciPointObj *)psubwinparenttarget); 00392 return (sciPointObj *)pcopyobj; 00393 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.5.1