Debian Codegraph @

fltk/test/symbols.py

raw symbols SCIP
1 #
2 # "$Id: symbols.py 495 2013-03-30 09:39:45Z andreasheld $"
3 #
4 # Symbols 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 N=0
31 W=60
32 H=60
33 ROWS=5
34 COLS=5
35 window=None
36
37 def bt(name):
38 global N
39 x = N%COLS
40 y = int(N/COLS)
41 N = N+1
42 x = x*W+10
43 y = y*H+10
44 b = Fl_Box(x,y,W-20,H-20,name)
45 b.box(FL_UP_BOX)
46 b.label(name)
47 b.labeltype(FL_NORMAL_LABEL)
48 b.labelcolor(FL_DARK3)
49 return b
50
51 window = Fl_Window(COLS*W,ROWS*H+20)
52
53 b1 = bt("@->")
54 b2 = bt("@>")
55 b3 = bt("@>>")
56 b4 = bt("@>|")
57 b5 = bt("@>[]")
58 b6 = bt("@|>")
59 b7 = bt("@<-")
60 b8 = bt("@<")
61 b9 = bt("@<<")
62 b10 = bt("@|<")
63 b11 = bt("@[]<")
64 b12 = bt("@<|")
65 b13 = bt("@<->")
66 b14 = bt("@-->")
67 b15 = bt("@+")
68 b16 = bt("@->|")
69 b17 = bt("@||")
70 b18 = bt("@arrow")
71 b19 = bt("@returnarrow")
72 b20 = bt("@square")
73 b21 = bt("@circle")
74 b22 = bt("@line")
75 b23 = bt("@menu")
76 b24 = bt("@UpArrow")
77 b25 = bt("@DnArrow")
78
79 window.resizable(window.this)
80 window.show(len(sys.argv), sys.argv)
81
82 Fl.run()