-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphicControl.odl
336 lines (252 loc) · 17 KB
/
GraphicControl.odl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
// Copyright 2017 InnoVisioNate Inc. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import "ocidl.idl";
#include <olectl.h>
[
uuid(8CAEFD70-55E6-11d3-8365-006008BD5BC3),
helpfile("Graphic.hlp"),
helpstring("InnoVisioNate Graphic Control"),
lcid(0x00000000),
version(1.0),
control
]
library Graphic {
import "GSystem\GSystem.odl";
enum GraphicPropertiesID {
gcPropName = 0,
gcPropSize = 1,
gcPropPosition = 2,
gcPropPlotView = 3,
gcPropPlotType = 4,
gcPropViewPhi = 5,
gcPropViewTheta = 6,
gcPropViewSpin = 7,
gcPropLightOn = 11,
gcPropLightPosition = 12,
gcPropBackgroundColor = 21,
gcPropLeftMargin = 23,
gcPropTopMargin = 24,
gcPropRightMargin = 25,
gcPropBottomMargin = 26,
gcPropMargins = 27,
gcPropFloor = 31,
gcPropCeiling = 32,
gcPropAxis = 50,
gcPropPlot = 51,
gcPropFunction = 52,
gcPropText = 53,
gcPropShowFunctions = 60,
gcPropAutoPlotViewDetection = 71,
gcPropPickBoxSize = 72,
gcPropUseStatusBar = 73,
gcPropUseGraphicsCursor = 74,
gcPropDenyUserPropertySettings = 75,
gcPropAllowUserShowFunctions = 76};
enum GraphicMethodsID {
gcMethodClearAllData = 100,
gcMethodPrepareForData = 101,
gcMethodTakeDataString = 102,
gcMethodTakeDataArray = 103,
gcMethodTakeFile = 104,
gcMethodTakeDataSet = 105,
gcMethodFinishedWithData = 106,
gcMethodPrepareForDataSets = 107,
gcMethodDraw = 108,
gcMethodSetProperties = 120,
gcMethodAddAxis = 121,
gcMethodAddText = 122,
gcMethodAddTextInteractive = 123,
gcMethodRemoveText = 124,
gcMethodRemoveAllText = 125,
gcMethodAddFunction = 126,
gcMethodAddFunctionInteractive = 127,
gcMethodRemoveFunction = 128,
gcMethodRemoveAllFunctions = 129,
gcMethodAddPlot = 130,
gcMethodRemovePlot = 131,
gcMethodRemoveAllPlots = 132,
gcMethodSynchronise = 133
};
[ uuid(8CAEFD71-55E6-11d3-8365-006008BD5BC3),
helpstring("GSystems Graphic Control (G), Events Interface"),
]
interface IGSGraphicEvents {
HRESULT Clicked();
HRESULT ReDraw();
};
[ uuid(8CAEFD72-55E6-11d3-8365-006008BD5BC3),
helpstring("GSystems Graphic Control (G), Automation Interface"),
dual,oleautomation,
pointer_default(unique)
]
interface IGSGraphic : IDispatch {
// Properties
[propput,id(gcPropSize),helpstring("Size the graphic")]
HRESULT Size( [in] long cx,[in] long cy);
[propput,id(gcPropPosition),helpstring("Position the graphic")]
HRESULT Position( [in] long x,[in] long y);
[propput,id(gcPropPlotView),helpstring("Sets the view (2-D or 3-D) of the Graphic Control, From the enum PlotViews")]
HRESULT PlotView([in] enum PlotViews plotView);
[propget,id(gcPropPlotView),helpstring("Gets the view (2-D or 3-D) of the Graphic Control, From the enum PlotViews")]
HRESULT PlotView([out,retval] enum PlotViews* plotView);
[propput,id(gcPropPlotType),helpstring("Sets the plot type of the Graphic Control, From the enum PlotTypes")]
HRESULT PlotType([in] enum gc2DPlotTypes plotType);
[propget,id(gcPropPlotType),helpstring("Gets the plot type of the Graphic Control, From the enum PlotTypes")]
HRESULT PlotType([out,retval] enum gc2DPlotTypes* plotType);
[propput,id(gcPropFloor),helpstring("Sets the value to use as minimum Z when data does not supply any or only 1 Z value")]
HRESULT Floor([in] double floorZValue);
[propget,id(gcPropFloor),helpstring("Gets the value in use as the minimum Z value when data does not supply any or only 1 Z value")]
HRESULT Floor([out,retval] double *pFloorZValue);
[propput,id(gcPropCeiling),helpstring("Sets the value to use as maximum Z when data does not supply any or only 1 Z value")]
HRESULT Ceiling([in] double ceilingZValue);
[propget,id(gcPropCeiling),helpstring("Gets the value in use as the maximum Z value when data does not supply any or only 1 Z value")]
HRESULT Ceiling([out,retval] double *pCeilingZValue);
[propput,id(gcPropViewPhi),helpstring("One of two angles which determines the view of the graphic is Theta - an angle of elevation above the X-Y plane. This property is the value, in degrees, of this angle.")]
HRESULT ViewPhi([in] float phiAngle);
[propget,id(gcPropViewPhi),helpstring("One of two angles which determines the view of the graphic is Theta - an angle of elevation above the X-Y plane. This property is the value, in degrees, of this angle.")]
HRESULT ViewPhi([out,retval] float *pPhiAngle);
[propput,id(gcPropViewTheta),helpstring("One of two angles which determines the view of the graphic is Phi - an angle of spin around the z-axis. This property is the value, in degrees, of this angle.")]
HRESULT ViewTheta([in] float thetaAngle);
[propget,id(gcPropviewTheta),helpstring("One of two angles which determines the view of the graphic is Phi - an angle of spin around the z-axis. This property is the value, in degrees, of this angle.")]
HRESULT ViewTheta([out,retval] float *pThetaAngle);
[propput,id(gcPropViewSpin),helpstring("After the view is determined by Phi and Theta, this angle will spin the view about the vector from the viewer to the origin - tilting the view. This property is the value, in degrees, of this angle.")]
HRESULT ViewSpin([in] float spinAngle);
[propget,id(gcPropViewSpin),helpstring("After the view is determined by Phi and Theta, this angle will spin the view about the vector from the viewer to the origin - tilting the view. This property is the value, in degrees, of this angle.")]
HRESULT ViewSpin([out,retval] float *pSpinAngle);
/* Properties: Lighting properties */
[propput,id(gcPropLightOn),helpstring("Whether a specific light # (1-8) is enabled (turned on).")]
HRESULT LightOn([in]long lightNumber,[in]VARIANT_BOOL setIsEnabled);
[propget,id(gcPropLightOn),helpstring("Whether a specific light # (1-8) is enabled (turned on).")]
HRESULT LightOn([in]long lightNumber,[out,retval]VARIANT_BOOL *isEnabled);
[propput,id(gcPropLightPosition),helpstring("Specifies the 3-D position of a light - using the same data range as that embodied by the data you have sent to the Control.")]
HRESULT LightPosition([in]long lightNumber,[in]VARIANT *);
[propget,id(gcPropLightPosition),helpstring("Specifies the 3-D position of a light - using the same data range as that embodied by the data you have sent to the Control.")]
HRESULT LightPosition([in]long lightNumber,[out,retval]VARIANT *);
[propput,id(gcPropBackgroundColor),helpstring("Sets the background color of the graphic given a windows color index")]
HRESULT BackgroundColor([in] long colorValue);
[propget,id(gcPropBackgroundColor),helpstring("Retrieves the background color of the graphic (as a windows color index)")]
HRESULT BackgroundColor([out,retval] long *pColorValue);
[propput,id(gcPropLeftMargin),helpstring("Sets the left margin (in pixels)")]
HRESULT LeftMargin([in] long leftMargin);
[propget,id(gcPropLeftMargin),helpstring("Retrieves the left margin (in pixels)")]
HRESULT LeftMargin([out,retval] long *pLeftMargin);
[propput,id(gcPropTopMargin),helpstring("Sets the top margin (in pixels)")]
HRESULT TopMargin([in] long topMargin);
[propget,id(gcPropTopMargin),helpstring("Retrieves the top margin (in pixels)")]
HRESULT TopMargin([out,retval] long *pTopMargin);
[propput,id(gcPropRightMargin),helpstring("Sets the right margin (in pixels)")]
HRESULT RightMargin([in] long rightMargin);
[propget,id(gcPropRightMargin),helpstring("Retrieves the right margin (in pixels)")]
HRESULT RightMargin([out,retval] long *pRightMargin);
[propput,id(gcPropBottomMargin),helpstring("Sets the bottom margin (in pixels)")]
HRESULT BottomMargin([in] long bottomMargin);
[propget,id(gcPropBottomMargin),helpstring("Retrieves the bottom margin (in pixels)")]
HRESULT BottomMargin([out,retval] long *pBottomMargin);
[propput,id(gcPropMargins),helpstring("Sets all margins (left, top, right, bottom) (in pixels)")]
HRESULT Margins([in] long leftMargin,[in] long topMargin, [in] long rightMargin, [in] long bottomMargin);
/* Properties: Other objects */
[propget,id(gcPropAxis),helpstring("Retrieves a axis object, specify 'X','Y','Z', or the single character name of an axis you've created, or receive a NULL object\n\nPlease Release() the returned object at some point.")]
HRESULT Axis([in]BSTR axisType,[out,retval]IDispatch **axisObject);
[propget,id(gcPropPlot),helpstring("Retrieves a plot object, specify the # of the plot (plots are created in sequential order starting at 1). NULL is returned if not found.\n\nPlease Release() the returned object at some point.")]
HRESULT Plot([in]long plotNumber,[out,retval]IDispatch **plotObject);
[propget,id(gcPropFunction),helpstring("Retrieves a function object, specify the expression of the function. Null is returned if not found.\n\nPlease Release() the returned object at some point.")]
HRESULT Function([in]BSTR functionExpression,[out,retval]IDispatch **functionObject);
[propget,id(gcPropText),helpstring("Retrieves a text object, specify the content of the text. Null is returned if not found.\n\nPlease Release() the returned object at some point.")]
HRESULT Text([in]BSTR text,[out,retval]IDispatch **textObject);
/* Properties: Other objects control */
[propput,id(gcPropShowFunctions),helpstring("Hide or show the function specifications. You cannot show them unless at least one function has been defined.")]
HRESULT ShowFunctions([in]VARIANT_BOOL setShowing);
[propget,id(gcPropShowFunctions),helpstring("Hide or show the function specifications. You cannot show them unless at least one function has been defined.")]
HRESULT ShowFunctions([out,retval]VARIANT_BOOL *pShowing);
[propput,id(gcPropAllowUserShowFunctions),helpstring("When running (not design mode), allow the user to control the visibility aspects of the function specification dialog (or not).")]
HRESULT AllowUserSetFunctionVisibility([in] VARIANT_BOOL doAllow);
/* Properties: Other categories */
[propput,id(gcPropAutoPlotViewDetection),helpstring("Allows (or prevents) the graphic to set it's plotView to 3D if it detects 3D data")]
HRESULT AutoPlotViewDetection([in] VARIANT_BOOL );
[propget,id(gcPropAutoPlotViewDetection),helpstring("Allows (or prevents) the graphic to set it's plotView to 3D if it detects 3D data")]
HRESULT AutoPlotViewDetection([out,retval] VARIANT_BOOL *);
[propput,id(gcPropPickBoxSize),helpstring("Sets the size (in pixels) of the Pick box - this is the size of the area around the mouse pointer that the graphic detects elements (for example, text), in.")]
HRESULT PickBoxSize([in] long newSize);
[propget,id(gcPropPickBoxSize),helpstring("Sets the size (in pixels) of the Pick box - this is the size of the area around the mouse pointer that the graphic detects elements (for example, text), in.")]
HRESULT PickBoxSize([out,retval] long *pGetSize);
[propput,id(gcPropUseStatusBar),helpstring("Turns the use of the status bar on and off")]
HRESULT UseStatusBar([in] VARIANT_BOOL);
[propget,id(gcPropUseStatusBar),helpstring("Turns the use of the status bar on and off")]
HRESULT UseStatusBar([out,retval] VARIANT_BOOL *);
[propput,id(gcPropUseGraphicsCursor),helpstring("Turns the use of the 3-D graphics cursor on and off")]
HRESULT UseGraphicsCursor([in]VARIANT_BOOL);
[propget,id(gcPropUseGraphicsCursor),helpstring("Turns the use of the 3-D graphics cursor on and off")]
HRESULT UseGraphicsCursor([out,retval] VARIANT_BOOL *);
[propput,id(gcPropDenyUserPropertySettings),helpstring("Set this value to true to prevent the user from seeing the Graphic Control's property settings dialog during runtime")]
HRESULT DenyUserPropertySettings([in] VARIANT_BOOL);
[propget,id(gcPropDenyUserPropertySettings),helpstring("Set this value to true to prevent the user from seeing the Graphic Control's property settings dialog during runtime")]
HRESULT DenyUserPropertySettings([out,retval] VARIANT_BOOL *);
/* Methods: */
[id(gcMethodClearAllData),helpstring("Call clear all the data (in preparation for sending data) for all plots.")]
HRESULT ClearAllData();
[id(gcMethodPrepareForData),helpstring("Call PrepareForData to prepare the Graphic to recieve data, pass 0 for all plots, or a specific plot number.")]
HRESULT PrepareForData( [in] ULONG_PTR plotNumber );
[id(gcMethodTakeDataString),helpstring("Call TakeData with a string of numbers x, y , and (optionally), z, separated by ' '.")]
HRESULT TakeDataString( [in] BSTR stringOfNumbers, [in] ULONG_PTR plotNumber);
[id(gcMethodTakeDataArray),helpstring("Pass a 2-dimensional array. Dimension 1 contains the rows, dimension 2, columns. Each row is one X and (n-1) Y's (for 2-D graphics), or X and Y, and (n - 2) Z-Values (for 3-D graphics). n = # columns")]
HRESULT TakeDataArray([in] SAFEARRAY(double)* pArray,[in] ULONG_PTR plotNumber);
[id(gcMethodTakeFile),helpstring("Call TakeFile with the name of an input file containing x, y, and (optionally), z values.")]
HRESULT TakeFile( [in] BSTR fileName,[in] ULONG_PTR plotNumber);
[id(gcMethodTakeDataSet),helpstring("TakeDataSet")]
HRESULT TakeDataSet([in] long ds,[in] ULONG_PTR plotNumber);
[id(gcMethodFinishedWithData),helpstring("FinishedWithData")]
HRESULT FinishedWithData( [in] ULONG_PTR plotNumber );
[id(gcMethodPrepareForDataSets),helpstring("PrepareForDataSets")]
HRESULT PrepareForDataSets();
[id(gcMethodDraw),helpstring("PlotData")]
HRESULT Draw([in] ULONG_PTR plotNumber );
[id(gcMethodSetProperties),helpstring("Set the properties")]
HRESULT SetProperties();
[id(gcMethodAddAxis),helpstring("Provides an additional axis")]
HRESULT AddAxis([in]char type,[in]IDispatch *axisObject);
[id(gcMethodAddText),helpstring("Add passed Text at the passed (window) points")]
HRESULT AddText([in]BSTR bstrText,[out,retval]IDispatch **pText);
[id(gcMethodAddTextInteractive),helpstring("Add text interactively (with the GSystems Graphic Control's dialogs). This uses the Graphic Control's interface to add the text.")]
HRESULT AddTextInteractive([out,retval,optional,defaultvalue(0)]IDispatch **pText);
[id(gcMethodRemoveText),helpstring("Remove the text given the provided object interface")]
HRESULT RemoveText([in]IDispatch *pText);
[id(gcMethodRemoveAllText),helpstring("Removes all text defined on the graphic")]
HRESULT RemoveAllText();
[id(gcMethodAddFunction),helpstring("Add a function with the expression, returns an interface to the function. Functions are initially created invisible. Use the ShowFunctions property to make it visible.")]
HRESULT AddFunction([in] BSTR expression,[out,retval,optional,defaultvalue(0)]IDispatch **pFunction);
[id(gcMethodAddFunctionInteractive),helpstring("Add a function interactively (with the GSystems Graphic Control's dialogs). Functions are initially created invisible. Use the ShowFunctions property to make it visible.")]
HRESULT AddFunctionInteractive([out,retval,optional,defaultvalue(0)]IDispatch **pFunction);
[id(gcMethodRemoveFunction),helpstring("Remove a function given the provided object interface")]
HRESULT RemoveFunction([in]IDispatch *pFunction);
[id(gcMethodRemoveAllFunctions),helpstring("Removes all functions defined in the graphic")]
HRESULT RemoveAllFunctions();
[id(gcMethodAddPlot),helpstring("Add a plot with the given id number return it's dispatch interface")]
HRESULT AddPlot([in]long id, [out,retval]IDispatch **pPlot);
[id(gcMethodRemovePlot),helpstring("Remove a plot given the id number")]
HRESULT RemovePlot([in]long idNumber);
[id(gcMethodRemoveAllPlots),helpstring("Removes all plots defined in the graphic")]
HRESULT RemoveAllPlots();
[id(gcMethodSynchronise),helpstring("Synchronize with the graphic by waiting until drawing is over")]
HRESULT Synchronise();
};
[ uuid(8CAEFD73-55E6-11d3-8365-006008BD5BC3),
helpstring("GSystems Graphic Control Services Interface")]
interface IGSGraphicServices : IUnknown {
HRESULT ActivateLighting();
HRESULT AnyOpenGLHere(RECT *pRect);
};
[
uuid(8CAEFD74-55E6-11d3-8365-006008BD5BC3),
helpstring("InnoVisioNate Graphic Class G"),
control
]
coclass GSystemGraphic {
[default] interface IGSGraphic;
[default,source] interface IGSGraphicEvents;
interface IGSGraphicServices;
interface IOleInPlaceSite;
interface IOleClientSite;
interface ISpecifyPropertyPages;
};
};