|
@@ -94,7 +94,7 @@ extern "C" {
|
94
|
94
|
cmGrKeyCodeId_t eventKey; // Event keys (See the cmGrEvent() keys)
|
95
|
95
|
int eventX; // Mouse X,Y location when event was generated (Same as cmGrEvent())
|
96
|
96
|
int eventY; //
|
97
|
|
- unsigned deltaFlags; // Event caused an object state change (See kXXXGrPlFl flags)
|
|
97
|
+ unsigned deltaFlags; // Event which caused an object state change (See kXXXGrPlFl flags)
|
98
|
98
|
} cmGrPlotCbArg_t;
|
99
|
99
|
|
100
|
100
|
|
|
@@ -104,7 +104,8 @@ extern "C" {
|
104
|
104
|
// the object has not yet been changed. This may be confusing because if
|
105
|
105
|
// the state of the object is queried inside the callback it will have the
|
106
|
106
|
// pre-change state - but this state will be automatically toggled when the
|
107
|
|
- // callback returns 'true'.
|
|
107
|
+ // callback returns 'true'. Examine the arg->deltaFlags to determine the
|
|
108
|
+ // state attribute which is changing.
|
108
|
109
|
typedef bool (*cmGrPlotCbFunc_t)( cmGrPlotCbArg_t* arg );
|
109
|
110
|
|
110
|
111
|
extern cmGrPlH_t cmGrPlNullHandle;
|
|
@@ -201,13 +202,21 @@ extern "C" {
|
201
|
202
|
cmGrPlRC_t cmGrPlotClear( cmGrPlH_t h ); // destroy all objects
|
202
|
203
|
cmErr_t* cmGrPlotErr( cmGrPlH_t h );
|
203
|
204
|
cmRpt_t* cmGrPlotRpt( cmGrPlH_t h );
|
|
205
|
+
|
|
206
|
+ // Return the count of plot objects.
|
204
|
207
|
unsigned cmGrPlotObjectCount( cmGrPlH_t h );
|
|
208
|
+
|
|
209
|
+ // Return the handle of the ith object (0<=index<cmGrPlotObjectCount())
|
205
|
210
|
cmGrPlObjH_t cmGrPlotObjectIndexToHandle( cmGrPlH_t h, unsigned index );
|
|
211
|
+
|
|
212
|
+ // Given a plot object id return the associated object handle.
|
206
|
213
|
cmGrPlObjH_t cmGrPlotObjectIdToHandle( cmGrPlH_t h, unsigned id );
|
207
|
214
|
|
208
|
215
|
// Pass a keyboard event to the plot system.
|
209
|
216
|
void cmGrPlotKeyEvent( cmGrPlH_t h, cmGrH_t grH, unsigned eventFlags, cmGrKeyCodeId_t keycode );
|
210
|
217
|
|
|
218
|
+ // Set the default object callback and arg.
|
|
219
|
+ void cmGrPlotSetCb( cmGrPlH_t h, cmGrPlotCbFunc_t func, void* arg );
|
211
|
220
|
|
212
|
221
|
|
213
|
222
|
#ifdef __cplusplus
|