summaryrefslogtreecommitdiff
path: root/test/inactive.C
blob: f787821249162cda929d60707ea5f9501d8124a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// generated by Fast Light User Interface Designer (fluid) version 0.99

#include "inactive.H"

Fl_Group *the_group;

Fl_Menu_Item menu_menu[] = {
 {"item", 0,  0, 0, 0, 0, 3, 14, 0},
 {"item", 0,  0, 0, 0, 0, 3, 14, 0},
 {"item", 0,  0, 0, 0, 0, 3, 14, 0},
 {"item", 0,  0, 0, 0, 0, 3, 14, 0},
 {"item", 0,  0, 0, 0, 0, 3, 14, 0},
 {0}
};

static void cb_active(Fl_Button*, void*) {
  the_group->activate();
}

static void cb_inactive(Fl_Button*, void*) {
  the_group->deactivate();
}

int main(int argc, char **argv) {
  Fl_Window *w;
  { Fl_Window* o = w = new Fl_Window(420, 295);
    { Fl_Group* o = the_group = new Fl_Group(25, 25, 375, 235, "activate()/deactivate() called on this Fl_Group");
      o->box(FL_ENGRAVED_FRAME);
      o->align(17);
      new Fl_Button(50, 50, 105, 25, "button");
      { Fl_Group* o = new Fl_Group(50, 100, 105, 85, "Child group");
        o->box(FL_DOWN_FRAME);
        { Fl_Check_Button* o = new Fl_Check_Button(50, 100, 105, 25, "red");
          o->type(102);
          o->down_box(FL_DIAMOND_DOWN_BOX);
          o->labelcolor(1);
        }
        { Fl_Check_Button* o = new Fl_Check_Button(50, 120, 105, 25, "green");
          o->type(102);
          o->down_box(FL_DIAMOND_DOWN_BOX);
          o->selection_color(2);
          o->labelcolor(2);
        }
        { Fl_Check_Button* o = new Fl_Check_Button(50, 140, 105, 25, "blue");
          o->type(102);
          o->down_box(FL_DIAMOND_DOWN_BOX);
          o->selection_color(4);
          o->labelcolor(4);
        }
        { Fl_Check_Button* o = new Fl_Check_Button(50, 160, 105, 25, "white");
          o->type(102);
          o->down_box(FL_DIAMOND_DOWN_BOX);
          o->selection_color(7);
          o->labelcolor(7);
        }
        o->end();
      }
      { Fl_Slider* o = new Fl_Slider(165, 50, 24, 150, "Fl_Slider");
        o->value(0.5);
      }
      { Fl_Input* o = new Fl_Input(195, 50, 195, 30);
        o->static_value("Fl_Input");
      }
      { Fl_Menu_Button* o = new Fl_Menu_Button(235, 105, 110, 30, "menu");
        o->menu(menu_menu);
      }
      { Fl_Box* o = new Fl_Box(240, 205, 145, 50, "Fl_Box");
        o->box(FL_EMBOSSED_FRAME);
        o->labeltype(FL_SHADOW_LABEL);
        o->labelfont(3);
        o->labelsize(38);
      }
      { Fl_Value_Output* o = new Fl_Value_Output(255, 165, 130, 30, "value:");
        o->maximum(10000);
        o->step(1);
        o->textfont(5);
        o->textsize(24);
        o->textcolor(4);
      }
      { Fl_Scrollbar* o = new Fl_Scrollbar(40, 220, 180, 20, "scrollbar");
        o->type(1);
        o->maximum(100);
      }
      o->end();
    }
    { Fl_Button* o = new Fl_Button(25, 265, 185, 25, "active");
      o->type(102);
      o->value(1);
      o->callback((Fl_Callback*)cb_active);
    }
    { Fl_Button* o = new Fl_Button(220, 265, 180, 25, "inactive");
      o->type(102);
      o->callback((Fl_Callback*)cb_inactive);
    }
    o->end();
  }
  w->show(argc, argv);
  return Fl::run();
}