panthema / 2006 / sdlfractal / sdlfractal-0.1 / src / FractalWin.cc (Download File)
// generated by Fast Light User Interface Designer (fluid) version 1.0107

#include "FractalWin.h"

void FractalWin::cb_WMain_i(Fl_Window* o, void*) {
  WinClose(o);
}
void FractalWin::cb_WMain(Fl_Window* o, void* v) {
  ((FractalWin*)(o->user_data()))->cb_WMain_i(o,v);
}

void FractalWin::cb_Tabs0_i(Fl_Tabs* o, long v) {
  TabChange(o,v);
}
void FractalWin::cb_Tabs0(Fl_Tabs* o, long v) {
  ((FractalWin*)(o->parent()->user_data()))->cb_Tabs0_i(o,v);
}

void FractalWin::cb_cb_mandelbrot_colorscheme_i(Fl_Choice* o, void*) {
  Mandelbrot_Choice_ColorScheme(o);
}
void FractalWin::cb_cb_mandelbrot_colorscheme(Fl_Choice* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->user_data()))->cb_cb_mandelbrot_colorscheme_i(o,v);
}

void FractalWin::cb_vi_mandelbrot_numcolor_i(Fl_Value_Input* o, void*) {
  Mandelbrot_Update_numcolor(o);
}
void FractalWin::cb_vi_mandelbrot_numcolor(Fl_Value_Input* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->user_data()))->cb_vi_mandelbrot_numcolor_i(o,v);
}

void FractalWin::cb_vi_mandelbrot_maxsquarenorm_i(Fl_Value_Input* o, void*) {
  Mandelbrot_Set_MaxSquareNorm(o);
}
void FractalWin::cb_vi_mandelbrot_maxsquarenorm(Fl_Value_Input* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->user_data()))->cb_vi_mandelbrot_maxsquarenorm_i(o,v);
}

void FractalWin::cb_vi_mira_a_i(Fl_Value_Input* o, void*) {
  Update_Mira_A(o);
}
void FractalWin::cb_vi_mira_a(Fl_Value_Input* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->user_data()))->cb_vi_mira_a_i(o,v);
}

void FractalWin::cb_vi_mira_b_i(Fl_Value_Input* o, void*) {
  Update_Mira_B(o);
}
void FractalWin::cb_vi_mira_b(Fl_Value_Input* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->user_data()))->cb_vi_mira_b_i(o,v);
}

void FractalWin::cb_vi_mira_iterations_i(Fl_Value_Input* o, void*) {
  Update_Mira_Iterations(o);
}
void FractalWin::cb_vi_mira_iterations(Fl_Value_Input* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->user_data()))->cb_vi_mira_iterations_i(o,v);
}

void FractalWin::cb_vi_mira_drawoffset_i(Fl_Value_Input* o, void*) {
  Update_Mira_DrawOffset(o);
}
void FractalWin::cb_vi_mira_drawoffset(Fl_Value_Input* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->user_data()))->cb_vi_mira_drawoffset_i(o,v);
}

void FractalWin::cb_Tabs1_i(Fl_Tabs* o, long v) {
  TabChange(o,v);
}
void FractalWin::cb_Tabs1(Fl_Tabs* o, long v) {
  ((FractalWin*)(o->parent()->parent()->parent()->user_data()))->cb_Tabs1_i(o,v);
}

void FractalWin::cb_vi_hfractal_order_i(Fl_Value_Input* o, void*) {
  Update_HFractal_Order(o);
}
void FractalWin::cb_vi_hfractal_order(Fl_Value_Input* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_vi_hfractal_order_i(o,v);
}

void FractalWin::cb_vi_pythagorastree_order_i(Fl_Value_Input* o, void*) {
  Update_PythagorasTree_Order(o);
}
void FractalWin::cb_vi_pythagorastree_order(Fl_Value_Input* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_vi_pythagorastree_order_i(o,v);
}

