1 // generated by Fast Light User Interface Designer (fluid) version 1.0300
5 static void cb_(Fl_Button
* o
, void*) {
6 Fl_Window
* w
= o
->window();
7 w
->position(w
->x()-50,w
->y());
10 static void cb_2(Fl_Button
* o
, void*) {
11 Fl_Window
* w
= o
->window();
12 w
->position(w
->x(),w
->y()+50);
15 static void cb_1(Fl_Button
* o
, void*) {
16 Fl_Window
* w
= o
->window();
17 w
->position(w
->x()+50,w
->y());
20 static void cb_8(Fl_Button
* o
, void*) {
21 Fl_Window
* w
= o
->window();
22 w
->position(w
->x(),w
->y()-50);
25 static void cb_grow(Fl_Button
* o
, void*) {
26 Fl_Window
* w
= o
->window();
27 w
->size(w
->w()+20, w
->h()+20);
30 static void cb_shrink(Fl_Button
* o
, void*) {
31 Fl_Window
* w
= o
->window();
32 w
->size(w
->w()-20, w
->h()-20);
35 int main(int argc
, char **argv
) {
37 { Fl_Double_Window
* o
= new Fl_Double_Window(366, 261);
39 { Fl_Button
* o
= new Fl_Button(20, 40, 40, 40, "@<-");
40 o
->callback((Fl_Callback
*)cb_
);
42 { Fl_Button
* o
= new Fl_Button(60, 80, 40, 40, "@2->");
43 o
->callback((Fl_Callback
*)cb_2
);
45 { Fl_Button
* o
= new Fl_Button(100, 40, 40, 40, "@->");
46 o
->callback((Fl_Callback
*)cb_1
);
48 { Fl_Button
* o
= new Fl_Button(60, 0, 40, 40, "@8->");
49 o
->callback((Fl_Callback
*)cb_8
);
51 { Fl_Button
* o
= new Fl_Button(30, 130, 110, 40, "grow");
54 o
->callback((Fl_Callback
*)cb_grow
);
56 { Fl_Button
* o
= new Fl_Button(30, 190, 110, 40, "shrink");
59 o
->callback((Fl_Callback
*)cb_shrink
);
61 { Fl_Box
* o
= new Fl_Box(150, 10, 160, 220, "This is a test of program-generated resize() of a window. The window should \
62 move or resize once when each button is clicked. The program and window manag\
63 er should not go into fits echoing resizes back and forth!");
64 o
->box(FL_BORDER_BOX
);
65 o
->align(Fl_Align(132|FL_ALIGN_INSIDE
));
69 } // Fl_Double_Window* o