1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#!/usr/bin/env entity
<!--
FILE: "/home/joze/pub/entity/entity/t/multiclick.e"
LAST MODIFICATION: "Sat, 13 May 2000 23:06:51 +0200 (joze)"
(C) 2000 by Johannes Zellner, <johannes@zellner.org>
$Id: multiclick.e,v 1.2 2000/06/01 01:06:23 imain Exp $
-->
<object>
<window
tooltip = "multiclick.e by Johannes Zellner <johannes@zellner.org>"
onbuttonpress = "onbuttonpress"
ondoubleclick = "ondoubleclick"
ontripleclick = "ontripleclick"
ondelete = "entity:exit">
<label text = "try single, double and triple clicks on this window"/>
<label text = "note, that installing a double click handler will"/>
<label text = "delay triggering a buttonpress handler and installing"/>
<label text = "a triple click handler will delay triggering a"/>
<label text = "doubleclick handler"/>
<?perl
sub onbuttonpress {
my ($node, $button, $x, $y) = @_;
print("buttonpress event: x=$x, y=$y, button $button\n");
}
sub ondoubleclick {
my ($node, $button, $x, $y) = @_;
print("doubleclick event: x=$x, y=$y, button $button\n");
}
sub ontripleclick {
my ($node, $button, $x, $y) = @_;
print("tripleclick event: x=$x, y=$y, button $button\n");
}
?>
</window>
</object>
|