File: multiclick.e

package info (click to toggle)
entity 0.7.2-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,352 kB
  • ctags: 5,272
  • sloc: ansic: 61,707; sh: 7,921; makefile: 732; perl: 399
file content (38 lines) | stat: -rwxr-xr-x 1,296 bytes parent folder | download | duplicates (3)
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 &lt;johannes@zellner.org&gt;"
  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>