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

#include "CubeViewUI.h"

inline void CubeViewUI::cb_zoom_i(fltk::ValueSlider* o, void*) {
  cube->setsize((float) o->value());
  cube->redraw();
}
void CubeViewUI::cb_zoom(fltk::ValueSlider* o, void* v) {
  ((CubeViewUI*)(o->parent()->parent()->user_data()))->cb_zoom_i(o,v);
}

inline void CubeViewUI::cb_vrot_i(fltk::ThumbWheel* o, void*) {
  cube->v_angle((float) o->value());
  cube->redraw();
}
void CubeViewUI::cb_vrot(fltk::ThumbWheel* o, void* v) {
  ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_vrot_i(o,v);
}

inline void CubeViewUI::cb_ypan_i(fltk::Slider* o, void*) {
  cube->pany((float) o->value());
  cube->redraw();
}
void CubeViewUI::cb_ypan(fltk::Slider* o, void* v) {
  ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_ypan_i(o,v);
}

inline void CubeViewUI::cb_xpan_i(fltk::Slider* o, void*) {
  cube->panx((float) o->value());
  cube->redraw();
}
void CubeViewUI::cb_xpan(fltk::Slider* o, void* v) {
  ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_xpan_i(o,v);
}

inline void CubeViewUI::cb_hrot_i(fltk::ThumbWheel* o, void*) {
  cube->h_angle((float) o->value());
  cube->redraw();
}
void CubeViewUI::cb_hrot(fltk::ThumbWheel* o, void* v) {
  ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_hrot_i(o,v);
}

CubeViewUI::CubeViewUI() {
  fltk::Window* w;
   {fltk::Window* o = mainWindow = new fltk::Window(415, 406, "CubeView");
    w = o;
    o->user_data((void*)(this));
    o->begin();
     {fltk::Group* o = new fltk::Group(3, 3, 409, 400);
      o->begin();
       {fltk::ValueSlider* o = zoom = new fltk::ValueSlider(101, 0, 227, 19, "Zoom");
        o->labelfont(fltk::HELVETICA_BOLD);
        o->labelcolor((fltk::Color)136);
        o->minimum(1);
        o->maximum(50);
        o->step(0.1);
        o->value(10);
        o->callback((fltk::Callback*)cb_zoom);
        o->align(fltk::ALIGN_LEFT);
      }
       {fltk::Group* o = VChange = new fltk::Group(0, 97, 37, 192);
        o->set_vertical();
        o->begin();
         {fltk::ThumbWheel* o = vrot = new fltk::ThumbWheel(0, 0, 17, 186, "V Rot");
          o->set_vertical();
          o->labeltype(fltk::NO_LABEL);
          o->minimum(-180);
          o->maximum(180);
          o->step(1);
          o->callback((fltk::Callback*)cb_vrot);
          o->align(fltk::ALIGN_TOP|fltk::ALIGN_WRAP);
        }
         {fltk::Slider* o = ypan = new fltk::Slider(20, 0, 17, 186);
          o->set_vertical();
          o->labeltype(fltk::NO_LABEL);
          o->labelcolor((fltk::Color)136);
          o->minimum(-25);
          o->maximum(25);
          o->step(0.1);
          o->callback((fltk::Callback*)cb_ypan);
          o->align(fltk::ALIGN_CENTER);
        }
        o->end();
      }
       {fltk::Group* o = HChange = new fltk::Group(115, 359, 190, 40);
        o->begin();
         {fltk::Slider* o = xpan = new fltk::Slider(2, 2, 186, 17);
          o->labeltype(fltk::NO_LABEL);
          o->labelcolor((fltk::Color)136);
          o->minimum(25);
          o->maximum(-25);
          o->step(0.1);
          o->callback((fltk::Callback*)cb_xpan);
          o->align(fltk::ALIGN_CENTER);
        }
         {fltk::ThumbWheel* o = hrot = new fltk::ThumbWheel(2, 21, 186, 17, "H Rotation");
          o->labeltype(fltk::NO_LABEL);
          o->minimum(-180);
          o->maximum(180);
          o->step(1);
          o->callback((fltk::Callback*)cb_hrot);
          o->align(fltk::ALIGN_LEFT);
        }
        o->end();
      }
       {fltk::Group* o = MainView = new fltk::Group(41, 24, 333, 333);
        o->begin();
         {fltk::InvisibleBox* o = cframe = new fltk::InvisibleBox(0, 0, 333, 333);
          o->box(fltk::DOWN_BOX);
          o->color((fltk::Color)56);
          o->selection_color((fltk::Color)69);
        }
         {cube = new CubeView(2, 2, 329, 329);
        }
        o->end();
      }
      o->end();
      fltk::Group::current()->resizable(o);
    }
    o->end();
  }
}

void CubeViewUI::show() {
  mainWindow->show();
}
