File: chiark-tcl-applet-wrapper

package info (click to toggle)
chiark-tcl-applet 1.0-2
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 144 kB
  • sloc: tcl: 860; makefile: 32
file content (47 lines) | stat: -rwxr-xr-x 1,007 bytes parent folder | download
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
39
40
41
42
43
44
45
46
47
#!/usr/bin/wish -f
# -*- Tcl -*-

# Copyright 2016,2020 Ian Jackson
# SPDX-License-Identifier: GPL-3.0-or-later
# There is NO WARRANTY.

# usage:
#   chiark-tcl-applet-wrapper program arguments...
# will run
#   program arguments... WINDOWID
# and program sbould put up an X11 window as a child of WINDOWID
#
# eg, for a silly example:
#   .../example xterm -id

set lib .

source $lib/applet.tcl
source $lib/subproc.tcl
source $lib/utils.tcl

applet::become

set debug::debug puts

foreach b {1 3} {
    applet::setup-button-menu $b
}

.m1 add command -command { applet::msel; puts hi } -label hi
.m3 add command -command { applet::msel; puts boo } -label boo

#image create bitmap ims -file gs_s.xbm   
#image create bitmap ims -file /usr/share/ghostscript/8.71/lib/gs_s.xbm   
#setimage ims
#setimage ims

applet::setup-tooltip { puts VIS } { puts INVIS }
applet::tooltip-set "line\nanother"

proc cmdline {id orientation} {
    global argv
    return [concat $argv $id]
}

applet::setup-subproc cmdline