This file is indexed.

/usr/share/doc/plplot-doc/html/extended-wish.html is in plplot-doc 5.10.0-0ubuntu5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter&#160;15.&#160;Building an Extended WISH</title><link rel="stylesheet" type="text/css" href="stylesheet.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The PLplot Plotting Library"><link rel="up" href="part_bindings.html" title="Part&#160;III.&#160; Language Bindings"><link rel="prev" href="tcl-understanding.html" title="Understanding the Performance Characteristics of Tcl"><link rel="next" href="introduction-tk.html" title="Introduction to Tk"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;15.&#160;Building an Extended WISH</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="tcl-understanding.html">Prev</a>&#160;</td><th width="60%" align="center">Part&#160;III.&#160; Language Bindings </th><td width="20%" align="right">&#160;<a accesskey="n" href="introduction-tk.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="extended-wish"></a>Chapter&#160;15.&#160;Building an Extended WISH</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="extended-wish.html#intro-tcl">Introduction to Tcl</a></span></dt><dd><dl><dt><span class="sect2"><a href="extended-wish.html#motivation-tcl">Motivation for Tcl</a></span></dt><dt><span class="sect2"><a href="extended-wish.html#capabilities-tcl">Capabilities of Tcl</a></span></dt><dt><span class="sect2"><a href="extended-wish.html#acquiring-tcl">Acquiring Tcl</a></span></dt></dl></dd><dt><span class="sect1"><a href="introduction-tk.html">Introduction to Tk</a></span></dt><dt><span class="sect1"><a href="introduction-itcl.html">Introduction to [incr Tcl]</a></span></dt><dt><span class="sect1"><a href="extensions-tcl.html">PLplot Extensions to Tcl</a></span></dt><dt><span class="sect1"><a href="custom-extensions-tcl.html">Custom Extensions to Tcl</a></span></dt><dd><dl><dt><span class="sect2"><a href="custom-extensions-tcl.html#wish-construction">WISH Construction</a></span></dt><dt><span class="sect2"><a href="custom-extensions-tcl.html#wish-linking">WISH Linking</a></span></dt><dt><span class="sect2"><a href="custom-extensions-tcl.html#wish-programming">WISH Programming</a></span></dt></dl></dd></dl></div><p>
    Beginning with PLplot 5.0, a new and powerful paradigm for interaction
    with PLplot is introduced.  This new paradigm consists of an
    integration of PLplot with a powerful scripting language (Tcl), and
    extensions to that language to support X Windows interface development
    (Tk) and object oriented programming ([incr Tcl]).  Taken together,
    these four software systems (Tcl/Tk/itcl/PLplot) comprise a powerful
    environment for the rapid prototyping and development of sophisticated,
    flexible, X Windows applications with access to the PLplot API.  Yet
    that is only the beginning&#8212;Tcl was born to be extended.  The true
    power of this paradigm is achieved when you add your own, powerful,
    application specific extensions to the above quartet, thus creating an
    environment for the development of wholly new applications with only a
    few keystrokes of shell programming ...
  </p><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="intro-tcl"></a>Introduction to Tcl</h2></div></div></div><p>
      The Tool Command Language, or just Tcl (pronounced
      <span class="quote">&#8220;<span class="quote">tickle</span>&#8221;</span>) is an embeddable script language which can be
      used to control a wide variety of applications.  Designed by John
      Ousterhout of UC Berkeley, Tcl is freely available under the standard
      Berkeley copyright.  Tcl and Tk (described below) are extensively
      documented in a new book published by Addison Wesley, entitled
      <span class="quote">&#8220;<span class="quote">Tcl and the Tk toolkit</span>&#8221;</span> by John Ousterhout.  This book
      is a must have for those interested in developing powerful extensible
      applications with high quality X Windows user interfaces.  The
      discussion in this chapter cannot hope to approach the level of
      introduction provided by that book.  Rather we will concentrate on
      trying to convey some of the excitement, and show the nuts and bolts
      of using Tcl and some extensions to provide a powerful and flexible
      interface to the PLplot library within your application.
    </p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="motivation-tcl"></a>Motivation for Tcl</h3></div></div></div><p>
	The central observation which led Ousterhout to create Tcl was the
	realization that many applications require the use of some sort of
	a special purpose, application specific, embedded <span class="quote">&#8220;<span class="quote">macro
	language</span>&#8221;</span>.  Application programmers cobble these <span class="quote">&#8220;<span class="quote">tiny
	languages</span>&#8221;</span> into their codes in order to provide flexibility
	and some modicum of high level control.  But the end result is
	frequently a quirky and fragile language.  And each application has
	a different <span class="quote">&#8220;<span class="quote">tiny language</span>&#8221;</span> associated with it.  The
	idea behind Tcl, then, was to create a single <span class="quote">&#8220;<span class="quote">core
	language</span>&#8221;</span> which could be easily embedded into a wide variety
	of applications.  Further, it should be easily extensible so that
	individual applications can easily provide application specific
	capabilities available in the macro language itself, while still
	providing a robust, uniform syntax across a variety of
	applications.  To say that Tcl satisfies these requirements would
	be a spectacular understatement.
      </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="capabilities-tcl"></a>Capabilities of Tcl</h3></div></div></div><p>
	The mechanics of using Tcl are very straightforward.  Basically you
	just have to include the file <code class="filename">tcl.h</code>, issue
	some API calls to create a Tcl interpreter, and then evaluate a
	script file or perform other operations supported by the Tcl API.
	Then just link against <code class="filename">libtcl.a</code> and off you
	go.
      </p><p>
	Having done this, you have essentially created a shell.  That is, your
	program can now execute shell scripts in the Tcl language.  Tcl
	provides support for basic control flow, variable substitution file
	i/o and subroutines.  In addition to the built in Tcl commands, you can
	define your own subroutines as Tcl procedures which effectively
	become new keywords.
      </p><p>
	But the real power of this approach is to add new commands to the
	interpreter which are realized by compiled C code in your
	application.  Tcl provides a straightforward API call which allows
	you to register a function in your code to be called whenever the
	interpreter comes across a specific keyword of your choosing in
	the shell scripts it executes.
      </p><p>
	This facility allows you with tremendous ease, to endow your
	application with a powerful, robust and full featured macro
	language, trivially extend that macro language with new keywords
	which trigger execution of compiled application specific commands,
	and thereby raise the level of interaction with your code to one of
	essentially shell programming via script editing.
      </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="acquiring-tcl"></a>Acquiring Tcl</h3></div></div></div><p>
	There are several important sources of info and code for Tcl.
	Definitely get the book mentioned above, and the source code for the
	Tcl and Tk toolkits can be downloaded from <a class="ulink" href="http://www.tcl.tk/software/tcltk/download.html" target="_top">The Tcl developer
	Xchange</a>.
      </p><p>
	Additionally there is a newsgroup, <code class="literal">comp.lang.tcl</code>
	which is well read, and an excellent place for people to get
	oriented, find help, etc.  Highly recommended.
      </p><p> In any event, in order to use the Tk driver in PLplot, you will
      need Tcl-8.2 and Tk-8.2 (or higher versions). Additionally, in order
      to use the extended WISH paradigm (described below) you will need
      iTcl-3.1 (or a higher version).
      </p><p>
	However, you will quite likely find Tcl/Tk to be very addictive,
	and the great plethora of add-ons available at
	<code class="literal">harbor</code> will undoubtedly attract no small amount
	of your attention.  It has been our experience that all of these
	extensions fit together very well.  You will find that there are
	large sectors of the Tcl user community which create so-called
	<span class="quote">&#8220;<span class="quote">MegaWishes</span>&#8221;</span> which combine many of the available
	extensions into a single, heavily embellished, shell interpreter.
	The benefits of this approach will become apparent as you gain
	experience with Tcl and Tk.
      </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="tcl-understanding.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="part_bindings.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="introduction-tk.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Understanding the Performance Characteristics of Tcl&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Introduction to Tk</td></tr></table></div></body></html>