00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __FXPLOT2DDIAG_H
00022 #define __FXPLOT2DDIAG_H
00023
00024 #include "FXPlot2D.h"
00025
00026 #include <vector>
00027
00029 struct FXCurveRecord {
00031 FXbool operator == (const FXCurve *c) const;
00033 void load(const FXCurve *c);
00035 void save(FXCurve *c) const;
00036
00038 FXString label;
00040 FXint style;
00042 FXPlotPen pen;
00044 FXint markStyle;
00046 FXint markSize;
00048 FXColor markColor;
00049 };
00050
00051
00055 class FXPlot2DDiag : public FXDialogBox
00056 {
00057 FXDECLARE(FXPlot2DDiag)
00058 protected:
00059
00060 FXPlot2DDiag(){};
00061
00063 FXList* curves;
00065 FXPlot2D *plot;
00067 FXCurve *cur;
00068
00070 FXCurveRecord rec;
00072 FXDataTarget label;
00074 FXDataTarget style;
00076 FXDataTarget lineWidth;
00078 FXDataTarget lineStyle;
00080 FXDataTarget lineColor;
00082 FXDataTarget markStyle;
00084 FXDataTarget markColor;
00086 FXDataTarget markSize;
00087
00089 FXButton* apply;
00091 FXButton* remove;
00092
00093 public:
00095 FXPlot2DDiag(FXPlot2D *view);
00097 virtual ~FXPlot2DDiag();
00098
00100 FXuint execute(FXuint placement=PLACEMENT_CURSOR);
00101
00102
00103 long onChanged(FXObject *obj,FXSelector sel,void* ptr);
00104 long onApply(FXObject *obj,FXSelector sel,void* ptr);
00105 long onCmdClose(FXObject *obj,FXSelector sel,void* ptr);
00106 long onCurveChanged(FXObject *obj,FXSelector sel,void* ptr);
00107 long onCmdDeleteCurve(FXObject *obj,FXSelector sel,void* ptr);
00108
00109
00110 enum Commands {
00111 ID_CLOSE = FXDialogBox::ID_LAST,
00112 ID_APPLY,
00113 ID_DELETE,
00114 ID_SEL_CURVE,
00115 ID_CONTROLS,
00116 ID_LAST,
00117 };
00118 };
00119
00120
00121 #endif // __FXPLOT2DDIAG_H
00122
00123
00124