38 |
int type; |
int type; |
39 |
char *name; |
char *name; |
40 |
FL_COLOR color; |
FL_COLOR color; |
41 |
} |
} |
42 |
XYType; |
XYType; |
43 |
|
|
44 |
#define VN(a,c) {a,#a,c} |
#define VN(a,c) {a,#a,c} |
60 |
static void |
static void |
61 |
done_xyplot(FL_OBJECT *ob, long q) |
done_xyplot(FL_OBJECT *ob, long q) |
62 |
{ |
{ |
63 |
fl_hide_form(ob->form); |
fl_hide_form(ob->form); |
64 |
exit(0); |
exit(0); |
65 |
} |
} |
66 |
|
|
67 |
#include <math.h> |
#include <math.h> |
68 |
|
|
69 |
static int post(FL_OBJECT *ob, int ev, |
static int post(FL_OBJECT *ob, int ev, |
70 |
FL_Coord mx, FL_Coord my, int key, void *xev) |
FL_Coord mx, FL_Coord my, int key, void *xev) |
71 |
{ |
{ |
72 |
if(ev == FL_PUSH || ev == FL_MOUSE) |
if(ev == FL_PUSH || ev == FL_MOUSE) |
113 |
} |
} |
114 |
|
|
115 |
|
|
116 |
fl_set_xyplot_data(xyplot[i], x[i], y[i], 21, "TestTitle", |
fl_set_xyplot_data(xyplot[i], x[i], y[i], 21, "TestTitle", |
117 |
"X-axis", "Y|axis"); |
"X-axis", "Y|axis"); |
118 |
if(i==0) |
if(i==0) |
119 |
fl_add_xyplot_text(xyplot[i], x[i][15], 0.1, |
fl_add_xyplot_text(xyplot[i], x[i][15], 0.1, |
137 |
fl_set_xyplot_ytics(xyplot[i], 5, 2); |
fl_set_xyplot_ytics(xyplot[i], 5, 2); |
138 |
fl_set_xyplot_ybounds(xyplot[i], 2.4,-2.4); |
fl_set_xyplot_ybounds(xyplot[i], 2.4,-2.4); |
139 |
} |
} |
140 |
|
|
141 |
fl_set_object_posthandler(xyplot[i], post); |
fl_set_object_posthandler(xyplot[i], post); |
142 |
} |
} |
143 |
|
|
212 |
fl_set_object_callback(obj, done_xyplot, 0); |
fl_set_object_callback(obj, done_xyplot, 0); |
213 |
|
|
214 |
obj = fl_add_text(FL_NORMAL_TEXT,180,15,240,30,"FL_XYPLOT"); |
obj = fl_add_text(FL_NORMAL_TEXT,180,15,240,30,"FL_XYPLOT"); |
215 |
fl_set_object_lcol(obj, FL_SLATEBLUE); |
fl_set_object_lcol(obj, FL_SLATEBLUE); |
216 |
fl_set_object_lsize(obj, FL_HUGE_SIZE); |
fl_set_object_lsize(obj, FL_HUGE_SIZE); |
217 |
fl_set_object_lstyle(obj, FL_BOLD_STYLE|FL_EMBOSSED_STYLE); |
fl_set_object_lstyle(obj, FL_BOLD_STYLE|FL_EMBOSSED_STYLE); |
218 |
fl_set_object_boxtype(obj, FL_FLAT_BOX); |
fl_set_object_boxtype(obj, FL_FLAT_BOX); |