// generated by Fast Light User Interface Designer (fluid) version 2.1000

#include "alignment_panel.h"
#include "PrefsData.h"
#include "FluidType.h"
fltk::TextBuffer *shell_run_buffer;

fltk::Window *preferences_window=(fltk::Window *)0;

fltk::TabGroup *pref_tabs=(fltk::TabGroup *)0;

static void cb_pref_tabs(fltk::TabGroup*, void*) {
  initialize_tab_colors();
}

fltk::CheckButton *openlast_button=(fltk::CheckButton *)0;

static void cb_openlast_button(fltk::CheckButton*, void*) {
  prefs.open_previous_file(openlast_button->value());
}

fltk::CheckButton *prevpos_button=(fltk::CheckButton *)0;

static void cb_prevpos_button(fltk::CheckButton*, void*) {
  prefs.prev_window_pos(prevpos_button->value());
}

fltk::CheckButton *completion_button=(fltk::CheckButton *)0;

static void cb_completion_button(fltk::CheckButton*, void*) {
  prefs.show_completion_dialogs(completion_button->value());
}

fltk::ValueInput *recent_spinner=(fltk::ValueInput *)0;

static void cb_recent_spinner(fltk::ValueInput*, void*) {
  prefs.recent_files((int) recent_spinner->value()); load_history();
}

fltk::CheckButton *tabcolor_button=(fltk::CheckButton *)0;

static void cb_tabcolor_button(fltk::CheckButton* o, void*) {
  prefs.tabcolor(o->value());
  initialize_tab_colors();
}

fltk::CheckButton *splash_button=(fltk::CheckButton *)0;

static void cb_splash_button(fltk::CheckButton* o, void*) {
  prefs.show_splash(o->value());
}

fltk::Input *header_file_input=(fltk::Input *)0;

fltk::Input *code_file_input=(fltk::Input *)0;

fltk::CheckButton *include_H_from_C_button=(fltk::CheckButton *)0;

fltk::Input *horizontal_input=(fltk::Input *)0;

fltk::Input *vertical_input=(fltk::Input *)0;

fltk::Input *snap_input=(fltk::Input *)0;

fltk::RadioButton *def_widget_size[6]={(fltk::RadioButton *)0};

static void cb_Close(fltk::Button*, void*) {
  preferences_window->hide();
}

