# 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)} {open return_type {static void} } { code {gui->glview->setColor(gui->r_slider->value(), gui->g_slider->value(), gui->b_slider->value(), gui->a_slider->value()); printf("IsoViewSlider r=%f b=%f g=%f a=%f\\n", gui->r_slider->value(),gui->g_slider->value(),gui->b_slider->value(),gui->a_slider->value());} {} } Function {IsoViewUI(NetworkServices &ns):net(ns)} {open } { Fl_Window mainwin {open private xywh {91 47 760 440} type Double color 33 resizable visible } { Fl_Group {} {open xywh {485 265 260 160} box SHADOW_BOX color 174 } { Fl_Input Host { label {Host:} callback {printf("Hostname is now [%s]\\n",Host->value());} xywh {580 275 140 25} when 8 code0 {Host->value("");} } Fl_Input DataPort { label {DataPort:} callback {printf("DataPort is now %s\\n",DataPort->value());} xywh {580 305 140 25} when 8 code0 {DataPort->value("5557");} } Fl_Input ControlPort { label {ControlPort:} callback {printf("ControlPort is now %s\\n",ControlPort->value());} xywh {580 335 140 25} when 8 code0 {ControlPort->value("5558");} } Fl_Return_Button QuitButton { label Quit callback {exit(0);} xywh {615 375 105 35} } 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()));} xywh {495 375 105 35} } } Fl_Group {} {open xywh {485 5 105 250} box SHADOW_BOX color 174 } { Fl_Output max_label { label max xywh {520 10 60 25} align 2 code0 {max_label->value("1.0");} } Fl_Output min_label { label min xywh {520 225 60 25} align 1 code0 {min_label->value("0.0");} } Fl_Value_Slider IsoVal { label IsoVal user_data this callback {printf("Isovalue is now %g\\n",o->value());} xywh {490 10 30 240} type {Vert Knob} align 8 when 4 minimum 1 maximum 0 } } Fl_Group {} {open xywh {600 5 145 250} box SHADOW_BOX color 174 } { Fl_Slider r_slider { label R user_data this callback static_colorCB xywh {615 15 25 180} color 1 minimum 1 maximum 0 value 1 } Fl_Slider g_slider { label G user_data this callback static_colorCB xywh {645 15 25 180} color 2 minimum 1 maximum 0 value 1 } Fl_Slider b_slider { label B user_data this callback static_colorCB xywh {675 15 25 180} color 4 minimum 1 maximum 0 value 1 } Fl_Slider a_slider { label A user_data this callback static_colorCB xywh {705 15 25 180} color 65 minimum 1 maximum 0 value 1 } Fl_Light_Button {} { label Perspective callback {glview->perspective=((Fl_Light_Button*)o)->value(); glview->valid(0); glview->redraw();} xywh {615 215 115 30} } } Fl_Group glview { label GLView xywh {10 10 455 415} box ENGRAVED_BOX color 41 align 16 class GLView } {} } } Function {show()} {open } { code {this->mainwin->show(); Fl::add_check((Fl_Timeout_Handler)IsoViewUI::checkNet,(void*)this);} {} } Function {setIsoRange(double _min,double _max)} {open return_type void } { code {char tmp[32]; sprintf(tmp,"%g",_min); this->min_label->value(tmp); sprintf(tmp,"%g",_max); this->max_label->value(tmp); this->IsoVal->range(_min,_max);} {} } Function {checkNet(IsoViewUI *self)} {open private return_type {static void} } { code {int r; printf("Calling CheckNet\\n"); 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: printf("\\tNew data found. So do a call to setSurface() to incorporate the new data and check for new data ASAP if using a timer\\n"); self->glview->setSurface(self->net.numverts,self->net.verts,self->net.numtris,self->net.tris,0,0); break; default: printf("\\tI do not understand this return value in IsoViewUI::checkNet()\\n"); break; }} {selected } } }