/[xforms]/xforms/demos/xyplotall.c
ViewVC logotype

Diff of /xforms/demos/xyplotall.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by leeming, Thu Apr 24 09:35:33 2003 UTC revision 1.4 by leeming, Tue Sep 9 00:28:25 2003 UTC
# Line 38  typedef struct Line 38  typedef struct
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}
# Line 60  static XYType xytype[] = Line 60  static XYType xytype[] =
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)
# Line 113  main(int argc, char *argv[]) Line 113  main(int argc, char *argv[])
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,
# Line 137  main(int argc, char *argv[]) Line 137  main(int argc, char *argv[])
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    
# Line 212  void create_form_xyplot(void) Line 212  void create_form_xyplot(void)
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);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26