00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef INC_MI32_MXGRAPH_H
00034 #define INC_MI32_MXGRAPH_H
00035
00036 #ifndef INC_MI32_MGD2_H
00037 #include <mi32/mgd2.h>
00038 #endif
00039
00040 #ifndef INC_MI32_MXTOOLS_H
00041 #include <mi32/mxtools.h>
00042 #endif
00043
00044
00045
00046
00047 #define MxGraph_DestroyReason 0x00000001
00048 #define MxGraph_LeftPressReason 0x00000002
00049 #define MxGraph_LeftReleaseReason 0x00000004
00050 #define MxGraph_RightPressReason 0x00000008
00051 #define MxGraph_RightReleaseReason 0x00000010
00052 #define MxGraph_MotionLeftNotifyReason 0x00000020
00053 #define MxGraph_MotionRightNotifyReason 0x00000040
00054 #define MxGraph_RedrawReason 0x00000080
00055 #define MxGraph_ExposeReason 0x00000100
00056 #define MxGraph_ResizeReason 0x00000200
00057 #define MxGraph_ClientMessageReason 0x00000400
00058 #define MxGraph_DataChangeReason 0x00000800
00059 #define MxGraph_ColorChangeReason 0x00001000
00060 #define MxGraph_CursorEnterReason 0x00002000
00061 #define MxGraph_CursorLeaveReason 0x00004000
00062 #define MxGraph_CursorMotionReason 0x00008000
00063
00064 #define MxGraph_NDViewClearScreen 0x02000000
00065 #define MxGraph_NDViewRestoreScreen 0x04000000
00066
00067 struct POINT_ND {
00068 DOUBLE *coord;
00069 UINT16 cluster;
00070 INT32 pointid;
00071 };
00072
00073 struct MxGraphCallbackStruct {
00074 UINT32 reason;
00075 Widget widget;
00076 Display *display;
00077 XEvent event;
00078 int x;
00079 int y;
00080 DPOINT2D Pos;
00081 const MIUNICODE *lineid;
00082 int vertexnum;
00083 COLOR color;
00084 };
00085
00086
00087
00088 #define GRAPH_HISTOGRAM_NOFILL 0x0001
00089 #define GRAPH_HISTOGRAM_GRIDLINES 0x0002
00090 #define GRAPH_HISTOGRAM_CUMULATIVE 0x0004
00091 #define GRAPH_HISTOGRAM_MINMAXONLY 0x0008
00092 #define GRAPH_HISTOGRAM_CREATEMENU 0x0010
00093 #define GRAPH_HISTOGRAM_LOGARITHMIC 0x0020
00094 #define GRAPH_HISTOGRAM_MENUCLOSE 0x0100
00095
00096 #define LABELS_NONE 1
00097 #define LABELS_PLAIN 2
00098 #define LABELS_INBOX 3
00099
00100 #define HISTOGRAM_IGNORE 0
00101 #define HISTOGRAM_BAR 1
00102 #define HISTOGRAM_OUTLINE 2
00103 #define HISTOGRAM_STRIP 3
00104 #define HISTOGRAM_LASTSTYLE 3
00105
00106
00107 #define XYPLOT_DRAWSTAIRS 0x0001
00108 #define XYPLOT_SOLIDPLOT 0x0002
00109 #define XYPLOT_DRAWGRID 0x0004
00110 #define XYPLOT_HASTOOL 0x0008
00111 #define XYPLOT_DRAWNODES 0x0010
00112 #define XYPLOT_SNAPTOVERTEX 0x0020
00113 #define XYPLOT_XVALUEISINTEGER 0x0040
00114
00115 typedef fastdelegate::FastDelegate<void(MGD::CONTEXT*, int, int)> MXGRAPH_DELEGATE_DRAW;
00116
00117
00118
00119 #if defined(__cplusplus)
00120 extern "C" {
00121 #endif
00122
00124 int MxGraphAddCallback (
00125 Widget wgraph,
00126 McbCallbackFunc,
00127 void *data,
00128 UINT32 reason
00129 );
00130
00132 int MxGraphDraw (
00133 Widget wgraph
00134 );
00135
00137 int MxGraphEnableRedraw (
00138 Widget wgraph,
00139 int flag
00140 );
00141
00143 void MxGraphRemoveCallback (
00144 Widget w,
00145 McbCallbackFunc,
00146 void *data,
00147 UINT32 reason
00148 );
00149
00153 Widget MxGraphCreate (
00154 Widget parent,
00155 int Width,
00156 int Height,
00157 MXGRAPH_DELEGATE_DRAW DelegateDraw,
00158 Arg *arg,
00159 int n,
00160 void *userdata
00161 );
00162
00164 int MxGraphSnapshot (
00165 Widget wgraph
00166 );
00167
00171 void* MxGraphGetUserData (
00172 Widget wgraph
00173 );
00174
00176 int MxGraphGetDimensions (
00177 Widget wgraph,
00178 int *Width,
00179 int *Height
00180 );
00181
00187 MXTHANDLE MxGraphGetTool (
00188 Widget wgraph
00189 );
00190
00192 #define MxGraphHistogramClear(wdt) (MxGraphHistogramSetData(wdt,NULL,0))
00193
00195 int MxGraphHistogramComputeFromData (
00196 Widget whisto,
00197 DOUBLE *data,
00198 int numdata,
00199 int numintervals
00200 );
00201
00215 Widget MxGraphHistogramCreate (
00216 Widget parent,
00217 int Width,
00218 int Height,
00219 int numintervals,
00220 UINT32 *data,
00221 UINT32 flags,
00222 Arg *arg,
00223 int n
00224 );
00225
00227 int MxGraphHistogramEnableTooltip (
00228 Widget whisto,
00229 int flag
00230 );
00231
00233 int MxGraphHistogramGetCount (
00234 Widget whisto,
00235 INT32 bin,
00236 INT32 *count
00237 );
00238
00244 int MxGraphHistogramGetDataRange (
00245 Widget whisto,
00246 DOUBLE *start,
00247 DOUBLE *end
00248 );
00249
00251 int MxGraphHistogramGetMaxCount (
00252 Widget whisto,
00253 INT32 *bin,
00254 INT32 *count
00255 );
00256
00258 int MxGraphHistogramGetNumIntervals (
00259 Widget whisto,
00260 INT32 *numintervals
00261 );
00262
00264 int MxGraphHistogramScreenToData (
00265 Widget whisto,
00266 int x,
00267 int y,
00268 INT32 *bin,
00269 DOUBLE *value,
00270 INT32 *count
00271 );
00272
00274 int MxGraphHistogramSetData (
00275 Widget whisto,
00276 UINT32 *data,
00277 int items
00278 );
00279
00281 int MxGraphHistogramSetDataDouble (
00282 Widget whisto,
00283 DOUBLE *data,
00284 int numintervals
00285 );
00286
00298 int MxGraphHistogramSetFlags (
00299 Widget whisto,
00300 UINT32 flags
00301 );
00302
00310 int MxGraphHistogramSetStyle (
00311 Widget whisto,
00312 COLOR *fg,
00313 COLOR *bg,
00314 COLOR *fill,
00315 COLOR *labelcover,
00316 DOUBLE levelcount,
00317 int DrawStyle
00318 );
00319
00321 int MxGraphHistogramSetTextStyle (
00322 Widget whisto,
00323 const char *Fontname,
00324 float size
00325 );
00326
00331 int MxGraphHistogramSetTicMarks (
00332 Widget whisto,
00333 DOUBLE datastart,
00334 DOUBLE dataend,
00335 DOUBLE ticstart,
00336 DOUBLE ticspacing
00337 );
00338
00340 int MxGraphHistogramSetFromRaster (
00341 Widget whisto,
00342 RVC::OBJITEM objitem,
00343 const REGION2D *region,
00344 int ColorComp
00345 );
00346
00348 int MxGraphHistogramSmooth (
00349 Widget whisto
00350 );
00351
00353 int MxGraphHistogramCheckForNull (
00354 Widget whisto
00355 );
00356
00358 int MxGraphXYPlotAddLineScaled (
00359 Widget wplot,
00360 const MIUNICODE *name,
00361 DPOLYLINE *Line,
00362 const COLOR *color,
00363 DOUBLE linewidth,
00364 DOUBLE offset,
00365 DOUBLE scale,
00366 int Redraw
00367 );
00368
00370 int MxGraphXYPlotAddLine (
00371 Widget wplot,
00372 const MIUNICODE *name,
00373 DPOLYLINE *Line,
00374 const COLOR *color,
00375 DOUBLE linewidth,
00376 int Redraw
00377 );
00378
00380 int MxGraphXYPlotClear (
00381 Widget wplot,
00382 int Redraw
00383 );
00384
00395 Widget MxGraphXYPlotCreate (
00396 Widget parent,
00397 int Width,
00398 int Height,
00399 const MIUNICODE *title,
00400 const MIUNICODE *xtitle,
00401 const MIUNICODE *ytitle,
00402 const MIUNICODE *y2title,
00403 UINT32 flags,
00404 Arg *argext,
00405 int next
00406 );
00407
00411 int MxGraphXYPlotEditVertex (
00412 Widget wplot,
00413 const MIUNICODE *linename,
00414 INT32 vertexnum,
00415 DOUBLE y,
00416 int redraw
00417 );
00418
00420 int MxGraphXYPlotGetColors (
00421 Widget wplot,
00422 COLOR *A,
00423 COLOR *B,
00424 COLOR *TextColor
00425 );
00426
00428 int MxGraphXYPlotGetExtents (
00429 Widget wplot,
00430 DRECT2D *rect
00431 );
00432
00434 int MxGraphXYPlotGetHorizontalRange (
00435 Widget wplot,
00436 DOUBLE *minval,
00437 DOUBLE *maxval
00438 );
00439
00446 int MxGraphXYPlotGetLine (
00447 Widget wplot,
00448 const MIUNICODE *linename,
00449 DPOLYLINE *poly
00450 );
00451
00453 int MxGraphXYPlotGetVerticalRange (
00454 Widget wplot,
00455 DOUBLE *minval,
00456 DOUBLE *maxval
00457 );
00458
00467 int MxGraphXYPlotSetFlags (
00468 Widget wplot,
00469 UINT32 flags
00470 );
00471
00473 int MxGraphXYPlotSetFontname (
00474 Widget wplot,
00475 const MIUNICODE *fontname
00476 );
00477
00479 int MxGraphXYPlotSetFontSize (
00480 Widget wplot,
00481 int Size
00482 );
00483
00485 int MxGraphXYPlotSetAxisNames (
00486 Widget wplot,
00487 const char *title,
00488 const char *xtitle,
00489 const char *ytitle,
00490 const char *y2title
00491 );
00492
00494 int MxGraphXYPlotSetAxisNamesUC (
00495 Widget wplot,
00496 const MIUNICODE *title,
00497 const MIUNICODE *xtitle,
00498 const MIUNICODE *ytitle,
00499 const MIUNICODE *y2title
00500 );
00501
00503 int MxGraphXYPlotSetHorizontalRange (
00504 Widget wplot,
00505 DOUBLE minval,
00506 DOUBLE maxval,
00507 int Redraw
00508 );
00509
00513 int MxGraphXYPlotSetChangePositionCallback (
00514 Widget wplot,
00515 McbCallbackFunc func,
00516 void *userdata
00517 );
00518
00520 void MxGraphXYPlotSetCursorTrackCallback (
00521 Widget wplot,
00522 McbCallbackFunc func,
00523 void *userdata
00524 );
00525
00527 int MxGraphXYPlotSetVerticalRange (
00528 Widget wplot,
00529 DOUBLE minval,
00530 DOUBLE maxval,
00531 int Redraw
00532 );
00533
00535 int MxGraphXYPlotSetColors (
00536 Widget wplot,
00537 COLOR *A,
00538 COLOR *B,
00539 COLOR *TextColor
00540 );
00541
00543 int MxGraphXYPlotEditLineColors (
00544 Widget wplot,
00545 int Redraw
00546 );
00547
00549 int MxGraphNDViewClearPoints (
00550 Widget wview
00551 );
00552
00554 int MxGraphNDViewAddPoints (
00555 Widget wview,
00556 INT32 numdim,
00557 POINT_ND *points,
00558 INT32 numpts,
00559 int Normalize,
00560 int ToClass
00561 );
00562
00566 int MxGraphNDViewAddSinglePoint (
00567 Widget wview,
00568 INT32 numdim,
00569 POINT_ND *point
00570 );
00571
00573 Widget MxGraphNDViewCreate (
00574 Widget parent,
00575 int Width,
00576 int Height,
00577 UINT32 flags,
00578 Arg *argext,
00579 int next
00580 );
00581
00583 int MxGraphNDViewEditColors (
00584 Widget wview,
00585 int Redraw
00586 );
00587
00589 int MxGraphNDViewGetMaxNumClasses (
00590 Widget wview
00591 );
00592
00594 int MxGraphNDViewGetClassColor (
00595 Widget wview,
00596 int classnum,
00597 COLOR *color
00598 );
00599
00601 int MxGraphNDViewRotateRandom (
00602 Widget wview
00603 );
00604
00606 int MxGraphNDViewRotate (
00607 Widget wview
00608 );
00609
00611 int MxGraphNDViewSetPoints (
00612 Widget wview,
00613 INT32 numdim,
00614 POINT_ND *points,
00615 INT32 numpts,
00616 int Norm
00617 );
00618
00620 int MxGraphNDViewSetRotationVector (
00621 Widget wview,
00622 DOUBLE dx,
00623 DOUBLE dy,
00624 DOUBLE radius
00625 );
00626
00628 int MxGraphNDViewSetViewAxises (
00629 Widget wview,
00630 int haxis,
00631 int vaxis
00632 );
00633
00635 int MxGraphNDViewSpinRandom (
00636 Widget wview
00637 );
00638
00640 int MxGraphNDViewSpinSetCancel (
00641 Widget wview
00642 );
00643
00645 int MxGraphNDViewSpinGetCancel (
00646 Widget wview
00647 );
00648
00650 int MxGraphNDViewSetPointMappingCallback (
00651 Widget wview,
00652 int (*MapFunc)(void*,INT32,COLOR*,int),
00653 void *userdata
00654 );
00655
00657 int MxGraphNDViewSetSpeed (
00658 Widget wview,
00659 DOUBLE time_speed
00660 );
00661
00665 int MxGraphNDViewUpdatePointCoord (
00666 Widget wview,
00667 INT32 pointnum,
00668 INT32 numdim,
00669 INT32 dim,
00670 DOUBLE value
00671 );
00672
00674 Widget MxGraphSliderCreate (
00675 Widget parent,
00676 int Width,
00677 int Height,
00678 int MinVal,
00679 int MaxVal,
00680 int InitVal,
00681 int *Value,
00682 UINT32 flags,
00683 Arg *argext,
00684 int next
00685 );
00686
00688 int MxGraphSliderGetMinMax (
00689 Widget wgraph,
00690 int *MinVal,
00691 int *MaxVal
00692 );
00693
00695 int MxGraphSliderGetValue (
00696 Widget wgraph,
00697 int *Value
00698 );
00699
00701 int MxGraphSliderSetBackgroundColor (
00702 Widget wgraph,
00703 COLOR *color
00704 );
00705
00707 int MxGraphSliderSetMarkerColor (
00708 Widget wgraph,
00709 COLOR *fillcolor
00710 );
00711
00713 int MxGraphSliderSetMinMax (
00714 Widget wgraph,
00715 int NewMin,
00716 int NewMax,
00717 int Redraw
00718 );
00719
00721 int MxGraphSliderSetValue (
00722 Widget wgraph,
00723 int NewValue,
00724 int Redraw
00725 );
00726
00728 int MxGraphSliderSetValueChangeCallback (
00729 Widget wgraph,
00730 McbCallbackFunc func,
00731 void *userdata
00732 );
00733
00735 int MxGraphSliderSetSensitive (
00736 Widget wgraph,
00737 int Flag
00738 );
00739
00741 Widget MxGraphSelectorCreate (
00742 Widget parent,
00743 int Width,
00744 int Height,
00745 int NumSelections,
00746 UINT8 *Bitmap,
00747 UINT32 flags,
00748 Arg *argext,
00749 int next
00750 );
00751
00752 #if defined(__cplusplus)
00753 }
00754 #endif
00755
00756
00757 #endif