Debian Codegraph @

fltk/test/tile.py

raw symbols SCIP
1 #
2 # "$Id: tile.py 172 2006-01-26 07:45:15Z andreasheld $"
3 #
4 # Tiling test program for pyFLTK the Python bindings
5 # for the Fast Light Tool Kit (FLTK).
6 #
7 # FLTK copyright 1998-1999 by Bill Spitzak and others.
8 # pyFLTK copyright 2003 by Andreas Held and others.
9 #
10 # This library is free software you can redistribute it and/or
11 # modify it under the terms of the GNU Library General Public
12 # License, version 2.0 as published by the Free Software Foundation.
13 #
14 # This library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Library General Public License for more details.
18 #
19 # You should have received a copy of the GNU Library General Public
20 # License along with this library if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 # USA.
23 #
24 # Please report all bugs and problems to "[email protected]".
25 #
26
27 from fltk import *
28 import sys
29
30 window = Fl_Window(300, 300)
31 window.box(FL_NO_BOX)
32 window.resizable(window)
33 tile = Fl_Tile(0,0,300,300)
34 box0 = Fl_Box(0,0,150,150,"0")
35 box0.box(FL_DOWN_BOX)
36 box0.color(9)
37 box0.labelsize(36)
38 box0.align(FL_ALIGN_CLIP)
39
40 w1 = Fl_Window(150,0,150,150,"1")
41 w1.box(FL_NO_BOX)
42
43 box1 = Fl_Box(0,0,150,150,"1\nThis is a\nchild\nwindow")
44 box1.box(FL_DOWN_BOX)
45 box1.color(19)
46 box1.labelsize(18)
47 box1.align(FL_ALIGN_CLIP)
48 w1.resizable(box1)
49 w1.end()
50
51 box2a = Fl_Box(0,150,70,150,"2a");
52 box2a.box(FL_DOWN_BOX);
53 box2a.color(12);
54 box2a.labelsize(36)
55 box2a.align(FL_ALIGN_CLIP)
56 box2b = Fl_Box(70,150,80,150,"2b")
57 box2b.box(FL_DOWN_BOX)
58 box2b.color(13)
59 box2b.labelsize(36)
60 box2b.align(FL_ALIGN_CLIP)
61
62 box3a = Fl_Box(150,150,150,70,"3a")
63 box3a.box(FL_DOWN_BOX)
64 box3a.color(12)
65 box3a.labelsize(36)
66 box3a.align(FL_ALIGN_CLIP)
67 box3b = Fl_Box(150,150+70,150,80,"3b")
68 box3b.box(FL_DOWN_BOX)
69 box3b.color(13)
70 box3b.labelsize(36)
71 box3b.align(FL_ALIGN_CLIP)
72
73 r = Fl_Box(10,0,300-10,300-10)
74 tile.resizable(r)
75
76 tile.end()
77 window.end()
78 window.show(len(sys.argv), sys.argv)
79 w1.show()
80 Fl.run()