Tweak themes for more color consistency.
[ntk.git] / test / resize.cxx
blob8d13db528fc522e448c2aff0f2eddb27f9362902
1 // generated by Fast Light User Interface Designer (fluid) version 1.0300
3 #include "resize.h"
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) {
36 Fl_Double_Window* w;
37 { Fl_Double_Window* o = new Fl_Double_Window(366, 261);
38 w = o;
39 { Fl_Button* o = new Fl_Button(20, 40, 40, 40, "@<-");
40 o->callback((Fl_Callback*)cb_);
41 } // Fl_Button* o
42 { Fl_Button* o = new Fl_Button(60, 80, 40, 40, "@2->");
43 o->callback((Fl_Callback*)cb_2);
44 } // Fl_Button* o
45 { Fl_Button* o = new Fl_Button(100, 40, 40, 40, "@->");
46 o->callback((Fl_Callback*)cb_1);
47 } // Fl_Button* o
48 { Fl_Button* o = new Fl_Button(60, 0, 40, 40, "@8->");
49 o->callback((Fl_Callback*)cb_8);
50 } // Fl_Button* o
51 { Fl_Button* o = new Fl_Button(30, 130, 110, 40, "grow");
52 o->labelfont(1);
53 o->labelsize(18);
54 o->callback((Fl_Callback*)cb_grow);
55 } // Fl_Button* o
56 { Fl_Button* o = new Fl_Button(30, 190, 110, 40, "shrink");
57 o->labelfont(1);
58 o->labelsize(18);
59 o->callback((Fl_Callback*)cb_shrink);
60 } // Fl_Button* o
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));
66 } // Fl_Box* o
67 o->end();
68 o->resizable(o);
69 } // Fl_Double_Window* o
70 w->show(argc, argv);
71 return Fl::run();