8a7b86977f8cb0e83eb5afef02f16ac439a41353
[scilab.git] / scilab / modules / graphics / includes / GetProperty.h
1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2001 - 2002 - INRIA - Mathieu Philipe
4  * Copyright (C) 2002 - 2004 - INRIA - Djalel Abdemouche
5  * Copyright (C) 2004 - 2006 - INRIA - Fabrice Leray
6  * Copyright (C) 2005 - INRIA - Jean-Baptiste Silvy
7  * Copyright (C) 2010 - Paul Griffiths
8  * Copyright (C) 2011 - DIGITEO - Bruno JOFRET
9  *
10  * This file must be used under the terms of the CeCILL.
11  * This source file is licensed as described in the file COPYING, which
12  * you should have received as part of this distribution.  The terms
13  * are also available at
14  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
15  *
16  */
17
18 /*------------------------------------------------------------------------
19  *    Graphic library
20  *    newGraph Library header
21  *    Comment:
22  *    This file contains all functions used to GET the properties of graphics
23  *    objects.
24  --------------------------------------------------------------------------*/
25
26
27
28 #ifndef __SCI_GET_PROPERTY__
29 #define __SCI_GET_PROPERTY__
30
31 #include "dynlib_graphics.h"
32 #include "ObjectStructure.h"
33 #include "StringMatrix.h"
34 #include "BOOL.h"
35
36 GRAPHICS_IMPEXP void sciGetPointerToUserData (sciPointObj * pobj,int ***user_data_ptr, int **size_ptr); /* GET */
37 GRAPHICS_IMPEXP sciEntityType sciGetEntityType (sciPointObj * pobj);  /* GET */
38
39 /* Graphic Context Functions */
40 GRAPHICS_IMPEXP sciGraphicContext *sciGetGraphicContext (sciPointObj * pobj); /* GET */
41 GRAPHICS_IMPEXP int sciGetNumColors (char* pobjUID); /* GET */
42 GRAPHICS_IMPEXP int sciGetColormap (sciPointObj * pobj, double rgbmat[] ); /* GET */
43 GRAPHICS_IMPEXP int sciGetGoodIndex(sciPointObj * pobj, int colorindex);  /* GET */
44
45 GRAPHICS_IMPEXP int sciGetForegroundToDisplay (sciPointObj * pobj); /* GET */
46 GRAPHICS_IMPEXP int sciGetBackgroundToDisplay (sciPointObj * pobj); /* GET */
47
48 GRAPHICS_IMPEXP int sciGetBackground (sciPointObj * pobj); /* GET */
49 GRAPHICS_IMPEXP int sciGetForeground (sciPointObj * pobj); /* GET */
50 GRAPHICS_IMPEXP double sciGetLineWidth (sciPointObj * pobj); /* GET */
51 GRAPHICS_IMPEXP BOOL sciGetIsLine (sciPointObj * pobj); /* GET */
52 GRAPHICS_IMPEXP BOOL sciGetIsDisplayingLines(sciPointObj * pObj);
53 GRAPHICS_IMPEXP int sciGetLineStyle (sciPointObj * pobj); /* GET */
54 GRAPHICS_IMPEXP BOOL sciGetIsMark (sciPointObj * pobj); /* GET */
55 GRAPHICS_IMPEXP BOOL sciGetIsFilled (sciPointObj * pobj); /* GET */
56 GRAPHICS_IMPEXP double sciGetArrowSize (sciPointObj * pobj); /* GET */
57
58 GRAPHICS_IMPEXP EAxesBoxType sciGetBoxType( sciPointObj * pobj ) ; /* GET */
59 GRAPHICS_IMPEXP BOOL sciGetIsBoxed (sciPointObj * pobj); /* GET */
60 GRAPHICS_IMPEXP int sciGetMarkStyle (sciPointObj * pobj); /* GET */
61 GRAPHICS_IMPEXP int sciGetMarkSize (sciPointObj * pobj); /* GET */
62 GRAPHICS_IMPEXP int sciGetMarkSizeUnit (sciPointObj * pobj); /* GET */
63
64 /* Text Functions */
65 GRAPHICS_IMPEXP sciFont *sciGetFontContext (sciPointObj * pobj);  /* GET */
66 GRAPHICS_IMPEXP double sciGetFontSize(char * pobjUID); /* GET */
67 GRAPHICS_IMPEXP double sciGetFontOrientation (sciPointObj * pobj); /* GET */
68 GRAPHICS_IMPEXP StringMatrix * sciGetText (sciPointObj * pobj); /* GET */
69 GRAPHICS_IMPEXP void sciGetTextSize( sciPointObj * pobj, int * nbRow, int * nbCol ) ; /* GET */
70 GRAPHICS_IMPEXP BOOL sciisTextEmpty(char* identifier);
71 GRAPHICS_IMPEXP unsigned int sciGetTextLength (sciPointObj * pobj); /* GET */
72
73 GRAPHICS_IMPEXP int sciGetFontBackground (sciPointObj * pobj); /* GET */
74 GRAPHICS_IMPEXP int sciGetFontForeground (sciPointObj * pobj); /* GET */
75 GRAPHICS_IMPEXP int sciGetMarkBackground (sciPointObj * pobj); /* GET */
76 GRAPHICS_IMPEXP int sciGetMarkForeground (sciPointObj * pobj); /* GET */
77 /* F.Leray 09.04.04*/
78 GRAPHICS_IMPEXP int sciGetFontBackgroundToDisplay (sciPointObj * pobj); /* GET */
79 GRAPHICS_IMPEXP int sciGetFontForegroundToDisplay (sciPointObj * pobj); /* GET */
80 GRAPHICS_IMPEXP int sciGetMarkBackgroundToDisplay (sciPointObj * pobj); /* GET */
81 GRAPHICS_IMPEXP int sciGetMarkForegroundToDisplay (sciPointObj * pobj); /* GET */
82
83 GRAPHICS_IMPEXP int sciGetFontStyle (sciPointObj * pobj); /* GET */
84
85 /* Legend */
86 GRAPHICS_IMPEXP sciLegendPlace sciGetLegendPlace (sciPointObj * pobj);
87 GRAPHICS_IMPEXP void sciGetLegendPos (sciPointObj * pobj , double position[]);
88
89 /* Figure / Subwin main functions */
90 GRAPHICS_IMPEXP sciPointObj *sciGetParentFigure (sciPointObj * pobj); /* GET */
91 GRAPHICS_IMPEXP sciPointObj *sciGetParentSubwin (sciPointObj * pobj); /* GET */
92 GRAPHICS_IMPEXP int sciGetNumFigure (sciPointObj * pobj); /* GET */
93
94 /* GMODE */
95 GRAPHICS_IMPEXP scigMode *sciGetGraphicMode (sciPointObj * pobj);  /* GET */
96 GRAPHICS_IMPEXP int sciGetIsClipRegionValuated (sciPointObj * pobj);
97 GRAPHICS_IMPEXP int sciGetIsClipping (sciPointObj * pobj); /* GET */
98 GRAPHICS_IMPEXP double *sciGetClipping (sciPointObj * pobj); /* GET */
99 GRAPHICS_IMPEXP BOOL sciGetAddPlot (sciPointObj * pobj);  /* GET */
100 GRAPHICS_IMPEXP BOOL sciGetAutoScale (sciPointObj * pobj);  /* GET */
101 GRAPHICS_IMPEXP BOOL sciGetZooming (sciPointObj * pobj);  /* GET */
102 GRAPHICS_IMPEXP int sciGetXorMode (sciPointObj * pobj);  /* GET */
103 GRAPHICS_IMPEXP BOOL sciGetRealVisibility (sciPointObj * pobj) ; /* GET */
104 GRAPHICS_IMPEXP BOOL sciGetVisibility (sciPointObj * pobj);  /* GET */
105 GRAPHICS_IMPEXP BOOL sciGetResize (sciPointObj * pobj);  /* GET */
106
107
108 /* Window Functions */
109 GRAPHICS_IMPEXP char *sciGetName (sciPointObj * pobj);  /* GET */
110 GRAPHICS_IMPEXP int sciGetNum (sciPointObj * pobj);  /* GET */
111 GRAPHICS_IMPEXP int sciGetWidth (sciPointObj * pobj);   /* GET */
112 GRAPHICS_IMPEXP int sciGetHeight (sciPointObj * pobj);  /* GET */
113 GRAPHICS_IMPEXP void sciGetDim( sciPointObj * pobj, int * pWidth, int * pHeight ) ; /* GET */
114 GRAPHICS_IMPEXP int sciGetWindowWidth(sciPointObj * pObj) ; /* GET */
115 GRAPHICS_IMPEXP int sciGetWindowHeight(sciPointObj * pObj) ; /* GET */
116 GRAPHICS_IMPEXP sciPointObj *sciIsExistingSubWin (double *WRect); /* GET */ /* WARNING special case here */
117
118
119 GRAPHICS_IMPEXP double *sciGetPoint (char * pthis, int *num, int *numco); /* GET */
120
121 GRAPHICS_IMPEXP BOOL sciGetdrawmode (sciPointObj *pobj); /* GET */
122 GRAPHICS_IMPEXP sciPointObj *sciGetAxes (sciPointObj *pparentfigure,sciPointObj *psubwin); /* GET */
123
124
125 GRAPHICS_IMPEXP int sciType (char *marker, sciPointObj *pobj); /* GET */
126
127 GRAPHICS_IMPEXP sciPointObj *sciGetSurface(sciPointObj *psubwin); /* GET */
128
129 GRAPHICS_IMPEXP char sciGetxLocation(sciPointObj * pObj);
130 GRAPHICS_IMPEXP char sciGetyLocation(sciPointObj * pObj);
131
132
133 /* UNUSED ? */
134 GRAPHICS_IMPEXP sciPointObj *sciGetOriginalSubWin (sciPointObj * pfigure);
135
136 GRAPHICS_IMPEXP int * sciGetInterpVector(sciPointObj * pobj); /* GET */
137 GRAPHICS_IMPEXP BOOL sciGetIsColorInterpolated(sciPointObj * pobj); /* GET */
138
139 GRAPHICS_IMPEXP BOOL sciGetAutoRotation ( sciPointObj * pObj ) ;
140 GRAPHICS_IMPEXP BOOL sciGetAutoPosition ( sciPointObj * pObj ) ;
141
142 GRAPHICS_IMPEXP BOOL sciGetCenterPos( sciPointObj * pObj ) ;
143
144 GRAPHICS_IMPEXP BOOL sciGetIs3d( sciPointObj * pObj ) ;
145
146 /**
147  * for a subwindow object, return if the its labels (x,y,z) are all
148  *       empty or not.
149  * @param pObjUID the subwindow's identifier.
150  */
151 GRAPHICS_IMPEXP BOOL sciGetLegendDefined(char * pObjUID);
152
153 GRAPHICS_IMPEXP BOOL sciGetAutoSize( sciPointObj * pObj ) ;
154 GRAPHICS_IMPEXP sciTextAlignment sciGetAlignment( sciPointObj * pObj ) ;
155 GRAPHICS_IMPEXP void sciGetUserSize( sciPointObj * pObj, double * width, double * height ) ;
156
157 GRAPHICS_IMPEXP int sciGetNbChildren( sciPointObj * pObj ) ; /* GET */
158
159 GRAPHICS_IMPEXP BOOL sciGetIsAccessibleChild( sciPointObj * pObj ) ; /* GET */
160
161 GRAPHICS_IMPEXP BOOL GetHandleVisibilityOnUimenu( sciPointObj * pobj ) ; /* GET */
162
163 GRAPHICS_IMPEXP int sciGetNbTypedObjects( sciPointObj * pObj, sciEntityType type ) ;
164
165 GRAPHICS_IMPEXP int sciGetHiddenColor( sciPointObj * pObj ) ; /* GET */
166
167 GRAPHICS_IMPEXP int sciGetHiddenAxisColor( sciPointObj * pObj ) ; /* GET */
168
169 GRAPHICS_IMPEXP BOOL sciGetIsAutoDrawable( sciPointObj * pobj ) ;
170 GRAPHICS_IMPEXP BOOL sciGetImmediateDrawingMode( sciPointObj * pobj ) ;
171
172
173 GRAPHICS_IMPEXP void sciGetGridStyle( sciPointObj * pObj, int * xStyle, int * yStyle, int * zStyle ) ;
174
175 GRAPHICS_IMPEXP void sciGetViewport( sciPointObj * pObj, int viewport[4] );
176
177 GRAPHICS_IMPEXP void sciGetInfoMessage( sciPointObj * pObj, char * infoMessage ) ;
178
179 GRAPHICS_IMPEXP int sciGetInfoMessageLength( sciPointObj * pObj ) ;
180
181 GRAPHICS_IMPEXP void sciGetScreenPosition( sciPointObj * pObj, int * posX, int * posY ) ;
182
183 GRAPHICS_IMPEXP BOOL sciGetIsEventHandlerEnable( sciPointObj * pObj ) ;
184 GRAPHICS_IMPEXP char * sciGetEventHandler( sciPointObj * pObj ) ;
185
186 GRAPHICS_IMPEXP double * sciGetAxesBounds( sciPointObj * pObj ) ;
187 GRAPHICS_IMPEXP double * sciGetMargins( sciPointObj * pObj ) ;
188
189 GRAPHICS_IMPEXP void sciGetRealDataBounds( sciPointObj * pObj, double bounds[6] ) ; /* GET */
190 GRAPHICS_IMPEXP void sciGetDataBounds( sciPointObj * pObj, double bounds[6] ) ; /* GET */
191 GRAPHICS_IMPEXP void sciGetDisplayedDataBounds(sciPointObj * pObj, double bounds[6]); /* GET */
192
193 GRAPHICS_IMPEXP void sciGetViewingAngles( sciPointObj * pObj, double * alpha, double * theta) ; /* GET */
194
195 GRAPHICS_IMPEXP void sciGetLogFlags(char *pObjUID, char flags[3]); /* GET */
196
197 GRAPHICS_IMPEXP BOOL sciGetPixmapMode(sciPointObj * pObj); /* GET */
198
199 GRAPHICS_IMPEXP int sciGetNbPoints(sciPointObj * pObj); /* GET */
200
201 GRAPHICS_IMPEXP int sciGetPolylineStyle(sciPointObj * pObj); /* GET */
202
203 GRAPHICS_IMPEXP BOOL sciGetIsClosed(sciPointObj * pObj); /* GET */
204
205 GRAPHICS_IMPEXP void sciGetTextPos(sciPointObj * pObj, double position[3]); /* GET */
206
207 GRAPHICS_IMPEXP void sciGetPixelCoordinate(sciPointObj * pObj, const double userCoord[3], int pixCoord[2]); /* GET */
208
209 GRAPHICS_IMPEXP void sciGet2dViewCoordinate(sciPointObj * pObj, const double userCoords3D[3], double userCoords2D[2]); /* GET */
210
211 GRAPHICS_IMPEXP void sciGet2dViewCoordFromPixel(sciPointObj * pObj, const int pixelCoords[2], double userCoords2D[2]); /* GET */
212
213 GRAPHICS_IMPEXP void sciGet2dViewPixelCoordinates(sciPointObj * pObj, const double userCoords2D[2], int pixelCoords[2]); /* GET */
214
215 GRAPHICS_IMPEXP BOOL sciGetIsIsoView(sciPointObj * pObj); /* GET */
216
217 GRAPHICS_IMPEXP BOOL sciGetIsCubeScaled(sciPointObj * pObj); /* GET */
218
219 GRAPHICS_IMPEXP void sciGetAxesReverse(sciPointObj * pObj, BOOL axesReverse[3]); /* GET */
220
221 GRAPHICS_IMPEXP BOOL sciGetTightLimitsOn(sciPointObj * pObj); /* GET */
222
223 GRAPHICS_IMPEXP void sciGetAutoTicks(sciPointObj * pObj, BOOL autoTicks[3]); /* GET */
224
225 GRAPHICS_IMPEXP BOOL sciGetAutoSubticks(sciPointObj * pObj); /* GET */
226
227 GRAPHICS_IMPEXP void sciGetNbSubTics(sciPointObj * pObj, int nbsubtics[3]); /* GET */
228
229 GRAPHICS_IMPEXP void sciGetAxesVisible(sciPointObj * pObj, BOOL axesVisible[3]); /* GET */
230
231 GRAPHICS_IMPEXP void sciGetZoomBox(sciPointObj * pObj, double zoomBox[6]); /* GET */
232
233 GRAPHICS_IMPEXP void sciGet2dViewBoundingBox(sciPointObj * pObj, double corner1[2], double corner2[2],
234                              double corner3[2], double corner4[2]); /* GET */
235
236 GRAPHICS_IMPEXP void sciGetTextBoundingBox(sciPointObj * pObj, double corner1[3], double corner2[3],
237                            double corner3[3], double corner4[3]); /* GET */
238
239 GRAPHICS_IMPEXP void sciGetPixelBoundingBox(sciPointObj * pObj, int corner1[2], int corner2[2],
240                             int corner3[2], int corner4[2]); /* GET */
241
242 GRAPHICS_IMPEXP void sciGetViewingArea(sciPointObj * pObj, int * xPos, int * yPos, int * width, int * height); /* GET */
243
244 GRAPHICS_IMPEXP void sciGetAABoundingBox(sciPointObj * pObj, double bounds[6]); /* GET */
245
246 GRAPHICS_IMPEXP BOOL sciGetUseNurbs(sciPointObj * pObj); /* GET */
247
248 GRAPHICS_IMPEXP BOOL sciGetIsUsingFractionalMetrics(sciPointObj * pObj); /* GET */
249
250 GRAPHICS_IMPEXP int sciGetNbXTicks(sciPointObj * pSubwin);
251 GRAPHICS_IMPEXP void sciGetXTicksPos(sciPointObj * pSubwin, double ticksPos[], char ** ticksLabels);
252 GRAPHICS_IMPEXP int sciGetNbYTicks(sciPointObj * pSubwin);
253 GRAPHICS_IMPEXP void sciGetYTicksPos(sciPointObj * pSubwin, double ticksPos[], char ** ticksLabels);
254 GRAPHICS_IMPEXP int sciGetNbZTicks(sciPointObj * pSubwin);
255 GRAPHICS_IMPEXP void sciGetZTicksPos(sciPointObj * pSubwin, double ticksPos[], char ** ticksLabels);
256
257 GRAPHICS_IMPEXP BOOL sciGetIsAbleToCreateWindow(void);
258
259 GRAPHICS_IMPEXP int sciGetSubwinIndex(sciPointObj * pSubwin); /* GET */
260
261 GRAPHICS_IMPEXP BOOL sciIsAutomaticallyRedrawn(sciPointObj * pObj);
262
263 GRAPHICS_IMPEXP void sciGetColorRange(sciPointObj * pObj, int subset[2]); /* GET */
264 GRAPHICS_IMPEXP void sciGetOutsideColor(sciPointObj * pObj, int colors[2]); /* GET */
265 GRAPHICS_IMPEXP void sciGetZBounds(sciPointObj * pObj, double bounds[2]); /* GET */
266
267 GRAPHICS_IMPEXP BOOL sciGetGridFront(sciPointObj * pObj); /* GET */
268
269 GRAPHICS_IMPEXP int sciGetAntialiasingQuality(sciPointObj * pObj); /* GET */
270
271 GRAPHICS_IMPEXP sciLegendPlace sciGetLegendLocation(sciPointObj * pObj); /* GET */
272
273 GRAPHICS_IMPEXP void printSetGetErrorMessage(const char * propertyName);
274
275 GRAPHICS_IMPEXP void sciGetNbSubticks(sciPointObj * pSubwin, double nbsubtics[3]);
276
277 #endif /* __SCI_GET_PROPERTY__ */