Tweak themes for more color consistency.
[ntk.git] / test / tile.cxx
blobfa96f1fb55466b4eb5abc790b4f5307f740cca9a
1 //
2 // "$Id: tile.cxx 7903 2010-11-28 21:06:39Z matt $"
3 //
4 // Tile test program for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2010 by Bill Spitzak and others.
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Library General Public
10 // License as published by the Free Software Foundation; either
11 // version 2 of the License, or (at your option) any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Library General Public License for more details.
18 // You should have received a copy of the GNU Library General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 // USA.
23 // Please report all bugs and problems on the following page:
25 // http://www.fltk.org/str.php
28 #include <FL/Fl.H>
29 #include <FL/Fl_Double_Window.H>
30 #include <FL/Fl_Tile.H>
31 #include <FL/Fl_Box.H>
33 //#define TEST_INACTIVE
35 int main(int argc, char** argv) {
36 Fl_Double_Window window(300,300);
37 window.box(FL_NO_BOX);
38 window.resizable(window);
39 Fl_Tile tile(0,0,300,300);
40 Fl_Box box0(0,0,150,150,"0");
41 box0.box(FL_DOWN_BOX);
42 box0.color(9);
43 box0.labelsize(36);
44 box0.align(FL_ALIGN_CLIP);
45 Fl_Double_Window w1(150,0,150,150,"1");
46 w1.box(FL_NO_BOX);
47 Fl_Box box1(0,0,150,150,"1\nThis is a\nchild\nwindow");
48 box1.box(FL_DOWN_BOX);
49 box1.color(19);
50 box1.labelsize(18);
51 box1.align(FL_ALIGN_CLIP);
52 w1.resizable(box1);
53 w1.end();
55 // Fl_Tile tile2(0,150,150,150);
56 Fl_Box box2a(0,150,70,150,"2a");
57 box2a.box(FL_DOWN_BOX);
58 box2a.color(12);
59 box2a.labelsize(36);
60 box2a.align(FL_ALIGN_CLIP);
61 Fl_Box box2b(70,150,80,150,"2b");
62 box2b.box(FL_DOWN_BOX);
63 box2b.color(13);
64 box2b.labelsize(36);
65 box2b.align(FL_ALIGN_CLIP);
66 //tile2.end();
68 //Fl_Tile tile3(150,150,150,150);
69 Fl_Box box3a(150,150,150,70,"3a");
70 box3a.box(FL_DOWN_BOX);
71 box3a.color(12);
72 box3a.labelsize(36);
73 box3a.align(FL_ALIGN_CLIP);
74 Fl_Box box3b(150,150+70,150,80,"3b");
75 box3b.box(FL_DOWN_BOX);
76 box3b.color(13);
77 box3b.labelsize(36);
78 box3b.align(FL_ALIGN_CLIP);
79 //tile3.end();
81 Fl_Box r(10,0,300-10,300-10);
82 tile.resizable(r);
83 // r.box(FL_BORDER_FRAME);
85 tile.end();
86 window.end();
87 #ifdef TEST_INACTIVE // test inactive case
88 tile.deactivate();
89 #endif
90 w1.show();
91 window.show(argc,argv);
92 return Fl::run();
96 // End of "$Id: tile.cxx 7903 2010-11-28 21:06:39Z matt $".