void DelayGUI::CreateGUI(int xoff, int yoff, char *name)
{
	 Fl_Group* o = GUIDelayGroup = new Fl_Group(xoff, yoff, 300, 60, name);
      o->type(1);
	  o->color(GUIBG2_COLOUR);
	  o->box(FL_UP_BOX);
      o->labeltype(FL_ENGRAVED_LABEL);
      o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
	  o->user_data((void*)(this));
       	  
	  DelayA = new Fl_Knob(xoff+50, yoff+5, 40, 40, "Delay");
	  DelayA->color(GUI_COLOUR);
      DelayA->labelsize(10);
	  DelayA->maximum(1);
      DelayA->step(0.01);
      DelayA->value(0.5);
      DelayA->callback((Fl_Callback*)cb_Delay);
	  
	  Feedback = new Fl_Knob(xoff+100, yoff+5, 40, 40, "Feedback");
	  Feedback->color(GUI_COLOUR);
      Feedback->labelsize(10);
	  Feedback->maximum(1.0);
      Feedback->step(0.01);
      Feedback->value(0.5);
      Feedback->callback((Fl_Callback*)cb_Feedback);
	  
	  Bypass = new Fl_Button(xoff+5, yoff+25, 40, 20, "Bypass");
	  Bypass->color(GUIBG2_COLOUR);
	  Bypass->labelsize(10);
	  Bypass->type(1);
	  Bypass->value(1);
	  Bypass->callback((Fl_Callback*)cb_Bypass);
	  
      o->end();
    
}
Example #2
0
Fl_Double_Window* SUBnoteUI::make_window() {
  { SUBparameters = new Fl_Double_Window(735, 390, "SUBsynth Parameters");
    SUBparameters->user_data((void*)(this));
    { Fl_Scroll* o = new Fl_Scroll(5, 140, 435, 245);
      o->type(1);
      o->box(FL_THIN_UP_BOX);
      { Fl_Pack* o = harmonics = new Fl_Pack(10, 145, 425, 235);
        harmonics->type(1);
        for (int i=0;i<MAX_SUB_HARMONICS;i++){h[i]=new SUBnoteharmonic(0,0,15,o->h(),"");h[i]->init(pars,i);}
        harmonics->end();
      } // Fl_Pack* harmonics
      o->end();
    } // Fl_Scroll* o
    { Fl_Button* o = new Fl_Button(625, 365, 105, 20, "Close");
      o->box(FL_THIN_UP_BOX);
      o->labelfont(1);
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_Close);
    } // Fl_Button* o
    { Fl_Group* o = new Fl_Group(5, 5, 215, 135, "AMPLITUDE");
      o->box(FL_THIN_UP_FRAME);
      o->labeltype(FL_EMBOSSED_LABEL);
      o->labelfont(1);
      o->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE);
      { Fl_Value_Slider* o = vol = new Fl_Value_Slider(10, 25, 140, 15, "Vol");
        vol->tooltip("Volume");
        vol->type(5);
        vol->box(FL_FLAT_BOX);
        vol->labelsize(11);
        vol->maximum(127);
        vol->step(1);
        vol->callback((Fl_Callback*)cb_vol);
        vol->align(FL_ALIGN_RIGHT);
        o->value(pars->PVolume);
      } // Fl_Value_Slider* vol
      { Fl_Value_Slider* o = vsns = new Fl_Value_Slider(10, 45, 140, 15, "V.Sns");
        vsns->tooltip("Velocity Sensing Function (rightmost to disable)");
        vsns->type(5);
        vsns->box(FL_FLAT_BOX);
        vsns->labelsize(11);
        vsns->maximum(127);
        vsns->step(1);
        vsns->callback((Fl_Callback*)cb_vsns);
        vsns->align(FL_ALIGN_RIGHT);
        o->value(pars->PAmpVelocityScaleFunction);
      } // Fl_Value_Slider* vsns
      { WidgetPDial* o = pan = new WidgetPDial(185, 20, 30, 30, "Pan");
        pan->tooltip("Panning (leftmost is Random)");
        pan->box(FL_ROUND_UP_BOX);
        pan->color(FL_BACKGROUND_COLOR);
        pan->selection_color(FL_INACTIVE_COLOR);
        pan->labeltype(FL_NORMAL_LABEL);
        pan->labelfont(0);
        pan->labelsize(10);
        pan->labelcolor(FL_FOREGROUND_COLOR);
        pan->maximum(127);
        pan->step(1);
        pan->callback((Fl_Callback*)cb_pan);
        pan->align(FL_ALIGN_BOTTOM);
        pan->when(FL_WHEN_CHANGED);
        o->value(pars->PPanning);
      } // WidgetPDial* pan
      { EnvelopeUI* o = ampenv = new EnvelopeUI(10, 65, 205, 70, "SUBsynth - Amplitude Envelope");
        ampenv->box(FL_FLAT_BOX);
        ampenv->color((Fl_Color)51);
        ampenv->selection_color(FL_BACKGROUND_COLOR);
        ampenv->labeltype(FL_NORMAL_LABEL);
        ampenv->labelfont(0);
        ampenv->labelsize(14);
        ampenv->labelcolor(FL_FOREGROUND_COLOR);
        ampenv->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE);
        ampenv->when(FL_WHEN_RELEASE);
        o->init(pars->AmpEnvelope,master);
        ampenv->end();
      } // EnvelopeUI* ampenv
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(495, 325, 235, 35);
      o->box(FL_THIN_UP_FRAME);
      { Fl_Counter* o = filterstages = new Fl_Counter(515, 340, 45, 15, "Filter Stages");
        filterstages->tooltip("How many times the noise is filtered");
        filterstages->type(1);
        filterstages->labelfont(1);
        filterstages->labelsize(10);
        filterstages->minimum(1);
        filterstages->maximum(5);
        filterstages->step(1);
        filterstages->textsize(10);
        filterstages->callback((Fl_Callback*)cb_filterstages);
        filterstages->align(FL_ALIGN_TOP);
        o->value(pars->Pnumstages);
      } // Fl_Counter* filterstages
      { Fl_Choice* o = magtype = new Fl_Choice(585, 340, 65, 15, "Mag.Type");
        magtype->down_box(FL_BORDER_BOX);
        magtype->labelfont(1);
        magtype->labelsize(10);
        magtype->textsize(11);
        magtype->callback((Fl_Callback*)cb_magtype);
        magtype->align(FL_ALIGN_TOP);
        magtype->menu(menu_magtype);
        o->value(pars->Phmagtype);
      } // Fl_Choice* magtype
      { Fl_Choice* o = start = new Fl_Choice(670, 340, 50, 15, "Start");
        start->down_box(FL_BORDER_BOX);
        start->labelfont(1);
        start->labelsize(10);
        start->textsize(11);
        start->callback((Fl_Callback*)cb_start);
        start->align(FL_ALIGN_TOP);
        start->menu(menu_start);
        o->value(pars->Pstart);
      } // Fl_Choice* start
      o->end();
    } // Fl_Group* o
    { freqsettingsui = new Fl_Group(440, 5, 290, 135, "FREQUENCY");
      freqsettingsui->box(FL_THIN_UP_FRAME);
      freqsettingsui->labeltype(FL_EMBOSSED_LABEL);
      freqsettingsui->labelfont(1);
      freqsettingsui->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE);
      { EnvelopeUI* o = freqenvelopegroup = new EnvelopeUI(445, 65, 205, 70, "SUBsynth - Frequency Envelope");
        freqenvelopegroup->box(FL_FLAT_BOX);
        freqenvelopegroup->color((Fl_Color)51);
        freqenvelopegroup->selection_color(FL_BACKGROUND_COLOR);
        freqenvelopegroup->labeltype(FL_NORMAL_LABEL);
        freqenvelopegroup->labelfont(0);
        freqenvelopegroup->labelsize(14);
        freqenvelopegroup->labelcolor(FL_FOREGROUND_COLOR);
        freqenvelopegroup->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE);
        freqenvelopegroup->when(FL_WHEN_RELEASE);
        o->init(pars->FreqEnvelope,master);
        if (pars->PFreqEnvelopeEnabled==0) o->deactivate();
        freqenvelopegroup->end();
      } // EnvelopeUI* freqenvelopegroup
      { Fl_Check_Button* o = freqee = new Fl_Check_Button(445, 68, 55, 15, "Enabled");
        freqee->down_box(FL_DOWN_BOX);
        freqee->labelfont(1);
        freqee->labelsize(10);
        freqee->callback((Fl_Callback*)cb_freqee);
        o->value(pars->PFreqEnvelopeEnabled);
      } // Fl_Check_Button* freqee
      { Fl_Counter* o = octave = new Fl_Counter(670, 50, 45, 15, "Octave");
        octave->tooltip("Octave");
        octave->type(1);
        octave->labelsize(10);
        octave->minimum(-8);
        octave->maximum(7);
        octave->step(1);
        octave->textfont(1);
        octave->textsize(11);
        octave->callback((Fl_Callback*)cb_octave);
        octave->align(FL_ALIGN_TOP);
        int k=pars->PCoarseDetune/1024;if (k>=8) k-=16;
        o->value(k);
      } // Fl_Counter* octave
      { Fl_Counter* o = coarsedet = new Fl_Counter(655, 115, 60, 20, "Coarse Det.");
        coarsedet->tooltip("Coarse Detune");
        coarsedet->labelsize(10);
        coarsedet->minimum(-64);
        coarsedet->maximum(63);
        coarsedet->step(1);
        coarsedet->textfont(1);
        coarsedet->textsize(11);
        coarsedet->callback((Fl_Callback*)cb_coarsedet);
        coarsedet->align(FL_ALIGN_TOP);
        int k=pars->PCoarseDetune%1024;if (k>=512) k-=1024;
        o->value(k);
        o->lstep(10);
      } // Fl_Counter* coarsedet
      { Fl_Slider* o = detune = new Fl_Slider(495, 25, 230, 15);
        detune->tooltip("Fine Detune (cents)");
        detune->type(5);
        detune->box(FL_FLAT_BOX);
        detune->minimum(-8192);
        detune->maximum(8191);
        detune->step(1);
        detune->callback((Fl_Callback*)cb_detune);
        o->value(pars->PDetune-8192);
      } // Fl_Slider* detune
      { Fl_Value_Output* o = detunevalueoutput = new Fl_Value_Output(448, 25, 45, 15, "Detune");
        detunevalueoutput->labelsize(10);
        detunevalueoutput->minimum(-5000);
        detunevalueoutput->maximum(5000);
        detunevalueoutput->step(0.01);
        detunevalueoutput->textfont(1);
        detunevalueoutput->textsize(10);
        detunevalueoutput->callback((Fl_Callback*)cb_detunevalueoutput);
        detunevalueoutput->align(FL_ALIGN_TOP_LEFT);
        o->value(getdetune(pars->PDetuneType,0,pars->PDetune));
      } // Fl_Value_Output* detunevalueoutput
      { Fl_Check_Button* o = hz440 = new Fl_Check_Button(555, 45, 50, 15, "440Hz");
        hz440->tooltip("set the base frequency to 440Hz");
        hz440->down_box(FL_DOWN_BOX);
        hz440->labelfont(1);
        hz440->labelsize(10);
        hz440->callback((Fl_Callback*)cb_hz440);
        o->value(pars->Pfixedfreq);
      } // Fl_Check_Button* hz440
      { WidgetPDial* o = fixedfreqetdial = new WidgetPDial(610, 45, 15, 15, "Eq.T.");
        fixedfreqetdial->tooltip("How the frequency varies acording to the keyboard (leftmost for fixed frequen\
cy)");
        fixedfreqetdial->box(FL_ROUND_UP_BOX);
        fixedfreqetdial->color(FL_BACKGROUND_COLOR);
        fixedfreqetdial->selection_color(FL_INACTIVE_COLOR);
        fixedfreqetdial->labeltype(FL_NORMAL_LABEL);
        fixedfreqetdial->labelfont(0);
        fixedfreqetdial->labelsize(10);
        fixedfreqetdial->labelcolor(FL_FOREGROUND_COLOR);
        fixedfreqetdial->maximum(127);
        fixedfreqetdial->step(1);
        fixedfreqetdial->callback((Fl_Callback*)cb_fixedfreqetdial);
        fixedfreqetdial->align(FL_ALIGN_RIGHT);
        fixedfreqetdial->when(FL_WHEN_CHANGED);
        o->value(pars->PfixedfreqET);
        if (pars->Pfixedfreq==0) o->deactivate();
      } // WidgetPDial* fixedfreqetdial
      { Fl_Choice* o = detunetype = new Fl_Choice(655, 85, 70, 15, "Detune Type");
        detunetype->down_box(FL_BORDER_BOX);
        detunetype->labelsize(10);
        detunetype->textfont(1);
        detunetype->textsize(10);
        detunetype->callback((Fl_Callback*)cb_detunetype);
        detunetype->align(FL_ALIGN_TOP_LEFT);
        o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");
        o->value(pars->PDetuneType-1);
      } // Fl_Choice* detunetype
      freqsettingsui->end();
    } // Fl_Group* freqsettingsui
    { Fl_Check_Button* o = stereo = new Fl_Check_Button(440, 325, 55, 35, "Stereo");
      stereo->box(FL_THIN_UP_BOX);
      stereo->down_box(FL_DOWN_BOX);
      stereo->labelfont(1);
      stereo->labelsize(10);
      stereo->callback((Fl_Callback*)cb_stereo);
      o->value(pars->Pstereo);
    } // Fl_Check_Button* stereo
    { Fl_Button* o = new Fl_Button(445, 365, 70, 20, "Clear");
      o->tooltip("Clear the harmonics");
      o->box(FL_THIN_UP_BOX);
      o->labelfont(1);
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_Clear);
    } // Fl_Button* o
    { bandwidthsettingsui = new Fl_Group(220, 5, 220, 135, "BANDWIDTH");
      bandwidthsettingsui->box(FL_THIN_UP_FRAME);
      bandwidthsettingsui->labeltype(FL_EMBOSSED_LABEL);
      bandwidthsettingsui->labelfont(1);
      bandwidthsettingsui->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE);
      { EnvelopeUI* o = bandwidthenvelopegroup = new EnvelopeUI(225, 65, 205, 70, "SUBsynth - BandWidth Envelope");
        bandwidthenvelopegroup->box(FL_FLAT_BOX);
        bandwidthenvelopegroup->color((Fl_Color)51);
        bandwidthenvelopegroup->selection_color(FL_BACKGROUND_COLOR);
        bandwidthenvelopegroup->labeltype(FL_NORMAL_LABEL);
        bandwidthenvelopegroup->labelfont(0);
        bandwidthenvelopegroup->labelsize(14);
        bandwidthenvelopegroup->labelcolor(FL_FOREGROUND_COLOR);
        bandwidthenvelopegroup->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE);
        bandwidthenvelopegroup->when(FL_WHEN_RELEASE);
        o->init(pars->BandWidthEnvelope,master);
        if (pars->PBandWidthEnvelopeEnabled==0) o->deactivate();
        bandwidthenvelopegroup->end();
      } // EnvelopeUI* bandwidthenvelopegroup
      { Fl_Check_Button* o = bwee = new Fl_Check_Button(225, 67, 55, 15, "Enabled");
        bwee->down_box(FL_DOWN_BOX);
        bwee->labelfont(1);
        bwee->labelsize(10);
        bwee->callback((Fl_Callback*)cb_bwee);
        o->value(pars->PBandWidthEnvelopeEnabled);
      } // Fl_Check_Button* bwee
      { Fl_Value_Slider* o = bandwidth = new Fl_Value_Slider(225, 40, 115, 15, "Band Width");
        bandwidth->type(5);
        bandwidth->box(FL_FLAT_BOX);
        bandwidth->labelsize(10);
        bandwidth->maximum(127);
        bandwidth->step(1);
        bandwidth->callback((Fl_Callback*)cb_bandwidth);
        bandwidth->align(FL_ALIGN_TOP);
        o->value(pars->Pbandwidth);
      } // Fl_Value_Slider* bandwidth
      { Fl_Value_Slider* o = bwidthscale = new Fl_Value_Slider(345, 40, 90, 15, "B.Width Scale");
        bwidthscale->tooltip("How much I increase the BandWidth according to lower/higher harmonics");
        bwidthscale->type(5);
        bwidthscale->box(FL_FLAT_BOX);
        bwidthscale->labelsize(10);
        bwidthscale->minimum(-64);
        bwidthscale->maximum(63);
        bwidthscale->step(1);
        bwidthscale->callback((Fl_Callback*)cb_bwidthscale);
        bwidthscale->align(FL_ALIGN_TOP);
        o->value(pars->Pbwscale-64);
      } // Fl_Value_Slider* bwidthscale
      bandwidthsettingsui->end();
    } // Fl_Group* bandwidthsettingsui
    { Fl_Group* o = globalfiltergroup = new Fl_Group(440, 140, 290, 185, "FILTER");
      globalfiltergroup->box(FL_THIN_UP_FRAME);
      globalfiltergroup->labeltype(FL_EMBOSSED_LABEL);
      globalfiltergroup->labelfont(1);
      globalfiltergroup->labelsize(13);
      globalfiltergroup->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE);
      { EnvelopeUI* o = filterenv = new EnvelopeUI(445, 250, 275, 70, "SUBsynth - Filter Envelope");
        filterenv->box(FL_FLAT_BOX);
        filterenv->color((Fl_Color)51);
        filterenv->selection_color(FL_BACKGROUND_COLOR);
        filterenv->labeltype(FL_NORMAL_LABEL);
        filterenv->labelfont(0);
        filterenv->labelsize(14);
        filterenv->labelcolor(FL_FOREGROUND_COLOR);
        filterenv->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE);
        filterenv->when(FL_WHEN_RELEASE);
        o->init(pars->GlobalFilterEnvelope,master);
        filterenv->end();
      } // EnvelopeUI* filterenv
      { FilterUI* o = filterui = new FilterUI(445, 170, 275, 75, "SUBsynthl - Filter");
        filterui->box(FL_FLAT_BOX);
        filterui->color(FL_LIGHT1);
        filterui->selection_color(FL_BACKGROUND_COLOR);
        filterui->labeltype(FL_NORMAL_LABEL);
        filterui->labelfont(0);
        filterui->labelsize(14);
        filterui->labelcolor(FL_FOREGROUND_COLOR);
        filterui->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE);
        filterui->when(FL_WHEN_RELEASE);
        o->init(pars->GlobalFilter,&pars->PGlobalFilterVelocityScale,&pars->PGlobalFilterVelocityScaleFunction,master);
        filterui->end();
      } // FilterUI* filterui
      if (pars->PGlobalFilterEnabled==0) o->deactivate();
      globalfiltergroup->end();
    } // Fl_Group* globalfiltergroup
    { Fl_Check_Button* o = filtere = new Fl_Check_Button(445, 145, 85, 20, "Enabled");
      filtere->down_box(FL_DOWN_BOX);
      filtere->labelfont(1);
      filtere->labelsize(11);
      filtere->callback((Fl_Callback*)cb_filtere);
      o->value(pars->PGlobalFilterEnabled);
    } // Fl_Check_Button* filtere
    { Fl_Button* o = new Fl_Button(540, 370, 25, 15, "C");
      o->box(FL_THIN_UP_BOX);
      o->color((Fl_Color)179);
      o->labelfont(1);
      o->labelsize(11);
      o->labelcolor(FL_BACKGROUND2_COLOR);
      o->callback((Fl_Callback*)cb_C);
    } // Fl_Button* o
    { Fl_Button* o = new Fl_Button(570, 370, 25, 15, "P");
      o->box(FL_THIN_UP_BOX);
      o->color((Fl_Color)179);
      o->labelfont(1);
      o->labelsize(11);
      o->labelcolor(FL_BACKGROUND2_COLOR);
      o->callback((Fl_Callback*)cb_P);
    } // Fl_Button* o
    SUBparameters->end();
  } // Fl_Double_Window* SUBparameters
  return SUBparameters;
}
Example #3
0
void MainWindow::createComponents()
{
    Fl_Group* grpSequence = new Fl_Group(10,20,150,120, "Sequence :");
    if ( grpSequence != NULL )
    {
        grpSequence->box(FL_DOWN_BOX);
        grpSequence->align(Fl_Align(FL_ALIGN_TOP_LEFT));
        grpSequence->labelsize(DEFAULT_FONT_SIZE);
        grpSequence->begin();

        seqPreparing = new Fl_Box(20,30,130,20,"1. Preparing update ...");
        if ( seqPreparing != NULL )
        {
            seqPreparing->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqPreparing->labelsize(DEFAULT_FONT_SIZE);
            seqPreparing->deactivate();
        }

        seqRetrieving = new Fl_Box(20,50,130,20,"2. Retrieving data ...");
        if ( seqRetrieving != NULL )
        {
            seqRetrieving->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqRetrieving->labelsize(DEFAULT_FONT_SIZE);
            seqRetrieving->deactivate();
        }

        seqProcessing = new Fl_Box(20,70,130,20,"3. Processing data ...");
        if ( seqProcessing != NULL )
        {
            seqProcessing->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqProcessing->labelsize(DEFAULT_FONT_SIZE);
            seqProcessing->deactivate();
        }

        seqUpdating = new Fl_Box(20,90,130,20,"4. Updating ...");
        if ( seqUpdating != NULL )
        {
            seqUpdating->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqUpdating->labelsize(DEFAULT_FONT_SIZE);
            seqUpdating->deactivate();
        }

        seqFinalizing = new Fl_Box(20,110,130,20,"5. Finalizing ...");
        if ( seqFinalizing != NULL )
        {
            seqFinalizing->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqFinalizing->labelsize(DEFAULT_FONT_SIZE);
            seqFinalizing->deactivate();
        }

        grpSequence->end();

        progBar = new Fl_Progress(10,150,150,10);
        if ( progBar != NULL )
        {
            progBar->color2(FL_BLUE);
            progBar->maximum(5);
            progBar->minimum(0);
            progBar->value(0);
        }

        mli_info = new Fl_Box(170,20,220,140,"");
        if ( mli_info != NULL )
        {
            mli_info->box( FL_DOWN_BOX );
            mli_info->align( FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE );
            mli_info->labelsize(DEFAULT_FONT_SIZE);
        }

        Fl_Box* boxCopyright = new Fl_Box(10,165,380,35);
        if ( boxCopyright != NULL )
        {
            boxCopyright->box(FL_DOWN_BOX);
            boxCopyright->align( FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE );
            boxCopyright->labelsize(COPYRIGHT_FONT_SIZE);
            boxCopyright->label("Automatic Updater, (C)Copyright 2013 Rageworx freeware.\n"
                                "All rights reserved, [email protected]");
        }

    }
}
Example #4
0
int main (int argc, char **argv) {

  Fl_Window* w;
  fl_init_locale_support("ewmconf", PREFIX"/share/locale");
  readConfiguration();
   {Fl_Window* o = new Fl_Window(320, 370, _("Window manager settings"));
    w = o;
     {Fl_Tabs* o = new Fl_Tabs(2, 5, 318, 325);
      o->color((Fl_Color)16);
       {Fl_Group* o = new Fl_Group(1, 29, 316, 295, _("&Titlebar"));
        o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
         {Fl_Choice* o = new Fl_Choice(83, 13, 105, 22, _("Text align:")); o->begin();
          o->callback((Fl_Callback*)cb_Text);
          new Fl_Item(_("Left"));
          new Fl_Item(_("Right"));
          new Fl_Item(_("Center"));
          o->value(title_align);
          o->end();
        }
         {Fl_Value_Input* o = new Fl_Value_Input(243, 13, 60, 22, _("Height:"));
          o->minimum(10);
          o->maximum(50);
          o->step(1);
          o->value(20);
          o->callback((Fl_Callback*)cb_Height);
          o->value(title_height);
        }
         {Fl_Button* o = titlebarLabelColorButton = new Fl_Button(85, 55, 60, 20, _("Titlebar label color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_titlebarLabelColorButton);
          o->align(132);
          o->color((Fl_Color)title_normal_color_text);
        }
         {Fl_Button* o = titlebarColorButton = new Fl_Button(85, 120, 60, 20, _("Titlebar color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_titlebarColorButton);
          o->align(132);
          o->color((Fl_Color) title_normal_color);
        }
         {Fl_Group* o = new Fl_Group(153, 45, 160, 110);
           {Fl_Button* o = titlebarActiveLabelColorButton = new Fl_Button(90, 10, 60, 20, _("Titlebar active label color: "));
            o->box(FL_DOWN_BOX);
            o->callback((Fl_Callback*)cb_titlebarActiveLabelColorButton);
            o->align(132);
            o->color((Fl_Color) title_active_color_text);
          }
           {Fl_Button* o = titlebarActiveColorButton = new Fl_Button(90, 75, 60, 20, _("Titlebar active color: "));
            o->box(FL_DOWN_BOX);
            o->callback((Fl_Callback*)cb_titlebarActiveColorButton);
            o->align(132);
            o->color((Fl_Color)title_active_color);
          }
          o->end();
        }
         {Fl_Choice* o = titlebarDrawGrad = new Fl_Choice(85, 157, 163, 23, _("Box type:")); o->begin();
          o->callback((Fl_Callback*)cb_titlebarDrawGrad);
          o->align(132);
          new Fl_Item(_("Flat"));
          new Fl_Item(_("Horizontal shade"));
          new Fl_Item(_("Thin down"));
          new Fl_Item(_("Up box"));
          new Fl_Item(_("Down box"));
          new Fl_Item(_("Plastic"));
          o->value(title_draw_grad);
          o->end();
        }
         {Fl_Check_Button* o = useThemeButton = new Fl_Check_Button(8, 220, 300, 20, _("&Use theme"));
          o->callback((Fl_Callback*)cb_useThemeButton);
          o->value(use_theme);
        }
         {Fl_Input* o = themePathInput = new Fl_Input(65, 247, 210, 23, _("Path:"));
          o->callback((Fl_Callback*)cb_themePathInput);
          o->deactivate();
          themePathInput->value(theme_path);
        }
         {Fl_Button* o = browse_btn = new Fl_Button(280, 247, 25, 23, _("..."));
          o->callback((Fl_Callback*)cb_browse_btn);
          o->deactivate();
        }
         {Fl_Divider* o = new Fl_Divider(8, 190, 300, 25, _("label"));
          o->color((Fl_Color)16);
        }
         {Fl_Divider* o = new Fl_Divider(8, 85, 297, 25, _("label"));
          o->color((Fl_Color)16);
        }
        o->end();
      }
       {Fl_Group* o = new Fl_Group(3, 20, 310, 305, _("&Resizing"));
        o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
        o->hide();
         {Fl_Check_Button* o = animateButton = new Fl_Check_Button(10, 10, 300, 20, _("Animate size changes"));
          o->value(1);
          o->callback((Fl_Callback*)cb_animateButton);
          o->value(animate);
        }
         {Fl_Value_Slider* o = animateSlider = new Fl_Value_Slider(70, 35, 235, 20, _("Speed:"));
          o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
          o->box(FL_DOWN_BOX);
          o->text_size(10);
          o->minimum(5);
          o->maximum(20);
          o->step(2);
          o->value(14);
          o->slider_size(8);
          o->callback((Fl_Callback*)cb_animateSlider);
          o->align(FL_ALIGN_LEFT);
          o->value(animate_speed);
          if(animate) o->activate(); else o->deactivate();
        }
        new Fl_Divider(0, 60, 300, 25, _("label"));
         {Fl_Check_Button* o = opaqueResize = new Fl_Check_Button(10, 85, 290, 20, _("Show window content while resizing"));
          o->callback((Fl_Callback*)cb_opaqueResize);
          o->value(opaque_resize);
        }
        o->end();
      }
      o->end();
    }
     {Fl_Button* o = new Fl_Button(67, 337, 80, 25, _("&OK"));
      o->shortcut(0xff0d);
      o->callback((Fl_Callback*)cb_OK);
    }
     {Fl_Button* o = new Fl_Button(152, 337, 80, 25, _("&Apply"));
      o->callback((Fl_Callback*)cb_Apply);
    }
     {Fl_Button* o = new Fl_Button(237, 337, 80, 25, _("&Cancel"));
      o->shortcut(0xff1b);
      o->callback((Fl_Callback*)cb_Cancel);
    }
    o->end();
  }
  useThemeButton->do_callback();
  w->show(argc, argv);
  return  Fl::run();
}
Fl_Font_Browser::Fl_Font_Browser():Fl_Window(100,100,550-60,332-5,"Font Browser") 
{
      lst_Font = new Fl_Browser(15, 55-5, 195, 159);
      lst_Font->labelsize(12);
      lst_Font->textsize(12);
      lst_Font->callback((Fl_Callback*)cb_FontName_Selected, (void*)(lst_Font->parent()));
      lst_Font->type(FL_HOLD_BROWSER);
    
      txt_InputFont = new Fl_Input(15, 31-5, 195, 24, "Font:");
      txt_InputFont->labelsize(12);
      txt_InputFont->textsize(12);
      txt_InputFont->align(FL_ALIGN_TOP_LEFT);
      txt_InputFont->when(FL_WHEN_ENTER_KEY);
      txt_InputFont->callback((Fl_Callback*)cb_txtInputFontName, (void*)(txt_InputFont->parent()));
    
      lst_Style = new Fl_Browser(215, 56-5, 155-60, 159);
      lst_Style->labelsize(12);
      lst_Style->type(FL_HOLD_BROWSER);
      lst_Style->textsize(12); 
      lst_Style->callback((Fl_Callback*)cb_StyleSelected, (void*)(lst_Style->parent()));   
       
      txt_InputStyle = new Fl_Input(215, 32-5, 155-60, 24, "Syle:");
      txt_InputStyle->labelsize(12);
      txt_InputStyle->align(FL_ALIGN_TOP_LEFT);
      txt_InputStyle->textsize(12);    
      txt_InputStyle->callback((Fl_Callback*)cb_txtInputFontStyle, (void*)(txt_InputStyle->parent()));
      
      lst_Size = new Fl_Browser(375-60, 56-5, 75, 159);
      lst_Size->labelsize(12);
      lst_Size->type(FL_HOLD_BROWSER);
      lst_Size->textsize(12); 
      lst_Size->callback((Fl_Callback*)cb_FontSize_Selected, (void*)(lst_Size->parent()));   
      
      txt_InputSize = new Fl_Input(375-60, 32-5, 75, 24, "Size:");
      txt_InputSize->labelsize(12);
      txt_InputSize->align(FL_ALIGN_TOP_LEFT);
      txt_InputSize->textsize(12);    
      txt_InputSize->callback((Fl_Callback*)cb_txtInputFontSize, (void*)(txt_InputSize->parent()));
      
      btn_OK =new Fl_Button(475-60, 35-5, 64, 20, "&OK");
      btn_OK->shortcut(0x8006f);
      btn_OK->labelfont(1);
      btn_OK->labelsize(12);
      btn_OK->callback((Fl_Callback*)cb_okBtn_Red );
         
      btn_Cancel =new Fl_Button(475-60, 60-5, 64, 20, "Cancel");
      btn_Cancel->labelsize(12);
      btn_Cancel->callback((Fl_Callback*)cb_Cancel, (void *)(btn_Cancel->parent()));
    
    
       Fl_Box* o = new Fl_Box(15, 220-5, 20, 10, "Properties");
       
       o->box(FL_BORDER_FRAME);
       o->labelsize(12);
       o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
      
        btn_Check1= new Fl_Check_Button(40-20, 250-5-5, 100, 15, "Strikethrough");
        btn_Check1->down_box(FL_DOWN_BOX);
        btn_Check1->labelsize(12);
        btn_Check1->callback((Fl_Callback*)cb_Strikethrough, (void *)(btn_Check1->parent()));
      
        btn_Check2 = new Fl_Check_Button(40-20, 270-5-5, 100, 15, "Underline");
        btn_Check2->down_box(FL_DOWN_BOX);
        btn_Check2->labelsize(12);
        btn_Check2->callback((Fl_Callback*)cb_UnderLine, (void *)(btn_Check2->parent()));
    
        btn_Color = new Fl_Button(40-20, 307-10-5, 90, 23, "Color:");
        btn_Color->down_box(FL_BORDER_BOX);
        btn_Color->labelsize(12);
        btn_Color->align(FL_ALIGN_TOP_LEFT);
        btn_Color->color(FL_BLACK);
        btn_Color->callback((Fl_Callback*)cb_Color_Select, (void *)(lst_Size->parent()));

     
    { Fl_Group* o = new Fl_Group(130, 220-5, 256+180, 82, "Example");
      o->box(FL_BORDER_FRAME);
      o->labelsize(12);
      o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
      { box_Example = new Fl_Font_Preview_Box(132-10, 241-5, 227+50+35+10, 48, "AaBbCcDdEeFfGgHhIi");
        box_Example->box(FL_DOWN_BOX);
        box_Example->labelsize(12);
        box_Example->align(FL_ALIGN_WRAP|FL_ALIGN_CLIP|FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
      }
      o->end();
    }
     set_modal();
     end();
 // Initializations 
  pickedsize = 14; // Font Size to be used
          //
  int k =   Fl::set_fonts(0); // Nr of fonts available on the server
  
  for(int i= 0; i < k; i++) 
  {
    int t;
    const char *name = Fl::get_font_name((Fl_Font)i,&t);
    char buffer[128];

// Load the font list .. Ignore the bold and italic types of the font
     if(!((t & FL_BOLD) ||(t & FL_ITALIC)))
     {
        sprintf(buffer, "%s",name);
        lst_Font->add(buffer);
     }
  }
     /* FL_Browser uses the symbol "@" as a formating char. There are some fonts that there 
      names starts with char "@".       We need to disable this     
   */  
     lst_Font->format_char(0);
       
  
  // Sort the font Alphabetically
  ForwardSort(lst_Font);
  
  lst_Font->value(1); // Select the first font in the list
  lst_Style->value(1);  
  lst_Font->do_callback();  // Do font selected callback .. to draw the preview
  lst_Style->do_callback();
  this->callback_ = 0;  // Initialize Widgets callback 
  this->data_ = 0;      // And the data
}
SaveTrajectoryFltkMenu::SaveTrajectoryFltkMenu(VMDApp *vmdapp)
: VMDFltkMenu("save", "Save Trajectory", vmdapp) {
  
  size(450, 250);
    { Fl_Choice* o = molchooser = new Fl_Choice(120, 10, 320, 25, "Save data from: ");
      o->box(FL_THIN_UP_BOX);
      o->down_box(FL_BORDER_BOX);
      o->color(VMDMENU_CHOOSER_BG);
      o->selection_color(VMDMENU_CHOOSER_SEL);
      o->callback(molchooser_cb, this);
    }
    { Fl_Input *o = selectinput = new Fl_Input(120, 45, 295, 25, "Selected atoms:");
      o->selection_color(VMDMENU_VALUE_SEL);
    }
    { Fl_Choice* o = repchooser = new Fl_Choice(415, 45, 25, 25);
      o->down_box(FL_BORDER_BOX);
      o->align(FL_ALIGN_TOP_LEFT);
      o->color(VMDMENU_CHOOSER_BG, VMDMENU_CHOOSER_SEL);
      o->callback(repchooser_cb, this);
    }
    { Fl_Choice* o = filetypechooser = new Fl_Choice(20, 90, 115, 25, "File type:");
      o->down_box(FL_BORDER_BOX);
      o->align(FL_ALIGN_TOP_LEFT);
      o->color(VMDMENU_CHOOSER_BG, VMDMENU_CHOOSER_SEL);
    }
    savebutton = new Fl_Return_Button(345, 90, 95, 25, "Save...");
    savebutton->callback(save_cb, this);
    { Fl_Group* o = timestepgroup = new Fl_Group(20, 145, 165, 95, "Frames: ");
      o->box(FL_ENGRAVED_FRAME);
      o->align(FL_ALIGN_TOP_LEFT);
      { Fl_Button* o = saveinbackgroundbutton = new Fl_Round_Button(30, 215, 150, 20, "Save in background");
        o->down_box(FL_ROUND_DOWN_BOX);
        o->type(FL_RADIO_BUTTON);
      }
      { Fl_Button* o = allatoncebutton = new Fl_Round_Button(30, 195, 150, 20, "Save all at once");
        o->down_box(FL_ROUND_DOWN_BOX);
        o->type(FL_RADIO_BUTTON);
      }
      { Fl_Input* o = firstinput = new Fl_Int_Input(25, 170, 45, 20, "First:");
        o->align(FL_ALIGN_TOP);
        o->selection_color(VMDMENU_VALUE_SEL);
      }
      { Fl_Input* o = lastinput = new Fl_Int_Input(80, 170, 45, 20, "Last:");
        o->align(FL_ALIGN_TOP);
        o->selection_color(VMDMENU_VALUE_SEL);
      }
      { Fl_Input* o = strideinput = new Fl_Int_Input(135, 170, 45, 20, "Stride:");
        o->align(FL_ALIGN_TOP);
        o->selection_color(VMDMENU_VALUE_SEL);
      }
      o->end();
      datasetbrowser = new Fl_Multi_Browser(195, 145, 240, 95, "Volumetric Datasets");
      datasetbrowser->align(5);
      datasetbrowser->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
    } 
    end();

  allatoncebutton->value(1);
  selected_molid = -1;
  datasetbrowser->deactivate();
  
  command_wanted(Command::PLUGIN_UPDATE);
  command_wanted(Command::MOL_NEW);
  command_wanted(Command::MOL_RENAME);
  command_wanted(Command::MOL_DEL);
  command_wanted(Command::MOL_ADDREP);
  command_wanted(Command::MOL_DELREP);
  command_wanted(Command::MOL_MODREP);
  command_wanted(Command::MOL_MODREPITEM);
  command_wanted(Command::ANIM_DELETE);
}
Example #7
0
int main(int argc, char* argv[]){
	Fl_Window *mainw = new Fl_Window(400, 380, "DoConfigure - Doukutsu Monotagari Settings");
	
	Fl_Group *movegroup = new Fl_Group(10, 10, 185, 50);
		movegroup->box(FL_THIN_DOWN_BOX);
		movear = new Fl_Radio_Round_Button(10, 10, 185, 20, "Arrows for Movement");
		movear->setonly();
		movegt = new Fl_Radio_Round_Button(10, 40, 185, 20, "<>? for Movement");
	movegroup->end();
	
	Fl_Group *buttongroup = new Fl_Group(10, 70, 185, 50);
		buttongroup->box(FL_THIN_DOWN_BOX);
		buttonxz = new Fl_Radio_Round_Button(10, 70, 185, 20, "Z=Jump; X=Attack");
		buttonxz->setonly();
		buttonzx = new Fl_Radio_Round_Button(10, 100, 185, 20, "X=Jump; Z=Attack");
	buttongroup->end();
	
	Fl_Group *okaygroup = new Fl_Group(205, 10, 185, 50);
		okaygroup->box(FL_THIN_DOWN_BOX);
		okayjump = new Fl_Radio_Round_Button(205, 10, 185, 20, "Jump=Okay");
		okayjump->setonly();
		okayattack = new Fl_Radio_Round_Button(205, 40, 185, 20, "Attack=Okay");
	okaygroup->end();
	
	displaychoice = new Fl_Choice(205, 70, 185, 20);
	Fl_Menu_Item screens[] = {
		{"Fullscreen 16-bit"},
		{"Windowed 320x240"},
 		{"Windowed 640x480"},
		{"Fullscreen 24-bit"},
		{"Fullscreen 32-bit"},
		{0}};
	displaychoice->menu(screens);
	joychoice = new Fl_Check_Button(205, 100, 185, 20, "Use Joypad");
	joychoice->callback(&activatejoy);
		
	joystuffcontainer = new Fl_Group(10, 130, 380, 200);
		joystuffcontainer->box(FL_THIN_DOWN_BOX);
		for(char i=0;i<8;i++){
			joyRows[i] = new RadioRow(i);
		}
		//There's no Label class alright? I'll switch it as soon as one is introduced.
		for (char i=0;i<6;i++) {
			Fl_Group *labeljump = new Fl_Group(10, 150+i*30, 10, 20);
			char* label=new char[strlen(ActionName(i+1))+2];
			sprintf(label, "%s:", ActionName(i+1));
			labeljump->label(label);
			labeljump->align(FL_ALIGN_RIGHT);
			labeljump->end();
		}
		
#ifdef HAVE_SDL
		if (JoystickSingleton::Instance().NumJoysticks() > 0){
			for (char i=0;i<6;i++){
				Fl_Button* btn = new Fl_Button(345, 150+30*i, 35, 20, "pick");
				btn->callback(&pickJsButton, (void*)(long)(i+1));
			}
		}
#endif

	joystuffcontainer->end();
	
	Fl_Button *okaybutton = new Fl_Button(10, 340, 185, 30, "Okay");
	okaybutton->callback(&write_Config);
	Fl_Button *cancelbutton = new Fl_Button(205, 340, 185, 30, "Cancel");
	cancelbutton->callback(&quit);
	
	mainw->end();
	mainw->show(argc, argv);
	
#ifdef HAVE_SDL
	char joystickLabel[100];
	sprintf(joystickLabel, "%s (%d found)", joychoice->label(), JoystickSingleton::Instance().NumJoysticks());
	joychoice->label(joystickLabel);
#endif

	read_Config();
	Fl::option(Fl::OPTION_VISIBLE_FOCUS, false);
	return Fl::run();
}
Example #8
0
edisplayconf::edisplayconf() {
  Fl_Window* w;
   {Fl_Window* o = win = new Fl_Window(265, 335, _("Display configuration"));
    w = o;
    o->callback((Fl_Callback*)cb_win, (void*)(this));
     {Fl_Tabs* o = new Fl_Tabs(5, 5, 255, 285);
       {Fl_Group* o = group_mouse = new Fl_Group(0, 20, 255, 265, _("Mouse"));
        o->align(FL_ALIGN_LEFT);
         {Fl_Value_Slider* o = slider_accel = new Fl_Value_Slider(25, 25, 220, 18, _("Acceleration"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(10);
          o->step(1);
          o->value(2);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Value_Slider* o = slider_thresh = new Fl_Value_Slider(25, 65, 220, 18, _("Threshold (pixels)"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(20);
          o->step(1);
          o->value(4);
          o->align(FL_ALIGN_TOP);
        }
        o->end();
      }
       {Fl_Group* o = group_bell = new Fl_Group(0, 20, 255, 265, _("Bell"));
        o->hide();
         {Fl_Value_Slider* o = slider_volume = new Fl_Value_Slider(25, 25, 220, 18, _("Volume in %"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(100);
          o->step(1);
          o->value(50);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Value_Slider* o = slider_pitch = new Fl_Value_Slider(25, 70, 220, 18, _("Pitch in Hz"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->minimum(100);
          o->maximum(1000);
          o->step(1);
          o->value(440);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Value_Slider* o = slider_duration = new Fl_Value_Slider(25, 115, 220, 18, _("Duration in ms"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(1000);
          o->step(1);
          o->value(200);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Button* o = new Fl_Button(180, 165, 60, 25, _("Test"));
          o->callback((Fl_Callback*)cb_Test);
        }
        o->end();
      }
       {Fl_Group* o = group_keyboard = new Fl_Group(0, 20, 255, 265, _("Keyboard"));
        o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
        o->hide();
         {Fl_Check_Button* o = check_autorepeat = new Fl_Check_Button(24, 25, 221, 20, _("  Repeat key activated"));
          o->selection_color((Fl_Color)2);
          o->value(1);
        }
         {Fl_Value_Slider* o = slider_click = new Fl_Value_Slider(25, 65, 220, 18, _("Click volume %"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(100);
          o->step(1);
          o->value(50);
          o->align(FL_ALIGN_TOP);
        }
        o->end();
      }
       {Fl_Group* o = group_screen = new Fl_Group(0, 20, 255, 265, _("Screen"));
        o->hide();
         {Fl_Button* o = but_activate = new Fl_Button(165, 187, 80, 25, _("&Test"));
          o->callback((Fl_Callback*)cb_but_activate);
        }
        new Fl_Box(10, 1, 234, 55);
         {Fl_Value_Slider* o = slider_delay = new Fl_Value_Slider(25, 77, 220, 18, _("Activation delay (min)"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->minimum(5);
          o->maximum(120);
          o->step(1);
          o->value(15);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Check_Button* o = check_blanking = new Fl_Check_Button(23, 25, 222, 20, _(" Screen blanker activated"));
          o->selection_color((Fl_Color)2);
          o->value(1);
        }
        new Fl_Box(10, 100, 234, 37);
         {Fl_Value_Slider* o = slider_pattern = new Fl_Value_Slider(25, 152, 220, 18, _("Pattern change delay (min)"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->minimum(1);
          o->maximum(5);
          o->step(0);
          o->value(2);
          o->align(FL_ALIGN_TOP);
          o->deactivate();
        }
         {Fl_Group* o = new Fl_Group(30, 105, 210, 25);
           {Fl_Round_Button* o = radio_blank = new Fl_Round_Button(0, 5, 105, 20, _("Blank"));
            o->type(Fl_Round_Button::RADIO);
            o->selection_color((Fl_Color)1);
            o->value(1);
            o->callback((Fl_Callback*)cb_radio_blank);
          }
           {Fl_Round_Button* o = radio_pattern = new Fl_Round_Button(115, 5, 95, 20, _("Pattern"));
            o->type(Fl_Round_Button::RADIO);
            o->selection_color((Fl_Color)1);
            o->callback((Fl_Callback*)cb_radio_pattern);
          }
          o->end();
        }
        o->end();
      }
      o->end();
    }
     {Fl_Button* o = new Fl_Button(190, 300, 70, 25, _("&Cancel"));
      o->callback((Fl_Callback*)cb_Cancel);
      o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    }
     {Fl_Button* o = but_kbd_apply = new Fl_Button(115, 300, 70, 25, _("&Apply"));
      o->callback((Fl_Callback*)cb_but_kbd_apply);
    }
     {Fl_Return_Button* o = new Fl_Return_Button(40, 300, 70, 25, _("OK"));
      o->shortcut(0xd);
      o->callback((Fl_Callback*)cb_OK);
    }
    o->end();
  }
}
Example #9
0
ClusterView2D::ClusterView2D(int x, int y, int w, int h, int inResolution, cxVolume * pVolume) : Fl_Gl_Window(x, y, w, h-COLOR_CHOOSER_HEIGHT){

	//mode(FL_ALPHA | FL_DEPTH | FL_DOUBLE | FL_RGB8 );
	//	Fl::add_idle(&idle_cp, (void*)this);
	opacityDisp = 0;
	histogram1D = 0;
	m_dataPts = NULL;
	m_cluster = NULL;
	m_ctrs = NULL;
	m_pVolume = pVolume;
	
	m_percentHeight = (float)COLOR_CHOOSER_HEIGHT / (float) h;
	m_percentWidth = (float)COLOR_CHOOSER_WIDTH / (float) w;
	ClusterView2D *ihateptrs = this; // this is necessary because &this doesnt work.
		
	//m_buttonA = new Fl_Button(x+MARGIN+COLOR_CHOOSER_WIDTH, y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN, BUTTON_WIDTH,BUTTON_HEIGHT, "Reset");
	//m_buttonA->callback((Fl_Callback*)cb_buttonA, this);
	//m_buttonA->resizable(0);
	

	Fl_Group* o = new Fl_Group(	2,
								y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN,
								COLOR_CHOOSER_WIDTH*3,
								COLOR_CHOOSER_HEIGHT*4,"K-Means settings");
    o->box(FL_ENGRAVED_FRAME);
    o->align(FL_ALIGN_TOP_LEFT);

	m_pInputA = new Fl_Input(	o->x()+3,
								o->y()+MARGIN,
								BUTTON_WIDTH*2 + 3*2,
								BUTTON_HEIGHT,"Filename");
    m_pInputA->value("");
	m_pInputA->align(FL_ALIGN_RIGHT);
	
	m_pButtonChooser = new Fl_Button(	(m_pInputA->x()+m_pInputA->w()),
										o->y()+ MARGIN, 
										BUTTON_WIDTH, BUTTON_HEIGHT,"Browse..");
    m_pButtonChooser->callback((Fl_Callback *)cb_ButtonChooser, this);
	
	m_pFileChooser = NULL;
	
	m_inp_tch = new Fl_Input(o->x() + 3, m_pInputA->y()+ BUTTON_HEIGHT*2, BUTTON_WIDTH, BUTTON_HEIGHT, "timesteps intervals");
	m_inp_tch->align(FL_ALIGN_TOP_LEFT);
	m_inp_tch->value("12");
	
	m_inp_t = new Fl_Input(o->x() + 3, m_pInputA->y()+ BUTTON_HEIGHT*3 + MARGIN, BUTTON_WIDTH, BUTTON_HEIGHT, "algorithm");
    m_inp_t->align(FL_ALIGN_TOP_LEFT);
	m_inp_t->value("0");
	
	m_inp_k = new Fl_Input(m_inp_tch->x()+m_inp_tch->w() + 3, m_pInputA->y()+ BUTTON_HEIGHT*2, BUTTON_WIDTH, BUTTON_HEIGHT, "clusters");
	m_inp_k->align(FL_ALIGN_TOP_LEFT);
	m_inp_k->value("3");
	
	m_inp_s = new Fl_Input(m_inp_t->x()+m_inp_t->w() + 3, m_pInputA->y()+ BUTTON_HEIGHT*3 + MARGIN, BUTTON_WIDTH, BUTTON_HEIGHT, "stages");
	m_inp_s->align(FL_ALIGN_TOP_LEFT);
	m_inp_s->value("300");
	
	m_inp_start_time = new Fl_Input(m_inp_k->x()+m_inp_k->w() + 3, m_pInputA->y()+ BUTTON_HEIGHT*2, 
									BUTTON_WIDTH, BUTTON_HEIGHT, "start timestep");
	m_inp_start_time->align(FL_ALIGN_TOP_LEFT);
	m_inp_start_time->value("0");

	m_inp_total_time = new Fl_Input(m_inp_s->x()+m_inp_s->w() + 3, m_pInputA->y()+ BUTTON_HEIGHT*3 + 
									MARGIN, BUTTON_WIDTH, BUTTON_HEIGHT, "number of timesteps");
	m_inp_total_time->align(FL_ALIGN_TOP_LEFT);
	m_inp_total_time->value("120");


	Fl_Button* bt_save = new Fl_Button(	m_inp_tch->x()+m_inp_tch->w() + 3,
										m_pInputA->y()+ BUTTON_HEIGHT*5 + MARGIN*3, 
										BUTTON_WIDTH, BUTTON_HEIGHT,"Create new cluster");
	bt_save->callback((Fl_Callback *)cb_ButtonSave, this);

	Fl_Button* bt_load = new Fl_Button(	bt_save->x()+bt_save->w()+3,
										m_pInputA->y()+ BUTTON_HEIGHT*5 + MARGIN*3, 
										BUTTON_WIDTH, BUTTON_HEIGHT,"Load cluster");
	bt_load->callback((Fl_Callback *)cb_ButtonLoad, this);	

	
	o->end();
	m_pLB = new Fl_Light_Button(o->x() + o->w() + 3,
			 	    (y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN), 
				    BUTTON_WIDTH,BUTTON_HEIGHT, "Show all clusters");
    //m_pLB->labelsize(TEXTSIZE);
    m_pLB->callback((Fl_Callback *)cb_LB, this);
	m_pLB->set();
	m_bshowall = true; 

	m_pButtonNext = new Fl_Button(	o->x() + o->w() + 3,
									(y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN + BUTTON_HEIGHT + 3),
									BUTTON_WIDTH, BUTTON_HEIGHT,"Next Cluster");
    m_pButtonNext->callback((Fl_Callback *)cb_ButtonNext, this);

#ifdef CHANGES
	m_pButtonClear = new Fl_Light_Button(	o->x() + o->w() + 3,
									(y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN + BUTTON_HEIGHT*2 + 6),
									BUTTON_WIDTH, BUTTON_HEIGHT,"Clear Cluster");
    m_pButtonClear->callback((Fl_Callback *)cb_ButtonClear, this);
	m_pButtonClear->set();
	m_bClear = true;
#endif	
/*
	int tch     = 0;        // use all timesteps in calculating KMeans (use only 1 chunk) -tch
int alg     = 0;        // use Lloyd by default  -t option
int	k		= 4;		// number of centers     -k option
int	dim		= 2;		// dimension            
int	stages		= 1000;		// number of stages  -s option

	strcpy(params[0],"");
	strcpy(params[1],"-t");
	strcpy(params[2],"3");
	strcpy(params[3],"-tch");
	strcpy(params[4],"12");
	strcpy(params[5],"-tac");
	strcpy(params[6],filename);
	strcpy(params[7],"-k");
	strcpy(params[8],"3");
	strcpy(params[9],"-s");
	strcpy(params[10],"300");
	main_cluster(nparams, params);
	*/

	m_total_size = 0;
	m_dim = 0;
	m_selcluster = 0;
	m_bInit = false;
	m_nClusters = 0;

	m_xblock = 1;
	m_yblock = 1;
	m_zblock = 1;

	m_datamin = -100;
	m_datamax = 100;
#ifdef SHOW_CLUSTER
	pVolume->SetClusterView(this);
#endif

	srand((unsigned)time( NULL ));
}
Example #10
0
Fl_Window* make_codingstyle_window() {
  Fl_Window* w;
   {Fl_Window* o = new Fl_Window(310, 255);
    w = o;
    o->shortcut(0xff1b);
     {Fl_Tabs* o = new Fl_Tabs(0, 0, 303, 220);
      o->color((Fl_Color)0xfffffffe);
       {Fl_Group* o = new Fl_Group(1, 24, 301, 195, _("Brace Style"));
         {Fl_Group* o = new Fl_Group(14, 22, 282, 122, _("Brace Style"));
          o->box(FL_ENGRAVED_BOX);
          o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
           {Fl_Box* o = new Fl_Box(20, 6, 47, 20, _("if ( x ) {"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(20, 25, 45, 20, _("++y;"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(20, 41, 36, 20, _("}"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(114, 6, 47, 20, _("if ( x )"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(114, 25, 36, 20, _("{"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(115, 42, 46, 20, _("++y;"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(114, 59, 36, 20, _("}"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Round_Button* o = pStyle1 = new Fl_Round_Button(16, 84, 66, 25, _("Style 1"));
            o->type(Fl_Round_Button::RADIO);
            o->value(1);
            o->callback((Fl_Callback*)cb_pStyle1);
          }
           {Fl_Box* o = new Fl_Box(201, 6, 47, 20, _("if ( x )"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(201, 25, 36, 20, _("{"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(227, 42, 34, 22, _("++y;"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(201, 59, 36, 20, _("}"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Round_Button* o = pStyle2 = new Fl_Round_Button(109, 84, 66, 25, _("Style 2"));
            o->type(Fl_Round_Button::RADIO);
            o->callback((Fl_Callback*)cb_pStyle2);
          }
           {Fl_Round_Button* o = pStyle3 = new Fl_Round_Button(200, 84, 66, 25, _("Style 3"));
            o->type(Fl_Round_Button::RADIO);
            o->callback((Fl_Callback*)cb_pStyle3);
          }
          o->end();
        }
         {Fl_Check_Button* o = pNoSpaceParens = new Fl_Check_Button(15, 147, 195, 22, _("No space before parentheses"));
          o->callback((Fl_Callback*)cb_pNoSpaceParens);
        }
         {Fl_Check_Button* o = pBraceFuncs = new Fl_Check_Button(15, 170, 174, 22, _("Apply to function braces"));
          o->value(1);
          o->callback((Fl_Callback*)cb_pBraceFuncs);
        }
        o->end();
      }
       {Fl_Group* o = new Fl_Group(1, 24, 301, 195, _("Other"));
        o->hide();
         {Fl_Group* o = new Fl_Group(11, 22, 284, 90, _("Indentation"));
          o->box(FL_ENGRAVED_BOX);
          o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
           {Fl_Value_Input* o = pTabSize = new Fl_Value_Input(129, 33, 60, 22, _("Tab size for indents"));
            o->maximum(12);
            o->value(2);
            o->callback((Fl_Callback*)cb_pTabSize);
          }
           {Fl_Check_Button* o = pIndentTabs = new Fl_Check_Button(13, 7, 114, 22, _("Indent with tabs"));
            o->callback((Fl_Callback*)cb_pIndentTabs);
          }
           {Fl_Check_Button* o = pIndentCode = new Fl_Check_Button(14, 58, 151, 22, _("Indent code blocks"));
            o->callback((Fl_Callback*)cb_pIndentCode);
          }
          o->end();
        }
         {Fl_Check_Button* o = pReturnParens = new Fl_Check_Button(10, 120, 220, 22, _("Always use parentheses on return"));
          o->callback((Fl_Callback*)cb_pReturnParens);
        }
        o->end();
      }
      o->end();
    }
     {Fl_Button* o = new Fl_Button(115, 227, 59, 23, _("Cancel"));
      o->callback((Fl_Callback*)cb_Cancel);
    }
     {Fl_Button* o = new Fl_Button(180, 227, 59, 23, _("Save"));
      o->callback((Fl_Callback*)cb_Save);
    }
     {Fl_Button* o = new Fl_Button(245, 227, 59, 23, _("Use"));
      o->callback((Fl_Callback*)cb_Use);
    }
    o->end();
    o->resizable(o);
  }
  return  w;
}
Example #11
0
int main (int argc, char **argv) {

  Fl_Window* w;
  fl_init_locale_support("eiconsconf", PREFIX"/share/locale");
  readIconsConfiguration();
   {Fl_Window* o = iconsConfWindow = new Fl_Window(265, 314, _("Icons settings"));
    w = o;
    o->shortcut(0xff1b);
     {Fl_Button* o = new Fl_Button(25, 280, 75, 25, _("&OK"));
      o->callback((Fl_Callback*)cb_OK);
    }
     {Fl_Button* o = new Fl_Button(185, 280, 75, 25, _("&Cancel"));
      o->callback((Fl_Callback*)cb_Cancel);
    }
     {Fl_Button* o = new Fl_Button(105, 280, 75, 25, _("&Apply"));
      o->callback((Fl_Callback*)cb_Apply);
    }
     {Fl_Tabs* o = new Fl_Tabs(3, 5, 257, 265);
      o->color((Fl_Color)0xfffffffe);
       {Fl_Group* o = new Fl_Group(1, 23, 255, 241, _("Look&&feel"));
        o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
         {Fl_Button* o = colorButton = new Fl_Button(165, 17, 60, 18, _("Background color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_colorButton);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->color((Fl_Color) label_background);
          if(label_trans) o->deactivate();
        }
         {Fl_Button* o = colorButton1 = new Fl_Button(165, 47, 60, 18, _("Label color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_colorButton1);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->color((Fl_Color) label_foreground);
        }
         {Fl_Value_Slider* o = maxWidthSlider = new Fl_Value_Slider(115, 95, 125, 20, _("Maximum width: "));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->minimum(48);
          o->maximum(200);
          o->step(1);
          o->value(50);
          o->slider_size(10);
          o->callback((Fl_Callback*)cb_maxWidthSlider);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->value(label_maxwidth);
        }
         {Fl_Value_Slider* o = fontsizeSlider = new Fl_Value_Slider(115, 125, 125, 20, _("Font height: "));
          o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
          o->minimum(8);
          o->maximum(48);
          o->step(1);
          o->value(10);
          o->slider_size(10);
          o->callback((Fl_Callback*)cb_fontsizeSlider);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->value(label_fontsize);
        }
         {Fl_Value_Slider* o = gridspaceSlider = new Fl_Value_Slider(115, 155, 125, 20, _("Grid spacing: "));
          o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
          o->minimum(1);
          o->maximum(50);
          o->step(1);
          o->value(10);
          o->slider_size(10);
          o->callback((Fl_Callback*)cb_gridspaceSlider);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->value(label_gridspacing);
        }
         {Fl_Check_Button* o = autoArrButton = new Fl_Check_Button(25, 215, 222, 20, _("Auto arrange icons"));
          o->callback((Fl_Callback*)cb_autoArrButton);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
          o->value(auto_arr);
        }
         {Fl_Check_Button* o = engageButton = new Fl_Check_Button(25, 190, 222, 20, _("Engage with just one click"));
          o->callback((Fl_Callback*)cb_engageButton);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
          o->value(label_engage_1click);
        }
         {Fl_Check_Button* o = bg_color_check = new Fl_Check_Button(227, 17, 20, 18);
          o->callback((Fl_Callback*)cb_bg_color_check);
          o->tooltip(_("Clear this, to get transparent background."));
          if(!label_trans) o->set_value();
        }
        o->end();
      }
      o->end();
    }
    o->end();
    o->resizable(o);
  }
  w->show(argc, argv);
  return  Fl::run();
}
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();
	}
}