ObjectStructure.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------
00002  *    Graphic library 
00003  *    Copyright INRIA
00004  *    newGraph Library header
00005  *    Matthieu PHILIPPE,   INRIA 2001-2002
00006  *    Djalel ABDEMOUCHE,   INRIA 2002-2004
00007  *    Fabrice Leray,       INRIA 2004-2006
00008  *    Jean-Baptiste Silvy, INRIA 2005-xxxx
00009  *    Comment:
00010  *    This file contains all structures definitions used for New Graphics mode.
00011  --------------------------------------------------------------------------*/
00012 #ifndef __SCI_OBJECT_STRUCTURE__
00013 #define __SCI_OBJECT_STRUCTURE__
00014 
00015 #ifdef _MSC_VER
00016 #undef Top 
00017 #include <windows.h>
00018 #define Top C2F(vstk).top
00019 #endif
00020 
00021 /*en fait il n'y a essentiellement besion que de Math.h dans stack-c.h
00022   sauf pour les callback (il faudrait creer une fonction et l'appeler) */
00023 #include "stack-c.h"
00024 #include "StringMatrix.h"
00025 #include "machine.h"
00026 #include "../../data_structures/includes/DoublyLinkedList.h" /* REORGANISATION TEMPORAIRE */
00027 
00028 
00029 #ifndef _MSC_VER
00030 #define PS_SOLID 0
00031 #define HS_HORIZONTAL 0
00032 #define PLANES 0
00033 #define RASTERCAPS 0
00034 #define RC_PALETTE 0
00035 #define BITSPIXEL 0
00036 #define FLOAT 0
00037 #define TEXTMETRIC 0
00038 #define GM_ADVANCED 0
00039 #define MWT_IDENTITY 0
00040 #define HORZRES 0
00041 #define VERTRES 0
00042 #define VERTSIZE 0
00043 #define DEFAULT_CHARSET 0
00044 #define HORZSIZE 0                                                     
00045 #define MF_SEPARATOR 0
00046 #define SW_MINIMIZE 0
00047 #define SW_SHOWNORMAL 0
00048 #define SB_VERT 0
00049 #define SB_HORZ 0
00050 #endif 
00051 #define NUMCOLORS_SCI 32
00052 #define SCI_FIGURE_NAME_LENGTH 256
00053 /* Renvoi le pointeur sur la structure */
00054 
00055 #define pFIGURE_FEATURE(pointobj)      ((sciFigure        *)pointobj->pfeatures)
00056 #define pSTATUSB_FEATURE(pointobj)     ((sciStatusBar     *)pointobj->pfeatures)
00057 #define pSUBWIN_FEATURE(pointobj)      ((sciSubWindow     *)pointobj->pfeatures)
00058 #define pTEXT_FEATURE(pointobj)        ((sciText          *)pointobj->pfeatures)
00059 #define pTITLE_FEATURE(pointobj)       ((sciTitle         *)pointobj->pfeatures)
00060 #define pLEGEND_FEATURE(pointobj)      ((sciLegend        *)pointobj->pfeatures)
00061 #define pPOLYLINE_FEATURE(pointobj)    ((sciPolyline      *)pointobj->pfeatures)
00062 #define pARC_FEATURE(pointobj)         ((sciArc           *)pointobj->pfeatures)
00063 #define pRECTANGLE_FEATURE(pointobj)   ((sciRectangle     *)pointobj->pfeatures)
00064 #define pMERGE_FEATURE(pointobj)       ((sciMerge         *)pointobj->pfeatures)/* DJ.A 30/12 */
00065 #define pSURFACE_FEATURE(pointobj)     ((sciSurface       *)pointobj->pfeatures)
00066 #define pLIGHT_FEATURE(pointobj)       ((sciLightSource   *)pointobj->pfeatures)
00067 /*#define pAXIS_FEATURE(pointobj)        ((sciAxis          *)pointobj->pfeatures)*/ 
00068 #define pAXES_FEATURE(pointobj)        ((sciAxes          *)pointobj->pfeatures)
00069 #define pGRAYPLOT_FEATURE(pointobj)    ((sciGrayplot      *)pointobj->pfeatures)
00070 #define pFEC_FEATURE(pointobj)         ((sciFec           *)pointobj->pfeatures)
00071 #define pPANNER_FEATURE(pointobj)      ((sciPanner        *)pointobj->pfeatures)
00072 #define pSBH_FEATURE(pointobj)         ((sciScrollBarHorz *)pointobj->pfeatures)
00073 #define pSBV_FEATURE(pointobj)         ((sciScrollBarVert *)pointobj->pfeatures)
00074 #define pLABELMENU_FEATURE(pointobj)   ((sciLabelMenu     *)pointobj->pfeatures)
00075 #define pMENUCONTEXT_FEATURE(pointobj) ((sciMenuContext   *)pointobj->pfeatures)
00076 #define pMENU_FEATURE(pointobj)        ((sciMenu          *)pointobj->pfeatures)
00077 #define pAGREG_FEATURE(pointobj)       ((sciAgreg         *)pointobj->pfeatures)
00078 #define pSEGS_FEATURE(pointobj)        ((sciSegs          *)pointobj->pfeatures)
00079 #define pLABEL_FEATURE(pointobj)       ((sciLabel         *)pointobj->pfeatures)
00080 #define pUIMENU_FEATURE(pointobj)      ((sciUimenu        *)pointobj->pfeatures)
00081 #define pCONSOLE_FEATURE(pointobj)     ((sciConsole       *)pointobj->pfeatures)
00082 #define pFRAME_FEATURE(pointobj)       ((sciFrame         *)pointobj->pfeatures)
00083 #define pWINDOW_FEATURE(pointobj)      ((sciWindow        *)pointobj->pfeatures)
00084 #define pWINDOWFRAME_FEATURE(pointobj) ((sciWindowFrame   *)pointobj->pfeatures)
00085 #define pSCREEN_FEATURE(pointobj)      ((sciScreen        *)pointobj->pfeatures)
00087 #ifndef _MSC_VER
00088 typedef unsigned short HMENU;
00089 typedef void *HFONT;
00090 typedef unsigned long DWORD;
00091 #endif
00092 
00093 typedef struct tagPOINT2D
00094 {
00095   double x;
00096   double y;
00097 }
00098 POINT2D;
00099 
00100 typedef struct tagPOINT3D
00101 {
00102   double x;
00103   double y;
00104   double z;
00105 }
00106 POINT3D;  
00107 
00132 typedef enum
00133   {
00134     SCI_FIGURE,         
00136     SCI_SUBWIN,         
00138     SCI_TEXT,                   
00140     SCI_TITLE,          
00142     SCI_LEGEND,         
00144     SCI_ARC,                    
00146     SCI_POLYLINE,           
00148     SCI_RECTANGLE,    
00150     SCI_SURFACE,  /* DJ.A 30/12 */
00152     SCI_MERGE,
00154     SCI_LIGHT,          
00156     SCI_AXIS,   
00158     SCI_AXES,     
00160     SCI_SEGS,   
00162     SCI_GRAYPLOT, 
00164     SCI_FEC,                            
00166     SCI_PANNER,         
00168     SCI_SBH,                    
00170     SCI_SBV,                    
00172     SCI_MENU,                   
00174     SCI_MENUCONTEXT,    
00176     SCI_STATUSB,            
00178     SCI_AGREG,                  
00180     SCI_LABEL,
00182     SCI_UIMENU,
00184     SCI_CONSOLE,
00186     SCI_FRAME,
00188     SCI_WINDOW,
00190     SCI_WINDOWFRAME,
00192     SCI_SCREEN
00193   }
00195 sciEntityType;  
00196 
00197 
00198 typedef struct _Vertices 
00199 {
00200   int value_xm;
00201   int value_ym;
00202   double value_x;
00203   double value_y;
00204   double value_z;
00205   
00206   struct _Vertices * pNext;
00207 } 
00208 Vertices;
00209 
00210 
00214 typedef struct
00215 {
00216   sciEntityType entitytype;
00218   void *pfeatures;              
00219 }
00220 sciPointObj;  
00221 
00222 
00226 typedef struct tagHandleTab
00227 {
00228   sciPointObj *pointobj;        
00230   long index;
00232   struct tagHandleTab *pprev;
00234   struct tagHandleTab *pnext;
00235 }
00236 sciHandleTab; 
00237 
00238 
00244 typedef struct tagSons
00245 {
00247   struct tagSons *pprev;          
00249   sciPointObj *pointobj;        
00251   struct tagSons *pnext;
00252 }
00254 sciSons;  
00255 
00256 
00260 typedef struct
00261 {
00263   sciHandleTab * phandle;       
00265   sciPointObj * pparent;               
00267   sciSons * psons;             
00269   sciSons * plastsons;
00271   DoublyLinkedList * pSelectedSon ;
00272 }
00273 sciRelationShip;  
00274 
00275 
00276 
00303 typedef struct
00304 {
00307   int backgroundcolor;      
00309   int foregroundcolor;
00311   int fillcolor;
00313   int fillstyle;
00315   int linewidth;
00317   BOOL isline;
00319   int linestyle;
00321   BOOL ismark;
00323   int markstyle;
00325   int marksize;
00327   int marksizeunit;
00329   int markbackground;
00331   int markforeground;
00332 }
00333 sciGraphicContext;  
00334 
00335 
00336 /*----------------------
00337   SCIFONT.H header file no more used
00338   ----------------------*/
00339 
00340 /* Changing those lines, be carreful that
00341    the new attribut is update in the sciset and sciget routines
00342 */
00344 #define SCI_DONT_CARE          0
00345 
00346 #define SCI_ATTR_BOLD          1
00347 
00348 #define SCI_ATTR_ITALIC        2
00349 
00350 #define SCI_ATTR_UNDERLINE     4
00351 
00352 #define SCI_ATTR_STRIKEOUT     8
00353 
00354 
00358 typedef struct
00359 {
00361   /* il faudrait prendre la font windows */
00363   int backgroundcolor;          
00365   int foregroundcolor;          
00367   char *pfontname;               
00369   unsigned int fontnamelen;     
00371   int fonttype; /* scilab font index 0 to 9 */
00373   int fontdeciwidth;            
00375   int textorientation;          
00376 }
00377 sciFont;  
00378 
00379 
00383 typedef struct
00384 { 
00386   BOOL addplot;        
00388   BOOL autoscaling;    
00390   BOOL zooming; 
00392   BOOL wresize;     
00394   int xormode;
00395                        
00396   
00397 }
00398 scigMode;  
00399 
00400 
00404 typedef struct
00405 {
00406   double xmin;
00408   double xmax;
00410   double ymin;
00412   double ymax;
00414   double zmin;
00416   double zmax;
00417 }
00418 sciRange;  
00419 
00420 
00425 typedef struct
00426 {
00427   struct BCG *pScilabXgc;       
00428   sciRelationShip relationship;
00429   scigMode gmode;
00430   sciGraphicContext graphiccontext; /* the only property used here is background */
00431   sciPointObj * originalsubwin0011;
00433   char name[SCI_FIGURE_NAME_LENGTH];     
00435   int namelen;
00437   int number;                          
00439   int figuredimwidth;                  
00440   int figuredimheight;                 
00441   /* specifies the dimension of this figure         */
00442   int windowdimwidth;                  
00443   int windowdimheight;  
00444   /* specifies the dimension of this window         */
00446   int inrootposx;
00447   int inrootposy;
00449   double *pcolormap;
00451   int numcolors;
00452   BOOL isiconified;                  
00454   BOOL isselected; 
00455   int rotstyle;
00457   BOOL visible;
00458   BOOL auto_redraw;
00460   int numsubwinselected;
00462   int pixmap; /* DJ.A 30/12 */
00463   int wshow ;
00464   
00465   BOOL allredraw;
00466   
00467   sciFont fontcontext; /* F.Leray 08.04.04 */
00468   char * infoMessage ; 
00470   int * user_data; /* adding 27.06.05 */
00471   int size_of_user_data;
00472   
00473 }
00474 sciFigure;  
00475 
00476 typedef enum { ALIGN_NONE, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT } sciTextAlignment ;
00477 
00481 typedef struct
00482 {
00484   sciRelationShip relationship;
00486   sciFont fontcontext;
00487   sciGraphicContext graphiccontext; /* the only properties used by Text are foreground and background */
00488   
00490   StringMatrix * pStrings ;
00491 
00493   double x ;
00495   double y ;
00496   double z ;
00497 
00498   BOOL is3d ; 
00501   BOOL autoSize ; /* to know wether the size of the displayed array is specified by user or */
00502                    /* automatically computed. */
00503 
00504   double userSize[2] ; 
00506   sciTextAlignment stringsAlign ; 
00508   BOOL centeredPos ; 
00510   BOOL isboxed  ;
00511   BOOL isline   ; /* switch the contour of the box */
00512   BOOL isfilled ; /* switch the transparency of the box */
00515   char *callback; 
00517   int callbacklen; 
00518   int callbackevent; 
00520   BOOL visible;
00521   int isclip;
00522   double clip_region[4];
00523   int clip_region_set;
00524   
00525   int * user_data; /* adding 27.06.05 */
00526   int size_of_user_data;
00527 
00528 }
00529 sciText;  
00530 
00531 
00532 
00533 
00537 typedef enum
00538   {
00540     SCI_LEGEND_OUTSIDE = -1,
00542     SCI_LEGEND_IN_INSIDE = 0,
00544     SCI_LEGEND_IN_UPPER_LEFT = 1,
00546     SCI_LEGEND_IN_UPPER_RIGHT = 2,
00548     SCI_LEGEND_IN_LOWER_LEFT = 3,
00550     SCI_LEGEND_IN_LOWER_RIGHT = 4,
00552     SCI_LEGEND_IN_SPECIFIED = 5
00553   }  
00554 sciLegendPlace;
00555 
00556 
00557 
00561 typedef struct
00562 {
00563   sciGraphicContext graphiccontext; /* used to draw the line and marks of the curve F.Leray 21.01.05 */
00565   int nblegends;
00567   int *pstyle;
00569   sciText text;
00571   POINT2D pos;
00573   int width;                 
00575   int height;                
00577   BOOL isselected;
00579   BOOL issurround;           
00580   /* void    *associetedentity;  get the associeted entity by asking parents.relation.sons */
00581   /* the subwindow dimension is get by asking relation     */
00582   sciLegendPlace place;
00584   sciSons *associatedentity;
00586   sciPointObj **pptabofpointobj;
00588   BOOL visible; 
00589   int isclip;
00590   double clip_region[4];
00591   int clip_region_set;
00592   int * user_data; /* adding 27.06.05 */
00593   int size_of_user_data;
00594 }
00595 sciLegend;  
00596 
00597 
00601 typedef enum
00602   {
00604     SCI_TITLE_IN_TOP = 0,
00606     SCI_TITLE_IN_BOTTOM = 1,
00607   }
00608 sciTitlePlace;  
00609 
00610 
00614 typedef struct
00615 {
00617   sciText text;
00619   POINT2D pos;
00620   int ptype;
00622   sciTitlePlace titleplace;
00624   BOOL isselected;
00626   BOOL visible;
00627   int isclip;
00628 }
00629 sciTitle;
00630 
00634 typedef struct
00635 {
00636   /* sciRelationShip relationship; */
00638  /*  sciText text; */
00639   sciPointObj * text ;
00641   /* POINT2D pos; */
00642   int ptype ; 
00645   BOOL isselected;
00646   BOOL auto_position; /* automatic or manual position selection for label */
00647   BOOL auto_rotation; /* automatic or manual rotation selection for label (depends on the current view mode 2d or 3d mainly for y and z labels) */
00648                       /* not implemented for titles */
00649 
00650 }
00651 sciLabel ;
00652 
00653 typedef struct
00654 {
00655   sciRelationShip relationship;
00657   sciText label; /* Callback in sciText struct. */
00659   BOOL visible;
00660   BOOL handle_visible;
00661   BOOL Enable;
00662 
00663   int MenuPosition;
00664   int CallbackType;
00665 
00666   #ifdef _MSC_VER
00667         HMENU hMenu;
00668         int IDM_this;
00669   #endif
00670 
00671 
00672 }
00673 sciUimenu;
00674 
00675 /* the part of the drawn box for 3d axis */
00676 typedef enum { BT_OFF = FALSE, BT_ON = TRUE, BT_HIDDEN_AXIS, BT_BACK_HALF } EAxesBoxType ;
00677 
00678 typedef struct 
00679 {  
00680   double  xlim[4];  /* [xmin,xmax,ar,nint]           */ /* F.Leray 21.09.04 : NOUVEAU sens pour xlim,ylim,zlim: NON! Comme avant valeurs en tight limits on/off */ /* F.Leray 07.10.04 */
00681   double  ylim[4];  /* [ymin,ymax,ar,nint]           */ /* pour afficher les graduations automatiques on a calcule des xyzgrads provenant de TheTicks */
00682   double  zlim[4];  /* [zmin,zmax,ar,nint]         */ 
00683 
00684   /* tics data from algo */
00685   double  xgrads[20], ygrads[20], zgrads[20];                   /* Here they are  */
00686   int nxgrads, nygrads, nzgrads;                         /* with their size <=> nber of tics */
00687 
00688   /* tics data from user (=> u_...)*/
00689   double *u_xgrads, *u_ygrads, *u_zgrads;                       /* Here they are  */
00690   int u_nxgrads, u_nygrads, u_nzgrads;                   /* with their size <=> nber of tics */
00691   
00692   int  ticscolor;
00693   /*  int  fontsize;
00694       int  textcolor;*/
00695   sciFont fontcontext;
00696   
00697   int  subint[3]; /* Dj.A 17/12/03 */
00698   EAxesBoxType  rect ; 
00699   char xdir;   
00700   char ydir;   
00703   /* flags for switching from auto to manual ticks */
00704   BOOL auto_ticks[3]; /* if on, it means that the ticks are taken from computation (see theticks algo. by Francois D.) */
00705   
00706   char **u_xlabels,  **u_ylabels,  **u_zlabels; /* label string corresponding to each specified u_xyzgrads */
00707     
00708   int hiddenAxisColor ; /* the color and style of the hidden axis */
00709 
00710   double  limits[7]; /* = 1 set tight limits = 0 set axes auto shape */
00711   integer flag[3]; /* 3d options */
00712   
00713   /* F.Leray 07.10.04 REMOVE AAINT*/
00714   int nbsubtics[3]; /* Don't touch to subint because also deals with drawaxis: AXES structure has multiple uses... */ /* F.Leray 07.10.04 */
00715 
00716   BOOL reverse[3]; /* if TRUE, it means that the corresponding axe is reversed */
00717   BOOL axes_visible[3]; /* if TRUE, it means that the corresponding axes is drawn */
00718   
00719 }
00720 AXES; 
00721 
00725 typedef struct
00726 {
00727   AXES axes;
00729   sciRelationShip relationship;
00731   scigMode gmode;
00733   sciGraphicContext graphiccontext;
00736   char name[sizeof ("ScilabGraphic") + 4];          
00738   int namelen;
00740   int number;                   
00742   /*BOOL isselected;*/                   
00744   int infigureposx;                      
00746   int infigureposy;                      
00748   int windimwidth;                     
00750   int windimheight;                   
00752   sciRange range;                        
00754   int zoomx;                             
00756   int zoomy;
00757   double SRect[6]; /* [xmin xmax ymin ymax zmin zmax] : Strict rect. coming from update_specification_bounds function or from a set(a,"data_bounds",[...]) */
00758   double FRect[6]; /* real data_bounds */
00759   double WRect[4]; /* size of the subplot */
00760   double ARect[4]; /* margins, give the size of the axe*/
00761   int zoomy_kp;
00762   /* ZRect_kp is now useless : when unzooming we deal with SRect values */
00763   double ZRect[6]; /* reversed for zoom only to avoid using FRect as zoom box AND computed box */ /* F.Leray 09.12.04 */
00764 
00765   char logflags[3]; /* Z has a logflag now F.Leray 03.11.04 */
00766   int grid[3];
00767   /*   BOOL isaxes; */
00768 
00769   BOOL is3d;
00770   BOOL tight_limits;
00771   double theta_kp;
00772   double alpha_kp;
00773   /* viewing angles */
00774   double theta;
00775   double alpha; 
00777   sciPointObj *pPopMenu;    
00779   char *callback; 
00781   int callbacklen;  
00782   int callbackevent; 
00784   BOOL visible;
00785 
00786   int isclip;
00787   double clip_region[4];
00788   int clip_region_set;
00790   integer project[3];
00791   BOOL isoview; 
00792   int hiddencolor;
00793   int hiddenstate;
00794   BOOL facetmerge; 
00795   int with_leg; /* Adding F.Leray 07.05.04 */ /* for strflag[0] support : not needed today */
00796   BOOL cube_scaling; /* Matlab like view in 3D when one or two range is/are preferential */
00797   BOOL FirstPlot; /* An internal state used to indicated that high level functions must not use SRect*/
00798 
00799   /* F.Leray 25.04.05 Labels in sciSubWin*/
00800   sciPointObj * mon_title;
00801   sciPointObj * mon_x_label;
00802   sciPointObj * mon_y_label;
00803   sciPointObj * mon_z_label;
00804 
00805   /*  An internal state used as subtics flag (auto == FALSE, TRUE == manual) named flagNax */
00806   BOOL flagNax;
00807   int surfcounter; /* used to merge 3d objects */
00808   int * user_data; /* adding 27.06.05 */
00809   int size_of_user_data;
00810   
00811   int YGradMostOnLeft;
00812   int YGradMostOnRight;
00813   int XGradMostOnTop;
00814   int XGradMostOnBottom;
00815 
00816   BOOL firsttime_x;
00817   BOOL firsttime_y;
00818 
00819   Vertices * vertices_list; /* F.Leray 30.08.05 : stores the (x,y) coord. in term of user data coord. + pixel value on screen */
00820 }
00821 sciSubWindow;  
00822 
00823 
00832 typedef struct
00833 {
00835   sciRelationShip relationship;
00837   sciGraphicContext graphiccontext;
00839   double x;
00841   double y;
00843   double width;
00845   double height;
00847   double alphabegin;            
00849   double alphaend;
00850   int fill; /* another flag to specify wether we should have a box around the text */
00852   BOOL isselected;
00854   char *callback; 
00856   int callbacklen;   
00857   int callbackevent;
00859   BOOL visible;
00860   int isclip;
00861   double clip_region[4];
00862   int clip_region_set;
00863   double z; 
00864   int * user_data; /* adding 27.06.05 */
00865   int size_of_user_data;
00866   BOOL isfilled; /* to know if an arc is filled or not */
00867   /* the isline property is inside the associated graphiccontext */
00868 }  
00869 sciArc;
00870 
00871 
00875 typedef struct taglistPoints
00876 {
00878   double x;
00880   double y;
00882   struct taglistPoints *pnextpoints;
00883 }  
00884 sciListPoints;
00885 
00886 
00895 typedef struct
00896 {
00897   sciRelationShip relationship;
00898   sciGraphicContext graphiccontext;
00899   double *pvx;                  /* vecteur des points x doublon avec pvector je les garde pour compatiblite*/
00900   double *pvy;                  /* vecteur des points y doublon avec pvector*/
00901   double *pvz; 
00902   int n1;                       
00903   int n2;                       
00904   int closed;                   
00905   int plot;                     
00906   BOOL isselected;
00907   char *callback;               
00908   int callbacklen;              
00909   int callbackevent;
00911   BOOL visible;
00912   int isclip;
00913   double clip_region[4];
00914   int clip_region_set;
00915   int * user_data; /* adding 27.06.05 */
00916   int size_of_user_data;
00917   BOOL isfilled; /* to know if a polyline is filled or not */
00918   BOOL isinterpshaded;
00919   int *scvector;
00920   int dim_icv; /* dimension of the interpolated color vector (3 or 4) */
00921   int bar_layout;
00922 
00923   double * x_shift;
00924   double * y_shift;
00925   double * z_shift;
00926   
00927   double bar_width;
00928   
00929   double arsize_factor; /* to be able to enlarge arrow size without changing the line thickness */
00930 }
00931 sciPolyline;  
00937 typedef struct
00938 {
00939   sciRelationShip relationship;
00940   sciGraphicContext graphiccontext;
00941   double x;                        
00942   double y;                        
00943   double width;
00944   double height;
00945   int fillflag;
00946   int str; 
00947   integer strwidth;
00948   integer strheight;
00949   double horzcurvature;            /*F.Leray not implemented till now... 19.03.04 to see...*/
00950   double vertcurvature;            /*F.Leray not implemented till now... 19.03.04 to see...*/
00951   BOOL isselected;
00952   char *callback; 
00953   int callbacklen; 
00954   int callbackevent;
00956   BOOL visible;
00957   int isclip;
00958   double clip_region[4];
00959   int clip_region_set;
00960   double z;  
00962   BOOL flagstring; /* flag used to determine wether the rectangle is used to surround a string : used when axes is reversed */
00963   int * user_data; /* adding 27.06.05 */
00964   int size_of_user_data;
00965   BOOL isfilled; /* to know if a rectangle is filled or not */
00966 }
00967 sciRectangle;  
00970 typedef enum
00971   {
00972     SCI_FAC3D,
00973     SCI_CONTOUR,
00974     SCI_PARAM3D,
00975     SCI_PARAM3D1,
00976     SCI_PLOT3D,
00977   }
00978 sciTypeOf3D;
00979 
00980 
00984 typedef struct
00985 {
00986   sciRelationShip relationship;
00987   sciGraphicContext graphiccontext;
00988   double * pvecx; /* x data */
00989   double * pvecy; /* y data */
00990   double * pvecz; /* z data */
00991   double *inputCMoV; /* Adding here in order to always have the input data*/
00992   /* We will determinate if it is a vector or matrix data with m3n and n3n values*/
00993   double *zcol;
00994   double *color;  /* Final matrix used only for drawing :  */
00995                   /*  color == zcol if 'direct' mode used (direct indices on colormap)  */
00996                   /* else 'scaled' mode used => color == linear interp. of zcol on the colormap */
00997 
00998   int cdatamapping; /* like in Matlab, it determines how the color is computed ('scaled' or 'direct' mode) */
00999                     /* 0: scaled */
01000                     /* 1: direct (default) */
01001   integer izcol; /* 0 : no color; 1 : color is a vector, 2 : color is a matrix */
01002   integer dimzx;
01003   integer dimzy;
01004 
01005   /*F.Leray 12.03.04 Adding here to know the length of arrays pvecx, pvecy and pvecz*/
01006 
01007   int nc; /* number of colors */
01008   int nx; /* number of x data */
01009   int ny; /* number of y data */
01010   int nz; /* number of z data */
01011   int isfac;
01012   int m1,n1;
01013   int m2,n2;
01014   int m3,n3;
01015   int m3n,n3n;
01016 
01017   integer flag[3];
01018   double ebox[6];
01019   int flagcolor; /* this flag indicates the type of the color of how the facet have to be colored 
01020                     0: uniformed color
01021                     1: facet's color are computed with z*/ /* in case of a simple plot...!!! F.Leray 19.03.04 */
01022   sciTypeOf3D typeof3d; /* Fac3d or Plot3d */
01023   int hiddencolor;
01024   BOOL isselected;
01025   char *callback; 
01026   int callbacklen; 
01027   int callbackevent;
01029   BOOL visible;
01030 
01031   int flag_x; /* 1 if the vector is increasing, -1 if decreasing. */
01032               /* The vector should be either increasing or decreasing. */
01033   int flag_y;
01034   
01035   int * user_data; /* adding 27.06.05 */
01036   int size_of_user_data;
01037 }
01038 sciSurface;  
01045 typedef struct
01046 {
01047   sciRelationShip relationship;
01048   long *from_entity; /* vector of handles on the facet or segment entity*/
01049   int *index_in_entity;/*index of facet or segment in its entity*/
01050   int N; /* number of facets or segments */
01051   int * user_data; /* adding 27.06.05 */
01052   int size_of_user_data;
01053 }
01054 sciMerge;  
01060 typedef struct
01061 {
01062   sciRelationShip relationship;
01063   sciGraphicContext graphiccontext;
01064   POINT3D org;
01065   BOOL switchon;                /* on or off */
01067   BOOL visible;
01068   int isclip;
01069   double clip_region[4];
01070   int clip_region_set;
01071   int * user_data; /* adding 27.06.05 */
01072   int size_of_user_data;
01073 }
01074 sciLightSource;  
01080 /* NOT USED IN FACT */
01081 /* typedef struct */
01082 /* { */
01083 /*   sciRelationShip relationship; */
01084 /*   sciGraphicContext graphiccontext;  */
01085 /*   sciText text; */
01086 /*   char strflag[4]; */
01087 /*   int strflaglen; */
01088 /*   double aaint[4]; */
01089 /*   double minx; */
01090 /*   double miny; */
01091 /*   double minz; */
01092 /*   double maxx; */
01093 /*   double maxy; */
01094 /*   double maxz; */
01095 /*   int styledimension;                /\* 2=2d 3=3d *\/ */
01096 /*   int stylecrossing; */
01097 /*   double orgcrossing; */
01098 /*   char *plabelx; */
01099 /*   char *plabely; */
01100 /*   char *plabelz; */
01101 /*   BOOL manualscale; */
01102 /*   BOOL plotit; */
01103 /*   BOOL isselected; */
01104 /*   int grid; */
01105 /*   char *callback; /\** specifies the text scilab code for the callback associated with this entity *\/ */
01106 /*   int callbacklen; /\** the length of the callback code *\/   */
01107 /*   int callbackevent; */
01108 /*   /\** specifies if this object is visble             *\/ */
01109 /*   BOOL visible; */
01110 /*   int isclip; /\* Adding F.Leray 10.03.04*\/ */
01111 /* } */
01112 /* sciAxis;  /\** *\/ */
01113 
01114 
01115 
01125 typedef struct
01126 {
01127   sciRelationShip relationship;
01128   sciGraphicContext graphiccontext; 
01129   char dir;   
01130   char tics;  
01131   POINT2D *vector;              /* vecteur de points redondant, for future developpement*/
01132   double *vx;  
01133   double *vy;  
01135   double *vz; 
01136   int nx;
01137   int ny;
01138   int nb_tics_labels; /* F.Leray 29.04.05 : number of tics_labels can be different from Max(nx,ny) if xy_type diff. from 'v' */
01139   /***/
01140   int nz;
01141   char **str ;  
01142   int subint;  
01143   char *format; 
01144   int fontsize;
01145   int textcolor;
01146   int ticscolor;
01147   char logscale;
01148   int seg;      
01149   char *callback; 
01150   int callbacklen; 
01151   int callbackevent;
01153   BOOL visible;
01154   int isclip;
01155   double clip_region[4]; /* to introduce for axis ? */
01156   int clip_region_set;
01157 
01158   int * user_data; /* adding 27.06.05 */
01159   int size_of_user_data;
01160 }
01161 sciAxes;  
01162 
01172 typedef struct
01173 {
01174   sciRelationShip relationship;
01175   sciGraphicContext graphiccontext; 
01176   double *vx;   /*F.Leray 18.02.04 ...of size Nbr1 ? No depending on the type ptype*/
01177   double *vy;   /*F.Leray 18.02.04 ...of size Nbr2 ? No depending on the type ptype*/
01178   double *vfx; /* size Nbr1 * Nbr2 */
01179   double *vfy; /* size Nbr1 * Nbr2 */
01180   integer Nbr1; 
01181   integer Nbr2; 
01182   integer *pstyle;
01183   integer iflag;      
01184   double arrowsize;  /*F.Leray units : hundreds (i.e. 100, 150,...)*/
01185   double parfact;
01186   integer ptype; /* if ptype=0, it is segments; if ptype=1, it is champ (champ or champ1)*/
01187   integer typeofchamp; /* when ptype=0, if typeofchamp=0 => champ is invoked else champ1 is invoked (typeofchamp==1) */
01188   BOOL isselected;
01189   char *callback; 
01190   int callbacklen; 
01191   int callbackevent;
01193   BOOL visible;
01194   int isclip;
01195   double clip_region[4];
01196   int clip_region_set;
01197   double *vz; 
01198   double *vfz;
01199 
01200   int * user_data; /* adding 27.06.05 */
01201   int size_of_user_data;
01202 }
01203 sciSegs; 
01204  
01205 
01206 
01207 
01217 typedef struct
01218 {
01219   sciRelationShip relationship;
01220   sciGraphicContext graphiccontext; 
01221   
01222   double *pvecx;  
01223   double *pvecy;  
01224   double *pvecz;  
01225   int nx; 
01226   int ny;
01227   int type;   
01228   char datamapping[7];
01229   BOOL isselected;
01230   char *callback; 
01231   int callbacklen; 
01232   int callbackevent;
01234   BOOL visible;
01235   int * user_data; /* adding 27.06.05 */
01236   int size_of_user_data;
01237 }
01238 sciGrayplot;  
01250 typedef struct
01251 {
01252   sciRelationShip relationship;
01253   sciGraphicContext graphiccontext; 
01254   
01255   double *pvecx;  
01256   double *pvecy;   
01257   double *pnoeud;
01258   double *pfun;    
01259   int Nnode; 
01260   int Ntr;  
01261   double *zminmax; 
01262   integer *colminmax;
01263   integer *colout;
01264   BOOL with_mesh;
01265   BOOL isselected;
01266   char *callback; 
01267   int callbacklen; 
01268   int callbackevent;
01270   BOOL visible;
01271   int * user_data; /* adding 27.06.05 */
01272   int size_of_user_data;
01273 }
01274 sciFec;  
01280 typedef struct
01281 {
01282   sciRelationShip relationship;
01283   int posx;
01284   int posy;
01285   int width;
01286   int height;
01287   int totalheigth;              /* the height in the menu bar */
01288 }
01289 sciPanner;  
01295 typedef struct
01296 {
01297   sciRelationShip relationship;
01298   int poshorz;
01299   int totalheight;
01300 }
01301 sciScrollBarHorz;  
01307 typedef struct
01308 {
01309   sciRelationShip relationship;
01310   int posvert;
01311   int totalwidth;
01312 }
01313 sciScrollBarVert;  
01319 typedef struct tagLabelMenu
01320 {
01321   char *plabel;
01322   struct tagLabelMenu *pnextlabelmenu;
01323 }
01324 sciLabelMenu;  
01331 typedef struct
01332 {
01333   sciRelationShip relationship;
01334   sciGraphicContext graphiccontext;
01335   sciText text;
01336   sciLabelMenu *plabelmenu;
01337   HMENU  hPopMenu;                      
01338 }
01339 sciMenu  , sciMenuContext;
01356 typedef struct
01357 {
01358   sciRelationShip relationship;
01359   sciGraphicContext graphiccontext;
01360   sciText text;
01361   char *ptext;
01362 }
01363 sciStatusBar;  
01369 typedef struct
01370 {
01371   sciRelationShip relationship;
01372   double xmin;                     
01373   double ymin;                     
01374   double xmax;
01375   double ymax;
01376   BOOL isselected;
01377   char *callback; 
01378   int callbacklen; 
01379   int callbackevent;
01381   BOOL visible;
01382 
01383   int * user_data; /* adding 27.06.05 */
01384   int size_of_user_data;
01385 }
01386 sciAgreg;  
01391 typedef struct 
01392 {
01393   sciRelationShip relationship ;
01394 
01395   BOOL visible ;
01396 
01397   int * user_data ;
01398   int size_of_user_data;
01399 
01400 } sciConsole ;
01401 
01405 typedef struct 
01406 {
01407   sciRelationShip relationship ;
01408 
01409   BOOL visible ;
01410 
01411   int * user_data ;
01412   int size_of_user_data;
01413 
01414 } sciFrame ;
01415 
01419 typedef struct 
01420 {
01421   sciRelationShip relationship ;
01422 
01423   BOOL visible ;
01424 
01425   int * user_data ;
01426   int size_of_user_data;
01427 
01428 } sciWindow ;
01429 
01433 typedef struct 
01434 {
01435   sciRelationShip relationship ;
01436 
01437   BOOL visible ;
01438 
01439   int * user_data ;
01440   int size_of_user_data;
01441 
01442 } sciWindowFrame ;
01443 
01447 typedef struct 
01448 {
01449   sciRelationShip relationship ;
01450 
01451   BOOL visible ;
01452 
01453   int * user_data ;
01454   int size_of_user_data;
01455 
01456 } sciScreen ;
01457 
01458 #endif /*__SCI_OBJECT_STRUCTURE__ */

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