fltk::Window* make_preferences_window() {
  fltk::Window* w;
   {fltk::Window* o = preferences_window = new fltk::Window(370, 253, "fluid Preferences");
    w = o;
    o->shortcut(0xff1b);
    o->begin();
     {fltk::TabGroup* o = pref_tabs = new fltk::TabGroup(5, 4, 360, 210);
      o->callback((fltk::Callback*)cb_pref_tabs);
      o->begin();
       {fltk::Group* o = new fltk::Group(0, 21, 360, 188, "General");
        o->color((fltk::Color)0x54c2d400);
        o->begin();
         {fltk::CheckButton* o = openlast_button = new fltk::CheckButton(10, 5, 190, 25, "Open Previous File on Startup");
          o->callback((fltk::Callback*)cb_openlast_button);
          openlast_button->value(prefs.open_previous_file() ? true : false);
        }
         {fltk::CheckButton* o = prevpos_button = new fltk::CheckButton(10, 25, 190, 25, "Remember Window Positions");
          o->callback((fltk::Callback*)cb_prevpos_button);
          prevpos_button->value(prefs.prev_window_pos() ? true : false);
        }
         {fltk::CheckButton* o = completion_button = new fltk::CheckButton(10, 45, 186, 25, "Show Completion Dialog Info");
          o->callback((fltk::Callback*)cb_completion_button);
          completion_button->value(prefs.show_completion_dialogs() ? true : false);
        }
         {fltk::ValueInput* o = recent_spinner = new fltk::ValueInput(13, 93, 37, 25, "# Recent Files");
          o->callback((fltk::Callback*)cb_recent_spinner);
          o->align(fltk::ALIGN_RIGHT);
          o->when(fltk::WHEN_CHANGED);
          recent_spinner->maximum(10); recent_spinner->value(prefs.recent_files());
        }
         {fltk::CheckButton* o = tabcolor_button = new fltk::CheckButton(10, 125, 100, 25, "Colorful tabs");
          o->callback((fltk::Callback*)cb_tabcolor_button);
          o->value(prefs.tabcolor() ? true : false);
        }
         {fltk::CheckButton* o = splash_button = new fltk::CheckButton(10, 65, 190, 25, "Show splash screen on startup");
          o->callback((fltk::Callback*)cb_splash_button);
          o->value(prefs.show_splash() ? true : false);
        }
        o->end();
      }
       {fltk::Group* o = new fltk::Group(0, 20, 360, 190, "Code generation");
        o->color((fltk::Color)0x13d47a00);
        o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
        o->hide();
        o->begin();
         {fltk::Widget* o = new fltk::Widget(16, 0, 323, 25, "Use \"name.ext\" to set name or just \".ext\" to set only extension.");
          o->box(fltk::NO_BOX);
          o->labelsize(11);
          o->align(fltk::ALIGN_LEFT|fltk::ALIGN_CENTER|fltk::ALIGN_INSIDE|fltk::ALIGN_WRAP);
        }
         {fltk::Input* o = header_file_input = new fltk::Input(96, 30, 185, 22, "Header File:");
          o->callback((fltk::Callback*)header_input_cb, (void*)(1));
          o->when(fltk::WHEN_CHANGED);
        }
         {fltk::Input* o = code_file_input = new fltk::Input(96, 57, 185, 22, "Code File:");
          o->callback((fltk::Callback*)code_input_cb, (void*)(1));
          o->when(fltk::WHEN_CHANGED);
        }
         {fltk::CheckButton* o = include_H_from_C_button = new fltk::CheckButton(16, 84, 170, 22, "#include \"header\" in code");
          o->set_flag(fltk::STATE);
          o->callback((fltk::Callback*)include_H_from_C_button_cb);
        }
        o->end();
      }
       {fltk::Group* o = new fltk::Group(0, 21, 360, 189, "Alignment");
        o->color((fltk::Color)0xd49a5600);
        o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
        o->hide();
        o->begin();
         {fltk::Input* o = horizontal_input = new fltk::Input(75, 6, 100, 22, "Horizontal:");
          o->labelsize(14);
          o->textsize(14);
          o->callback((fltk::Callback*)alignment_cb, (void*)(1));
          o->when(fltk::WHEN_RELEASE|fltk::WHEN_ENTER_KEY);
        }
         {fltk::Input* o = vertical_input = new fltk::Input(238, 6, 100, 22, "Vertical:");
          o->labelsize(14);
          o->textsize(14);
          o->callback((fltk::Callback*)alignment_cb, (void*)(2));
          o->when(fltk::WHEN_RELEASE|fltk::WHEN_ENTER_KEY);
        }
         {fltk::Input* o = snap_input = new fltk::Input(75, 40, 100, 22, "Snap:");
          o->labelsize(14);
          o->textsize(14);
          o->callback((fltk::Callback*)alignment_cb, (void*)(3));
          o->when(fltk::WHEN_RELEASE|fltk::WHEN_ENTER_KEY);
        }
         {fltk::Group* o = new fltk::Group(73, 75, 207, 85, "Widget\n Size:");
          o->align(fltk::ALIGN_LEFT);
          o->begin();
           {fltk::RadioButton* o = def_widget_size[0] = new fltk::RadioButton(0, 0, 83, 25, "Tiny");
            o->labelsize(8);
            o->callback((fltk::Callback*)default_widget_size_cb, (void*)(8));
            o->align(fltk::ALIGN_LEFT|fltk::ALIGN_RIGHT|fltk::ALIGN_INSIDE);
          }
           {fltk::RadioButton* o = def_widget_size[1] = new fltk::RadioButton(100, 0, 70, 25, "Small");
            o->labelsize(11);
            o->callback((fltk::Callback*)default_widget_size_cb, (void*)(11));
          }
           {fltk::RadioButton* o = def_widget_size[2] = new fltk::RadioButton(0, 25, 83, 25, "Normal");
            o->callback((fltk::Callback*)default_widget_size_cb, (void*)(14));
            o->align(fltk::ALIGN_LEFT|fltk::ALIGN_RIGHT|fltk::ALIGN_INSIDE);
          }
           {fltk::RadioButton* o = def_widget_size[3] = new fltk::RadioButton(100, 25, 90, 25, "medium");
            o->labelsize(18);
            o->callback((fltk::Callback*)default_widget_size_cb, (void*)(18));
          }
           {fltk::RadioButton* o = def_widget_size[4] = new fltk::RadioButton(0, 50, 83, 26, "large");
            o->labelsize(24);
            o->callback((fltk::Callback*)default_widget_size_cb, (void*)(24));
            o->align(fltk::ALIGN_LEFT|fltk::ALIGN_RIGHT|fltk::ALIGN_INSIDE);
          }
           {fltk::RadioButton* o = def_widget_size[5] = new fltk::RadioButton(100, 50, 95, 25, "huge");
            o->labelsize(32);
            o->callback((fltk::Callback*)default_widget_size_cb, (void*)(32));
          }
          o->end();
        }
        o->end();
      }
      o->end();
    }
     {fltk::Button* o = new fltk::Button(139, 222, 106, 25, "Close");
      o->callback((fltk::Callback*)cb_Close);
    }
    o->end();
    o->set_non_modal();
    o->resizable(o);
  }
  return  w;
}

