Debian Codegraph @

fltk/test/tabs.py

raw symbols SCIP
1 #
2 # "$Id: tabs.py 531 2019-12-27 12:15:45Z andreasheld $"
3 #
4 # Tabs 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
28 from fltk import *
29
30 # global object names
31 foo_window = None # type 'Fl_Window' from '()'
32
33
34 def main():
35 global foo_window
36
37 foo_window = Fl_Window(733, 489, 321, 324)
38
39 o_2_0 = Fl_Tabs(10, 10, 300, 200)
40
41 o_3_0 = Fl_Group(10, 30, 300, 180, "Label1")
42
43 o_4_0 = Fl_Input(60, 50, 240, 40, "input:")
44 o_4_0.label('input:')
45
46 o_4_1 = Fl_Input(60, 90, 240, 30, "input2:")
47 o_4_1.label('input2:')
48
49 o_4_2 = Fl_Input(60, 120, 240, 80, "input3:")
50 o_4_2.label('input3:')
51 o_3_0.selection_color(1)
52 o_3_0.resizable(o_3_0.this)
53 o_3_0.label('Label1')
54 o_3_0.end()
55
56 o_3_1 = Fl_Group(10, 30, 300, 180, "tab2")
57
58 o_4_0 = Fl_Button(20, 60, 100, 30, "button1")
59 o_4_0.label('button1')
60
61 o_4_1 = Fl_Input(140, 100, 100, 30, "input in box2")
62 o_4_1.label('input in box2')
63
64 o_4_2 = Fl_Button(30, 140, 260, 30, "This is stuff inside the Fl_Group tab2")
65 o_4_2.label("This is stuff inside the Fl_Group tab2")
66
67 o_4_3 = Fl_Button(30, 170, 260, 30, "Test event blocking by modal window")
68 o_4_3.label('Test event blocking by modal window')
69 o_3_1.selection_color(2)
70 o_3_1.label('tab2')
71 o_3_1.end()
72
73 o_3_2 = Fl_Group(10, 30, 300, 180, "tab3")
74
75 o_4_0 = Fl_Button(20, 60, 60, 80, "button2")
76 o_4_0.label('button2')
77
78 o_4_1 = Fl_Button(80, 60, 60, 80, "button")
79 o_4_1.label('button')
80
81 o_4_2 = Fl_Button(140, 60, 60, 80, "button")
82 o_4_2.label('button')
83 o_3_2.selection_color(3)
84 o_3_2.label('tab3')
85 o_3_2.end()
86
87 o_3_3 = Fl_Group(10, 30, 300, 180, "tab4")
88
89 o_4_0 = Fl_Button(20, 50, 60, 110, "button2")
90 o_4_0.label('button2')
91
92 o_4_1 = Fl_Button(80, 50, 60, 110, "button")
93 o_4_1.label('button')
94
95 o_4_2 = Fl_Button(140, 50, 60, 110, "button")
96 o_4_2.label('button')
97 o_3_3.selection_color(5)
98 o_3_3.labelfont(2)
99 o_3_3.label('tab4')
100 o_3_3.end()
101
102 o_3_4 = Fl_Group(10, 30, 300, 180, " tab5 ")
103
104 o_4_0 = Fl_Button(20, 80, 60, 80, "button2")
105 o_4_0.label('button2')
106
107 o_4_1 = Fl_Button(90, 90, 60, 80, "button")
108 o_4_1.label('button')
109
110 o_4_2 = Fl_Clock(160, 50, 100, 100, "Make sure this clock does not use processor time when this tab is hidden or window is iconized")
111 o_4_2.selection_color(0)
112 o_4_2.align(130)
113 o_4_2.labelsize(10)
114 o_4_2.box(fl_define_FL_OVAL_BOX()+1)
115 o_4_2.labelfont(8)
116 o_4_2.color(238)
117 o_4_2.label('Make sure this clock does not use processor time when this tab is hidden or window is iconized')
118 o_3_4.labeltype(fl_define_FL_ENGRAVED_LABEL())
119 o_3_4.label(' tab5 ')
120 o_3_4.end()
121 o_2_0.selection_color(7)
122 o_2_0.resizable(o_2_0.this)
123 o_2_0.end()
124
125 o_2_1 = Fl_Input(60, 220, 130, 30, "inputA:")
126 o_2_1.label('inputA:')
127
128 o_2_2 = Fl_Input(60, 250, 250, 30, "inputB:")
129 o_2_2.label('inputB:')
130
131 o_2_3 = Fl_Button(180, 290, 60, 30, "cancel")
132 o_2_3.label('cancel')
133
134 o_2_4 = Fl_Return_Button(250, 290, 60, 30, "OK")
135 o_2_4.label('OK')
136 foo_window.resizable(foo_window.this)
137 foo_window.end()
138
139 return foo_window
140
141
142
143 if __name__=='__main__':
144 import sys
145 window = main()
146 window.show(len(sys.argv), sys.argv)
147 Fl.run()