void FractalWin::cb_vi_sierpinski_order_i(Fl_Value_Input* o, void*) {
  Update_Sierpinski_Order(o);
}
void FractalWin::cb_vi_sierpinski_order(Fl_Value_Input* o, void* v) {
  ((FractalWin*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_vi_sierpinski_order_i(o,v);
}

void FractalWin::cb_button_savepng_i(Fl_Button*, void*) {
  Button_SavePNG(vi_pngwidth->value());
}
void FractalWin::cb_button_savepng(Fl_Button* o, void* v) {
  ((FractalWin*)(o->parent()->user_data()))->cb_button_savepng_i(o,v);
}

void FractalWin::cb_Redraw_i(Fl_Button*, void*) {
  Button_Redraw();
}
void FractalWin::cb_Redraw(Fl_Button* o, void* v) {
  ((FractalWin*)(o->parent()->user_data()))->cb_Redraw_i(o,v);
}

FractalWin::FractalWin() {
  Fl_Window* w;
  { Fl_Window* o = WMain = new Fl_Window(385, 235, "Fractal Control");
    w = o;
    o->labelsize(12);
    o->callback((Fl_Callback*)cb_WMain, (void*)(this));
    { Fl_Tabs* o = Tabs0 = new Fl_Tabs(5, 5, 375, 190);
      o->labelsize(12);
      o->callback((Fl_Callback*)cb_Tabs0, (void*)(0));
      o->when(FL_WHEN_CHANGED);
      { Fl_Group* o = new Fl_Group(5, 30, 375, 130, "Mandelbrot");
        o->user_data((void*)(1));
        { Fl_Choice* o = cb_mandelbrot_colorscheme = new Fl_Choice(175, 50, 190, 25, "Color Scheme");
          o->down_box(FL_BORDER_BOX);
          o->callback((Fl_Callback*)cb_cb_mandelbrot_colorscheme);
          o->when(FL_WHEN_CHANGED);
        }
        { Fl_Value_Input* o = vi_mandelbrot_numcolor = new Fl_Value_Input(175, 85, 190, 25, "Color Gradient Length");
          o->callback((Fl_Callback*)cb_vi_mandelbrot_numcolor);
          o->when(FL_WHEN_RELEASE);
          o->range(16,INT_MAX);
          o->step(8);
        }
        { Fl_Value_Input* o = vi_mandelbrot_maxsquarenorm = new Fl_Value_Input(175, 120, 190, 25, "Max Square Norm");
          o->callback((Fl_Callback*)cb_vi_mandelbrot_maxsquarenorm);
          o->when(FL_WHEN_RELEASE);
        }
        o->end();
      }
      { Fl_Group* o = new Fl_Group(5, 30, 235, 100, "Feigenbaum");
        o->user_data((void*)(2));
        o->hide();
        o->end();
        Fl_Group::current()->resizable(o);
      }
      { Fl_Group* o = new Fl_Group(5, 32, 255, 163, "Mira");
        o->user_data((void*)(3));
        o->hide();
        { Fl_Value_Input* o = vi_mira_a = new Fl_Value_Input(115, 45, 110, 25, "a");
          o->tooltip("Parameter a of the Mira fractal");
          o->callback((Fl_Callback*)cb_vi_mira_a);
          o->step(0.0001);
        }
        { Fl_Value_Input* o = vi_mira_b = new Fl_Value_Input(115, 80, 113, 25, "b");
          o->tooltip("Parameter b of the Mira fractal");
          o->callback((Fl_Callback*)cb_vi_mira_b);
          o->step(0.0001);
        }
        { Fl_Value_Input* o = vi_mira_iterations = new Fl_Value_Input(115, 115, 113, 25, "Iterations");
          o->tooltip("Number of points to draw");
          o->callback((Fl_Callback*)cb_vi_mira_iterations);
          Fl_Group::current()->resizable(o);
          o->step(100);
          o->range(0,INT_MAX);
        }
        { Fl_Value_Input* o = vi_mira_drawoffset = new Fl_Value_Input(115, 150, 113, 25, "Draw Offset");
          o->tooltip("Start drawing points after this number of iterations");
          o->callback((Fl_Callback*)cb_vi_mira_drawoffset);
          o->step(100);
          o->range(0,INT_MAX);
        }
        o->end();
      }
      { Fl_Group* o = new Fl_Group(5, 30, 370, 89, "Simpler Fractals");
        o->user_data((void*)(4));
        o->hide();
        { Fl_Tabs* o = Tabs1 = new Fl_Tabs(10, 35, 360, 79);
          o->callback((Fl_Callback*)cb_Tabs1, (void*)(1));
          o->when(FL_WHEN_CHANGED);
          { Fl_Group* o = new Fl_Group(10, 60, 265, 54, "H-Fractal");
            o->user_data((void*)(4));
            o->hide();
            { Fl_Value_Input* o = vi_hfractal_order = new Fl_Value_Input(85, 75, 150, 25, "Order");
              o->callback((Fl_Callback*)cb_vi_hfractal_order);
              o->when(FL_WHEN_RELEASE);
              Fl_Group::current()->resizable(o);
            }
            o->end();
            Fl_Group::current()->resizable(o);
          }
          { Fl_Group* o = new Fl_Group(10, 60, 265, 54, "Pythagoras-Tree");
            o->user_data((void*)(5));
            o->hide();
            { Fl_Value_Input* o = vi_pythagorastree_order = new Fl_Value_Input(85, 75, 150, 25, "Order");
              o->callback((Fl_Callback*)cb_vi_pythagorastree_order);
              o->when(FL_WHEN_RELEASE);
              Fl_Group::current()->resizable(o);
            }
            o->end();
          }
          { Fl_Group* o = new Fl_Group(10, 60, 265, 54, "Sierpinski-Triangle");
            o->user_data((void*)(6));
            { Fl_Value_Input* o = vi_sierpinski_order = new Fl_Value_Input(85, 75, 150, 25, "Order");
              o->callback((Fl_Callback*)cb_vi_sierpinski_order);
              o->when(FL_WHEN_RELEASE);
              Fl_Group::current()->resizable(o);
            }
            o->end();
          }
          o->end();
        }
        o->end();
      }
      o->end();
      Fl_Group::current()->resizable(o);
    }
    { Fl_Button* o = button_savepng = new Fl_Button(140, 200, 80, 25, "Save PNG");
      o->callback((Fl_Callback*)cb_button_savepng);
    }
    { Fl_Value_Input* o = vi_pngwidth = new Fl_Value_Input(48, 200, 69, 25, "Width");
      o->range(256,INT_MAX);
      o->step(32);
    }
    { Fl_Button* o = new Fl_Button(315, 200, 65, 25, "Redraw");
      o->callback((Fl_Callback*)cb_Redraw);
    }
    UpdateValues();
    o->end();
  }
}