fltk::DoubleBufferWindow *shell_window=(fltk::DoubleBufferWindow *)0;

fltk::Input *shell_command_input=(fltk::Input *)0;

static void cb_shell_command_input(fltk::Input*, void*) {
  prefs.shell_command(shell_command_input->value());
}

fltk::CheckButton *shell_writecode_button=(fltk::CheckButton *)0;

static void cb_shell_writecode_button(fltk::CheckButton*, void*) {
  prefs.shell_writecode(shell_writecode_button->value());
}

fltk::CheckButton *shell_writemsgs_button=(fltk::CheckButton *)0;

static void cb_shell_writemsgs_button(fltk::CheckButton*, void*) {
  prefs.shell_writemsgs(shell_writemsgs_button->value());
}

fltk::CheckButton *shell_savefl_button=(fltk::CheckButton *)0;

static void cb_shell_savefl_button(fltk::CheckButton*, void*) {
  prefs.shell_savefl(shell_savefl_button->value());
}

static void cb_Cancel(fltk::Button*, void*) {
  shell_window->hide();
}

fltk::DoubleBufferWindow *shell_run_window=(fltk::DoubleBufferWindow *)0;

fltk::TextDisplay *shell_run_display=(fltk::TextDisplay *)0;

fltk::ReturnButton *shell_run_button=(fltk::ReturnButton *)0;

static void cb_shell_run_button(fltk::ReturnButton*, void*) {
  shell_run_window->hide();
}

fltk::DoubleBufferWindow* make_shell_window() {
  fltk::DoubleBufferWindow* w;
   {fltk::DoubleBufferWindow* o = shell_window = new fltk::DoubleBufferWindow(365, 125, "Shell Command");
    o->type(241);
    o->shortcut(0xff1b);
    o->begin();
     {fltk::Input* o = shell_command_input = new fltk::Input(10, 27, 347, 25, "Command:");
      o->labelfont(fltk::HELVETICA_BOLD);
      o->callback((fltk::Callback*)cb_shell_command_input);
      o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
      shell_command_input->value(prefs.shell_command());
    }
     {fltk::CheckButton* o = shell_writecode_button = new fltk::CheckButton(127, 61, 93, 19, "Write Code");
      o->callback((fltk::Callback*)cb_shell_writecode_button);
      shell_writecode_button->value(prefs.shell_writecode() ? true : false);
    }
     {fltk::CheckButton* o = shell_writemsgs_button = new fltk::CheckButton(231, 61, 126, 19, "Write Messages");
      o->callback((fltk::Callback*)cb_shell_writemsgs_button);
      o->hide();
      shell_writemsgs_button->value(prefs.shell_writemsgs() ? true : false);
    }
     {fltk::CheckButton* o = shell_savefl_button = new fltk::CheckButton(10, 61, 108, 19, "Save Fluid File");
      o->callback((fltk::Callback*)cb_shell_savefl_button);
      shell_savefl_button->value(prefs.shell_savefl() ? true : false);
    }
     {fltk::ReturnButton* o = new fltk::ReturnButton(132, 90, 143, 25, "Run Command");
      o->shortcut(0xff0d);
      o->callback((fltk::Callback*)do_shell_command);
    }
     {fltk::Button* o = new fltk::Button(285, 90, 72, 25, "Cancel");
      o->callback((fltk::Callback*)cb_Cancel);
    }
    o->end();
    o->resizable(o);
  }
   {fltk::DoubleBufferWindow* o = shell_run_window = new fltk::DoubleBufferWindow(555, 430, "Shell Command Output");
    w = o;
    o->type(241);
    o->shortcut(0xff1b);
    o->begin();
     {fltk::TextDisplay* o = shell_run_display = new fltk::TextDisplay(10, 10, 535, 375);
      o->textfont(fltk::COURIER);
      shell_run_buffer = new fltk::TextBuffer();
      shell_run_display->buffer(shell_run_buffer);
    }
     {fltk::ReturnButton* o = shell_run_button = new fltk::ReturnButton(468, 395, 77, 25, "Close");
      o->shortcut(0xff0d);
      o->callback((fltk::Callback*)cb_shell_run_button);
    }
    o->end();
    o->resizable(o);
  }
  return  w;
}
