// generated by Fast Light User Interface Designer (fluid) version 2,0003

#include "tabs.h"
#include <efltk/Fl_ListView.h>

Fl_Window *foo_window;
Fl_Tabs   *foo_tabs;

Fl_Align   tabAlignes[] = {FL_ALIGN_TOP,FL_ALIGN_BOTTOM,FL_ALIGN_LEFT,FL_ALIGN_RIGHT};

static void cb_cancel(Fl_Button*, void*) {
    exit(1);
}

static void cb_OK(Fl_Return_Button*, void*) {
    exit(0);
}

int tabAlignIndex = 0;
static void cb_mode(Fl_Button*, void*) {
   tabAlignIndex = (tabAlignIndex + 1) % 4;
   foo_tabs->tabs_mode(tabAlignes[tabAlignIndex]);   
}

int main (int argc, char **argv) {

    Fl_Window* w;
    {Fl_Window* o = foo_window = new Fl_Window(320, 305);
        w = o;
        {Fl_Tabs* o = foo_tabs = new Fl_Tabs(10, 10, 300, 200);
            {Fl_Group* o = new Fl_Group(0, 20, 300, 180, "Label1");
                new Fl_Input(50, 14, 240, 22, "input:");
                new Fl_Input(50, 36, 240, 22, "input2:");
                {Fl_Wordwrap_Input* o = new Fl_Wordwrap_Input(50, 58, 240, 99, "input3:");
                    o->type(20);
                }
                o->end();
                Fl_Group::current()->resizable(o);
            }
            {Fl_Group* o = new Fl_Group(0, 20, 300, 180, "tab2");
                o->hide();
                new Fl_Button(10, 25, 100, 22, "button1");
                new Fl_Input(130, 58, 100, 22, "input in box2");
                new Fl_Button(20, 113, 260, 22, "This is stuff inside the Fl_Group \"tab2\"");
                o->end();
            }
            {Fl_Group* o = new Fl_Group(0, 20, 300, 180, "tab3");
                o->hide();
                new Fl_Button(10, 30, 60, 80, "button2");
                new Fl_Button(70, 30, 60, 80, "button");
                new Fl_Button(130, 30, 60, 80, "button");
                o->end();
            }
            {Fl_Group* o = new Fl_Group(0, 20, 300, 180, "tab4");
                o->label_font(fl_fonts+2);
                o->hide();
                Fl_ListView *lv = new Fl_ListView(10, 20, 200, 120, "ListView");
                lv->add_column("column 1",70);
                lv->add_column("column 2",70);
                lv->add_column("column 3",70);
                for (int i=0; i < 7; i++) {
                    new Fl_ListView_Item("Item 1","Item 2","Item in column 3");
                }
                lv->end();
                o->resizable(lv);
                o->end();
            }
            {Fl_Group* o = new Fl_Group(0, 20, 300, 180, "     tab5      ");
                o->label_type(FL_ENGRAVED_LABEL);
                o->hide();
                new Fl_Button(10, 50, 60, 80, "button2");
                new Fl_Button(80, 60, 60, 80, "button");
                {Fl_Clock* o = new Fl_Clock(155, 13, 100, 100, "Make sure this clock does not use processor time when this tab is hidden or w\
                            indow is iconized");
                    o->box(FL_OSHADOW_BOX);
                    o->label_font(fl_fonts+8);
                    o->color((Fl_Color)238);
                    o->label_size(10);
                    o->align(130);
                }
                o->end();
            }
            o->end();
            Fl_Group::current()->resizable(o);
        }
        new Fl_Input(60, 220, 130, 22, "inputA:");
        new Fl_Input(60, 242, 250, 22, "inputB:");
     {Fl_Button* o = new Fl_Button(110, 275, 60, 22, "mode");
      o->callback((Fl_Callback*)cb_mode);
     }
        {Fl_Button* o = new Fl_Button(180, 275, 60, 22, "cancel");
            o->callback((Fl_Callback*)cb_cancel);
        }
        {Fl_Return_Button* o = new Fl_Return_Button(250, 275, 60, 22, "OK");
            o->shortcut(0xff0d);
            o->callback((Fl_Callback*)cb_OK);
        }
        o->end();
    }
    w->show(argc, argv);
    return  Fl::run();
}
