// @topic T02320 GUI Window Demo
// @brief CAppWindow class declaration
#ifndef _CAPPWINDOW_H_INCLUDED_
#define _CAPPWINDOW_H_INCLUDED_
#include <vector>
#include <FL/Fl.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include "train.h"
const int BOX_ARRAY_SIZE = 20;
const int OUTBOX_WIDTH = 20;
const int OUTBOX_HEIGHT = 10;
const int OUTBOX_TOP_LEFT_X = 10;
const int OUTBOX_TOP_LEFT_Y = 15;
class CAppWindow : public Fl_Double_Window {
//data
Fl_Output *out_box[BOX_ARRAY_SIZE];
Train& m_train;
// representations of the animation:
std::vector< Fl_Color > vect_original_track;
std::vector< Fl_Color > vect_current_display;
public:
//constructors
CAppWindow( Train& train );
//operations
// Call back from the "Animate" button
static void cb_btn_animate(Fl_Widget* btn, void* userdata);
// Re-entry point to animate the display
void btn_animate();
};//class CAppWindow
#endif // _CAPPWINDOW_H_INCLUDED_