/usr/lib/gcl-2.6.12-prof/gcl-tk/demos/mkBasic.lisp is in gcl 2.6.12-47.
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 | ;;# mkBasic w
;;
;; Create a top-level window that displays a basic text widget.
;;
;; Arguments:
;; w - Name to use for new top-level window.
(in-package "TK")
(defvar *basic-message* "
This window is a text widget. It displays one or more lines of text
and allows you to edit the text. Here is a summary of the things you
can do to a text widget:
1. Scrolling. Use the scrollbar to adjust the view in the text window.
2. Scanning. Press mouse button 2 in the text window and drag up or down.
This will drag the text at high speed to allow you to scan its contents.
3. Insert text. Press mouse button 1 to set the insertion cursor, then
type text. What you type will be added to the widget. You can backspace
over what you've typed using either the backspace key, the delete key,
or Control+h.
4. Select. Press mouse button 1 and drag to select a range of characters.
Once you've released the button, you can adjust the selection by pressing
button 1 with the shift key down. This will reset the end of the
selection nearest the mouse cursor and you can drag that end of the
selection by dragging the mouse before releasing the mouse button.
You can double-click to select whole words, or triple-click to select
whole lines.
5. Delete. To delete text, select the characters you'd like to delete
and type Control+d.
6. Copy the selection. To copy the selection either from this window
or from any other window or application, select what you want, click
button 1 to set the insertion cursor, then type Control+v to copy the
selection to the point of the insertion cursor.
7. Resize the window. This widget has been configured with the \"setGrid\"
option on, so that if you resize the window it will always resize to an
even number of characters high and wide. Also, if you make the window
narrow you can see that long lines automatically wrap around onto
additional lines so that all the information is always visible.
When you're finished with this demonstration, press the \"OK\" button
below.")
(defun mkBasic (&optional (w '.basic))
(if (winfo :exists w :return 'boolean) (destroy w))
(toplevel w)
(dpos w)
(wm :title w "Text Demonstration - Basic Facilities")
(wm :iconname w "Text Basics")
(button (conc w '.ok) :text "OK" :command (tk-conc "destroy " w))
(scrollbar (conc w '.s) :relief "flat" :command (tk-conc w ".t yview"))
(text (conc w '.t) :relief "raised" :bd 2 :yscrollcommand
(tk-conc w ".s set") :setgrid "true")
(pack (conc w '.ok) :side 'bottom :fill "x")
(pack (conc w '.s) :side 'right :fill "y")
(pack (conc w '.t) :expand 'yes :fill 'both)
(funcall (conc w '.t) :insert 0.0 *basic-message*)
(funcall (conc w '.t) :mark 'set 'insert 0.0)
(bind w "<Any-Enter>" (tk-conc "focus " w ".t"))
)
|