PlotWindow.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef __PLOTWINDOW
  2. #define __PLOTWINDOW
  3. #include <FL/Fl.H>
  4. #include <FL/Fl_Window.H>
  5. #include <FL/Fl_Round_Button.H>
  6. #include <FL/Fl_Check_Button.H>
  7. #include <FL/Fl_Value_Slider.H>
  8. #include <FL/fl_draw.h>
  9. #include <FL/Fl_Menu_Bar.H>
  10. #include <FL/Fl_Menu_Item.H>
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include <math.h>
  14. #include "GBCSolution.h"
  15. class PlotWindow : public Fl_Window {
  16. public:
  17. PlotWindow(int, int, GBCSolution*, GBCSolution*, GBCSolution*);
  18. ~PlotWindow(void);
  19. GBCSolution* gsln;
  20. GBCSolution* mem1;
  21. GBCSolution* mem2;
  22. private:
  23. virtual void draw(void);
  24. int cwidth;
  25. int cheight;
  26. int x_ticks;
  27. int y_ticks;
  28. void PlotPath(void);
  29. void PlotEnergy(void);
  30. void PlotVelocity(void);
  31. int x_click;
  32. int y_click;
  33. Fl_Round_Button* rbPlotPath;
  34. Fl_Round_Button* rbPlotVelocity;
  35. Fl_Round_Button* rbPlotEnergy;
  36. Fl_Check_Button* btMem1;
  37. Fl_Check_Button* btMem2;
  38. Fl_Value_Slider* sl_x;
  39. Fl_Menu_Bar* menu;
  40. virtual int handle(int);
  41. static void cb_nothing(Fl_Widget* o, void* v);
  42. static void cb_Close(Fl_Widget* o, void* v);
  43. static void cb_btPlot(Fl_Widget* o, void* v);
  44. static void cb_slUpdate(Fl_Widget* o, void* v);
  45. static void cb_Mem1(Fl_Widget* o, void* v);
  46. static void cb_Mem2(Fl_Widget* o, void* v);
  47. };
  48. #endif