2
# "$Id: iconize.py 35 2003-09-29 21:39:48Z andreasheld $"
4
# Iconize test program for pyFLTK the Python bindings
5
# for the Fast Light Tool Kit (FLTK).
7
# FLTK copyright 1998-1999 by Bill Spitzak and others.
8
# pyFLTK copyright 2003 by Andreas Held and others.
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 as published by the Free Software Foundation either
13
# version 2 of the License, or (at your option) any later version.
15
# This library is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
# Library General Public License for more details.
20
# You should have received a copy of the GNU Library General Public
21
# License along with this library if not, write to the Free Software
22
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25
# Please report all bugs and problems to "pyfltk-user@lists.sourceforge.net".
32
def iconize_cb(ptr, win):
35
def show_cb(ptr, win):
38
def hide_cb(ptr, win):
47
mainw = Fl_Window(200,200)
49
mainw.show(len(sys.argv),sys.argv)
51
control = Fl_Window(120,120)
53
hide_button = Fl_Button(0,0,120,30,"hide()")
54
hide_button.callback(hide_cb, mainw);
56
iconize_button = Fl_Button(0,30,120,30,"iconize()")
57
iconize_button.callback(iconize_cb, mainw)
59
show_button = Fl_Button(0,60,120,30,"show()")
60
show_button.callback(show_cb, mainw)
62
show_button2 = Fl_Button(0,90,120,30,"show this")
63
show_button2.callback(show_cb, control)
65
# Fl_Box box(FL_NO_BOX,0,60,120,30,"Also try running\nwith -i switch");
69
control.callback(window_cb)