// generated by Fast Light User Interface Designer (fluid) version 1.0107

#include <TRE_res.hpp>

extern std::string TRE_polinomyal_characteristic_coefficients;

void TRE_save_for_calculation_cb(Fl_Widget* w, void* d){
  char * outf=fl_file_chooser("choose file...",NULL,NULL);
  if(outf!=NULL){
    std::fstream outf_s(outf, std::ios::app|std::ios::out);
    outf_s << TRE_polinomyal_characteristic_coefficients << std::endl;
    outf_s.close();
  }
  
}

Fl_Double_Window* make_TRE_poly_res_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = new Fl_Double_Window(425, 150,"TRE: results");
    w = o;

    {
      Fl_Button* o =new Fl_Button(190, 5, 150, 30, "Save for calculation"); //0
      o->callback(TRE_save_for_calculation_cb);
    }

    { 
      Fl_Output* o = new Fl_Output(190, 40, 200, 30, "LaTex code"); //1
      o->tooltip("String formatted fore Latex2e document");
    }
    { 
      Fl_Output* o = new Fl_Output(190, 75, 200, 30, "Openoffice.org code"); //2
      o->tooltip("String formatted for ODT document");
    }
    { 
      Fl_Output* o = new Fl_Output(190, 110, 200, 30, "Characteristic polynomial"); //3
      o->tooltip("Characteristic polynomial");
    }
    o->end();
  }
  w->set_modal();
  return w;
}
