Ejemplo n.º 1
0
void MainWindow::Execute(void* p)
{
    Fl_Double_Window* window = new Fl_Double_Window(ALIAS_WINDOW);

    if ( window != NULL )
    {
        extern HINSTANCE fl_display;
        window->icon((char *)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON_MAIN)));

        window->label("Automatic Upgrader WIN32");
        window->labelsize(DEFAULT_FONT_SIZE);
        window->begin();

        createComponents();

        window->end();
        window->show( _argc, _argv );
        window->callback(window_callback);

        Fl::add_timeout(0.5f, timer_cb, this);

        Fl::scheme("plastic");

        returnCode = Fl::run();
    }

    stillAlive = false;
}
Ejemplo n.º 2
0
int main( int argc, char **argv )
{
  Fl_Double_Window *win = new Fl_Double_Window( 100, 100, 300, 300, "Flu_Spinner_Try" );

  Flu_Spinner *c = new Flu_Spinner( 100, 30, 70, 25, "Float Spinner" );
  c->callback( update );
  //c->deactivate();

  c = new Flu_Spinner( 100, 70, 70, 25, "Int Spinner" );
  //c->editable( false );
  c->callback( update );
  c->step( 1 );
  c->range( 0, 10 );

  c = new Flu_Spinner( 100, 110, 70, 25, "X: " );
  c->callback( update );
  c->align( FL_ALIGN_INSIDE );
  c->value( 0.5f );

  c = new Flu_Spinner( 100, 150, 70, 25, "Wrap Spinner" );
  c->callback( update );
  c->wrap_range( true );
  c->step( 1 );
  c->range( 0, 10 );

  win->end();
  win->resizable( win );

  win->show();

  return( Fl::run() );
}
Ejemplo n.º 3
0
ct_image_window::ct_image_window( ) {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = image_window = new Fl_Double_Window(421, 528);
    w = o;
    o->user_data((void*)(this));
    { Fl_Group* o = new Fl_Group(5, 30, 410, 410);
      o->box(FL_PLASTIC_DOWN_FRAME);
      { ct_draw_area* o = ct_image = new ct_draw_area(10, 35, 400, 400, "label");
        o->box(FL_FLAT_BOX);
        o->color(FL_DARK3);
        o->selection_color(FL_BACKGROUND_COLOR);
        o->labeltype(FL_NORMAL_LABEL);
        o->labelfont(0);
        o->labelsize(14);
        o->labelcolor(FL_BLACK);
        o->align(FL_ALIGN_CENTER);
        o->when(FL_WHEN_RELEASE);
      }
      o->end();
    }
    { Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 100, 25);
      o->box(FL_FLAT_BOX);
      o->menu(menu_);
    }
    { Fl_Value_Slider* o = WL = new Fl_Value_Slider(40, 470, 375, 20, "WL");
      o->type(1);
      o->box(FL_PLASTIC_THIN_DOWN_BOX);
      o->minimum(-2000);
      o->maximum(7000);
      o->step(1);
      o->value(40);
      o->callback((Fl_Callback*)cb_WL);
      o->align(FL_ALIGN_LEFT);
    }
    { Fl_Value_Slider* o = WW = new Fl_Value_Slider(40, 495, 375, 20, "WW");
      o->type(1);
      o->box(FL_PLASTIC_THIN_DOWN_BOX);
      o->minimum(1);
      o->maximum(4000);
      o->step(1);
      o->value(300);
      o->callback((Fl_Callback*)cb_WW);
      o->align(FL_ALIGN_LEFT);
    }
    { Fl_Value_Slider* o = Indx = new Fl_Value_Slider(40, 445, 375, 20, "Indx");
      o->type(1);
      o->box(FL_PLASTIC_THIN_DOWN_BOX);
      o->step(1);
      o->callback((Fl_Callback*)cb_Indx);
      o->align(FL_ALIGN_LEFT);
    }
    { Fl_Progress* o = progress_bar = new Fl_Progress(115, 5, 300, 20);
      o->box(FL_PLASTIC_THIN_UP_BOX);
      o->selection_color((Fl_Color)1);
      o->hide();
    }
    o->end();
  }
}
Ejemplo n.º 4
0
ModelerUserInterface::ModelerUserInterface() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = m_controlsWindow = new Fl_Double_Window(395, 325, "Final Project Controls");
    w = o;
    o->callback((Fl_Callback*)cb_m_controlsWindow, (void*)(this));
    o->when(FL_WHEN_NEVER);
    { Fl_Menu_Bar* o = m_controlsMenuBar = new Fl_Menu_Bar(0, 0, 395, 25);
      o->menu(menu_m_controlsMenuBar);
    }
    { Fl_Browser* o = m_controlsBrowser = new Fl_Browser(0, 25, 140, 300, "Controls");
      o->type(3);
      o->textsize(10);
      o->callback((Fl_Callback*)cb_m_controlsBrowser);
      Fl_Group::current()->resizable(o);
    }
    { Fl_Scroll* o = m_controlsScroll = new Fl_Scroll(145, 25, 250, 300);
      o->type(6);
      o->when(FL_WHEN_CHANGED);
      { Fl_Pack* o = m_controlsPack = new Fl_Pack(145, 25, 225, 300);
        o->end();
      }
      o->end();
    }
    o->end();
  }
  { Fl_Double_Window* o = m_modelerWindow = new Fl_Double_Window( 800, 800, "Assignment 2 Model");
    w = o;
    o->callback((Fl_Callback*)cb_m_modelerWindow, (void*)(this));
    o->when(FL_WHEN_NEVER);
    { ModelerView* o = m_modelerView = new ModelerView(0, 0, 800, 800, "ModelerView");
      o->box(FL_NO_BOX);
      o->color(FL_BACKGROUND_COLOR);
      o->selection_color(FL_BACKGROUND_COLOR);
      o->labeltype(FL_NORMAL_LABEL);
      o->labelfont(0);
      o->labelsize(14);
      o->labelcolor(FL_BLACK);
      o->align(FL_ALIGN_CENTER);
      o->when(FL_WHEN_RELEASE);
      Fl_Group::current()->resizable(o);
    }
    o->end();
  }
}
Ejemplo n.º 5
0
Fl_Double_Window* make_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = controls = new Fl_Double_Window(255, 60, "Rotation Angle");
    w = o;
    { Fl_Value_Input* o = angle_value = new Fl_Value_Input(180, 5, 70, 25, "Angle");
      o->minimum(-65000);
      o->maximum(65000);
      o->callback((Fl_Callback*)cb_angle_value);
      o->when(FL_WHEN_ENTER_KEY);
    }
    { Fl_Roller* o = angle_roller = new Fl_Roller(5, 35, 245, 20);
      o->type(1);
      o->minimum(65000);
      o->maximum(-65000);
      o->step(0.1);
      o->callback((Fl_Callback*)cb_angle_roller);
    }
    { Fl_Button* o = new Fl_Button(70, 5, 55, 25, "next");
      o->shortcut(0x66);
      o->callback((Fl_Callback*)cb_next);
    }
    { Fl_Button* o = new Fl_Button(5, 5, 55, 25, "prev");
      o->shortcut(0x64);
      o->callback((Fl_Callback*)cb_prev);
    }
    o->end();
    o->resizable(o);
  }
  { ImageWindow* o = iw1 = new ImageWindow(100, 100);
    w = o;
    o->box(FL_FLAT_BOX);
    o->color(FL_BACKGROUND_COLOR);
    o->selection_color(FL_BACKGROUND_COLOR);
    o->labeltype(FL_NO_LABEL);
    o->labelfont(0);
    o->labelsize(14);
    o->labelcolor(FL_FOREGROUND_COLOR);
    o->align(FL_ALIGN_TOP);
    o->when(FL_WHEN_RELEASE);
    o->end();
  }
  { ImageWindow* o = iw2 = new ImageWindow(100, 100);
    w = o;
    o->box(FL_FLAT_BOX);
    o->color(FL_BACKGROUND_COLOR);
    o->selection_color(FL_BACKGROUND_COLOR);
    o->labeltype(FL_NO_LABEL);
    o->labelfont(0);
    o->labelsize(14);
    o->labelcolor(FL_FOREGROUND_COLOR);
    o->align(FL_ALIGN_TOP);
    o->when(FL_WHEN_RELEASE);
    o->end();
  }
  return w;
}
Ejemplo n.º 6
0
co_rc_t console_window_t::about()
{
	Fl_Double_Window *win = new Fl_Double_Window(400, 300);

	/* TODO: Add some text here :) */

	win->end();

	return CO_RC(OK);
}
Ejemplo n.º 7
0
int main(int argc, char* argv[])
{
    Fl_Double_Window *w = new Fl_Double_Window( 340, 160, "uPlayBack" );
    Fl_Group *pG = new CPlaybackWindow(0,0,340,160,"");
    w->end();


    w->resizable(pG);
    w->show(argc, argv);
    return Fl::run();
}
Ejemplo n.º 8
0
ImageWindow::ImageWindow() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = new Fl_Double_Window(930, 580, "Total Counts");
    w = o;
    o->user_data((void*)(this));
    { new Fl_Button(30, 190, 285, 30, "Save Image");
    } // Fl_Button* o
    { new Fl_Button(30, 240, 285, 30, "Reset Image");
    } // Fl_Button* o
    { new Fl_Light_Button(85, 492, 175, 40, "Analyze Pointing");
    } // Fl_Light_Button* o
    { new Fl_Value_Output(127, 384, 115, 25, "RA");
    } // Fl_Value_Output* o
    { new Fl_Value_Output(127, 419, 115, 25, "Dec");
    } // Fl_Value_Output* o
    { new Fl_Value_Output(127, 455, 115, 25, "Roll");
    } // Fl_Value_Output* o
    { Fl_Box* o = new Fl_Box(25, 359, 300, 214, "Current Pointing");
      o->box(FL_THIN_UP_FRAME);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP));
    } // Fl_Box* o
    { Fl_Choice* o = new Fl_Choice(456, 535, 155, 25, "Image Scaling");
      o->down_box(FL_BORDER_BOX);
    } // Fl_Choice* o
    { new Fl_Value_Output(199, 55, 115, 25, "Total Counts");
    } // Fl_Value_Output* o
    { Fl_Value_Output* o = new Fl_Value_Output(199, 97, 115, 25, "Average Count Rate");
      o->align(Fl_Align(132));
    } // Fl_Value_Output* o
    { Fl_Value_Output* o = new Fl_Value_Output(199, 140, 115, 25, "Bright Pixel Count Rate");
      o->align(Fl_Align(132));
    } // Fl_Value_Output* o
    { Fl_Box* o = new Fl_Box(23, 37, 300, 258, "Image Statistics");
      o->box(FL_THIN_UP_FRAME);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP));
    } // Fl_Box* o
    { new Fl_Progress(30, 540, 290, 30);
    } // Fl_Progress* o
    { Fl_Box* o = new Fl_Box(365, 40, 530, 475, "Detector Image");
      o->box(FL_THIN_UP_FRAME);
      o->labelfont(1);
      o->align(Fl_Align(FL_ALIGN_TOP));
    } // Fl_Box* o
    { Fl_Choice* o = new Fl_Choice(760, 535, 155, 25, "Pixel Arrangement");
      o->down_box(FL_BORDER_BOX);
    } // Fl_Choice* o
	plot = new plotWindow (100,100,500,500);
    o->end();
    w->show();
  } // Fl_Double_Window* o
}
Ejemplo n.º 9
0
int main(int argc, char **argv) {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = window_main = new Fl_Double_Window(305, 135, "FLTK window");
    w = o;
    o->align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE);
    input = new Fl_Input(145, 10, 150, 25, "Please enter value:");
    { Fl_Button* o = btnTest = new Fl_Button(10, 100, 100, 25, "Test");
      o->callback((Fl_Callback*)bt_callback, (void*)("test"));
    }
    { Fl_Return_Button* o = btnClose = new Fl_Return_Button(195, 100, 100, 25, "Close");
      o->callback((Fl_Callback*)bt_callback, (void*)("close"));
    }
    o->end();
  }
  w->show(argc, argv);
  return Fl::run();
}
Ejemplo n.º 10
0
int main( int argc, char **argv )
{
  Fl_Double_Window *win = new Fl_Double_Window( 100, 100, 300, 300, "Flu_Progress_Try" );
  Flu_Progress *p1 = new Flu_Progress( 80, 40, 150, 20, "Progress" );
  p1->value( 0.25 );
  Flu_Progress *p2 = new Flu_Progress( 80, 100, 150, 30, "Progress" );
  p2->value( 0.5 );
  Flu_Progress *p3 = new Flu_Progress( 80, 170, 150, 20, "Progress" );
  p3->value( 0.75 );
  Fl_Button *b = new Fl_Button( 130, 220, 40, 30, "Go" );
  b->callback( go );
  win->end();
  win->resizable( win );

  win->show();

  return( Fl::run() );
}
Ejemplo n.º 11
0
int main( int argc, char **argv )
{
  Fl_Double_Window *win = new Fl_Double_Window( 100, 100, 400, 300, "Flu_Chat_Buffer_Try" );
  Flu_Chat_Buffer *b = new Flu_Chat_Buffer( 0, 0, 400, 200 );
  Fl_Input *in = new Fl_Input( 80, 210, 100, 30, "Send:" );
  in->when( FL_WHEN_ENTER_KEY_ALWAYS );
  in->callback( sendMsg, b );
  win->end();
  win->resizable( win );

  b->addSystemMessage( "System message" );
  b->addRemoteMessage( "<Remote User> ", "Remote user's message" );
  b->addLocalMessage( "<Local User> ", "Local user's message" );

  win->show();

  return( Fl::run() );
}
Ejemplo n.º 12
0
int main() {
	fl_open_display();

	Fl_Double_Window* win = new Fl_Double_Window(295, 144, "Notify test");
	win->begin();
		txt = new Fl_Input(10, 15, 275, 25);
		txt->align(FL_ALIGN_TOP_LEFT);

		color_button = new Fl_Button(260, 50, 25, 25, "Color");
		color_button->align(FL_ALIGN_LEFT);
		color_button->callback(color_cb);
		Fl_Box* bx = new Fl_Box(10, 50, 164, 85, "Type some text and choose color, then press Send. "
		"Desktop should get notified about this.");
		bx->align(FL_ALIGN_WRAP);

		Fl_Button* send_button = new Fl_Button(195, 110, 90, 25, "&Send");
		send_button->callback(send_cb);
	win->end();
	win->show();
	return Fl::run();
}
Ejemplo n.º 13
0
Fl_Double_Window* UserInterface::makeWindow() {
    // make window
    Fl_Double_Window* w = new Fl_Double_Window(180, 170);
    w->user_data((void*)(this));

    // add saw wave button
    sawWaveButton = new Fl_Light_Button(25, 25, 125, 25, "Saw &Wave");
    sawWaveButton->callback((Fl_Callback*)cb_sawWaveButton, NULL); // (void*)(userdata));

    // add midi through button
    midiThruButton = new Fl_Light_Button(25, 65, 125, 25, "Midi &Through");
    midiThruButton->callback((Fl_Callback*)cb_midiThruButton, NULL);

    // add midi to synth button
    midiSynthButton = new Fl_Light_Button(25, 105, 125, 25, "Midi to &Synth");
    midiSynthButton->callback((Fl_Callback*)cb_midiSynthButton, NULL);

    // finish
    w->end();
    return w;
}
Ejemplo n.º 14
0
Archivo: Module.C Proyecto: 0mk/non
bool
Module::show_analysis_window ( void )
{
    /* use a large window for more accuracy at low frequencies */
    nframes_t nframes = sample_rate() / 2;
    float *buf = new float[nframes];

    memset( buf, 0, sizeof(float) * nframes );
    
    buf[0] = 1;
       
    if ( ! get_impulse_response( buf, nframes ) )
    {
        // return false;
    }
    
    Fl_Double_Window *w = new Fl_Double_Window( 1000, 500 );

    {
        SpectrumView * o = new SpectrumView( 25,25, 1000 - 50, 500 - 50, label() );
        o->labelsize(10);
        o->align(FL_ALIGN_RIGHT|FL_ALIGN_TOP);
        o->sample_rate( sample_rate() );
        o->data( buf, nframes );
    }

    w->end();

    w->show();

    while ( w->shown() )
        Fl::wait();

    delete w;

    return true;
}
Ejemplo n.º 15
0
int main(void) {
	Fl_Double_Window* win = new Fl_Double_Window(240, 165, "SevenSeg sample");
	win->begin();
		seg = new edelib::SevenSeg(10, 10, 70, 92);
		seg->box(FL_UP_BOX);
		seg->value(0);

		counter = new Fl_Counter(95, 20, 135, 20, "value");
		counter->type(1);
		counter->step(1);
		counter->minimum(-1);
		counter->maximum(9);
		counter->align(FL_ALIGN_TOP_LEFT);
		counter->callback(change_cb);

		slider = new Fl_Value_Slider(95, 65, 135, 20, "width");
		slider->type(1);
		slider->step(1);
		slider->minimum(2);
		slider->maximum(20);
		slider->value(seg->bar_width());
		slider->align(FL_ALIGN_TOP_LEFT);
		slider->callback(slide_cb);

		color_button = new Fl_Button(205, 95, 25, 25, "color");
		color_button->align(FL_ALIGN_LEFT);
		color_button->callback(color_cb);
		color_button->color(seg->color());

		chk = new Fl_Check_Button(95, 130, 135, 25, "deactivate");
		chk->down_box(FL_DOWN_BOX);
		chk->callback(deactivate_cb);
	win->end();
	win->show();
	return Fl::run();
}
Ejemplo n.º 16
0
	Fl_Double_Window* make_mods_window() {
		if(mods_window != nullptr) {
			delete (Fl_Double_Window*)mods_window;
			mods_window = nullptr;
		}

		std::shared_ptr<AppendAIPatch> aip = std::dynamic_pointer_cast<AppendAIPatch>(mods->get("aip"));

		Fl_Double_Window* w;
		{ Fl_Double_Window* o = new Fl_Double_Window(264, 340, "Special Mods");
		w = o;
		{ new DoneButton(5, 310, 255, 25, "Close Window");
		} // Fl_Button* o
		{ Fl_Check_Button* o = new ModCheckbox("dpos", 5, 10, 255, 15, "Dark ice caves and hell are possible");
		o->down_box(FL_DOWN_BOX);
		} // Fl_Check_Button* o
		{ Fl_Check_Button* o = new ModCheckbox("alld", 5, 30, 255, 15, "All levels are dark");
		o->down_box(FL_DOWN_BOX);
		} // Fl_Check_Button* o
		{ Fl_Check_Button* o = new ModCheckbox("smlt", 5, 50, 255, 15, "End Timer is not set to 99 minutes");
		  o->down_box(FL_DOWN_BOX);
		}
		{ Fl_Check_Button* o = new ModCheckbox("pret", 5, 70, 255, 15, "Display precise timer");
		  o->down_box(FL_DOWN_BOX);
		}
		{
			{ 
				init_appendai_choices();
				init_appendai_list();
			}
			{ Fl_Check_Button* o = new Fl_Check_Button(5, 172+40, 255, 15, "Piranhas unaffected (anti-crash)");
			  o->callback(unstable_check_callback);
			  if(aip->ignored_entities().size() > 0) {
				o->value(true);
			  }
			  else {
				o->value(false);
			  }
			}
		}

		std::shared_ptr<ShopContentsPatch> som = std::dynamic_pointer_cast<ShopContentsPatch>(mods->get("smo"));

		{ Fl_Group* o = new Fl_Group(5, 190+25+40, 255, 45, "Shop Mods");
		{ Fl_Check_Button* o = new ShopItemCheckbox(ITEM_JETPACK, 10, 195+25+40, 75, 15, "Jetpack");
			o->down_box(FL_DOWN_BOX);
		  } // Fl_Check_Button* o
		  { Fl_Check_Button* o = new ShopItemCheckbox(ITEM_TELEPORTER, 85, 195+25+40, 90, 15, "Teleporter");
			o->down_box(FL_DOWN_BOX);
		  } // Fl_Check_Button* o
		  { Fl_Check_Button* o = new ShopItemCheckbox(ITEM_COMPASS, 175, 195+25+40, 83, 15, "Compass");
			o->down_box(FL_DOWN_BOX);
		  } // Fl_Check_Button* o
		  { Fl_Check_Button* o = new ShopItemCheckbox(ITEM_MATTOCK, 10, 215+25+40, 85, 15, "Mattock");
		    o->down_box(FL_DOWN_BOX);
		  }
		  { Fl_Check_Button* o = new ShopItemCheckbox(ITEM_BOMB_BOX, 85, 215+25+40, 110, 15, "Bomb Box");
		    o->down_box(FL_DOWN_BOX);
		  }
		  { Fl_Check_Button* o = new Fl_Check_Button(175, 215+25+40, 110, 15, "1-2 Only");
			o->down_box(FL_DOWN_BOX);
			if(som->valid()) {
				o->value(som->levels() == 4);
				o->callback(shop_only12_callback);
			}
			else {
				o->deactivate();
			}
		  } // Fl_Check_Button* o
		  o->box(FL_UP_FRAME);
		  o->end();
			
		} // Fl_Group* o


		o->end();
		} // Fl_Double_Window* o

		mods_window = w;

		return w;
	}
