C:/cmcintos/defOrgs/examples/DefOrgViewer/Source/DefOrgViewerGUI.cxx

00001 // generated by Fast Light User Interface Designer (fluid) version 1.0106
00002 
00003 #include "DefOrgViewerGUI.h"
00004 
00005 inline void DefOrgViewerGUI::cb_Load_i(Fl_Button*, void*) {
00006   this->LoadImage();
00007 }
00008 void DefOrgViewerGUI::cb_Load(Fl_Button* o, void* v) {
00009   ((DefOrgViewerGUI*)(o->parent()->user_data()))->cb_Load_i(o,v);
00010 }
00011 
00012 inline void DefOrgViewerGUI::cb_Quit_i(Fl_Button*, void*) {
00013   this->Quit();
00014 }
00015 void DefOrgViewerGUI::cb_Quit(Fl_Button* o, void* v) {
00016   ((DefOrgViewerGUI*)(o->parent()->user_data()))->cb_Quit_i(o,v);
00017 }
00018 
00019 inline void DefOrgViewerGUI::cb_playPauseButton_i(Fl_Button*, void*) {
00020   TogglePlayPause();
00021 }
00022 void DefOrgViewerGUI::cb_playPauseButton(Fl_Button* o, void* v) {
00023   ((DefOrgViewerGUI*)(o->parent()->user_data()))->cb_playPauseButton_i(o,v);
00024 }
00025 
00026 inline void DefOrgViewerGUI::cb_Show_i(Fl_Check_Button*, void*) {
00027   this->ToggleVolumeRendering();
00028 }
00029 void DefOrgViewerGUI::cb_Show(Fl_Check_Button* o, void* v) {
00030   ((DefOrgViewerGUI*)(o->parent()->user_data()))->cb_Show_i(o,v);
00031 }
00032 
00033 inline void DefOrgViewerGUI::cb_Load1_i(Fl_Button*, void*) {
00034   this->LoadMeta();
00035 }
00036 void DefOrgViewerGUI::cb_Load1(Fl_Button* o, void* v) {
00037   ((DefOrgViewerGUI*)(o->parent()->user_data()))->cb_Load1_i(o,v);
00038 }
00039 
00040 DefOrgViewerGUI::DefOrgViewerGUI() {
00041   Fl_Double_Window* w;
00042   { Fl_Double_Window* o = mainWindow = new Fl_Double_Window(619, 730, "DefOrgViewer Alpha | Simon Fraser University");
00043     w = o;
00044     o->color((Fl_Color)246);
00045     o->user_data((void*)(this));
00046     { Fl_Button* o = new Fl_Button(5, 610, 175, 30, "Load Image");
00047       o->box(FL_PLASTIC_UP_BOX);
00048       o->color((Fl_Color)169);
00049       o->callback((Fl_Callback*)cb_Load);
00050     }
00051     { vtkFlRenderWindowInteractor* o = display = new vtkFlRenderWindowInteractor(5, 5, 610, 600);
00052       o->box(FL_PLASTIC_UP_FRAME);
00053       o->color(FL_BLACK);
00054       o->selection_color(FL_GRAY0);
00055       o->labeltype(FL_NORMAL_LABEL);
00056       o->labelfont(0);
00057       o->labelsize(14);
00058       o->labelcolor(FL_BLACK);
00059       o->align(FL_ALIGN_BOTTOM);
00060       o->when(FL_WHEN_RELEASE);
00061     }
00062     { Fl_Button* o = new Fl_Button(530, 680, 85, 45, "Quit");
00063       o->box(FL_PLASTIC_UP_BOX);
00064       o->color((Fl_Color)1);
00065       o->labelfont(1);
00066       o->callback((Fl_Callback*)cb_Quit);
00067     }
00068     { Fl_Button* o = playPauseButton = new Fl_Button(5, 679, 175, 46, "Start Simulation");
00069       o->type(1);
00070       o->box(FL_PLASTIC_UP_BOX);
00071       o->down_box(FL_PLASTIC_UP_BOX);
00072       o->color((Fl_Color)103);
00073       o->selection_color((Fl_Color)128);
00074       o->labelfont(1);
00075       o->callback((Fl_Callback*)cb_playPauseButton);
00076     }
00077     { Fl_Check_Button* o = new Fl_Check_Button(195, 605, 115, 30, "Show Volume Rendering");
00078       o->down_box(FL_DOWN_BOX);
00079       o->labelfont(1);
00080       o->callback((Fl_Callback*)cb_Show);
00081     }
00082     { Fl_Button* o = new Fl_Button(5, 645, 175, 30, "Load Geometry");
00083       o->box(FL_PLASTIC_UP_BOX);
00084       o->color((Fl_Color)3);
00085       o->callback((Fl_Callback*)cb_Load1);
00086     }
00087     new Fl_Text_Display(185, 635, 340, 90);
00088     o->end();
00089     o->resizable(o);
00090   }
00091 }
00092 
00093 DefOrgViewerGUI::~DefOrgViewerGUI() {
00094 }
00095 
00096 void DefOrgViewerGUI::Quit() {
00097 }
00098 
00099 void DefOrgViewerGUI::LoadImage() {
00100 }
00101 
00102 void DefOrgViewerGUI::Show() {
00103   mainWindow->show();
00104 }
00105 
00106 void DefOrgViewerGUI::Hide() {
00107   mainWindow->hide();
00108 }
00109 
00110 void DefOrgViewerGUI::TogglePlayPause() {
00111   if( !strcmp( playPauseButton->label(), "Start Simulation" ) )
00112 {
00113         playPauseButton->label( "Stop Simulation" );
00114 }
00115 else playPauseButton->label( "Start Simulation" );
00116 }
00117 
00118 void DefOrgViewerGUI::LoadMeta() {
00119 }
00120 
00121 void DefOrgViewerGUI::ToggleVolumeRendering() {
00122   if( !strcmp( playPauseButton->label(), "Start Simulation" ) )
00123 {
00124         playPauseButton->label( "Stop Simulation" );
00125 }
00126 else playPauseButton->label( "Start Simulation" );
00127 }

Generated on Wed Jul 19 13:05:15 2006 for IDO by  doxygen 1.4.7