GNU Exterior Ballistics Computer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.7 KiB

#ifndef __PLOTWINDOW
#define __PLOTWINDOW
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Round_Button.H>
#include <FL/Fl_Check_Button.H>
#include <FL/Fl_Value_Slider.H>
#include <FL/fl_draw.h>
#include <FL/Fl_Menu_Bar.H>
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Choice.H>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "GBCSolution.h"
class PlotWindow : public Fl_Window {
PlotWindow(int, int, GBCSolution*, GBCSolution*, GBCSolution*, GBCSolution*);
GBCSolution* gsln;
GBCSolution* mem1;
GBCSolution* mem2;
GBCSolution* mem3;
virtual void draw(void);
int cwidth;
int cheight;
int x_ticks;
int y_ticks;
int xmin, ymin, xmax, ymax;
int y0;
int x_range;
double y_range;
double x_scale, y_scale;
void PlotMem(GBCSolution* mem, int mode);
void SetupPlot(void);
void DrawPlotBackground(int mode, const char *ylabel);
void DrawPlotData(int mode);
void PlotPath(int ptype);
void PlotEnergy(void);
void PlotVelocity(int ptype);
int x_click;
int y_click;
Fl_Check_Button* btMem1;
Fl_Check_Button* btMem2;
Fl_Check_Button* btMem3;
Fl_Value_Slider* sl_x;
Fl_Choice* cScopeGuides;
Fl_Choice* cPlotType;
Fl_Menu_Bar* menu;
virtual int handle(int);
static void cb_nothing(Fl_Widget* o, void* v);
static void cb_Close(Fl_Widget* o, void* v);
static void cb_btPlot(Fl_Widget* o, void* v);
static void cb_slUpdate(Fl_Widget* o, void* v);
static void cb_Mem1(Fl_Widget* o, void* v);
static void cb_Mem2(Fl_Widget* o, void* v);
static void cb_Mem3(Fl_Widget* o, void* v);
static void cb_Guides(Fl_Widget* o, void* v);
static void cb_PlotType(Fl_Widget* o, void* v);