8
# Copyright (C) 2006 Slaven Rezic. All rights reserved.
9
# This program is free software; you can redistribute it and/or
10
# modify it under the same terms as Perl itself.
12
# Mail: slaven@rezic.de
13
# WWW: http://www.rezic.de/eserte/
20
$TOP = $MW->WidgetDemo(
23
This window displays the names of Tk's built-in
24
resp. predefined X11 cursors. Click on the names
25
to see the cursor shape.
27
-geometry_manager => 'grid',
28
-title => 'Predefined cursors',
29
-iconname => 'Predefined cursors',
34
for my $cursorfonth (Tk->findINC("X11/cursorfont.h"),
35
"/usr/X11R6/include/X11/cursorfont.h",
36
"/usr/include/X11/cursorfont.h",
38
last TRY_CURSORFONTH if (open $fh, $cursorfonth);
40
$TOP->Label(-text => "Sorry. I can't find X11/cursorfont.h on this system.")->grid;
48
next if $cursorname eq 'num_glyphs';
49
push @cursors, $cursorname;
53
$lb = $TOP->Scrolled("Listbox", -scrollbars => "ose")->grid;
54
$lb->insert("end", @cursors);
55
$lb->bind("<1>", sub {
56
my($inx) = $lb->curselection;
57
$lb->configure(-cursor => $cursors[$inx]);