Debian Codegraph @

fltk/test/multi.py

raw symbols SCIP
1 #
2 # "$Id: multi.py 28 2003-07-16 20:00:27Z andreasheld $"
3 #
4 # Multiline input 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
29 def btn_cb(ptr):
30 import sys
31 sys.exit(0)
32
33 window = Fl_Window(100, 100, 200, 220, "Inputs")
34
35 input = Fl_Multiline_Input(10, 10, 180, 90)
36
37 button = Fl_Button(80, 110, 40, 20, "Exit")
38 button.callback(btn_cb)
39
40 input.value("Here is a\nMultiline input.\nBelow are the Secret\nInt, and Float\ninput widgets.")
41
42 input2 = Fl_Secret_Input(10, 140, 180, 20)
43 input2.value("secret")
44
45 input3 = Fl_Int_Input(10, 165, 180, 20)
46 input3.value("12345")
47
48 input4 = Fl_Float_Input(10, 190, 180, 20)
49 input4.value("12.44")
50
51 window.end()
52 window.show()
53
54 Fl.run()
55