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

#include "viewerUI.H"

void viewerUI::cb_PanelComGeomTagsBrowser_i(Fl_Browser*, void*) {
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowser(Fl_Browser* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowser_i(o,v);
}

void viewerUI::cb_PanelComGeomTagsBrowserUnSelectAll_i(Fl_Button*, void*) {
  glviewer->PanelComGeomTagsBrowser_UnSelectAll();
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowserUnSelectAll(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowserUnSelectAll_i(o,v);
}

void viewerUI::cb_PanelComGeomTagsBrowserSelectAll_i(Fl_Button*, void*) {
  glviewer->PanelComGeomTagsBrowser_SelectAll();
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowserSelectAll(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowserSelectAll_i(o,v);
}

void viewerUI::cb_PanelComGeomTagsBrowserDraw_i(Fl_Button*, void*) {
  glviewer->DrawComGeomTagsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowserDraw(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowserDraw_i(o,v);
}

void viewerUI::cb_PanelComGeomTagsBrowserDrawMethod_i(Fl_Choice*, void*) {
  glviewer->DrawComGeomTagsShadedWasPicked(1);
  glviewer->DrawComGeomTagsBordersWasPicked(0);
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowserDrawMethod(Fl_Choice* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowserDrawMethod_i(o,v);
}

void viewerUI::cb_PanelComGeomTagsBrowserDrawShaded_i(Fl_Menu_*, void*) {
  glviewer->DrawComGeomTagsShadedWasPicked(1);
  glviewer->DrawComGeomTagsBordersWasPicked(0);
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowserDrawShaded(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowserDrawShaded_i(o,v);
}

void viewerUI::cb_PanelComGeomTagsBrowserDrawBorders_i(Fl_Menu_*, void*) {
  glviewer->DrawComGeomTagsShadedWasPicked(0);
  glviewer->DrawComGeomTagsBordersWasPicked(1);
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowserDrawBorders(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowserDrawBorders_i(o,v);
}

void viewerUI::cb_PanelComGeomTagsBrowserDrawShadedAndBorders_i(Fl_Menu_*, void*) {
  glviewer->DrawComGeomTagsShadedWasPicked(1);
  glviewer->DrawComGeomTagsBordersWasPicked(1);
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowserDrawShadedAndBorders(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowserDrawShadedAndBorders_i(o,v);
}

Fl_Menu_Item viewerUI::menu_PanelComGeomTagsBrowserDrawMethod[] = {
 {"Shaded", 0,  (Fl_Callback*)viewerUI::cb_PanelComGeomTagsBrowserDrawShaded, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0},
 {"Borders", 0,  (Fl_Callback*)viewerUI::cb_PanelComGeomTagsBrowserDrawBorders, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0},
 {"Both", 0,  (Fl_Callback*)viewerUI::cb_PanelComGeomTagsBrowserDrawShadedAndBorders, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0},
 {0,0,0,0,0,0,0,0,0}
};
Fl_Menu_Item* viewerUI::PanelComGeomTagsBrowserDrawShaded = viewerUI::menu_PanelComGeomTagsBrowserDrawMethod + 0;
Fl_Menu_Item* viewerUI::PanelComGeomTagsBrowserDrawBorders = viewerUI::menu_PanelComGeomTagsBrowserDrawMethod + 1;
Fl_Menu_Item* viewerUI::PanelComGeomTagsBrowserDrawShadedAndBorders = viewerUI::menu_PanelComGeomTagsBrowserDrawMethod + 2;

void viewerUI::cb_PanelComGeomTagsBrowserDrawOnlySelected_i(Fl_Button*, void*) {
  glviewer->DrawOnlySelectedWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowserDrawOnlySelected(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowserDrawOnlySelected_i(o,v);
}

void viewerUI::cb_PanelComGeomTagsBrowserSwapSurfaceNormals_i(Fl_Button*, void*) {
  glviewer->SwapSurfaceNormals();
  glviewer->redraw();
}
void viewerUI::cb_PanelComGeomTagsBrowserSwapSurfaceNormals(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_PanelComGeomTagsBrowserSwapSurfaceNormals_i(o,v);
}

void viewerUI::cb_LoadSolutionCase_i(Fl_Counter* o, void*) {
  char dum[200];

  glviewer->SolutionCaseSliderWasMoved( ((Fl_Value_Input *)o)->value());

  glviewer->GetCurrentMachText(dum);
  MachOutput->value(dum);

  glviewer->GetCurrentAlphaText(dum);
  AlphaOutput->value(dum);

  glviewer->GetCurrentBetaText(dum);
  BetaOutput->value(dum);

  glviewer->GetCommentTextString(dum);

  CommentOutput->value(dum);

  glviewer->redraw();
}
void viewerUI::cb_LoadSolutionCase(Fl_Counter* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_LoadSolutionCase_i(o,v);
}

void viewerUI::cb_CutPlanesBrowser_i(Fl_Browser*, void*) {
  glviewer->redraw();
}
void viewerUI::cb_CutPlanesBrowser(Fl_Browser* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_CutPlanesBrowser_i(o,v);
}

void viewerUI::cb_CutPlanesBrowserUnSelectAll_i(Fl_Button*, void*) {
  glviewer->CutPlanesBrowser_UnSelectAll();
  glviewer->redraw();
}
void viewerUI::cb_CutPlanesBrowserUnSelectAll(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_CutPlanesBrowserUnSelectAll_i(o,v);
}

void viewerUI::cb_CutPlanesBrowserSelectAll_i(Fl_Button*, void*) {
  glviewer->CutPlanesBrowser_SelectAll();
  glviewer->redraw();
}
void viewerUI::cb_CutPlanesBrowserSelectAll(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_CutPlanesBrowserSelectAll_i(o,v);
}

void viewerUI::cb_CutPlanesDrawWireFrame_i(Fl_Button*, void*) {
  glviewer->DrawCutPlanesWireWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_CutPlanesDrawWireFrame(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_CutPlanesDrawWireFrame_i(o,v);
}

void viewerUI::cb_CutPlanesDrawVelocityVectors_i(Fl_Button*, void*) {
  glviewer->DrawCutPlanesVelocityWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_CutPlanesDrawVelocityVectors(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_CutPlanesDrawVelocityVectors_i(o,v);
}

void viewerUI::cb_CutPlanesDrawCp_i(Fl_Button*, void*) {
  glviewer->DrawCuttingPlanesCpWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_CutPlanesDrawCp(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_CutPlanesDrawCp_i(o,v);
}

void viewerUI::cb_CutPlanesScaleVelocity_i(Fl_Value_Slider* o, void*) {
  glviewer->SetQuadCellVelocityScaler(((Fl_Value_Input *)o)->value());
  glviewer->redraw();
}
void viewerUI::cb_CutPlanesScaleVelocity(Fl_Value_Slider* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_CutPlanesScaleVelocity_i(o,v);
}

void viewerUI::cb_CutPlanesDrawShaded_i(Fl_Button*, void*) {
  glviewer->DrawCutPlanesShadedWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_CutPlanesDrawShaded(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_CutPlanesDrawShaded_i(o,v);
}

void viewerUI::cb_CutPlanesDrawVectorColor_i(Fl_Button*, void*) {
  glviewer->DrawCutPlanesVelocityColorWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_CutPlanesDrawVectorColor(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->parent()->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_CutPlanesDrawVectorColor_i(o,v);
}

void viewerUI::cb_FileMenuSaveAsPNG_i(Fl_Menu_*, void*) {
  const char *val;
  char dum[80];
  sprintf(dum,"");
  val = fl_input("File Name:",dum);
  if ( val != NULL ) {

  sprintf(dum,"%s",val);
  glviewer->WritePNGFile(dum);

  }
}
void viewerUI::cb_FileMenuSaveAsPNG(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FileMenuSaveAsPNG_i(o,v);
}

void viewerUI::cb_FileMenuSaveAsMoviePNG_i(Fl_Menu_*, void*) {
  const char *val;
  char dum[80];
  sprintf(dum,"");
  val = fl_input("File Name:",dum);
  if ( val != NULL ) {

     sprintf(dum,"%s",val);
     glviewer->MakeMovie(dum);

  }
}
void viewerUI::cb_FileMenuSaveAsMoviePNG(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FileMenuSaveAsMoviePNG_i(o,v);
}

void viewerUI::cb_FileMenuPickQuit_i(Fl_Menu_*, void*) {
  int val;
  val = fl_choice("Quit Application?", fl_no, fl_yes, 0);
  if ( val == 1 ) {
     glviewer->Exit(1);
  }
}
void viewerUI::cb_FileMenuPickQuit(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FileMenuPickQuit_i(o,v);
}

Fl_Menu_Item viewerUI::menu_FileMenu[] = {
 {"SaveAs", 0,  0, 0, 64, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"PNG File", 0,  (Fl_Callback*)viewerUI::cb_FileMenuSaveAsPNG, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Movie File", 0,  (Fl_Callback*)viewerUI::cb_FileMenuSaveAsMoviePNG, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0},
 {"Quit", 0x40071,  (Fl_Callback*)viewerUI::cb_FileMenuPickQuit, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0}
};
Fl_Menu_Item* viewerUI::SaveAsMenu = viewerUI::menu_FileMenu + 0;
Fl_Menu_Item* viewerUI::FileMenuSaveAsPNG = viewerUI::menu_FileMenu + 1;
Fl_Menu_Item* viewerUI::FileMenuSaveAsMoviePNG = viewerUI::menu_FileMenu + 2;
Fl_Menu_Item* viewerUI::FileMenuPickQuit = viewerUI::menu_FileMenu + 4;

void viewerUI::cb_ViewMenuResetView_i(Fl_Menu_*, void*) {
  glviewer->ResetView();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuResetView(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuResetView_i(o,v);
}

void viewerUI::cb_ViewMenuTopView_i(Fl_Menu_*, void*) {
  glviewer->TopView();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuTopView(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuTopView_i(o,v);
}

void viewerUI::cb_ViewMenuBottomView_i(Fl_Menu_*, void*) {
  glviewer->BottomView();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuBottomView(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuBottomView_i(o,v);
}

void viewerUI::cb_ViewMenuLeftView_i(Fl_Menu_*, void*) {
  glviewer->LeftView();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuLeftView(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuLeftView_i(o,v);
}

void viewerUI::cb_ViewMenuRightView_i(Fl_Menu_*, void*) {
  glviewer->RightView();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuRightView(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuRightView_i(o,v);
}

void viewerUI::cb_ViewMenuFrontView_i(Fl_Menu_*, void*) {
  glviewer->FrontView();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuFrontView(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuFrontView_i(o,v);
}

void viewerUI::cb_ViewMenuRearView_i(Fl_Menu_*, void*) {
  glviewer->RearView();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuRearView(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuRearView_i(o,v);
}

void viewerUI::cb_ViewMenuIsoViewUp_i(Fl_Menu_*, void*) {
  glviewer->IsoViewUp();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuIsoViewUp(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuIsoViewUp_i(o,v);
}

void viewerUI::cb_ViewMenuIsoViewDown_i(Fl_Menu_*, void*) {
  glviewer->IsoViewDown();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuIsoViewDown(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuIsoViewDown_i(o,v);
}

void viewerUI::cb_ViewMenuPickBlueBackground_i(Fl_Menu_*, void*) {
  glviewer->DrawWhiteBackgroundWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ViewMenuPickBlueBackground(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ViewMenuPickBlueBackground_i(o,v);
}

Fl_Menu_Item viewerUI::menu_ViewMenu[] = {
 {"Reset View", 0x40072,  (Fl_Callback*)viewerUI::cb_ViewMenuResetView, 0, 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Top View", 0x4ffbe,  (Fl_Callback*)viewerUI::cb_ViewMenuTopView, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Bottom View", 0x4ffbf,  (Fl_Callback*)viewerUI::cb_ViewMenuBottomView, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Left View", 0x4ffc0,  (Fl_Callback*)viewerUI::cb_ViewMenuLeftView, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Right View", 0x4ffc1,  (Fl_Callback*)viewerUI::cb_ViewMenuRightView, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Front View", 0x4ffc2,  (Fl_Callback*)viewerUI::cb_ViewMenuFrontView, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Rear View", 0x4ffc3,  (Fl_Callback*)viewerUI::cb_ViewMenuRearView, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Iso View Up", 0x4ffc4,  (Fl_Callback*)viewerUI::cb_ViewMenuIsoViewUp, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Iso View Down", 0x4ffc5,  (Fl_Callback*)viewerUI::cb_ViewMenuIsoViewDown, 0, 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Use Blue Background", 0,  (Fl_Callback*)viewerUI::cb_ViewMenuPickBlueBackground, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0}
};
Fl_Menu_Item* viewerUI::ViewMenuResetView = viewerUI::menu_ViewMenu + 0;
Fl_Menu_Item* viewerUI::ViewMenuTopView = viewerUI::menu_ViewMenu + 1;
Fl_Menu_Item* viewerUI::ViewMenuBottomView = viewerUI::menu_ViewMenu + 2;
Fl_Menu_Item* viewerUI::ViewMenuLeftView = viewerUI::menu_ViewMenu + 3;
Fl_Menu_Item* viewerUI::ViewMenuRightView = viewerUI::menu_ViewMenu + 4;
Fl_Menu_Item* viewerUI::ViewMenuFrontView = viewerUI::menu_ViewMenu + 5;
Fl_Menu_Item* viewerUI::ViewMenuRearView = viewerUI::menu_ViewMenu + 6;
Fl_Menu_Item* viewerUI::ViewMenuIsoViewUp = viewerUI::menu_ViewMenu + 7;
Fl_Menu_Item* viewerUI::ViewMenuIsoViewDown = viewerUI::menu_ViewMenu + 8;
Fl_Menu_Item* viewerUI::ViewMenuPickBlueBackground = viewerUI::menu_ViewMenu + 9;

void viewerUI::cb_LegendMenuPickLabel_i(Fl_Menu_*, void*) {
  glviewer->DrawLabelWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_LegendMenuPickLabel(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_LegendMenuPickLabel_i(o,v);
}

void viewerUI::cb_LegendMenuPickLegend_i(Fl_Menu_*, void*) {
  glviewer->DrawLegendWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_LegendMenuPickLegend(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_LegendMenuPickLegend_i(o,v);
}

void viewerUI::cb_LegendMenuPickDrawCG_i(Fl_Menu_*, void*) {
  glviewer->DrawCGWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_LegendMenuPickDrawCG(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_LegendMenuPickDrawCG_i(o,v);
}

void viewerUI::cb_LegendMenuPickDrawCGLabel_i(Fl_Menu_*, void*) {
  glviewer->DrawCGLabelWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_LegendMenuPickDrawCGLabel(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_LegendMenuPickDrawCGLabel_i(o,v);
}

void viewerUI::cb_LegendMenuPickDrawAxes_i(Fl_Menu_*, void*) {
  glviewer->DrawAxesWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_LegendMenuPickDrawAxes(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_LegendMenuPickDrawAxes_i(o,v);
}

Fl_Menu_Item viewerUI::menu_LegendMenu[] = {
 {"Run Label", 0,  (Fl_Callback*)viewerUI::cb_LegendMenuPickLabel, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Contours Legend", 0,  (Fl_Callback*)viewerUI::cb_LegendMenuPickLegend, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw CG", 0,  (Fl_Callback*)viewerUI::cb_LegendMenuPickDrawCG, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw CG Label Info", 0,  (Fl_Callback*)viewerUI::cb_LegendMenuPickDrawCGLabel, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw Axes", 0,  (Fl_Callback*)viewerUI::cb_LegendMenuPickDrawAxes, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0}
};
Fl_Menu_Item* viewerUI::LegendMenuPickLabel = viewerUI::menu_LegendMenu + 0;
Fl_Menu_Item* viewerUI::LegendMenuPickLegend = viewerUI::menu_LegendMenu + 1;
Fl_Menu_Item* viewerUI::LegendMenuPickDrawCG = viewerUI::menu_LegendMenu + 2;
Fl_Menu_Item* viewerUI::LegendMenuPickDrawCGLabel = viewerUI::menu_LegendMenu + 3;
Fl_Menu_Item* viewerUI::LegendMenuPickDrawAxes = viewerUI::menu_LegendMenu + 4;

void viewerUI::cb_ADBMenuPickOff_i(Fl_Menu_*, void*) {
  glviewer->DrawOffWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickOff(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickOff_i(o,v);
}

void viewerUI::cb_ADBMenuPickShaded_i(Fl_Menu_*, void*) {
  glviewer->DrawShadedWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickShaded(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickShaded_i(o,v);
}

void viewerUI::cb_ADBMenuPickWallCpShaded_i(Fl_Menu_*, void*) {
  glviewer->DrawCpWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickWallCpShaded(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickWallCpShaded_i(o,v);
}

void viewerUI::cb_ADBMenuPickWallSteadyCpShaded_i(Fl_Menu_*, void*) {
  glviewer->DrawCpSteadyWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickWallSteadyCpShaded(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickWallSteadyCpShaded_i(o,v);
}

void viewerUI::cb_ADBMenuPickWallUnsteadyCpShaded_i(Fl_Menu_*, void*) {
  glviewer->DrawUnsteadyCpWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickWallUnsteadyCpShaded(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickWallUnsteadyCpShaded_i(o,v);
}

void viewerUI::cb_ADBMenuPickWallGammaShaded_i(Fl_Menu_*, void*) {
  glviewer->DrawGammaWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickWallGammaShaded(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickWallGammaShaded_i(o,v);
}

void viewerUI::cb_ADBMenuPickWireFrame_i(Fl_Menu_*, void*) {
  glviewer->DrawWireFrameWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickWireFrame(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickWireFrame_i(o,v);
}

void viewerUI::cb_ADBMenuPickCoarseMesh_i(Fl_Menu_*, void*) {
  glviewer->DrawCoarseMeshWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickCoarseMesh(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickCoarseMesh_i(o,v);
}

void viewerUI::cb_ADBMenuPickWakes_i(Fl_Menu_*, void*) {
  glviewer->DrawWakesWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickWakes(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickWakes_i(o,v);
}

void viewerUI::cb_ADBMenuPickRotors_i(Fl_Menu_*, void*) {
  glviewer->DrawRotorsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickRotors(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickRotors_i(o,v);
}

void viewerUI::cb_ADBMenuPickControlSurfaces_i(Fl_Menu_*, void*) {
  glviewer->DrawControlSurfacesWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_ADBMenuPickControlSurfaces(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_ADBMenuPickControlSurfaces_i(o,v);
}

Fl_Menu_Item viewerUI::menu_ADBMenu[] = {
 {"Off", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickOff, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Shaded", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickShaded, 0, 12, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Pressures", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickWallCpShaded, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Steady Pressures", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickWallSteadyCpShaded, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Unsteady Pressures", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickWallUnsteadyCpShaded, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Vorticity", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickWallGammaShaded, 0, 136, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Triangulation", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickWireFrame, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Computational Mesh", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickCoarseMesh, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Trailing Wakes", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickWakes, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Rotors / Nozzles", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickRotors, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Control Surfaces", 0,  (Fl_Callback*)viewerUI::cb_ADBMenuPickControlSurfaces, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0}
};
Fl_Menu_Item* viewerUI::ADBMenuPickOff = viewerUI::menu_ADBMenu + 0;
Fl_Menu_Item* viewerUI::ADBMenuPickShaded = viewerUI::menu_ADBMenu + 1;
Fl_Menu_Item* viewerUI::ADBMenuPickWallCpShaded = viewerUI::menu_ADBMenu + 2;
Fl_Menu_Item* viewerUI::ADBMenuPickWallSteadyCpShaded = viewerUI::menu_ADBMenu + 3;
Fl_Menu_Item* viewerUI::ADBMenuPickWallUnsteadyCpShaded = viewerUI::menu_ADBMenu + 4;
Fl_Menu_Item* viewerUI::ADBMenuPickWallGammaShaded = viewerUI::menu_ADBMenu + 5;
Fl_Menu_Item* viewerUI::ADBMenuPickWireFrame = viewerUI::menu_ADBMenu + 6;
Fl_Menu_Item* viewerUI::ADBMenuPickCoarseMesh = viewerUI::menu_ADBMenu + 7;
Fl_Menu_Item* viewerUI::ADBMenuPickWakes = viewerUI::menu_ADBMenu + 8;
Fl_Menu_Item* viewerUI::ADBMenuPickRotors = viewerUI::menu_ADBMenu + 9;
Fl_Menu_Item* viewerUI::ADBMenuPickControlSurfaces = viewerUI::menu_ADBMenu + 10;

void viewerUI::cb_FEMMenuPickINPFile_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMINPFileWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickINPFile(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickINPFile_i(o,v);
}

void viewerUI::cb_FEMMenuPickFRDFile_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMFRDFileWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFRDFile(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFRDFile_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMShaded_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMShadedWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMShaded(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMShaded_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMMesh_i(Fl_Menu_*, void*) {
  glviewer->DrawFemWireFrameWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMMesh(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMMesh_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMShell_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMAsShellWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMShell(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMShell_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMSkins_i(Fl_Menu_*, void*) {
  glviewer->DrawFemSkinsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMSkins(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMSkins_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMRibs_i(Fl_Menu_*, void*) {
  glviewer->DrawFemRibsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMRibs(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMRibs_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMSpars_i(Fl_Menu_*, void*) {
  glviewer->DrawFemSparsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMSpars(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMSpars_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMWebs_i(Fl_Menu_*, void*) {
  glviewer->DrawFemWebsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMWebs(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMWebs_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMPressure_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMPressureWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMPressure(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMPressure_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMDeflectionMagnitude_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMDeflectionMagnitudeWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMDeflectionMagnitude(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMDeflectionMagnitude_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMStressMagnitude_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMStressWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMStressMagnitude(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMStressMagnitude_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMThickness_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMThicknessWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMThickness(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMThickness_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMDeformedMesh_i(Fl_Menu_*, void*) {
  glviewer->DrawFemDeformedWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMDeformedMesh(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMDeformedMesh_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMBucklingMode_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMBucklingModeWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMBucklingMode(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMBucklingMode_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMEquations_i(Fl_Menu_*, void*) {
  glviewer->DrawFemEquationsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMEquations(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMEquations_i(o,v);
}

void viewerUI::cb_FEMMenuPickFEMCLOADS_i(Fl_Menu_*, void*) {
  glviewer->DrawFemConcentratedLoadsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickFEMCLOADS(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickFEMCLOADS_i(o,v);
}

void viewerUI::cb_FEMMenuPickDrawFEMAxes_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMAxesWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickDrawFEMAxes(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickDrawFEMAxes_i(o,v);
}

void viewerUI::cb_FEMMenuPickDrawFEMBoundaryNodes_i(Fl_Menu_*, void*) {
  glviewer->DrawFEMBoundaryNodesWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_FEMMenuPickDrawFEMBoundaryNodes(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_FEMMenuPickDrawFEMBoundaryNodes_i(o,v);
}

Fl_Menu_Item viewerUI::menu_FEMMenu[] = {
 {"INP File", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickINPFile, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"FRD File", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFRDFile, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Shaded", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMShaded, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Wire Frame", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMMesh, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw As Shells", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMShell, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Skins", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMSkins, 0, 6, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Ribs", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMRibs, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Spars", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMSpars, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Stiffeners", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMWebs, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Pressure (INP)", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMPressure, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Deflection Magnitude (FRD)", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMDeflectionMagnitude, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Stress Magnitude (FRD)", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMStressMagnitude, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Thickness (FRD)", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMThickness, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Deflected Geometry (FRD)", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMDeformedMesh, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Buckling Mode 1 (INP)", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMBucklingMode, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Rigid Links", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMEquations, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Concentrated Loads", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickFEMCLOADS, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw FEM Axes", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickDrawFEMAxes, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Boundary Nodes", 0,  (Fl_Callback*)viewerUI::cb_FEMMenuPickDrawFEMBoundaryNodes, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0}
};
Fl_Menu_Item* viewerUI::FEMMenuPickINPFile = viewerUI::menu_FEMMenu + 0;
Fl_Menu_Item* viewerUI::FEMMenuPickFRDFile = viewerUI::menu_FEMMenu + 1;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMShaded = viewerUI::menu_FEMMenu + 2;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMMesh = viewerUI::menu_FEMMenu + 3;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMShell = viewerUI::menu_FEMMenu + 4;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMSkins = viewerUI::menu_FEMMenu + 5;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMRibs = viewerUI::menu_FEMMenu + 6;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMSpars = viewerUI::menu_FEMMenu + 7;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMWebs = viewerUI::menu_FEMMenu + 8;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMPressure = viewerUI::menu_FEMMenu + 9;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMDeflectionMagnitude = viewerUI::menu_FEMMenu + 10;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMStressMagnitude = viewerUI::menu_FEMMenu + 11;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMThickness = viewerUI::menu_FEMMenu + 12;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMDeformedMesh = viewerUI::menu_FEMMenu + 13;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMBucklingMode = viewerUI::menu_FEMMenu + 14;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMEquations = viewerUI::menu_FEMMenu + 15;
Fl_Menu_Item* viewerUI::FEMMenuPickFEMCLOADS = viewerUI::menu_FEMMenu + 16;
Fl_Menu_Item* viewerUI::FEMMenuPickDrawFEMAxes = viewerUI::menu_FEMMenu + 17;
Fl_Menu_Item* viewerUI::FEMMenuPickDrawFEMBoundaryNodes = viewerUI::menu_FEMMenu + 18;

void viewerUI::cb_OptionsMenuSetContourLevels_i(Fl_Menu_*, void*) {
  ContourLevelUserInterface *CL;
  CL = new ContourLevelUserInterface;
  CL->show(glviewer);
}
void viewerUI::cb_OptionsMenuSetContourLevels(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_OptionsMenuSetContourLevels_i(o,v);
}

void viewerUI::cb_OptionsMenuUsePerTriFunctionShading_i(Fl_Menu_*, void*) {
  glviewer->DrawPerTriFunctionsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_OptionsMenuUsePerTriFunctionShading(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_OptionsMenuUsePerTriFunctionShading_i(o,v);
}

void viewerUI::cb_OptionsMenuUseSmoothFunctionShading_i(Fl_Menu_*, void*) {
  glviewer->DrawSmoothFunctionsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_OptionsMenuUseSmoothFunctionShading(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_OptionsMenuUseSmoothFunctionShading_i(o,v);
}

void viewerUI::cb_OptionsMenuUseLineContours_i(Fl_Menu_*, void*) {
  glviewer->DrawLineContoursWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_OptionsMenuUseLineContours(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_OptionsMenuUseLineContours_i(o,v);
}

void viewerUI::cb_NormalizeQuadVectors_i(Fl_Menu_*, void*) {
  glviewer->DrawQuadVelocitiesNormalScaledWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_NormalizeQuadVectors(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_NormalizeQuadVectors_i(o,v);
}

void viewerUI::cb_VrefScaledQuadVectors_i(Fl_Menu_*, void*) {
  glviewer->DrawQuadVelocitiesVrefScaledWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_VrefScaledQuadVectors(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_VrefScaledQuadVectors_i(o,v);
}

void viewerUI::cb_VmaxScaleQuadVectors_i(Fl_Menu_*, void*) {
  glviewer->DrawQuadVelocitiesVmaxScaledWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_VmaxScaleQuadVectors(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_VmaxScaleQuadVectors_i(o,v);
}

void viewerUI::cb_OptionsMenuUseFlatShading_i(Fl_Menu_*, void*) {
  glviewer->DrawFlatShadedWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_OptionsMenuUseFlatShading(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_OptionsMenuUseFlatShading_i(o,v);
}

void viewerUI::cb_OptionsMenuUseTransparentShading_i(Fl_Menu_*, void*) {
  glviewer->DrawTransparentShadedWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_OptionsMenuUseTransparentShading(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_OptionsMenuUseTransparentShading_i(o,v);
}

void viewerUI::cb_OptionsMenuDrawWakesToInfinity_i(Fl_Menu_*, void*) {
  glviewer->DrawWakesToInfinityWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_OptionsMenuDrawWakesToInfinity(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_OptionsMenuDrawWakesToInfinity_i(o,v);
}

void viewerUI::cb_OptionsMenuDrawControlSurfacesDeflected_i(Fl_Menu_*, void*) {
  glviewer->DrawControlSurfacesDeflectedWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_OptionsMenuDrawControlSurfacesDeflected(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_OptionsMenuDrawControlSurfacesDeflected_i(o,v);
}

void viewerUI::cb_DrawReflectedGeometry_i(Fl_Menu_*, void*) {
  glviewer->DrawReflectedGeometryWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_DrawReflectedGeometry(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_DrawReflectedGeometry_i(o,v);
}

void viewerUI::cb_DrawWakeLines_i(Fl_Menu_*, void*) {
  glviewer->DrawWakeLinesWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_DrawWakeLines(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_DrawWakeLines_i(o,v);
}

void viewerUI::cb_DrawWakeNodes_i(Fl_Menu_*, void*) {
  glviewer->DrawWakePointsWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_DrawWakeNodes(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_DrawWakeNodes_i(o,v);
}

void viewerUI::cb_Beam3D_Off_i(Fl_Menu_*, void*) {
  glviewer->DrawBEAM3DFEMOff();
  glviewer->redraw();
}
void viewerUI::cb_Beam3D_Off(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_Beam3D_Off_i(o,v);
}

void viewerUI::cb_Beam3D_On_i(Fl_Menu_*, void*) {
  glviewer->DrawBEAM3DFEMOn();
  glviewer->redraw();
}
void viewerUI::cb_Beam3D_On(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_Beam3D_On_i(o,v);
}

void viewerUI::cb_Beam3D_On_Deflected_i(Fl_Menu_*, void*) {
  glviewer->DrawBEAM3DFEMDeformed();
  glviewer->redraw();
}
void viewerUI::cb_Beam3D_On_Deflected(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_Beam3D_On_Deflected_i(o,v);
}

void viewerUI::cb_DrawXPlane_i(Fl_Menu_*, void*) {
  glviewer->DrawXPlaneWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_DrawXPlane(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_DrawXPlane_i(o,v);
}

void viewerUI::cb_DrawYPlane_i(Fl_Menu_*, void*) {
  glviewer->DrawYPlaneWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_DrawYPlane(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_DrawYPlane_i(o,v);
}

void viewerUI::cb_DrawZPlane_i(Fl_Menu_*, void*) {
  glviewer->DrawZPlaneWasPicked();
  glviewer->redraw();
}
void viewerUI::cb_DrawZPlane(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_DrawZPlane_i(o,v);
}

void viewerUI::cb_DrawColoredWakesOff_i(Fl_Menu_*, void*) {
  glviewer->DrawWakesColored() = 0;
  glviewer->redraw();
}
void viewerUI::cb_DrawColoredWakesOff(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_DrawColoredWakesOff_i(o,v);
}

void viewerUI::cb_DrawColoredWakesByWingID_i(Fl_Menu_*, void*) {
  glviewer->DrawWakesColored() = 1;
  glviewer->redraw();
}
void viewerUI::cb_DrawColoredWakesByWingID(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_DrawColoredWakesByWingID_i(o,v);
}

void viewerUI::cb_DrawColoredWakesBySpan_i(Fl_Menu_*, void*) {
  glviewer->DrawWakesColored() = 2;;
  glviewer->redraw();
}
void viewerUI::cb_DrawColoredWakesBySpan(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_DrawColoredWakesBySpan_i(o,v);
}

void viewerUI::cb_CheckForOptimizationUpdates_i(Fl_Menu_*, void*) {
  glviewer->CheckForOptimizationReloads() = 1;

  int UpperBound = glviewer->GetNumberOfADBCases();

  LoadSolutionCase->bounds(1,UpperBound+1);

  glviewer->redraw();
}
void viewerUI::cb_CheckForOptimizationUpdates(Fl_Menu_* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_CheckForOptimizationUpdates_i(o,v);
}

Fl_Menu_Item viewerUI::menu_OptionsMenu[] = {
 {"Set Contour Levels", 0,  (Fl_Callback*)viewerUI::cb_OptionsMenuSetContourLevels, 0, 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Function Contour Type", 0,  0, 0, 192, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Use Per Tri Function Shading", 0,  (Fl_Callback*)viewerUI::cb_OptionsMenuUsePerTriFunctionShading, 0, 12, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Use Smooth Function Shading", 0,  (Fl_Callback*)viewerUI::cb_OptionsMenuUseSmoothFunctionShading, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Use Line Contours", 0,  (Fl_Callback*)viewerUI::cb_OptionsMenuUseLineContours, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0},
 {"Quad Tree Velocity Settings", 0,  0, 0, 192, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Normalize Vectors", 0,  (Fl_Callback*)viewerUI::cb_NormalizeQuadVectors, 0, 12, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Scale by Vref", 0,  (Fl_Callback*)viewerUI::cb_VrefScaledQuadVectors, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Scale by Vmax", 0,  (Fl_Callback*)viewerUI::cb_VmaxScaleQuadVectors, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0},
 {"Use Flat Shading", 0,  (Fl_Callback*)viewerUI::cb_OptionsMenuUseFlatShading, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Use Transparent Shading", 0,  (Fl_Callback*)viewerUI::cb_OptionsMenuUseTransparentShading, 0, 146, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw Wakes To Infinity", 0,  (Fl_Callback*)viewerUI::cb_OptionsMenuDrawWakesToInfinity, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw Control Surfaces Deflected", 0,  (Fl_Callback*)viewerUI::cb_OptionsMenuDrawControlSurfacesDeflected, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw Reflected Geometry", 0,  (Fl_Callback*)viewerUI::cb_DrawReflectedGeometry, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw Wakes As Lines", 0,  (Fl_Callback*)viewerUI::cb_DrawWakeLines, 0, 134, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw Wakes As Points", 0,  (Fl_Callback*)viewerUI::cb_DrawWakeNodes, 0, 130, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw Beam3D Model", 0,  0, 0, 192, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Off", 0,  (Fl_Callback*)viewerUI::cb_Beam3D_Off, 0, 12, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"On", 0,  (Fl_Callback*)viewerUI::cb_Beam3D_On, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"On & Deflected", 0,  (Fl_Callback*)viewerUI::cb_Beam3D_On_Deflected, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0},
 {"Draw Axis Planes", 0,  0, 0, 192, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw X-Plane", 0,  (Fl_Callback*)viewerUI::cb_DrawXPlane, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw Y-Plane", 0,  (Fl_Callback*)viewerUI::cb_DrawYPlane, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Draw Z-Plane", 0,  (Fl_Callback*)viewerUI::cb_DrawZPlane, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0},
 {"Draw Colored Wakes", 0,  0, 0, 192, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Off", 0,  (Fl_Callback*)viewerUI::cb_DrawColoredWakesOff, 0, 12, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Colored by Wing ID", 0,  (Fl_Callback*)viewerUI::cb_DrawColoredWakesByWingID, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Colored by Span Location", 0,  (Fl_Callback*)viewerUI::cb_DrawColoredWakesBySpan, 0, 8, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0},
 {"Optimization", 0,  0, 0, 64, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {"Check for Optimization Updates", 0,  (Fl_Callback*)viewerUI::cb_CheckForOptimizationUpdates, 0, 2, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0},
 {0,0,0,0,0,0,0,0,0}
};
Fl_Menu_Item* viewerUI::OptionsMenuSetContourLevels = viewerUI::menu_OptionsMenu + 0;
Fl_Menu_Item* viewerUI::ChooseContourType = viewerUI::menu_OptionsMenu + 1;
Fl_Menu_Item* viewerUI::OptionsMenuUsePerTriFunctionShading = viewerUI::menu_OptionsMenu + 2;
Fl_Menu_Item* viewerUI::OptionsMenuUseSmoothFunctionShading = viewerUI::menu_OptionsMenu + 3;
Fl_Menu_Item* viewerUI::OptionsMenuUseLineContours = viewerUI::menu_OptionsMenu + 4;
Fl_Menu_Item* viewerUI::ChooseQuadVectorType = viewerUI::menu_OptionsMenu + 6;
Fl_Menu_Item* viewerUI::NormalizeQuadVectors = viewerUI::menu_OptionsMenu + 7;
Fl_Menu_Item* viewerUI::VrefScaledQuadVectors = viewerUI::menu_OptionsMenu + 8;
Fl_Menu_Item* viewerUI::VmaxScaleQuadVectors = viewerUI::menu_OptionsMenu + 9;
Fl_Menu_Item* viewerUI::OptionsMenuUseFlatShading = viewerUI::menu_OptionsMenu + 11;
Fl_Menu_Item* viewerUI::OptionsMenuUseTransparentShading = viewerUI::menu_OptionsMenu + 12;
Fl_Menu_Item* viewerUI::OptionsMenuDrawWakesToInfinity = viewerUI::menu_OptionsMenu + 13;
Fl_Menu_Item* viewerUI::OptionsMenuDrawControlSurfacesDeflected = viewerUI::menu_OptionsMenu + 14;
Fl_Menu_Item* viewerUI::DrawReflectedGeometry = viewerUI::menu_OptionsMenu + 15;
Fl_Menu_Item* viewerUI::DrawWakeLines = viewerUI::menu_OptionsMenu + 16;
Fl_Menu_Item* viewerUI::DrawWakeNodes = viewerUI::menu_OptionsMenu + 17;
Fl_Menu_Item* viewerUI::Beam3D_Off = viewerUI::menu_OptionsMenu + 19;
Fl_Menu_Item* viewerUI::Beam3D_On = viewerUI::menu_OptionsMenu + 20;
Fl_Menu_Item* viewerUI::Beam3D_On_Deflected = viewerUI::menu_OptionsMenu + 21;
Fl_Menu_Item* viewerUI::DrawXPlane = viewerUI::menu_OptionsMenu + 24;
Fl_Menu_Item* viewerUI::DrawYPlane = viewerUI::menu_OptionsMenu + 25;
Fl_Menu_Item* viewerUI::DrawZPlane = viewerUI::menu_OptionsMenu + 26;
Fl_Menu_Item* viewerUI::DrawColoredWakesOff = viewerUI::menu_OptionsMenu + 29;
Fl_Menu_Item* viewerUI::DrawColoredWakesByWingID = viewerUI::menu_OptionsMenu + 30;
Fl_Menu_Item* viewerUI::DrawColoredWakesBySpan = viewerUI::menu_OptionsMenu + 31;
Fl_Menu_Item* viewerUI::CheckForOptimizationUpdates = viewerUI::menu_OptionsMenu + 34;

void viewerUI::cb_KeyboardControlInfoButton_i(Fl_Button*, void*) {
  fl_message("Use the arrow keys to translate. \nUse Cntrl+arrows keys to rotate. \nUse Alt+arrow keys to zoom. \nUse +/- keys to move through agglomerated meshes.");
  glviewer->redraw();
}
void viewerUI::cb_KeyboardControlInfoButton(Fl_Button* o, void* v) {
  ((viewerUI*)(o->parent()->user_data()))->cb_KeyboardControlInfoButton_i(o,v);
}

viewerUI::viewerUI() {
  { mainWindow = new Fl_Double_Window(1160, 765, "VSPAERO Viewer 6.4.0");
    mainWindow->labelsize(12);
    mainWindow->user_data((void*)(this));
    mainWindow->align(Fl_Align(FL_ALIGN_CENTER));
    { Fl_Group* o = new Fl_Group(0, -34, 1312, 818);
      o->box(FL_FLAT_BOX);
      o->labeltype(FL_ENGRAVED_LABEL);
      { MainView = new Fl_Group(0, -34, 1312, 818);
        MainView->box(FL_FLAT_BOX);
        { cframe = new Fl_Box(2, 30, 861, 731);
          cframe->box(FL_PLASTIC_UP_BOX);
          cframe->color((Fl_Color)4);
          cframe->selection_color((Fl_Color)69);
        } // Fl_Box* cframe
        { glviewer = new GL_VIEWER(7, 35, 850, 719, "This is the glviewer");
          glviewer->box(FL_FLAT_BOX);
          glviewer->color((Fl_Color)23);
          glviewer->selection_color(FL_BACKGROUND_COLOR);
          glviewer->labeltype(FL_NORMAL_LABEL);
          glviewer->labelfont(0);
          glviewer->labelsize(14);
          glviewer->labelcolor(FL_FOREGROUND_COLOR);
          glviewer->align(Fl_Align(FL_ALIGN_CENTER));
          glviewer->when(FL_WHEN_RELEASE);
        } // GL_VIEWER* glviewer
        { Quad = new Fl_Group(0, -30, 1290, 814);
          { Fl_Tabs* o = new Fl_Tabs(865, 2, 313, 759);
            { SolutionPanel = new Fl_Group(865, 26, 291, 735, "Solution");
              SolutionPanel->labelfont(1);
              { PanelComGeomTags = new Fl_Group(867, 215, 289, 546);
                PanelComGeomTags->tooltip("Comgeom II panel tag list");
                PanelComGeomTags->box(FL_PLASTIC_UP_BOX);
                { PanelComGeomTagsBrowser = new Fl_Browser(868, 243, 287, 415, "Component : Surface : Name");
                  PanelComGeomTagsBrowser->type(3);
                  PanelComGeomTagsBrowser->box(FL_PLASTIC_UP_BOX);
                  PanelComGeomTagsBrowser->color(FL_BACKGROUND_COLOR);
                  PanelComGeomTagsBrowser->selection_color((Fl_Color)4);
                  PanelComGeomTagsBrowser->labelfont(3);
                  PanelComGeomTagsBrowser->textfont(5);
                  PanelComGeomTagsBrowser->callback((Fl_Callback*)cb_PanelComGeomTagsBrowser);
                  PanelComGeomTagsBrowser->align(Fl_Align(FL_ALIGN_TOP));
                } // Fl_Browser* PanelComGeomTagsBrowser
                { PanelComGeomTagsBrowserUnSelectAll = new Fl_Button(1066, 664, 85, 25, "UnSelect All");
                  PanelComGeomTagsBrowserUnSelectAll->tooltip("Unselect all");
                  PanelComGeomTagsBrowserUnSelectAll->box(FL_PLASTIC_UP_BOX);
                  PanelComGeomTagsBrowserUnSelectAll->color((Fl_Color)4);
                  PanelComGeomTagsBrowserUnSelectAll->labelsize(12);
                  PanelComGeomTagsBrowserUnSelectAll->callback((Fl_Callback*)cb_PanelComGeomTagsBrowserUnSelectAll);
                } // Fl_Button* PanelComGeomTagsBrowserUnSelectAll
                { PanelComGeomTagsBrowserSelectAll = new Fl_Button(1066, 694, 85, 25, "Select All");
                  PanelComGeomTagsBrowserSelectAll->tooltip("Select all");
                  PanelComGeomTagsBrowserSelectAll->box(FL_PLASTIC_UP_BOX);
                  PanelComGeomTagsBrowserSelectAll->color((Fl_Color)4);
                  PanelComGeomTagsBrowserSelectAll->labelsize(12);
                  PanelComGeomTagsBrowserSelectAll->callback((Fl_Callback*)cb_PanelComGeomTagsBrowserSelectAll);
                } // Fl_Button* PanelComGeomTagsBrowserSelectAll
                { PanelComGeomTagsBrowserDraw = new Fl_Button(875, 664, 90, 25, "Draw");
                  PanelComGeomTagsBrowserDraw->tooltip("Draw selected GOMGEOM II tags");
                  PanelComGeomTagsBrowserDraw->type(1);
                  PanelComGeomTagsBrowserDraw->box(FL_PLASTIC_UP_BOX);
                  PanelComGeomTagsBrowserDraw->color((Fl_Color)5);
                  PanelComGeomTagsBrowserDraw->selection_color((Fl_Color)2);
                  PanelComGeomTagsBrowserDraw->labelsize(12);
                  PanelComGeomTagsBrowserDraw->callback((Fl_Callback*)cb_PanelComGeomTagsBrowserDraw);
                } // Fl_Button* PanelComGeomTagsBrowserDraw
                { PanelComGeomTagsBrowserDrawMethod = new Fl_Choice(973, 664, 87, 25);
                  PanelComGeomTagsBrowserDrawMethod->tooltip("Draw selected region as shade, bordered, or both");
                  PanelComGeomTagsBrowserDrawMethod->box(FL_PLASTIC_UP_BOX);
                  PanelComGeomTagsBrowserDrawMethod->down_box(FL_PLASTIC_UP_BOX);
                  PanelComGeomTagsBrowserDrawMethod->selection_color((Fl_Color)6);
                  PanelComGeomTagsBrowserDrawMethod->labelsize(12);
                  PanelComGeomTagsBrowserDrawMethod->callback((Fl_Callback*)cb_PanelComGeomTagsBrowserDrawMethod);
                  PanelComGeomTagsBrowserDrawMethod->align(Fl_Align(FL_ALIGN_CENTER));
                  PanelComGeomTagsBrowserDrawMethod->menu(menu_PanelComGeomTagsBrowserDrawMethod);
                } // Fl_Choice* PanelComGeomTagsBrowserDrawMethod
                { PanelComGeomTagsBrowserDrawOnlySelected = new Fl_Button(875, 695, 184, 25, "Draw Only Selected Comps");
                  PanelComGeomTagsBrowserDrawOnlySelected->tooltip("Draw only selected COMGEOM II tags");
                  PanelComGeomTagsBrowserDrawOnlySelected->type(1);
                  PanelComGeomTagsBrowserDrawOnlySelected->box(FL_PLASTIC_UP_BOX);
                  PanelComGeomTagsBrowserDrawOnlySelected->color((Fl_Color)4);
                  PanelComGeomTagsBrowserDrawOnlySelected->selection_color((Fl_Color)2);
                  PanelComGeomTagsBrowserDrawOnlySelected->labelsize(12);
                  PanelComGeomTagsBrowserDrawOnlySelected->callback((Fl_Callback*)cb_PanelComGeomTagsBrowserDrawOnlySelected);
                } // Fl_Button* PanelComGeomTagsBrowserDrawOnlySelected
                { PanelComGeomTagsBrowserSwapSurfaceNormals = new Fl_Button(875, 725, 183, 25, "Swap Surface Normals");
                  PanelComGeomTagsBrowserSwapSurfaceNormals->tooltip("Draw only selected COMGEOM II tags");
                  PanelComGeomTagsBrowserSwapSurfaceNormals->box(FL_PLASTIC_UP_BOX);
                  PanelComGeomTagsBrowserSwapSurfaceNormals->color((Fl_Color)4);
                  PanelComGeomTagsBrowserSwapSurfaceNormals->selection_color((Fl_Color)4);
                  PanelComGeomTagsBrowserSwapSurfaceNormals->labelsize(12);
                  PanelComGeomTagsBrowserSwapSurfaceNormals->callback((Fl_Callback*)cb_PanelComGeomTagsBrowserSwapSurfaceNormals);
                } // Fl_Button* PanelComGeomTagsBrowserSwapSurfaceNormals
                PanelComGeomTags->end();
              } // Fl_Group* PanelComGeomTags
              { CommentOutput = new Fl_Output(878, 155, 265, 43);
                CommentOutput->box(FL_BORDER_BOX);
                CommentOutput->color(FL_BACKGROUND_COLOR);
                CommentOutput->labelfont(1);
                CommentOutput->textfont(1);
              } // Fl_Output* CommentOutput
              { LoadSolutionCase = new Fl_Counter(872, 50, 200, 21, "Solution Case");
                LoadSolutionCase->labelfont(1);
                LoadSolutionCase->step(1);
                LoadSolutionCase->value(1);
                LoadSolutionCase->callback((Fl_Callback*)cb_LoadSolutionCase);
                LoadSolutionCase->align(Fl_Align(FL_ALIGN_TOP));
              } // Fl_Counter* LoadSolutionCase
              { NumberOfSolutionCasesText = new Fl_Output(1077, 50, 50, 21);
                NumberOfSolutionCasesText->box(FL_NO_BOX);
                NumberOfSolutionCasesText->labelfont(1);
                NumberOfSolutionCasesText->textfont(1);
              } // Fl_Output* NumberOfSolutionCasesText
              { MachOutput = new Fl_Output(929, 76, 225, 24, "Mach:");
                MachOutput->box(FL_FLAT_BOX);
                MachOutput->color(FL_BACKGROUND_COLOR);
                MachOutput->labelfont(1);
                MachOutput->textfont(1);
              } // Fl_Output* MachOutput
              { AlphaOutput = new Fl_Output(930, 100, 225, 24, "Alpha:");
                AlphaOutput->box(FL_FLAT_BOX);
                AlphaOutput->color(FL_BACKGROUND_COLOR);
                AlphaOutput->labelfont(1);
                AlphaOutput->textfont(1);
              } // Fl_Output* AlphaOutput
              { BetaOutput = new Fl_Output(930, 124, 225, 24, "Beta:");
                BetaOutput->box(FL_FLAT_BOX);
                BetaOutput->color(FL_BACKGROUND_COLOR);
                BetaOutput->labelfont(1);
                BetaOutput->textfont(1);
              } // Fl_Output* BetaOutput
              SolutionPanel->end();
            } // Fl_Group* SolutionPanel
            { CutPlanePanel = new Fl_Group(865, 26, 293, 734, "Cut Planes");
              CutPlanePanel->labelfont(1);
              CutPlanePanel->hide();
              { CutPlanes = new Fl_Group(868, 33, 288, 723);
                CutPlanes->tooltip("Comgeom II panel tag list");
                CutPlanes->box(FL_PLASTIC_UP_BOX);
                { CutPlanesBrowser = new Fl_Browser(869, 61, 287, 499, "Cut Planes");
                  CutPlanesBrowser->type(3);
                  CutPlanesBrowser->box(FL_PLASTIC_UP_BOX);
                  CutPlanesBrowser->color(FL_BACKGROUND_COLOR);
                  CutPlanesBrowser->selection_color((Fl_Color)4);
                  CutPlanesBrowser->labelfont(3);
                  CutPlanesBrowser->textfont(5);
                  CutPlanesBrowser->callback((Fl_Callback*)cb_CutPlanesBrowser);
                  CutPlanesBrowser->align(Fl_Align(FL_ALIGN_TOP));
                } // Fl_Browser* CutPlanesBrowser
                { CutPlanesBrowserUnSelectAll = new Fl_Button(983, 566, 85, 25, "UnSelect All");
                  CutPlanesBrowserUnSelectAll->tooltip("Unselect all");
                  CutPlanesBrowserUnSelectAll->box(FL_PLASTIC_UP_BOX);
                  CutPlanesBrowserUnSelectAll->color((Fl_Color)4);
                  CutPlanesBrowserUnSelectAll->labelsize(12);
                  CutPlanesBrowserUnSelectAll->callback((Fl_Callback*)cb_CutPlanesBrowserUnSelectAll);
                } // Fl_Button* CutPlanesBrowserUnSelectAll
                { CutPlanesBrowserSelectAll = new Fl_Button(884, 566, 85, 25, "Select All");
                  CutPlanesBrowserSelectAll->tooltip("Select all");
                  CutPlanesBrowserSelectAll->box(FL_PLASTIC_UP_BOX);
                  CutPlanesBrowserSelectAll->color((Fl_Color)4);
                  CutPlanesBrowserSelectAll->labelsize(12);
                  CutPlanesBrowserSelectAll->callback((Fl_Callback*)cb_CutPlanesBrowserSelectAll);
                } // Fl_Button* CutPlanesBrowserSelectAll
                { CutPlanesDrawWireFrame = new Fl_Button(883, 650, 130, 25, "Draw Quad Wire");
                  CutPlanesDrawWireFrame->tooltip("Select all");
                  CutPlanesDrawWireFrame->type(1);
                  CutPlanesDrawWireFrame->box(FL_PLASTIC_UP_BOX);
                  CutPlanesDrawWireFrame->color((Fl_Color)5);
                  CutPlanesDrawWireFrame->selection_color((Fl_Color)2);
                  CutPlanesDrawWireFrame->labelsize(12);
                  CutPlanesDrawWireFrame->callback((Fl_Callback*)cb_CutPlanesDrawWireFrame);
                } // Fl_Button* CutPlanesDrawWireFrame
                { CutPlanesDrawVelocityVectors = new Fl_Button(883, 685, 130, 25, "Draw Velocity Vectors");
                  CutPlanesDrawVelocityVectors->tooltip("Select all");
                  CutPlanesDrawVelocityVectors->type(1);
                  CutPlanesDrawVelocityVectors->box(FL_PLASTIC_UP_BOX);
                  CutPlanesDrawVelocityVectors->color((Fl_Color)5);
                  CutPlanesDrawVelocityVectors->selection_color((Fl_Color)2);
                  CutPlanesDrawVelocityVectors->labelsize(12);
                  CutPlanesDrawVelocityVectors->callback((Fl_Callback*)cb_CutPlanesDrawVelocityVectors);
                } // Fl_Button* CutPlanesDrawVelocityVectors
                { CutPlanesDrawCp = new Fl_Button(883, 720, 130, 25, "Draw Cp");
                  CutPlanesDrawCp->tooltip("Select all");
                  CutPlanesDrawCp->type(1);
                  CutPlanesDrawCp->box(FL_PLASTIC_UP_BOX);
                  CutPlanesDrawCp->value(1);
                  CutPlanesDrawCp->color((Fl_Color)5);
                  CutPlanesDrawCp->selection_color((Fl_Color)2);
                  CutPlanesDrawCp->labelsize(12);
                  CutPlanesDrawCp->callback((Fl_Callback*)cb_CutPlanesDrawCp);
                } // Fl_Button* CutPlanesDrawCp
                { CutPlanesScaleVelocity = new Fl_Value_Slider(1018, 686, 127, 25, "Velocity Scaler");
                  CutPlanesScaleVelocity->type(1);
                  CutPlanesScaleVelocity->step(0.05);
                  CutPlanesScaleVelocity->value(1);
                  CutPlanesScaleVelocity->textsize(14);
                  CutPlanesScaleVelocity->callback((Fl_Callback*)cb_CutPlanesScaleVelocity);
                  CutPlanesScaleVelocity->align(Fl_Align(FL_ALIGN_TOP));
                } // Fl_Value_Slider* CutPlanesScaleVelocity
                { CutPlanesDrawShaded = new Fl_Button(883, 616, 130, 25, "Draw Quad Shaded");
                  CutPlanesDrawShaded->tooltip("Select all");
                  CutPlanesDrawShaded->type(1);
                  CutPlanesDrawShaded->box(FL_PLASTIC_UP_BOX);
                  CutPlanesDrawShaded->color((Fl_Color)5);
                  CutPlanesDrawShaded->selection_color((Fl_Color)2);
                  CutPlanesDrawShaded->labelsize(12);
                  CutPlanesDrawShaded->callback((Fl_Callback*)cb_CutPlanesDrawShaded);
                } // Fl_Button* CutPlanesDrawShaded
                { CutPlanesDrawVectorColor = new Fl_Button(1015, 720, 127, 25, "Vector Color");
                  CutPlanesDrawVectorColor->tooltip("Select all");
                  CutPlanesDrawVectorColor->type(1);
                  CutPlanesDrawVectorColor->box(FL_PLASTIC_UP_BOX);
                  CutPlanesDrawVectorColor->color(FL_FOREGROUND_COLOR);
                  CutPlanesDrawVectorColor->selection_color((Fl_Color)5);
                  CutPlanesDrawVectorColor->labelsize(12);
                  CutPlanesDrawVectorColor->callback((Fl_Callback*)cb_CutPlanesDrawVectorColor);
                } // Fl_Button* CutPlanesDrawVectorColor
                CutPlanes->end();
              } // Fl_Group* CutPlanes
              CutPlanePanel->end();
            } // Fl_Group* CutPlanePanel
            o->end();
          } // Fl_Tabs* o
          Quad->end();
        } // Fl_Group* Quad
        MainView->end();
        Fl_Group::current()->resizable(MainView);
      } // Fl_Group* MainView
      o->end();
    } // Fl_Group* o
    { FileMenu = new Fl_Menu_Button(3, 3, 90, 25, "File");
      FileMenu->tooltip("File menu");
      FileMenu->box(FL_PLASTIC_UP_BOX);
      FileMenu->down_box(FL_PLASTIC_UP_BOX);
      FileMenu->selection_color((Fl_Color)231);
      FileMenu->labelfont(1);
      FileMenu->menu(menu_FileMenu);
    } // Fl_Menu_Button* FileMenu
    { ViewMenu = new Fl_Menu_Button(97, 3, 90, 25, "View");
      ViewMenu->tooltip("View menu");
      ViewMenu->box(FL_PLASTIC_UP_BOX);
      ViewMenu->down_box(FL_PLASTIC_UP_BOX);
      ViewMenu->selection_color((Fl_Color)231);
      ViewMenu->labelfont(1);
      ViewMenu->menu(menu_ViewMenu);
    } // Fl_Menu_Button* ViewMenu
    { LegendMenu = new Fl_Menu_Button(191, 3, 90, 25, "Legend");
      LegendMenu->tooltip("Legend menu");
      LegendMenu->box(FL_PLASTIC_UP_BOX);
      LegendMenu->down_box(FL_PLASTIC_UP_BOX);
      LegendMenu->selection_color((Fl_Color)231);
      LegendMenu->labelfont(1);
      LegendMenu->menu(menu_LegendMenu);
    } // Fl_Menu_Button* LegendMenu
    { ADBMenu = new Fl_Menu_Button(285, 3, 90, 25, "Aero");
      ADBMenu->tooltip("ADB menu");
      ADBMenu->box(FL_PLASTIC_UP_BOX);
      ADBMenu->down_box(FL_PLASTIC_UP_BOX);
      ADBMenu->selection_color((Fl_Color)231);
      ADBMenu->labelfont(1);
      ADBMenu->menu(menu_ADBMenu);
    } // Fl_Menu_Button* ADBMenu
    { FEMMenu = new Fl_Menu_Button(380, 3, 90, 25, "FEM");
      FEMMenu->tooltip("ADB menu");
      FEMMenu->box(FL_PLASTIC_UP_BOX);
      FEMMenu->down_box(FL_PLASTIC_UP_BOX);
      FEMMenu->selection_color((Fl_Color)231);
      FEMMenu->labelfont(1);
      FEMMenu->menu(menu_FEMMenu);
    } // Fl_Menu_Button* FEMMenu
    { OptionsMenu = new Fl_Menu_Button(475, 3, 90, 25, "Options");
      OptionsMenu->tooltip("Options menu");
      OptionsMenu->box(FL_PLASTIC_UP_BOX);
      OptionsMenu->down_box(FL_PLASTIC_UP_BOX);
      OptionsMenu->selection_color((Fl_Color)231);
      OptionsMenu->labelfont(1);
      OptionsMenu->menu(menu_OptionsMenu);
    } // Fl_Menu_Button* OptionsMenu
    { KeyboardControlInfoButton = new Fl_Button(568, 3, 160, 25, "Keyboard Controls");
      KeyboardControlInfoButton->tooltip("Keyboard control information");
      KeyboardControlInfoButton->box(FL_PLASTIC_UP_BOX);
      KeyboardControlInfoButton->down_box(FL_PLASTIC_UP_BOX);
      KeyboardControlInfoButton->labelfont(1);
      KeyboardControlInfoButton->callback((Fl_Callback*)cb_KeyboardControlInfoButton);
    } // Fl_Button* KeyboardControlInfoButton
    mainWindow->end();
    mainWindow->resizable(mainWindow);
  } // Fl_Double_Window* mainWindow
}

void viewerUI::show(int argc, char **argv) {
  mainWindow->show(argc, argv);
}

void viewerUI::LoadInitialData(char *name) {
  char dum[200];

  glviewer->LoadInitialData(name);

  glviewer->GetCurrentMachText(dum);
  MachOutput->value(dum);

  glviewer->GetCurrentAlphaText(dum);
  AlphaOutput->value(dum);

  glviewer->GetCurrentBetaText(dum);
  BetaOutput->value(dum);

  int UpperBound = glviewer->GetNumberOfADBCases();

  LoadSolutionCase->bounds(1,UpperBound);

  int BigStep = UpperBound/10;

  if (BigStep < 1 ) BigStep = 1;

  LoadSolutionCase->lstep((double)BigStep);

  sprintf(dum," of %d",UpperBound);

  NumberOfSolutionCasesText->value(dum);

  glviewer->GetCommentTextString(dum);

  CommentOutput->value(dum);
}
