summaryrefslogtreecommitdiff
path: root/test/style_ui.C
diff options
context:
space:
mode:
Diffstat (limited to 'test/style_ui.C')
-rw-r--r--test/style_ui.C273
1 files changed, 273 insertions, 0 deletions
diff --git a/test/style_ui.C b/test/style_ui.C
new file mode 100644
index 000000000..65d52b883
--- /dev/null
+++ b/test/style_ui.C
@@ -0,0 +1,273 @@
+// generated by Fast Light User Interface Designer (fluid) version 0.99
+
+#include "style_ui.H"
+
+Fl_Window *style_panel;
+
+static void cb_OK(Fl_Return_Button* o, void*) {
+ o->window()->hide();
+}
+
+static void cb_Quit(Fl_Menu_*, void*) {
+ exit(0);
+}
+
+Fl_Menu_Item menu_[] = {
+ {"File", 0, 0, 0, 64, 0, 0, 14, 0},
+ {"Open", 0x8006f, 0, 0, 0, 0, 0, 14, 0},
+ {"Save", 0x80073, 0, 0, 0, 0, 0, 14, 0},
+ {"Merge", 0, 0, 0, 0, 0, 0, 14, 0},
+ {"Quit", 0x80071, (Fl_Callback*)cb_Quit, 0, 0, 0, 0, 14, 0},
+ {0},
+ {"Edit", 0, 0, 0, 64, 0, 0, 14, 0},
+ {"Undo", 0x8007a, 0, 0, 0, 0, 0, 14, 0},
+ {"Cut", 0x80078, 0, 0, 0, 0, 0, 14, 0},
+ {"Copy", 0x80076, 0, 0, 0, 0, 0, 14, 0},
+ {"Paste", 0x80076, 0, 0, 0, 0, 0, 14, 0},
+ {0},
+ {"Font", 0, 0, 0, 64, 0, 0, 14, 0},
+ {"Normal", 0, 0, 0, 0, 0, 0, 14, 0},
+ {"Bold", 0, 0, 0, 0, 0, 1, 14, 0},
+ {"Italic", 0, 0, 0, 0, 0, 2, 14, 0},
+ {"Bold Italic", 0, 0, 0, 0, 0, 0, 14, 0},
+ {"Engrave", 0, 0, 0, 0, 4, 0, 14, 0},
+ {"Emboss", 0, 0, 0, 0, 5, 0, 14, 0},
+ {"@->", 0, 0, 0, 0, 2, 0, 14, 0},
+ {"Small", 0, 0, 0, 0, 0, 0, 10, 0},
+ {0},
+ {"Other", 0, 0, 0, 64, 0, 0, 14, 0},
+ {"help!", 0, 0, 0, 0, 0, 0, 14, 0},
+ {0},
+ {0}
+};
+
+static void cb_click(Fl_Button*, void*) {
+ show_style_panel();
+}
+static Fl_Menu_Item* font_menu();
+
+void show_style_panel() {
+ Fl_Window *w;
+ if (!style_panel) {
+ { Fl_Window* o = style_panel = w = new Fl_Double_Window(335, 425, "style");
+ { Fl_Choice* o = new Fl_Choice(60, 155, 220, 25, "labels:");
+ o->callback((Fl_Callback*)font_cb, (void*)(0));
+ o->menu(font_menu());
+ }
+ { Fl_Value_Input* o = new Fl_Value_Input(280, 155, 50, 25);
+ o->minimum(1);
+ o->maximum(128);
+ o->step(1);
+ o->value(14);
+ o->callback((Fl_Callback*)font_size_cb, (void*)(0));
+ o->when(4);
+ }
+ { Fl_Choice* o = new Fl_Choice(60, 190, 220, 25, "text:");
+ o->callback((Fl_Callback*)font_cb, (void*)(1));
+ o->menu(font_menu());
+ }
+ { Fl_Value_Input* o = new Fl_Value_Input(280, 190, 50, 25);
+ o->minimum(1);
+ o->maximum(128);
+ o->step(1);
+ o->value(14);
+ o->callback((Fl_Callback*)font_size_cb, (void*)(1));
+ o->when(4);
+ }
+ { Fl_Choice* o = new Fl_Choice(60, 225, 220, 25, "menus:");
+ o->callback((Fl_Callback*)font_cb, (void*)(2));
+ o->menu(font_menu());
+ }
+ { Fl_Value_Input* o = new Fl_Value_Input(280, 225, 50, 25);
+ o->minimum(1);
+ o->maximum(128);
+ o->step(1);
+ o->value(14);
+ o->callback((Fl_Callback*)font_size_cb, (void*)(2));
+ o->when(4);
+ }
+ { Fl_Button* o = new Fl_Button(255, 30, 75, 25, "background:");
+ o->box(FL_ENGRAVED_BOX);
+ o->callback((Fl_Callback*)color_button_cb);
+ o->align(4);
+ }
+ { Fl_Button* o = new Fl_Button(255, 60, 75, 25, "foreground:");
+ o->box(FL_ENGRAVED_BOX);
+ o->color(0);
+ o->callback((Fl_Callback*)color_button_cb);
+ o->align(4);
+ }
+ { Fl_Button* o = new Fl_Button(255, 90, 75, 25, "text background:");
+ o->box(FL_ENGRAVED_BOX);
+ o->color(7);
+ o->callback((Fl_Callback*)color_button_cb);
+ o->align(4);
+ }
+ { Fl_Button* o = new Fl_Button(255, 120, 75, 25, "selection:");
+ o->box(FL_ENGRAVED_BOX);
+ o->color(15);
+ o->callback((Fl_Callback*)color_button_cb);
+ o->align(4);
+ }
+ { Fl_Return_Button* o = new Fl_Return_Button(260, 395, 70, 25, "OK");
+ o->callback((Fl_Callback*)cb_OK);
+ }
+ { Fl_Button* o = new Fl_Button(175, 395, 70, 25, "defaults");
+ o->callback((Fl_Callback*)defaults_cb);
+ }
+ { Fl_Value_Slider* o = new Fl_Value_Slider(235, 260, 95, 25, "box thickness:");
+ o->type(1);
+ o->minimum(1);
+ o->maximum(3);
+ o->step(1);
+ o->value(3);
+ o->slider_size(0.3333);
+ o->callback((Fl_Callback*)box_thickness_cb);
+ o->align(4);
+ }
+ { Fl_Value_Slider* o = new Fl_Value_Slider(235, 295, 95, 25, "text box thickness:");
+ o->type(1);
+ o->maximum(2);
+ o->step(1);
+ o->value(2);
+ o->slider_size(0.3333);
+ o->callback((Fl_Callback*)text_box_thickness_cb);
+ o->align(4);
+ }
+ { Fl_Value_Slider* o = new Fl_Value_Slider(235, 335, 95, 25, "scrollbar thickness:");
+ o->type(1);
+ o->minimum(3);
+ o->maximum(30);
+ o->step(1);
+ o->value(17);
+ o->callback((Fl_Callback*)scrollbar_thickness_cb);
+ o->align(4);
+ }
+ o->end();
+ }
+ }
+ style_panel->show();
+}
+
+int main(int argc, char **argv) {
+ Fl_Window *w;
+ { Fl_Window* o = w = new Fl_Double_Window(445, 435);
+ { Fl_Group* o = new Fl_Group(270, 35, 140, 75, "Packed buttons:");
+ o->align(4);
+ { Fl_Button* o = new Fl_Button(270, 35, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(305, 35, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(340, 35, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(375, 35, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(270, 60, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(305, 60, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(340, 60, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(375, 60, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(270, 85, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(305, 85, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(340, 85, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(375, 85, 35, 25, "A");
+ o->type(102);
+ }
+ o->end();
+ }
+ { Fl_Adjuster* o = new Fl_Adjuster(105, 90, 75, 25);
+ o->labeltype(FL_ENGRAVED_LABEL);
+ o->align(4);
+ }
+ { Fl_Counter* o = new Fl_Counter(20, 120, 170, 25, "counter");
+ o->minimum(-1e+06);
+ o->maximum(1e+06);
+ }
+ { Fl_Adjuster* o = new Fl_Adjuster(80, 40, 25, 75, "adjuster:");
+ o->labeltype(FL_SYMBOL_LABEL);
+ o->align(4);
+ }
+ { Fl_Group* o = new Fl_Group(270, 130, 140, 75, "Inactive buttons:");
+ o->align(4);
+ o->deactivate();
+ { Fl_Button* o = new Fl_Button(270, 130, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(305, 130, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(340, 130, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(375, 130, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(270, 155, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(305, 155, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(340, 155, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(375, 155, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(270, 180, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(305, 180, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(340, 180, 35, 25, "A");
+ o->type(102);
+ }
+ { Fl_Button* o = new Fl_Button(375, 180, 35, 25, "A");
+ o->type(102);
+ }
+ o->end();
+ }
+ { Fl_Input* o = new Fl_Input(65, 175, 200, 25, "input:");
+ o->static_value("This is a text input field");
+ }
+ { Fl_Output* o = new Fl_Output(65, 200, 200, 25, "output:");
+ o->static_value("This is a text output field");
+ }
+ { Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 445, 30);
+ o->menu(menu_);
+ }
+ { Fl_Browser* o = new Fl_Browser(0, 235, 440, 200);
+ o->type(3);
+ Fl_Group::current()->resizable(o);
+ o->load("browser.C");
+ o->position(0);
+ }
+ { Fl_Button* o = new Fl_Button(235, 2, 170, 25, "click this to set style");
+ o->color(12);
+ o->selection_color(12);
+ o->callback((Fl_Callback*)cb_click);
+ }
+ o->end();
+ }
+ Fl::visual(FL_RGB);
+ w->show(argc, argv);
+ return Fl::run();
+}