Fl_Double_Window* make_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = new Fl_Double_Window(400, 605);
    w = o;
    { undobutton = new Fl_Button(6, 25, 40, 25, "Undo");
      undobutton->down_box(FL_DOWN_BOX);
      undobutton->callback((Fl_Callback*)undo_cb);
    } // Fl_Button* undobutton
    { forceslider = new Fl_Slider(206, 25, 75, 25, "Force");
      forceslider->type(5);
      forceslider->selection_color((Fl_Color)1);
      forceslider->minimum(0.05);
      forceslider->value(0.5);
      forceslider->callback((Fl_Callback*)lerp_cb);
      forceslider->align(Fl_Align(FL_ALIGN_RIGHT));
    } // Fl_Slider* forceslider
    { rgbmode = new Fl_Button(331, 25, 35, 25, "HSB");
      rgbmode->labelsize(12);
      rgbmode->callback((Fl_Callback*)rgbmode_cb);
      rgbmode->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
    } // Fl_Button* rgbmode
    { fnamebox = new Fl_Input(31, 60, 355, 25, "File:");
      fnamebox->labeltype(FL_ENGRAVED_LABEL);
      fnamebox->labelsize(12);
      fnamebox->callback((Fl_Callback*)input_cb);
      fnamebox->when(FL_WHEN_ENTER_KEY_ALWAYS);
    } // Fl_Input* fnamebox
    { cshow.hsblbls[0] = new Fl_Box(30, 219, 80, 20, "Hue (L)");
      cshow.hsblbls[0]->box(FL_FLAT_BOX);
      cshow.hsblbls[0]->color((Fl_Color)34);
      cshow.hsblbls[0]->labelfont(1);
      cshow.hsblbls[0]->labelsize(12);
      cshow.hsblbls[0]->labelcolor((Fl_Color)3);
    } // Fl_Box* cshow.hsblbls[0]
    { cshow.hsblbls[1] = new Fl_Box(115, 219, 75, 20, "Sat(M)");
      cshow.hsblbls[1]->box(FL_FLAT_BOX);
      cshow.hsblbls[1]->color((Fl_Color)34);
      cshow.hsblbls[1]->labelfont(1);
      cshow.hsblbls[1]->labelsize(12);
      cshow.hsblbls[1]->labelcolor((Fl_Color)2);
    } // Fl_Box* cshow.hsblbls[1]
    { cshow.hsblbls[2] = new Fl_Box(195, 219, 75, 20, "Bright(R)");
      cshow.hsblbls[2]->box(FL_FLAT_BOX);
      cshow.hsblbls[2]->color((Fl_Color)34);
      cshow.hsblbls[2]->labelfont(1);
      cshow.hsblbls[2]->labelsize(12);
      cshow.hsblbls[2]->labelcolor((Fl_Color)235);
    } // Fl_Box* cshow.hsblbls[2]
    { Fl_Box* o = new Fl_Box(275, 219, 80, 20, "Alpha(shift)");
      o->box(FL_FLAT_BOX);
      o->color((Fl_Color)34);
      o->labelfont(1);
      o->labelsize(12);
      o->labelcolor(FL_BACKGROUND2_COLOR);
    } // Fl_Box* o
    { cmedit = new class CMedit(5, 239, 380, 270);
      cmedit->box(FL_FLAT_BOX);
      cmedit->color(FL_BACKGROUND_COLOR);
      cmedit->selection_color(FL_BACKGROUND_COLOR);
      cmedit->labeltype(FL_NORMAL_LABEL);
      cmedit->labelfont(0);
      cmedit->labelsize(14);
      cmedit->labelcolor(FL_FOREGROUND_COLOR);
      cmedit->align(Fl_Align(FL_ALIGN_CENTER));
      cmedit->when(FL_WHEN_RELEASE);
      Fl_Group::current()->resizable(cmedit);
    } // class CMedit* cmedit
    { cshow.color = new colorpatch(62, 515, 50, 40);
      cshow.color->box(FL_DOWN_BOX);
      cshow.color->color(FL_BACKGROUND_COLOR);
      cshow.color->selection_color(FL_BACKGROUND_COLOR);
      cshow.color->labeltype(FL_NO_LABEL);
      cshow.color->labelfont(0);
      cshow.color->labelsize(14);
      cshow.color->labelcolor(FL_FOREGROUND_COLOR);
      cshow.color->align(Fl_Align(FL_ALIGN_CENTER));
      cshow.color->when(FL_WHEN_RELEASE);
    } // colorpatch* cshow.color
    { cshow.cindex = new Fl_Value_Input(7, 530, 50, 25, "  (index");
      cshow.cindex->box(FL_FLAT_BOX);
      cshow.cindex->color((Fl_Color)16);
      cshow.cindex->maximum(0);
      cshow.cindex->step(1);
      cshow.cindex->textsize(12);
      cshow.cindex->callback((Fl_Callback*)report_cb);
      cshow.cindex->align(Fl_Align(FL_ALIGN_TOP));
    } // Fl_Value_Input* cshow.cindex
    { cshow.hsba = new Fl_Output(117, 530, 120, 25, "HSBA");
      cshow.hsba->box(FL_FLAT_BOX);
      cshow.hsba->color((Fl_Color)16);
      cshow.hsba->textsize(11);
      cshow.hsba->align(Fl_Align(FL_ALIGN_TOP));
    } // Fl_Output* cshow.hsba
    { cshow.rgba = new Fl_Output(247, 530, 125, 25, "rgb");
      cshow.rgba->box(FL_FLAT_BOX);
      cshow.rgba->color((Fl_Color)16);
      cshow.rgba->textsize(11);
      cshow.rgba->align(Fl_Align(FL_ALIGN_TOP));
    } // Fl_Output* cshow.rgba
    { cshow.postscalein = new Fl_Value_Input(317, 570, 65, 25, "* Amax");
      cshow.postscalein->callback((Fl_Callback*)ascale_cb);
      cshow.postscalein->align(Fl_Align(FL_ALIGN_TOP_LEFT));
    } // Fl_Value_Input* cshow.postscalein
    { cshow.postexponin = new Fl_Value_Input(237, 570, 75, 25, "**  expon  )");
      cshow.postexponin->callback((Fl_Callback*)ascale_cb);
      cshow.postexponin->align(Fl_Align(FL_ALIGN_TOP_LEFT));
    } // Fl_Value_Input* cshow.postexponin
    { cshow.cmentin = new Fl_Value_Input(7, 570, 55, 25, "cmapsize");
      cshow.cmentin->box(FL_ENGRAVED_BOX);
      cshow.cmentin->color((Fl_Color)25);
      cshow.cmentin->callback((Fl_Callback*)ncment_cb);
      cshow.cmentin->align(Fl_Align(FL_ALIGN_TOP_LEFT));
      cshow.cmentin->when(FL_WHEN_RELEASE);
    } // Fl_Value_Input* cshow.cmentin
    { cshow.scaleout = new Fl_Output(137, 570, 95, 25, "  Aout  =  ( Ain");
      cshow.scaleout->box(FL_FLAT_BOX);
      cshow.scaleout->color((Fl_Color)16);
      cshow.scaleout->align(Fl_Align(FL_ALIGN_TOP_LEFT));
    } // Fl_Output* cshow.scaleout
    { Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 400, 20);
      o->color((Fl_Color)46);
      o->menu(menu_);
    } // Fl_Menu_Bar* o
    o->end();
  } // Fl_Double_Window* o
  return w;
}
Fl_Double_Window* IntersectionInterface::make_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = m_intersectionWindow = new Fl_Double_Window(420, 265, "Intersection UI");
    w = o;
    o->user_data((void*)(this));
    { Fl_Group* o = new Fl_Group(5, 25, 145, 30);
      o->end();
    }
    { Fl_Choice* o = m_iShapeType = new Fl_Choice(5, 25, 145, 30, "Object type");
      o->down_box(FL_BORDER_BOX);
      o->align(FL_ALIGN_TOP_LEFT);
      o->menu(menu_m_iShapeType);
    }
    { Fl_Value_Slider* o = m_dXAt = new Fl_Value_Slider(5, 75, 200, 25, "At x pos");
      o->type(5);
      o->minimum(-1.5);
      o->maximum(1.5);
      o->callback((Fl_Callback*)cb_m_dXAt);
      o->align(FL_ALIGN_TOP_LEFT);
    }
    { Fl_Value_Slider* o = m_dYAt = new Fl_Value_Slider(5, 115, 200, 25, "At y pos");
      o->type(5);
      o->minimum(-1.5);
      o->maximum(1.5);
      o->callback((Fl_Callback*)cb_m_dYAt);
      o->align(FL_ALIGN_TOP_LEFT);
    }
    { Fl_Value_Slider* o = m_dZAt = new Fl_Value_Slider(5, 155, 200, 25, "At z pos");
      o->type(5);
      o->minimum(-1.5);
      o->maximum(1.5);
      o->callback((Fl_Callback*)cb_m_dZAt);
      o->align(FL_ALIGN_TOP_LEFT);
    }
    { Fl_Value_Slider* o = m_dTheta = new Fl_Value_Slider(5, 195, 200, 25, "Vec theta");
      o->type(5);
      o->maximum(360);
      o->step(1);
      o->callback((Fl_Callback*)cb_m_dTheta);
      o->align(FL_ALIGN_TOP_LEFT);
    }
    { Fl_Value_Slider* o = m_dPhi = new Fl_Value_Slider(5, 235, 200, 25, "Vec phi");
      o->type(5);
      o->minimum(-90);
      o->maximum(90);
      o->step(1);
      o->value(45);
      o->callback((Fl_Callback*)cb_m_dPhi);
      o->align(FL_ALIGN_TOP_LEFT);
    }
    { Fl_Button* o = new Fl_Button(330, 25, 85, 25, "Write test");
      o->callback((Fl_Callback*)cb_Write);
    }
    { Fl_Value_Slider* o = m_dXRot = new Fl_Value_Slider(215, 75, 200, 25, "View rotation");
      o->type(5);
      o->maximum(360);
      o->step(1);
      o->callback((Fl_Callback*)cb_m_dXRot);
      o->align(FL_ALIGN_TOP_LEFT);
    }
    { Fl_Value_Slider* o = m_dYRot = new Fl_Value_Slider(215, 115, 200, 25, "View height");
      o->type(5);
      o->minimum(-90);
      o->maximum(90);
      o->step(1);
      o->callback((Fl_Callback*)cb_m_dYRot);
      o->align(FL_ALIGN_TOP_LEFT);
    }
    { Fl_Check_Button* o = m_bGrid = new Fl_Check_Button(215, 155, 25, 25, "Show grid");
      o->down_box(FL_DOWN_BOX);
      o->value(1);
      o->callback((Fl_Callback*)cb_m_bGrid);
    }
    { Fl_Check_Button* o = m_bRay = new Fl_Check_Button(215, 195, 25, 25, "Show ray");
      o->down_box(FL_DOWN_BOX);
      o->value(1);
      o->callback((Fl_Callback*)cb_m_bRay);
    }
    { Fl_Check_Button* o = m_bRayShadow = new Fl_Check_Button(215, 235, 25, 25, "Show ray shadow");
      o->down_box(FL_DOWN_BOX);
      o->value(1);
      o->callback((Fl_Callback*)cb_m_bRayShadow);
    }
    m_iSeed = new Fl_Value_Input(240, 30, 85, 20, "Seed");
    o->end();
    o->resizable(o);
  }
  return w;
}
Ejemplo n.º 19
0
int main (int argc, char ** argv)
{
    Fl_Double_Window *window;
    fl_register_images();
    //static Fl_GIF_Image image_img1 ("lines.gif");
    window = new Fl_Double_Window (850, 590,"RC Practice Utility v1.0");
    #ifdef WIN32
        window->icon((char*)LoadIcon(fl_display, MAKEINTRESOURCE(101)));
    #endif /*WIN32*/
    Fl_Button *But_Nxt,*But_Prev, *But_random;
    p_no = new Fl_Input(90,5,50,30);
    But_A= new Fl_Button( 430, 510, 80, 30, "A" );
    But_A->labelsize(16);
    But_A->labelfont(FL_BOLD);
    But_A->callback(Btn_A);
    But_B= new Fl_Button( 512, 510, 80, 30, "B" );
    But_B->labelsize(16);
    But_B->labelfont(FL_BOLD);
    But_B->callback(Btn_B);
    But_C= new Fl_Button( 594, 510, 80, 30, "C" );
    But_C->labelsize(16);
    But_C->labelfont(FL_BOLD);
    But_C->callback(Btn_C);
    But_D= new Fl_Button( 676, 510, 80, 30, "D" );
    But_D->labelsize(16);
    But_D->labelfont(FL_BOLD);
    But_D->callback(Btn_D);
    But_E= new Fl_Button( 758, 510, 80, 30, "E" );
    But_E->labelsize(16);
    But_E->labelfont(FL_BOLD);
    But_E->callback(Btn_E);
    info_box = new Fl_Help_View(425,510,420,50,0);
    info_box->box(FL_FLAT_BOX);
    info_box->color(FL_BACKGROUND_COLOR);
    info_box->hide();
    info_box->scrollbar_size(1);
    nxt_question= new Fl_Button( 430, 550, 160, 30, "Next Question" );
    nxt_question->deactivate();
    nxt_question->callback(Btn_nxt_question,(void*)window);
    Fl_Button *about_btn= new Fl_Button( 676, 550, 160, 30, "About" );
    about_btn->callback(Btn_about_CB,(void*)window);
    But_Nxt= new Fl_Button( 150, 4, 80, 30, "Next" );
    But_Nxt->callback((Fl_Callback*)Btn_Nxt_CB, (void*)(0));
    But_random= new Fl_Button( 240, 4, 80, 30, "Random" );
    But_random->callback((Fl_Callback*)Btn_random_CB, (void*)(0));
    But_Prev= new Fl_Button( 4, 4, 80, 30, "Previous" );
    But_Prev->callback((Fl_Callback*)Btn_Prev_CB, (void*)(0));
    clock1 = new Fl_Text_Display(425,10,350,30,0);
    clock1->box(FL_NO_BOX);
    clock1->color(FL_BACKGROUND_COLOR);
    clock1->textsize(16);
    p_no->textsize(16);
    p_no->callback((Fl_Callback*)pid_no_input_CB, (void*)(0));
    p_no->when(FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED);
    q=new Fl_Help_View(425,40,420,460,0);
    q->box(FL_THIN_DOWN_BOX);
    p=new Fl_Help_View(3,40,423,500,0);
    p->box(FL_THIN_DOWN_BOX);
    FILE *fp;
    rapidxml::xml_document<> doc;
    pid=0;
    totalq=0;
    totalp=0;
    cur_qid=0;
    cur_ans=0;
    rs=0;
    usr_ans=-1;
    enable_timer=0;
    cur_progress p(5, 550,423, 30,0);
    obj_progress = (cur_progress*)window->child(15);

    int i=strlen(argv[0]);
    for(;i>0;i--)
    {
        if(argv[0][i]=='/')
        {
            argv[0][i+1]='\0';
            break;
        }
    }
    i=i+2;
    current_path=(char*)malloc(i*sizeof(char));
    strcpy(current_path,argv[0]);
    #ifdef __APPLE__
    char *file_path=NULL;
    file_path = (char*)malloc((i+9)*sizeof(char));
    strcpy(file_path,current_path);
    strcat(file_path,"data.xml");
    rapidxml::file<> f(file_path);
    #else
    rapidxml::file<> f("data.xml");
    #endif
    //printf("Ok till this point");
    doc.parse<0>(f.data());
    node = doc.first_node("passages");
    totalp=total_psg();
    //printf("%d",totalp);

    srand (time(NULL));
    populate_psg((int)(rand() % totalp));


    //printf("PID = %s\n",get_attr_value(pid,"val"));
    //printf("P_DATA = %s\n",get_attr_value(data,"txt"));



    enable_timer=1;
    Fl::add_timeout(1, Timer_CB);              // setup a timer
    window->end ();
    window->show (argc, argv);

    return(Fl::run());
    return 0;
}
Ejemplo n.º 20
0
ModelerUserInterface::ModelerUserInterface() {
	// Make this instance the current one
	instance = this;

	// Initialize pointers to NULL
	m_nativeChooser = NULL;
	model = NULL;
	currentGroup = NULL;

	// Set appearance to GTK+ for a nice look
	Fl::scheme("gtk+");

	// Set the animation speed to 24 frames/second
	framesPerSecond = 24;

	// We're not animating yet.
	animating = false;

	// Set the color scheme
	Fl::set_color(FL_BACKGROUND_COLOR, 240, 240, 240);
	Fl::set_color(FL_BACKGROUND2_COLOR, 255, 255, 255);
	Fl::set_color(FL_FOREGROUND_COLOR, 0, 0, 0);
	Fl::set_color(FL_INACTIVE_COLOR, 128, 128, 128);
	Fl::set_color(FL_SELECTION_COLOR, 51, 153, 255);

	// Create all of the UI elements
	// (autogenerated by FLUID, the FLTK UI Designer)
	Fl_Double_Window* w;
	//const char* title = "CSEP457 Modeler";
	const char* title = "CSEP557 Modeler";
	{ Fl_Double_Window* o = m_controlsWindow = new Fl_Double_Window(800, 625, title);
		w = o;
		o->callback((Fl_Callback*)cb_m_controlsWindow, (void*)(this));
		o->when(FL_WHEN_NEVER);
		{ Fl_Menu_Bar* o = m_controlsMenuBar = new Fl_Menu_Bar(0, 0, 800, 25);
		  o->menu(menu_m_controlsMenuBar);
		}

		// Contains the controls on the left
		{ leftPane = new Fl_Group(0, 25, 250, 600);
			int tabSpace = -25, controlSpace = 0;
				{ Fl_Tile* o = m_controlSplitPane = new Fl_Tile(0, 50 + tabSpace, 250, 575 - tabSpace);
					o->box(FL_FLAT_BOX);
					{ Fl_Tree* o = m_controlsTree = new Fl_Tree(0, 50 + tabSpace, 250, 100);
					  o->when(FL_WHEN_CHANGED);
					  o->callback((Fl_Callback*)TreeCallback);
					  o->marginleft(-5);
					  o->end();
					}
					{ Fl_Scroll* o = m_controlsScroll =
						new Fl_Scroll(0, 150 + tabSpace, 250, 475 - tabSpace - controlSpace);
					  o->type(Fl_Scroll::VERTICAL);
					  o->when(FL_WHEN_CHANGED);
					  { Fl_Pack* o = m_controlsPack =
						  new Fl_Pack(10, 150 + tabSpace, 215, 475 - tabSpace - controlSpace);
						Fl_Group::current()->resizable(o);
						o->spacing(2);
						o->end();
					  }
					  o->end();
					}
					o->end();
				} // end Modeler group/tab
			leftPane->end();
		} // left pane
		{ // TODO: remove this extra brace!
			{ Fl_Group* o = m_viewPane = new Fl_Group(250, 25, 550, 600);
				o->box(FL_NO_BOX);
				o->color(FL_BACKGROUND_COLOR);
				m_modelerView = new ModelerView(250, 25, 550, 600, "");
				w->resizable(m_modelerView);
				o->end();
				Fl_Group::current()->resizable(o);
			}
		}
		o->end();
	}
}
int main( int argc, char **argv )
{
  //FL_NORMAL_SIZE = 12;
  Fl_Double_Window *win = new Fl_Double_Window( 500, 460, "Flu_Tree_Browser_Try" );

  tree = new Flu_Tree_Browser( 200, 0, 300, 460 );
  tree->box( FL_DOWN_BOX );
  tree->allow_dnd( true );
  //tree->when( FL_WHEN_RELEASE );
  tree->callback( tree_callback );
  //tree->color( FL_GRAY );

  Fl_Group *g = new Fl_Group( 0, 0, 200, 460 );
  g->resizable( NULL );

  showConnectors = new Fl_Check_Button( 10, 10, 140, 20, "Show Connectors" );
  showConnectors->value( tree->show_connectors() );
  showConnectors->callback( callback, 0 );

  showRoot = new Fl_Check_Button( 10, 30, 100, 20, "Show Root" );
  showRoot->value( tree->show_root() );
  showRoot->callback( callback, 0 );

  rootAlwaysOpen = new Fl_Check_Button( 10, 50, 140, 20, "Root Always Open" );
  rootAlwaysOpen->value( tree->get_root()->always_open() );
  rootAlwaysOpen->callback( callback, 0 );

  showLeaves = new Fl_Check_Button( 10, 70, 110, 20, "Show Leaves" );
  showLeaves->value( tree->show_leaves() );
  showLeaves->callback( callback, 0 );

  showBranches = new Fl_Check_Button( 10, 90, 120, 20, "Show Branches" );
  showBranches->value( tree->show_branches() );
  showBranches->callback( callback, 0 );

  openOnSelect = new Fl_Check_Button( 10, 110, 130, 20, "Open On Select" );
  openOnSelect->value( tree->open_on_select() );
  openOnSelect->callback( callback, 0 );

  active = new Fl_Check_Button( 10, 130, 100, 20, "Active" );
  active->value( tree->active() );
  active->callback( callback, 0 );

  animate = new Fl_Check_Button( 10, 150, 100, 20, "Animate" );
  animate->value( tree->animate() );
  animate->callback( callback, 0 );

  collapseTime = new Fl_Float_Input( 55, 170, 50, 20, "Time" );
  {
    char buf[32]; sprintf( buf, "%.2f", tree->collapse_time() );
    collapseTime->value( buf );
  }
  collapseTime->callback( callback, 0 );
  collapseTime->deactivate();

  frameRate = new Fl_Float_Input( 140, 170, 50, 20, "FPS" );
  {
    char buf[32]; sprintf( buf, "%.2f", tree->frame_rate() );
    frameRate->value( buf );
  }
  frameRate->callback( callback, 0 );
  frameRate->deactivate();

  shaded = new Fl_Check_Button( 10, 190, 130, 20, "Shaded Entries" );
  shaded->value( 0 );
  shaded->callback( callback, 0 );

  shadedEvenColor = new Fl_Button( 70, 210, 20, 20, "Even" );
  shadedEvenColor->align( FL_ALIGN_LEFT );
  shadedEvenColor->color( FL_LIGHT2 );
  shadedEvenColor->callback( shadedColorCB );
  shadedEvenColor->deactivate();

  shadedOddColor = new Fl_Button( 150, 210, 20, 20, "Odd" );
  shadedOddColor->align( FL_ALIGN_LEFT );
  shadedOddColor->color( FL_WHITE );
  shadedOddColor->callback( shadedColorCB );
  shadedOddColor->deactivate();

  selectionMode = new Fl_Choice( 110, 235, 85, 25, "Selection Mode" );
  selectionMode->add( "NO_SELECT" );
  selectionMode->add( "SINGLE_SELECT" );
  selectionMode->add( "MULTI_SELECT" );
  selectionMode->value( 2 );
  selectionMode->callback( mode_callback, 0 );

  selectionDragMode = new Fl_Choice( 110, 265, 85, 25, "Selection Drag" );
  selectionDragMode->add( "DRAG_IGNORE" );
  selectionDragMode->add( "DRAG_TO_SELECT" );
  if( tree->have_dnd() )
    selectionDragMode->add( "DRAG_TO_MOVE" );
  selectionDragMode->value( 1 );
  selectionDragMode->callback( mode_callback, 0 );

  insertionMode = new Fl_Choice( 110, 295, 85, 25, "Insertion Mode" );
  insertionMode->add( "INSERT_FRONT" );
  insertionMode->add( "INSERT_BACK" );
  insertionMode->add( "INSERT_SORTED" );
  insertionMode->add( "INSERT_SORTED_REVERSE" );
  insertionMode->value( 2 );
  insertionMode->callback( mode_callback, 0 );

  hGap = new Fl_Counter( 105, 325, 90, 20, "Horizontal Gap" );
  hGap->type( FL_SIMPLE_COUNTER );
  hGap->align( FL_ALIGN_LEFT );
  hGap->precision( 0 );
  hGap->range( 0, 20 );
  hGap->value( tree->horizontal_gap() );
  hGap->callback( callback, 0 );

  vGap = new Fl_Counter( 105, 350, 90, 20, "Vertical Gap" );
  vGap->type( FL_SIMPLE_COUNTER );
  vGap->align( FL_ALIGN_LEFT );
  vGap->precision( 0 );
  vGap->range( 0, 20 );
  vGap->value( tree->vertical_gap() );
  vGap->callback( callback, 0 );

  wGap = new Fl_Counter( 105, 375, 90, 20, "Widget Gap" );
  wGap->type( FL_SIMPLE_COUNTER );
  wGap->align( FL_ALIGN_LEFT );
  wGap->precision( 0 );
  wGap->range( 0, 20 );
  wGap->value( tree->widget_gap() );
  wGap->callback( callback, 0 );

  if( tree->have_dnd() )
    newNode = new Fl_Input( 50, 400, 50, 20, "New" );

  rebuildTree = new Fl_Button( 10, 405, 120, 20, "Rebuild Tree" );
  rebuildTree->callback( rebuildTreeCB, NULL );

  deleteNode = new Fl_Button( 10, 430, 120, 20, "Delete Selected" );
  deleteNode->callback( deleteNodeCB, NULL );

  g->end();

  win->end();
  win->resizable( tree );
  win->show( argc, argv );

  makeTree();

  //Fl::dnd_text_ops( 1 );

  printf( "sizeof(Flu_Tree_Browser::Node): %d\n", sizeof(Flu_Tree_Browser::Node) );

  return( Fl::run() );
}
Ejemplo n.º 22
0
//heres the money.....
int main(int argc, char* argv[])
{
    
    //make the frame
    Fl_Double_Window *w = new Fl_Double_Window( 820, 460, "uMS" );
    w->size_range(DEFAULT_WIDTH,DEFAULT_HEIGHT);
    
    //OK - lets build a whole set of panes
    std::string sWho;
    {
        //note scoping
        Fl_Preferences app( Fl_Preferences::USER, "MOOS", "uMS" );
        char Space[2048];
        app.get("Communities",Space,"Unnamed:9000@LOCALHOST",sizeof(Space));
        sWho = std::string(Space);
    }
    
    Fl_Tabs* pTab = new Fl_Tabs(10, 10, 800, 400);
    
    while(!sWho.empty())
    {
        std::string sChunk = MOOSChomp(sWho,",");
        std::string sName = MOOSChomp(sChunk,":");
        int nPort = atoi(MOOSChomp(sChunk,"@").c_str());
        std::string sHost = sChunk;
        if(!sChunk.empty() && nPort>0)
        {
            Fl_Group *pG  = MakeCommunityPane(10,30,800,390,(char*)sName.c_str());
            CScopeTabPane * pTabPane = (CScopeTabPane*)(pG);
            pTabPane->SetMOOSInfo(sHost,nPort);
            Fl_Group::current()->resizable(pG);
        }
    }
    if(pTab->children()==0)
    {
        MakeCommunityPane(10,30,800,390,"Unnamed");
    }
    
    w->end();
    
    
    //and add some buttons to control them....
    w->begin();
    {
        //add
        Fl_Button * pNewCommunityButton = new Fl_Button(10,420,160,30,"Add Community");
        pNewCommunityButton->callback(OnAddCommunity,pTab);
        
        //delete
        Fl_Button * pDelCommunityButton = new Fl_Button(180,420,160,30,"Remove Community");
        pDelCommunityButton->callback(OnRemoveCommunity,pTab);
        
        //save
        Fl_Button * pSaveButton = new Fl_Button(350,420,160,30,"Save Layout");
        pSaveButton->callback(OnSave,pTab);
        pSaveButton->callback();
        
        //rename
        Fl_Button * pRenameButton = new Fl_Button(520,420,160,30,"Rename");
        pRenameButton->callback(OnRenameCommunity,pTab);
        pRenameButton->callback();
        
    }
    w->end();
    
    
    //need to do more work on resizing       - maybe even read the manual
    w->resizable(pTab);
    
    
    //and GO!
    w->show(argc, argv);
    return Fl::run();
    
}
Ejemplo n.º 23
0
Fl_Double_Window* make_window() {
  Fl_Double_Window* w;
   {Fl_Double_Window* o = new Fl_Double_Window(560, 489);
    w = o;
    o->type(241);
     {Fl_Box* o = imbox = new Fl_Box(5, 30, 385, 455);
      o->box(FL_ENGRAVED_BOX);
      o->align(FL_ALIGN_CLIP);
      Fl_Group::current()->resizable(o);
    }
     {Fl_Box* o = filename_box = new Fl_Box(5, 5, 385, 20, "No file loaded...");
      o->box(FL_THIN_DOWN_BOX);
      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
    }
     {Fl_Group* o = new Fl_Group(395, 5, 160, 480);
      o->box(FL_THIN_DOWN_BOX);
       {Fl_Button* o = new Fl_Button(10, 10, 140, 25, "Load File");
        o->box(FL_THIN_UP_BOX);
        o->callback((Fl_Callback*)cb_Load);
      }
       {Fl_Button* o = new Fl_Button(10, 40, 140, 25, "Exit");
        o->box(FL_THIN_UP_BOX);
        o->callback((Fl_Callback*)cb_Exit);
      }
      new Fl_Divider(10, 75, 140, 15, "label");
       {Fl_Button* o = new Fl_Button(10, 100, 140, 25, "Fit To Box");
        o->type(Fl_Button::TOGGLE);
        o->box(FL_THIN_UP_BOX);
        o->callback((Fl_Callback*)cb_Fit);
      }
       {Fl_Button* o = new Fl_Button(10, 130, 140, 25, "Tile");
        o->type(Fl_Button::TOGGLE);
        o->box(FL_THIN_UP_BOX);
        o->callback((Fl_Callback*)cb_Tile);
      }
       {Fl_Choice* o = filter_choice = new Fl_Choice(10, 335, 140, 25, "Filter:"); o->begin();
        o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
        o->tooltip("Choose filter");
         {Fl_Item* o = new Fl_Item("None");
          o->user_data((void*)(0));
        }
         {Fl_Item* o = new Fl_Item("Brightness");
          o->user_data((void*)(FILTER_BRIGHTNESS));
        }
         {Fl_Item* o = new Fl_Item("Contrast");
          o->user_data((void*)(FILTER_CONTRAST));
        }
         {Fl_Item* o = new Fl_Item("Grayscale");
          o->user_data((void*)(FILTER_GRAYSCALE));
        }
         {Fl_Item* o = new Fl_Item("Gamma");
          o->user_data((void*)(FILTER_GAMMA));
        }
         {Fl_Item* o = new Fl_Item("Fore Blend");
          o->user_data((void*)(FILTER_FOREBLEND));
        }
         {Fl_Item* o = new Fl_Item("Back Blend");
          o->user_data((void*)(FILTER_BACKBLEND));
        }
        o->end();
      }
       {Fl_Box* o = new Fl_Box(10, 160, 140, 160);
        o->parent()->resizable(o);
      }
       {Fl_Value_Slider* o = Rslider = new Fl_Value_Slider(25, 380, 125, 15, "R");
        o->type(Fl_Value_Slider::HORIZONTAL);
        o->label_size(10);
        o->text_size(10);
        o->minimum(-3);
        o->maximum(3);
        o->value(1);
        o->slider_size(5);
        o->align(FL_ALIGN_LEFT);
        o->tooltip("Red value for filter");
      }
       {Fl_Value_Slider* o = Gslider = new Fl_Value_Slider(25, 400, 125, 15, "G");
        o->type(Fl_Value_Slider::HORIZONTAL);
        o->label_size(10);
        o->text_size(10);
        o->minimum(-3);
        o->maximum(3);
        o->value(1);
        o->slider_size(5);
        o->align(FL_ALIGN_LEFT);
        o->tooltip("Green value for filter");
      }
       {Fl_Value_Slider* o = Bslider = new Fl_Value_Slider(25, 420, 125, 15, "B");
        o->type(Fl_Value_Slider::HORIZONTAL);
        o->label_size(10);
        o->text_size(10);
        o->minimum(-3);
        o->maximum(3);
        o->value(1);
        o->slider_size(5);
        o->align(FL_ALIGN_LEFT);
        o->tooltip("Blue value for filter");
      }
       {Fl_Button* o = new Fl_Button(10, 445, 140, 25, "Apply");
        o->box(FL_THIN_UP_BOX);
        o->callback((Fl_Callback*)cb_Apply);
        o->tooltip("Apply current selected filter");
      }
       {Fl_Check_Button* o = lock = new Fl_Check_Button(10, 365, 140, 15, "Lock sliders");
        o->label_size(10);
        o->callback((Fl_Callback*)cb_lock);
        o->tooltip("Lock slider, RGB values taken from R slider ");
      }
      o->end();
    }
    o->end();
  }
  return  w;
}
Ejemplo n.º 24
0
int
main ( int argc, char **argv )
{
    bool no_ui = false;

    fl_display = 0;

    printf( "%s %s %s -- %s\n", APP_TITLE, VERSION, "", COPYRIGHT );

    Thread::init();

    Thread thread( "UI" );
    thread.set();

    ensure_dirs();

    signal( SIGTERM, sigterm_handler );
    signal( SIGHUP, sigterm_handler );
    signal( SIGINT, sigterm_handler );

    Fl_Tooltip::color( FL_BLACK );
    Fl_Tooltip::textcolor( FL_YELLOW );
    Fl_Tooltip::size( 14 );
    Fl_Tooltip::hoverdelay( 0.1f );


    LOG_REGISTER_CREATE( Mixer_Strip );
    LOG_REGISTER_CREATE( Chain );
    LOG_REGISTER_CREATE( Plugin_Module );
    LOG_REGISTER_CREATE( Gain_Module );
    LOG_REGISTER_CREATE( Spatializer_Module );
    LOG_REGISTER_CREATE( Meter_Module );
    LOG_REGISTER_CREATE( JACK_Module );
    LOG_REGISTER_CREATE( Mono_Pan_Module );
    LOG_REGISTER_CREATE( Meter_Indicator_Module );
    LOG_REGISTER_CREATE( Controller_Module );
    LOG_REGISTER_CREATE( AUX_Module );
    LOG_REGISTER_CREATE( Spatialization_Console );
    LOG_REGISTER_CREATE( Group );

    signal( SIGPIPE, SIG_IGN );


    const char *osc_port = NULL;

    nsm = new NSM_Client;

    instance_name = strdup( APP_NAME );
    bool instance_override = false;

    static struct option long_options[] = 
        {
            { "help", no_argument, 0, '?' },
            { "instance", required_argument, 0, 'i' },
            { "osc-port", required_argument, 0, 'p' },
            { "no-ui", no_argument, 0, 'u' },
            { 0, 0, 0, 0 }
        };

    int option_index = 0;
    int c = 0;
    

    while ( ( c = getopt_long_only( argc, argv, "", long_options, &option_index  ) ) != -1 )
    {
        switch ( c )
        {
            case 'p':
                DMESSAGE( "Using OSC port %s", optarg );
                osc_port = optarg;
                break;
            case 'i':
                DMESSAGE( "Using OSC port %s", optarg );
                free( instance_name );
                instance_name = strdup( optarg );
                instance_override = true;
                break;
            case 'u':
                DMESSAGE( "Disabling user interface" );
                no_ui = true;
                break;
            case '?':
                printf( "\nUsage: %s [--instance instance_name] [--osc-port portnum] [path_to_project]\n\n", argv[0] );
                exit(0);
                break;
        }
    }

    {
        char *name = strdup( argv[0] );
        char *n = basename( name );

        if ( ! strcmp( n, "non-mixer-noui" ) )
            no_ui = true;
        
        free( name );
    }

    if ( ! no_ui )
    {
        Fl::visual( FL_DOUBLE | FL_RGB );
        
        Fl::visible_focus( 0 );

        fl_register_images();
    }

    Fl::lock();

    Fl_Double_Window *main_window;

    
    {
        Fl_Double_Window *o = main_window = new Fl_Double_Window( 800, 600, "Non Mixer" );
        {
            main_window->xclass( APP_NAME );

            { 
                Fl_Widget *o = mixer = new Mixer( 0, 0, main_window->w(), main_window->h(), NULL );
                Fl_Group::current()->resizable(o);
            }
        }
        o->end();

        o->size_range( main_window->w(), mixer->min_h(), 0, 0 );

        o->callback( (Fl_Callback*)cb_main, main_window );

        if ( ! no_ui )
        {
            o->show( 0,0 );
        }
                      
    }

    Plugin_Module::spawn_discover_thread();

    mixer->init_osc( osc_port );

    char *nsm_url = getenv( "NSM_URL" );
        
    if ( nsm_url )
    {
        if ( ! nsm->init( nsm_url ) )
        {
            if ( instance_override )
                WARNING( "--instance option is not available when running under session management, ignoring." );
                
            if ( optind < argc )
                WARNING( "Loading files from the command-line is incompatible with session management, ignoring." );

            nsm->announce( APP_NAME, ":switch:dirty:", argv[0] );

            /* if ( ! no_ui ) */
            /* { */
                // poll so we can keep OSC handlers running in the GUI thread and avoid extra sync
                Fl::add_timeout( NSM_CHECK_INTERVAL, check_nsm, NULL );
            /* } */
        }
    }
    else
    {
        if ( optind < argc )
        {
            MESSAGE( "Waiting for plugins..." );
            Plugin_Module::join_discover_thread();

            MESSAGE( "Loading \"%s\"", argv[optind] );
                
            if ( ! mixer->command_load( argv[optind] ) )
            {
                fl_alert( "Error opening project specified on commandline" );
            }
        }
    }

    Fl::add_timeout( 0.1f, check_sigterm );
    Fl::dnd_text_ops( 0 );

    if ( ! no_ui )
    {
        DMESSAGE( "Running UI..." );

        Fl::run();
    }
    else
    {
        DMESSAGE( "Not Running UI..." );
        while ( ! got_sigterm )
        {
            Fl::check();
            usleep( 200 * 1000 );
        }
    }

    delete main_window;
    main_window = NULL;

    MESSAGE( "Your fun is over" );
}
Ejemplo n.º 25
0
Fl_Double_Window* UserInterface::make_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = m_mainWindow = new Fl_Double_Window(797, 595, "Mesh viewer");
    w = o;
    o->user_data((void*)(this));
    { Fl_Group* o = new Fl_Group(0, 22, 125, 506, "Camera controls");
      o->box(FL_ENGRAVED_BOX);
      { Fl_Slider* o = m_sldZoom = new Fl_Slider(16, 29, 95, 25, "Zoom");
        o->tooltip("Zoom camera in and out");
        o->type(1);
        o->minimum(0.0001);
        o->maximum(0.999);
        o->step(0.01);
        o->value(0.5);
        o->slider_size(0.040404);
        o->callback((Fl_Callback*)cb_m_sldZoom);
      }
      { Fl_Roller* o = m_rolRotAmt = new Fl_Roller(45, 333, 75, 20, "Rot. ");
        o->tooltip("Set rotation amount for key (j,k,i,m,r,R)");
        o->type(1);
        o->value(0.2);
        o->callback((Fl_Callback*)cb_m_rolRotAmt);
        o->align(FL_ALIGN_LEFT);
      }
      { Fl_Dial* o = m_dialSpin = new Fl_Dial(74, 91, 31, 30, "Spin");
        o->tooltip("Spin camera");
        o->step(0.05);
        o->callback((Fl_Callback*)cb_m_dialSpin);
      }
      { Fl_Adjuster* o = m_adjXTrans = new Fl_Adjuster(5, 223, 105, 17, "Move horiz");
        o->tooltip("Pan left/right");
        o->minimum(-5);
        o->maximum(5);
        o->callback((Fl_Callback*)cb_m_adjXTrans);
      }
      { Fl_Adjuster* o = m_adjYTrans = new Fl_Adjuster(5, 257, 105, 17, "Move vertical");
        o->tooltip("Camera up/down");
        o->minimum(-5);
        o->maximum(5);
        o->callback((Fl_Callback*)cb_m_adjYTrans);
      }
      { Fl_Adjuster* o = m_adjInOut = new Fl_Adjuster(5, 296, 105, 17, "In/Out");
        o->tooltip("Move camera in and out");
        o->minimum(-5);
        o->maximum(5);
        o->callback((Fl_Callback*)cb_m_adjInOut);
      }
      { Fl_Roller* o = m_rolTransAmt = new Fl_Roller(45, 358, 75, 15, "Trans.");
        o->tooltip("Change translation amount");
        o->type(1);
        o->maximum(10);
        o->value(0.1);
        o->callback((Fl_Callback*)cb_m_rolTransAmt);
        o->align(FL_ALIGN_LEFT);
      }
      { Fl_Button* o = new Fl_Button(24, 378, 65, 25, "Reset");
        o->tooltip("Reset camera");
        o->callback((Fl_Callback*)cb_Reset);
      }
      { Fl_Roller* o = m_rolUpDown = new Fl_Roller(15, 68, 20, 70, "Up/down");
        o->tooltip("Rotate the camera up/down");
        o->minimum(-1);
        o->step(0.01);
        o->callback((Fl_Callback*)cb_m_rolUpDown);
      }
      { Fl_Roller* o = m_rolLeftRight = new Fl_Roller(16, 158, 85, 20, "Rot left/rignt");
        o->tooltip("Rotate left to right");
        o->type(1);
        o->minimum(-1);
        o->step(0.01);
        o->callback((Fl_Callback*)cb_m_rolLeftRight);
      }
      { Fl_Button* o = new Fl_Button(5, 194, 35, 25, "Zero");
        o->tooltip("Zero trans sliders");
        o->callback((Fl_Callback*)cb_Zero);
      }
      { Fl_Check_Button* o = new Fl_Check_Button(0, 462, 20, 25, "IBar");
        o->down_box(FL_DOWN_BOX);
        o->value(1);
        o->callback((Fl_Callback*)cb_IBar);
      }
      { Fl_Check_Button* o = new Fl_Check_Button(0, 483, 25, 20, "Center obj");
        o->down_box(FL_DOWN_BOX);
        o->callback((Fl_Callback*)cb_Center);
      }
      o->end();
    }
    { JofGTIBar* o = m_view = new JofGTIBar(135, 3, 560, 557);
      Fl_Group::current()->resizable(o);
    }
    o->end();
  }
  return w;
}
Ejemplo n.º 26
0
parameter_window::parameter_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = param_window = new Fl_Double_Window(391, 105, "Open Slice Parameter");
    w = o;
    o->user_data((void*)(this));
    { Fl_Value_Input* o = width = new Fl_Value_Input(55, 10, 50, 25, "X size :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(1000);
      o->value(512);
      o->when(FL_WHEN_RELEASE);
    }
    { Fl_Value_Input* o = height = new Fl_Value_Input(55, 40, 50, 25, "Y size :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(1000);
      o->value(512);
    }
    { Fl_Value_Input* o = depth = new Fl_Value_Input(55, 70, 50, 25, "Z size :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(1000);
      o->value(400);
    }
    { Fl_Value_Input* o = sizeX = new Fl_Value_Input(170, 10, 50, 25, "Real X :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(100);
      o->value(0.625);
    }
    { Fl_Value_Input* o = sizeY = new Fl_Value_Input(170, 40, 50, 25, "Real Y :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(100);
      o->value(0.625);
    }
    { Fl_Value_Input* o = sizeZ = new Fl_Value_Input(170, 70, 50, 25, "Real Z :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->maximum(100);
      o->value(1);
    }
    { Fl_Value_Input* o = offset = new Fl_Value_Input(315, 10, 65, 25, "CT offset :");
      o->labeltype(FL_ENGRAVED_LABEL);
      o->labelfont(8);
      o->minimum(-2000);
      o->maximum(7999);
    }
    { Fl_Return_Button* o = OK = new Fl_Return_Button(235, 60, 70, 35, "OK");
      o->labelsize(16);
      o->callback((Fl_Callback*)cb_OK);
    }
    { Fl_Button* o = Cancel = new Fl_Button(310, 60, 70, 35, "Cancel");
      o->labelsize(16);
      o->callback((Fl_Callback*)cb_Cancel);
    }
    o->set_modal();
    o->end();
  }
  val = -1;
}
ModelerUserInterface::ModelerUserInterface() {
	// Make this instance the current one
	instance = this;

	// Initialize pointers to NULL
	m_nativeChooser = NULL;
	model = NULL;
	currentGroup = NULL;
	renderGroup = NULL;
	defaultCam = NULL;
	ps = NULL;
	movieWidth = 720;
	movieHeight = 480;

	// Set appearance to GTK+ for a nice look
	Fl::scheme("gtk+");

	// Set the animation speed to 24 frames/second
	framesPerSecond = 24;

	// We're not animating yet.
	animating = false;
	simulating = false;
	rendering = false;
	drawing = false;

	// Set the color scheme
	Fl::set_color(FL_BACKGROUND_COLOR, 240, 240, 240);
	Fl::set_color(FL_BACKGROUND2_COLOR, 255, 255, 255);
	Fl::set_color(FL_FOREGROUND_COLOR, 0, 0, 0);
	Fl::set_color(FL_INACTIVE_COLOR, 128, 128, 128);
	Fl::set_color(FL_SELECTION_COLOR, 51, 153, 255);

	// Create all of the UI elements
	// (autogenerated by FLUID, the FLTK UI Designer)
	Fl_Double_Window* w;
	const char* title = "Animator";
	{ Fl_Double_Window* o = m_controlsWindow = new Fl_Double_Window(800, 625, title);
		w = o;
		o->callback((Fl_Callback*)cb_m_controlsWindow, (void*)(this));
		o->when(FL_WHEN_NEVER);
		{ Fl_Menu_Bar* o = m_controlsMenuBar = new Fl_Menu_Bar(0, 0, 800, 25);
		  o->menu(menu_m_controlsMenuBar);
		}

		// Contains the controls on the left
		{ leftPane = new Fl_Group(0, 25, 250, 600);
			int tabSpace = 0, controlSpace = 0;
			int controlTop = 25 + 600 - controlSpace;

			// Modeler and Curves tabs
			{ Fl_Tabs* t = new Fl_Tabs(0, 25, 250, 600 - controlSpace);
				// Make the tab area stretch.
				leftPane->resizable(t);
				t->when(FL_WHEN_CHANGED);
				t->callback((Fl_Callback*)TabsCallback, this);
				// Curves tab
				{ Fl_Group* o = new Fl_Group(0, 50, 250, 575 - controlSpace, "Curves");
					o->box(FL_FLAT_BOX);
					o->color(FL_BACKGROUND_COLOR);
					{ Fl_Tree* o = curvesTree = new Fl_Tree(0, 50, 250, 575 - controlSpace);
					  o->when(FL_WHEN_CHANGED);
					  o->callback((Fl_Callback*)CurveTreeCallback);
					  o->marginleft(-5);
					  o->end();
					}
					o->end();
				}

				// Modeler tab
				{ Fl_Tile* o = m_controlSplitPane =
					new Fl_Tile(0, 50 + tabSpace, 250, 575 + tabSpace - controlSpace, "Modeler");
					// Make only the content area of the tabs resize.
					t->resizable(o);
					o->box(FL_FLAT_BOX);
					{ Fl_Tree* o = m_controlsTree = new Fl_Tree(0, 50 + tabSpace, 250, 100);
					  o->when(FL_WHEN_CHANGED);
					  o->callback((Fl_Callback*)TreeCallback);
					  o->marginleft(-5);
					  o->end();
					}
					{ Fl_Scroll* o = m_controlsScroll =
						new Fl_Scroll(0, 150 + tabSpace, 250, 475 - tabSpace - controlSpace);
					  o->type(Fl_Scroll::VERTICAL);
					  o->when(FL_WHEN_CHANGED);
					  { Fl_Pack* o = m_controlsPack =
						  new Fl_Pack(10, 150 + tabSpace, 215, 475 - tabSpace - controlSpace);
						Fl_Group::current()->resizable(o);
						o->spacing(2);
						o->end();
					  }
					  o->end();
					}
					o->end();
				} // end Modeler group/tab
				t->end();
			} // end tabs
			leftPane->end();
		} // left pane
		{ // TODO: remove this extra brace!
			{ Fl_Group* o = m_viewPane = new Special_Tile(250, 25, 550, 600);
				o->box(FL_NO_BOX);
				o->color(FL_BACKGROUND_COLOR);
				// show a smaller modeler view
				m_modelerView = new ModelerView(250, 25, 550, 350, "");
				m_modelerView->resizable();
				// show a curve window with animation controls underneath
				{ curvePane = new Fl_Group(250, 375, 550, 250);
					

					// Row containing the curve options
					{ Fl_Group* o = new Fl_Group(255, 380, 540, 20, "Curve Editor");
						// Put particle system label inside
						o->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
						o->labelfont(FL_HELVETICA_BOLD);

						// Curve type chooser
						chooserCurveType = new Fl_Choice(445, 380, 120, 20, "Curve Type: ");
						chooserCurveType->menu(curveTypeMenu);
						chooserCurveType->callback((Fl_Callback*)chooserCurveTypeCallback, this);
						chooserCurveType->deactivate();

						// Wrap checkbox
						checkboxWrap = new Fl_Check_Button(570, 380, 60, 20, "Wrap");
						checkboxWrap->callback((Fl_Callback*)checkboxWrapCallback, this);
						checkboxWrap->deactivate();

						// Zoom All button
						buttonZoomAll = new Fl_Button(640, 380, 80, 20, "Zoom All");
						buttonZoomAll->callback((Fl_Callback*)buttonZoomAllCallback, this);
						buttonZoomAll->deactivate();

						// No resizing
						o->resizable(NULL);

						o->end();
					}

					// The graph widget
					graph = new GraphWidget(255, 405, 540, 140);
					graph->callback((Fl_Callback*)graphCallback, this);
					curvePane->resizable(graph); // stretch the graph on resize

					// Camera buttons
					{ cameraPane = new Fl_Group(255, 550, 540, 20, "Camera");
						// Put camera label inside
						cameraPane->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
						cameraPane->labelfont(FL_HELVETICA_BOLD);

						// Prevent internal widgets from resizing when the group is resized.
						cameraPane->resizable(NULL);

						// Use Camera button
						checkboxUseCamera = new Fl_Check_Button(315, 550, 165, 20, "Look Through Camera");
						checkboxUseCamera->callback((Fl_Callback*)checkboxUseCameraCallback);

						// Plot Camera checkbox
						Fl_Button* buttonPlotCamera = new Fl_Button(485, 550, 120, 20, "Plot Keyframe");
						buttonPlotCamera->callback((Fl_Callback*)buttonPlotCameraCallback);

						// Clear Plot button
						Fl_Button* buttonClearPlot = new Fl_Button(610, 550, 120, 20, "Clear Keyframe");
						buttonClearPlot->callback((Fl_Callback*)buttonClearCameraCallback);
						
						// End this group
						cameraPane->end();
					}

					// Particle system buttons
					{ particlePane = new Fl_Group(255, 575, 540, 20, "Particle System");
						// Put particle system label inside
						particlePane->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
						particlePane->labelfont(FL_HELVETICA_BOLD);

						// Simulate button
						checkboxSimulate = new Fl_Check_Button(375, 575, 75, 20, "Simulate");
						checkboxSimulate->callback((Fl_Callback*)checkboxSimulateCallback);

						// Clear Particles button
						buttonClearParticles = new Fl_Button(455, 575, 50, 20, "Clear");
						buttonClearParticles->callback((Fl_Callback*)buttonClearParticlesCallback);

						// Particle "bake" indicator
						particleBakeIndicator = new IndicatorWindow(510, 575, 285, 20);
						// TODO: fix this:
						particleBakeIndicator->range(0, 20);
						particleBakeIndicator->deactivate();
						particlePane->resizable(particleBakeIndicator);

						// End this group
						particlePane->end();
					}

					// The playback controls
					{ Fl_Group* o = new Fl_Group(255, 600, 540, 20, "Playback");
						// Put particle system label inside
						o->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
						o->labelfont(FL_HELVETICA_BOLD);

						// Rewind button
						Fl_Button* rewind = new Fl_Button(335, 600, 20, 20, "@|<");
						rewind->labeltype(FL_SYMBOL_LABEL);
						rewind->callback((Fl_Callback*)buttonRewindCallback, this);

						// Play button
						buttonPlay = new Fl_Button(360, 600, 20, 20, "@>");
						buttonPlay->labeltype(FL_SYMBOL_LABEL);
						buttonPlay->callback((Fl_Callback*)buttonPlayCallback, this);
						buttonPlay->labelcolor(FL_GREEN);

						// Fast Forward button
						Fl_Button* fastForward = new Fl_Button(385, 600, 20, 20, "@>|");
						fastForward->labeltype(FL_SYMBOL_LABEL);
						fastForward->callback((Fl_Callback*)buttonFastForwardCallback, this);

						// Time slider
						sliderTime = new Fl_Value_Slider(455, 600, 340, 20, "Time:");
						sliderTime->type(FL_HORIZONTAL);
						sliderTime->align(FL_ALIGN_LEFT);
						sliderTime->callback((Fl_Callback*)sliderTimeCallback, this);
						sliderTime->bounds(0, 20);

						// Stretch the time slider on resize
						o->resizable(sliderTime);
						o->end();
					}
					curvePane->end();
				}
				w->resizable(m_modelerView);
				o->end();
				Fl_Group::current()->resizable(o);
			}
		}
		o->end();
	}
}