# data file for the Fltk User Interface Designer (fluid) version 1.0105 header_name {.h} code_name {.cxx} decl {\#include "GLView.h"} {public } decl {\#include "NetworkServices.h"} {public } decl {\#include } {} class IsoViewUI {open } { decl {NetworkServices &net;} {} Function {static_colorCB(Fl_Slider *slider,IsoViewUI *gui)} {return_type {static void} } { code {gui->glview->setColor(gui->r_slider->value(), gui->g_slider->value(), gui->b_slider->value(), gui->a_slider->value());} {} } Function {IsoViewUI(NetworkServices &ns):net(ns)} {} { Fl_Window mainwin { label IsoView2 open private xywh {458 146 765 440} type Double color 33 resizable visible } { Fl_Group {} {open xywh {485 285 260 140} box SHADOW_BOX color 174 } { Fl_Input Host { label {Host:} callback {printf("Hostname is now [%s]\\n",Host->value());} xywh {580 290 140 25} when 8 code0 {Host->value("");} } Fl_Input DataPort { label {DataPort:} callback {printf("DataPort is now %s\\n",DataPort->value());} xywh {580 320 140 25} when 8 code0 {DataPort->value("5557");} } Fl_Input ControlPort { label {ControlPort:} callback {printf("ControlPort is now %s\\n",ControlPort->value());} xywh {580 350 140 25} when 8 code0 {ControlPort->value("5558");} } Fl_Return_Button QuitButton { label Quit callback {exit(0);} xywh {620 385 100 25} } Fl_Button RetryButton { label Retry user_data this user_data_type {IsoViewUI*} callback {printf("Attempt to re-establish link to remote Cactus job\\n"); printf("\\tHost=[%s]\\tDataPort=%s\\tControlPort=%s\\n",Host->value(),DataPort->value(),ControlPort->value()); this->net.TryConnection(Host->value(),atoi(ControlPort->value()),atoi(DataPort->value())); checkNet(this);} xywh {510 385 90 25} } } Fl_Group {} {open xywh {485 5 115 270} box SHADOW_BOX color 174 } { Fl_Value_Slider IsoVal { label IsoVal user_data this callback IsoChangeCB xywh {490 10 30 260} type {Vert Knob} align 8 when 4 minimum 1 maximum 0 } Fl_Value_Output max_label { label Max selected tooltip {Max Range} xywh {525 240 70 25} align 5 code0 {max_label->value(1);} } Fl_Value_Output min_label { label Min tooltip {Min Range} xywh {525 10 70 25} align 6 code0 {min_label->value(-1);} } Fl_Value_Input iso_input { label iso_input callback ManIsoChange xywh {525 150 45 25} align 20 when 8 hide } } Fl_Group {} {open xywh {610 5 135 270} box SHADOW_BOX color 174 } { Fl_Slider r_slider { label R user_data this callback static_colorCB xywh {620 15 25 180} color 1 minimum 1 maximum 0 value 1 } Fl_Slider g_slider { label G user_data this callback static_colorCB xywh {650 15 25 180} color 2 minimum 1 maximum 0 value 1 } Fl_Slider b_slider { label B user_data this callback static_colorCB xywh {680 15 25 180} color 4 minimum 1 maximum 0 value 1 } Fl_Slider a_slider { label A user_data this callback static_colorCB xywh {710 15 25 180} color 7 minimum 1 maximum 0 value 1 } Fl_Round_Button r_points { label Points user_data this callback render_methodCB xywh {615 210 25 25} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button r_lines { label Lines user_data this callback render_methodCB xywh {615 230 25 25} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button r_polys { label Polygons user_data this callback render_methodCB xywh {615 250 25 25} type Radio down_box ROUND_DOWN_BOX code0 {r_polys->setonly();} } } Fl_Group glview { label GLView open xywh {20 5 455 420} box ENGRAVED_BOX color 41 align 16 class GLView } {} } } Function {show()} {} { code {this->mainwin->show(); //Fl::add_idle((Fl_Timeout_Handler)IsoViewUI::checkNet,(void*)this); Fl::add_timeout(0.01, timecall,(void*)this);} {} } Function {setIsoRange(double _min,double _max)} {open return_type void } { code {this->min_label->value(_min); this->max_label->value(_max); this->IsoVal->range(_min,_max);} {} } Function {checkNet(IsoViewUI *self)} {open private return_type {static void} } { code {int r; r=self->net.CheckNet(); switch(r){ case -1: printf("\\tNetwork not connected\\n"); break; case 0: printf("\\tNo new data on the network\\n"); break; case 1: if(self->net.numverts && self->net.verts && self->net.numtris && self->net.tris) { if (self->net.run==0) { self->setIsoVal(self->net.value); self->net.run=1; } self->setIsoRange(self->net.range[0],self->net.range[1]); self->glview->setSurface(self->net.numverts,self->net.verts,self->net.numtris,self->net.tris,self->net.numnorms,self->net.norms); self->net.numverts=0; self->net.numtris=0; } Fl::repeat_timeout(0.01, timecall, (void*)self); break; default: printf("\\tI do not understand this return value in IsoViewUI::checkNet()\\n"); break; }} {} } Function {timecall(void* tmp)} {return_type {static void} } { code {checkNet((IsoViewUI*)tmp);} {} } Function {render_methodCB(Fl_Round_Button *button, IsoViewUI *gui)} {return_type {static void} } { code {gui->glview->setRender(gui->r_points->value(), gui->r_lines->value(), gui->r_polys->value());} {} } Function {IsoChangeCB(Fl_Value_Slider *slider, IsoViewUI *gui)} {return_type {static void} } { code {gui->net.IsoValueChange(gui->IsoVal->value(), (void*)gui); gui->iso_input->value(gui->IsoVal->value());} {} } Function {ManIsoChange(Fl_Value_Input *input, IsoViewUI *gui)} {return_type {static void} } { code {//gui->net.IsoValueChange(gui->iso_input->value(), (void*)gui); fprintf(stderr, "%f\\n", input->value()); gui->IsoVal->value(gui->iso_input->value());} {} } Function {setIsoVal(float value)} {open return_type void } { code {this->IsoVal->value(value);} {} } }