File: help_keys.tcl

package info (click to toggle)
plplot 5.15.0%2Bdfsg2-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,484 kB
  • sloc: ansic: 79,703; xml: 28,583; cpp: 20,033; ada: 19,456; tcl: 12,081; f90: 11,431; ml: 7,276; java: 6,863; python: 6,792; sh: 3,274; perl: 828; lisp: 75; makefile: 74; sed: 34; fortran: 6
file content (63 lines) | stat: -rw-r--r-- 1,788 bytes parent folder | download | duplicates (5)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#----------------------------------------------------------------------------
# help_keys w
#
# Create a top-level window that displays info for On keys.. help item.
# Maurice LeBrun, IFS
# Adapted from mkStyles.tcl from widget demo.
#
# Arguments:
#    w -	Name to use for new top-level window.
#----------------------------------------------------------------------------

proc help_keys {{w .help_keys}} {
    catch {destroy $w}
    toplevel $w
    dpos $w
    wm title $w "Help on keys"
    wm iconname $w "help_keys"
    normal_text_setup $w

    insertWithTags $w.t {\
When a plframe widget has the input focus, keyboard input is relayed to
its remote TK driver.  The default actions of the keyboard handler are as
follows:

	"Q" | <Ctrl-x>		Terminate program
	<Return> or <Page Down>	Advance to the next page
	"m"			Toogle top menus
	"z"			enter zoom (Cliking once zooms x 2)
	"b"			back zoom
	"f"			forward zoom
	"r"			reset zoom
	"P"			print
	"s"			save again
	"5"			scroll magnification factor ??
	"1"			scroll speed	??
	<left><right><up><down>	scroll after zoom
	<Alt><key>		increase scroll speed

The user code can supply its own keyboard handler, and thereby add to
or modify these actions (this is in fact what is done by plrender).

} normal
    insertWithTags $w.t {
plrender} bold
    insertWithTags $w.t {\
 supports the following additional set of actions:

<Backspace>
<Delete>	Back page
<Page up>

+<n><Return>	Seek forward <n> pages.
-<n><Return>	Seek backward <n> pages.

<n><Return>	Seek to page <n>.

Both <Backspace> and <Delete> are recognized for a back-page since the
target system may use either as its erase key.  <Page Up> is present on
some keyboards (different from keypad key).
} normal
    $w.t configure -state disabled
    $w.t mark set insert 0.0
}