Variable: artist-mt

artist-mt is a variable defined in artist.el.gz.

Value

Large value
((menu
  ("Drawing"
   ((function-call
     ("Undo" do-undo undo))
    (separator)
    (graphics-operation
     ("Pen"
      (("Pen" pen-char "pen-c" artist-no-arrows nil nil nil nil artist-do-continously artist-pen
	(nil))
       ("Pen Line" pen-line "pen-l" artist-arrows artist-pen-set-arrow-points artist-pen-reset-last-xy nil nil artist-do-continously artist-pen-line
	(nil)))))
    (graphics-operation
     ("Line"
      (("line" line "line" artist-arrows artist-set-arrow-points-for-2points nil nil nil 2 artist-draw-line
	(artist-undraw-line artist-nil nil))
       ("straight line" s-line "sline" artist-arrows artist-set-arrow-points-for-2points nil nil nil 2 artist-draw-sline
	(artist-undraw-sline artist-nil nil)))))
    (graphics-operation
     ("Rectangle"
      (("rectangle" rect "rect" artist-no-arrows nil nil nil nil 2 artist-draw-rect
	(artist-undraw-rect artist-t-if-fill-char-set artist-fill-rect))
       ("square" square "square" artist-no-arrows nil nil nil nil 2 artist-draw-square
	(artist-undraw-square artist-t-if-fill-char-set artist-fill-square)))))
    (graphics-operation
     ("Poly-line"
      (("poly-line" polyline "poly" artist-arrows artist-set-arrow-points-for-poly nil nil nil artist-do-poly artist-draw-line
	(artist-undraw-line artist-nil nil))
       ("straight poly-line" spolyline "s-poly" artist-arrows artist-set-arrow-points-for-poly nil nil nil artist-do-poly artist-draw-sline
	(artist-undraw-sline artist-nil nil)))))
    (graphics-operation
     ("Ellipse"
      (("ellipse" ellipse "ellipse" artist-no-arrows nil nil nil nil 2 artist-draw-ellipse
	(artist-undraw-ellipse artist-t-if-fill-char-set artist-fill-ellipse))
       ("circle" circle "circle" artist-no-arrows nil nil nil nil 2 artist-draw-circle
	(artist-undraw-circle artist-t-if-fill-char-set artist-fill-circle)))))
    (graphics-operation
     ("Text"
      (("text see-thru" text-thru "text-thru" artist-no-arrows nil nil nil nil 1 artist-text-see-thru nil)
       ("text overwrite" text-ovwrt "text-ovwrt" artist-no-arrows nil nil nil nil 1 artist-text-overwrite nil))))
    (graphics-operation
     ("Spray-can"
      (("spray-can" spray-can "spray-can" artist-no-arrows nil nil nil nil artist-do-continously artist-spray
	(artist-spray-get-interval))
       ("spray set size" spray-get-size "spray-size" artist-no-arrows nil nil artist-spray-clear-circle artist-spray-set-radius 2 artist-draw-circle
	(artist-undraw-circle artist-nil nil)))))
    (graphics-operation
     ("Erase"
      (("erase char" erase-char "erase-c" artist-no-arrows nil nil nil nil artist-do-continously artist-erase-char
	(nil))
       ("erase rectangle" erase-rect "erase-r" artist-no-arrows nil nil nil nil 2 artist-draw-rect
	(artist-undraw-rect artist-t artist-erase-rect)))))
    (graphics-operation
     ("Vaporize"
      (("vaporize line" vaporize-line "vaporize-1" artist-no-arrows nil nil nil nil 1 artist-vaporize-line nil)
       ("vaporize lines" vaporize-lines "vaporize-n" artist-no-arrows nil nil nil nil 1 artist-vaporize-lines nil)))))))
 (menu
  ("Edit"
   ((graphics-operation
     ("Cut"
      (("cut rectangle" cut-r "cut-r" artist-no-arrows nil nil nil nil 2 artist-draw-rect
	(artist-undraw-rect artist-t artist-cut-rect))
       ("cut square" cut-s "cut-s" artist-no-arrows nil nil nil nil 2 artist-draw-square
	(artist-undraw-square artist-t artist-cut-square)))))
    (graphics-operation
     ("Copy"
      (("copy rectangle" copy-r "copy-r" artist-no-arrows nil nil nil nil 2 artist-draw-rect
	(artist-undraw-rect artist-t artist-copy-rect))
       ("copy square" copy-s "copy-s" artist-no-arrows nil nil nil nil 2 artist-draw-square
	(artist-undraw-square artist-t artist-copy-square)))))
    (graphics-operation
     ("Paste"
      (("paste" paste "paste" artist-no-arrows nil nil nil nil 1 artist-paste nil)
       ("paste" paste "paste" artist-no-arrows nil nil nil nil 1 artist-paste nil))))
    (graphics-operation
     ("Flood-fill"
      (("flood-fill" flood-fill "flood" artist-no-arrows nil nil nil nil 1 artist-flood-fill nil)
       ("flood-fill" flood-fill "flood" artist-no-arrows nil nil nil nil 1 artist-flood-fill nil)))))))
 (menu
  ("Settings"
   ((function-call
     ("Set Fill" set-fill artist-select-fill-char))
    (function-call
     ("Set Line" set-line artist-select-line-char))
    (function-call
     ("Set Erase" set-erase artist-select-erase-char))
    (function-call
     ("Rubber-banding" rubber-band artist-toggle-rubber-banding))
    (function-call
     ("Trimming" trimming artist-toggle-trim-line-endings))
    (function-call
     ("Borders" borders artist-toggle-borderless-shapes))
    (function-call
     ("Spray-chars" spray-chars artist-select-spray-chars))))))

Documentation

Master Table for artist-mode(var)/artist-mode(fun).

This table is primarily a table over the different graphics operations available in Artist mode, but it also holds layout information for the popup menu.

The master table is a list of table elements. The elements of this table have the layout

  (TAG INFO-PART)

There are three kinds of TAG:

  menu -- a sub-menu
  separator -- produce a separator in the popup menu
  function-call -- call a function
  graphics-operation -- a graphics operation

The layout of the INFO-PART for menu is

  (TITLE ((TAG-1 INFO-PART-1) (TAG-2 INFO-PART-2) ...))

TITLE is the title of the submenu; this is followed by a list of menu items, each on the general form (TAG INFO-PART).

The layout of the INFO-PART for separator is empty and not used.

This is the layout of the INFO-PART for function-call:

  (KEYWORD SYMBOL FN)

KEYWORD is a string naming the operation, and appears in the popup menu. SYMBOL is the symbol for the operations. FN is the function performing the operation. This function
  is called with no arguments. Its return value is ignored.


The layout of the INFO-PART for graphics-operation is

  (TITLE (UNSHIFTED SHIFTED))

TITLE is the title that appears in the popup menu. UNSHIFTED and SHIFTED specify for unshifted and shifted operation. Both have the form

  (KEYWORD KEY-SYMBOL MODE-LINE ARROW-PRED ARROW-SET-FN
   INIT-FN PREP-FILL-FN EXIT-FN DRAW-HOW DRAW-FN EXTRA-DRAW-INFO)

KEYWORD is a string specifying the name of the shape to draw.
  This is used when selecting drawing operation.
KEY-SYMBOL is the key which is used when looking up members
  through the functions artist-go-get-MEMBER-from-symbol
  and artist-fc-get-MEMBER-from-symbol.
MODE-LINE is a string that appears in the mode-line when drawing
  the shape.
ARROW-PRED is a function that is called to find out if the shape
  can have arrows. The function is called with no arguments and
  must return nil or t.
ARROW-SET-FN is a function that is called to set arrow end-points.
  Arguments and return values for this function are described below.
INIT-FN is, if non-nil, a function that is called when the first
  point of the shape is set. Arguments and return values for
  this function are described below.
PREP-FILL-FN is, if non-nil, a function that is called after
  the last point is set, but before the filling is done.
  Arguments and return values for this function are described below.
EXIT-FN is, if non-nil, a function that is called after filling
  is done. Arguments and return values for this function are
  described below.
DRAW-HOW defines the kind of shape. The kinds of shapes are:
  artist-do-continously -- Do drawing operation continuously,
                              as long as the mouse button is held down.
  artist-do-poly -- Do drawing operation many times.
  1 -- Do drawing operation only once.
  2 -- The drawing operation requires two points.
DRAW-FN is the function to call for drawing. Arguments and
  return values for this function are described below.
EXTRA-DRAW-INFO the layout of this depends on the value of DRAW-HOW:
  If DRAW-HOW is artist-do-continously:

    (INTERVAL-FN)

    INTERVAL-FN is, if non-nil, a function to call for getting
      an interval between repeated calls to the DRAW-FN.
      This function is called with no arguments and must
      return a number, the interval in seconds.
      If nil, calls to DRAW-FN are done only when the mouse
      or cursor is moved.

  If DRAW-HOW is either artist-do-poly or 2:

    (UNDRAW-FN FILL-PRED FILL-FN)

    UNDRAW-FN is a function to call for undrawing the shape.
      Arguments and return values for this function are
      described below.
    FILL-PRED is a function that is called to find out if the shape
      can have arrows. The function must take no arguments and
      return nil or t.
    FILL-FN is a function to call for filling the shape.
      Arguments and return values for this function are
      described below.

  If DRAW-HOW is 1:

    ()

Note! All symbols and keywords (both in the function-call INFO-PART
      as well as in the graphics-operation INFO-PART) must be unique.

The following table describe function arguments and return value for different functions and DRAW-HOWs.

If DRAW-HOW is either artist-do-continously or 1:

  INIT-FN X Y ==> ignored
  PREP-FILL-FN X Y ==> ignored
  EXIT-FN X Y ==> ignored
  ARROW-SET-FN X Y ==> ignored
  DRAW-FN X Y ==> ignored

If DRAW-HOW is 2:

  INIT-FN X1 Y1 ==> ignored
  PREP-FILL-FN X1 Y1 X2 Y2 ==> ignored
  EXIT-FN X1 Y1 X2 Y2 ==> ignored
  ARROW-SET-FN X1 Y1 X2 Y2 ==> ignored
  DRAW-FN X1 Y1 X2 Y2 ==> (ENDPOINT-1 ENDPOINT-2 SHAPE)
  UNDRAW-FN (ENDPOINT-1 ENDPOINT-2 SHAPE) ==> ignored
  FILL-FN (ENDPOINT-1 ENDPOINT-2 SHAPE) X1 Y1 X2 Y2 ==> ignored

  ENDPOINT-1 and ENDPOINT-2 are endpoints which are created with
  artist-make-endpoint
  SHAPE is an opaque structure, created by the DRAW-FN and intended
  to be used only by the UNDRAW-FN.

If DRAW-HOW is artist-do-poly:

  INIT-FN X1 Y1
  PREP-FILL-FN POINT-LIST
  ARROW-SET-FN POINT-LIST
  EXIT-FN POINT-LIST
  DRAW-FN X-LAST Y-LAST X-NEW Y-NEW ==> (ENDPOINT-1 ENDPOINT-2 SHAPE)
  UNDRAW-FN (ENDPOINT-1 ENDPOINT-2 SHAPE)
  FILL-FN POINT-LIST

  ENDPOINT-1 and ENDPOINT-2 are endpoints which are created with
  artist-make-endpoint.
  SHAPE is an opaque structure, created by the DRAW-FN and intended
  to be used only by the UNDRAW-FN.
  POINT-LIST is a list of vectors [X Y].

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/artist.el.gz
;;;
;;; The table of graphic operations
;;;
(defvar artist-mt
  ;; Implementation note: Maybe this should be done using a structure
  ;; in the cl package?
  ;;
  '(
    (menu
     ("Drawing"
      ((function-call
	( "Undo"		do-undo		undo))

       (separator )
       (graphics-operation
	("Pen" (("Pen" pen-char "pen-c"
		 artist-no-arrows nil
		 nil nil nil
		 artist-do-continously
		 artist-pen
		 (nil))
		("Pen Line" pen-line "pen-l"
		 artist-arrows artist-pen-set-arrow-points
		 artist-pen-reset-last-xy nil nil
		 artist-do-continously
		 artist-pen-line
		 (nil)))))

       (graphics-operation
	("Line" (("line" line "line"
		  artist-arrows artist-set-arrow-points-for-2points
		  nil nil nil
		  2
		  artist-draw-line
		  (artist-undraw-line
		   artist-nil nil))
		 ("straight line" s-line "sline"
		  artist-arrows artist-set-arrow-points-for-2points
		  nil nil nil
		  2
		  artist-draw-sline
		  (artist-undraw-sline
		   artist-nil nil)))))

       (graphics-operation
	("Rectangle" (("rectangle" rect "rect"
		       artist-no-arrows nil
		       nil nil nil
		       2
		       artist-draw-rect
		       (artist-undraw-rect
			artist-t-if-fill-char-set artist-fill-rect))
		      ("square" square "square"
		       artist-no-arrows nil
		       nil nil nil
		       2
		       artist-draw-square
		       (artist-undraw-square
			artist-t-if-fill-char-set artist-fill-square)))))

       (graphics-operation
	("Poly-line" (("poly-line" polyline "poly"
		       artist-arrows artist-set-arrow-points-for-poly
		       nil nil nil
		       artist-do-poly
		       artist-draw-line
		       (artist-undraw-line
			artist-nil nil))
		      ("straight poly-line" spolyline "s-poly"
		       artist-arrows artist-set-arrow-points-for-poly
		       nil nil nil
		       artist-do-poly
		       artist-draw-sline
		       (artist-undraw-sline
			artist-nil nil)))))

       (graphics-operation
	("Ellipse" (("ellipse" ellipse "ellipse"
		     artist-no-arrows nil
		     nil nil nil
		     2
		     artist-draw-ellipse
		     (artist-undraw-ellipse
		      artist-t-if-fill-char-set artist-fill-ellipse))
		    ("circle" circle "circle"
		     artist-no-arrows nil
		     nil nil nil
		     2
		     artist-draw-circle
		     (artist-undraw-circle
		      artist-t-if-fill-char-set artist-fill-circle)))))

       (graphics-operation
	("Text" (("text see-thru" text-thru "text-thru"
		   artist-no-arrows nil
		   nil nil nil
		   1
		   artist-text-see-thru
		   nil)
		  ("text overwrite" text-ovwrt "text-ovwrt"
		   artist-no-arrows nil
		   nil nil nil
		   1
		   artist-text-overwrite
		   nil))))

       (graphics-operation
	("Spray-can" (("spray-can" spray-can "spray-can"
		       artist-no-arrows nil
		       nil nil nil
		       artist-do-continously
		       artist-spray
		       (artist-spray-get-interval))
		      ("spray set size" spray-get-size "spray-size"
		       artist-no-arrows nil
		       nil artist-spray-clear-circle artist-spray-set-radius
		       2
		       artist-draw-circle
		       (artist-undraw-circle
			artist-nil nil)))))

       (graphics-operation
	("Erase" (("erase char" erase-char "erase-c"
		   artist-no-arrows nil
		   nil nil nil
		   artist-do-continously
		   artist-erase-char
		   (nil))
		  ("erase rectangle" erase-rect "erase-r"
		   artist-no-arrows nil
		   nil nil nil
		   2
		   artist-draw-rect
		   (artist-undraw-rect
		    artist-t artist-erase-rect)))))

       (graphics-operation
	("Vaporize" (("vaporize line" vaporize-line "vaporize-1"
		   artist-no-arrows nil
		   nil nil nil
		   1
		   artist-vaporize-line
		   nil)
		  ("vaporize lines" vaporize-lines "vaporize-n"
		   artist-no-arrows nil
		   nil nil nil
		   1
		   artist-vaporize-lines
		   nil)))))))

    (menu
     ("Edit"
      ((graphics-operation
	("Cut" (("cut rectangle" cut-r "cut-r"
		 artist-no-arrows nil
		 nil nil nil
		 2
		 artist-draw-rect
		 (artist-undraw-rect
		  artist-t artist-cut-rect))
		("cut square" cut-s "cut-s"
		 artist-no-arrows nil
		 nil nil nil
		 2
		 artist-draw-square
		 (artist-undraw-square
		  artist-t artist-cut-square)))))

       (graphics-operation
	("Copy" (("copy rectangle" copy-r "copy-r"
		  artist-no-arrows nil
		  nil nil nil
		  2
		  artist-draw-rect
		  (artist-undraw-rect
		   artist-t artist-copy-rect))
		 ("copy square" copy-s "copy-s"
		  artist-no-arrows nil
		  nil nil nil
		  2
		  artist-draw-square
		  (artist-undraw-square
		   artist-t artist-copy-square)))))

       (graphics-operation
	("Paste" (("paste" paste "paste"
		   artist-no-arrows nil
		   nil nil nil
		   1
		   artist-paste
		   nil)
		  ("paste" paste "paste"
		   artist-no-arrows nil
		   nil nil nil
		   1
		   artist-paste
		   nil))))

       (graphics-operation
	("Flood-fill" (("flood-fill" flood-fill "flood"
			artist-no-arrows nil
			nil nil nil
			1
			artist-flood-fill
			nil)
		       ("flood-fill" flood-fill "flood"
			artist-no-arrows nil
			nil nil nil
			1
			artist-flood-fill
			nil)))))))

    (menu
     ("Settings"
      ((function-call
	("Set Fill"	set-fill	artist-select-fill-char))

       (function-call
	("Set Line"	set-line	artist-select-line-char))

       (function-call
	("Set Erase"	set-erase	artist-select-erase-char))

       (function-call
	("Rubber-banding" rubber-band	artist-toggle-rubber-banding))

       (function-call
	("Trimming"	trimming	artist-toggle-trim-line-endings))

       (function-call
	("Borders"	borders		artist-toggle-borderless-shapes))

       (function-call
	("Spray-chars"	spray-chars	artist-select-spray-chars)))))

  ) ;; end of list

  "Master Table for `artist-mode'.
This table is primarily a table over the different graphics operations
available in Artist mode, but it also holds layout information for the
popup menu.

The master table is a list of table elements.  The elements of this table
have the layout

  (TAG INFO-PART)

There are three kinds of TAG:

  `menu'                -- a sub-menu
  `separator'           -- produce a separator in the popup menu
  `function-call'       -- call a function
  `graphics-operation'  -- a graphics operation

The layout of the INFO-PART for `menu' is

  (TITLE ((TAG-1 INFO-PART-1) (TAG-2 INFO-PART-2) ...))

TITLE is the title of the submenu; this is followed by a list of
menu items, each on the general form (TAG INFO-PART).


The layout of the INFO-PART for `separator' is empty and not used.


This is the layout of the INFO-PART for `function-call':

  (KEYWORD SYMBOL FN)

KEYWORD is a string naming the operation, and appears in the popup menu.
SYMBOL is the symbol for the operations.
FN is the function performing the operation.  This function
  is called with no arguments.  Its return value is ignored.


The layout of the INFO-PART for `graphics-operation' is

  (TITLE (UNSHIFTED SHIFTED))

TITLE is the title that appears in the popup menu.  UNSHIFTED
and SHIFTED specify for unshifted and shifted operation.  Both
have the form

  (KEYWORD KEY-SYMBOL MODE-LINE ARROW-PRED ARROW-SET-FN
   INIT-FN PREP-FILL-FN EXIT-FN DRAW-HOW DRAW-FN EXTRA-DRAW-INFO)

KEYWORD is a string specifying the name of the shape to draw.
  This is used when selecting drawing operation.
KEY-SYMBOL is the key which is used when looking up members
  through the functions `artist-go-get-MEMBER-from-symbol'
  and `artist-fc-get-MEMBER-from-symbol'.
MODE-LINE is a string that appears in the mode-line when drawing
  the shape.
ARROW-PRED is a function that is called to find out if the shape
  can have arrows.  The function is called with no arguments and
  must return nil or t.
ARROW-SET-FN is a function that is called to set arrow end-points.
  Arguments and return values for this function are described below.
INIT-FN is, if non-nil, a function that is called when the first
  point of the shape is set.  Arguments and return values for
  this function are described below.
PREP-FILL-FN is, if non-nil, a function that is called after
  the last point is set, but before the filling is done.
  Arguments and return values for this function are described below.
EXIT-FN is, if non-nil, a function that is called after filling
  is done.  Arguments and return values for this function are
  described below.
DRAW-HOW defines the kind of shape.  The kinds of shapes are:
  `artist-do-continously'  -- Do drawing operation continuously,
                              as long as the mouse button is held down.
  `artist-do-poly'         -- Do drawing operation many times.
  1                        -- Do drawing operation only once.
  2                        -- The drawing operation requires two points.
DRAW-FN is the function to call for drawing.  Arguments and
  return values for this function are described below.
EXTRA-DRAW-INFO the layout of this depends on the value of DRAW-HOW:
  If DRAW-HOW is `artist-do-continously':

    (INTERVAL-FN)

    INTERVAL-FN is, if non-nil, a function to call for getting
      an interval between repeated calls to the DRAW-FN.
      This function is called with no arguments and must
      return a number, the interval in seconds.
      If nil, calls to DRAW-FN are done only when the mouse
      or cursor is moved.

  If DRAW-HOW is either `artist-do-poly' or 2:

    (UNDRAW-FN FILL-PRED FILL-FN)

    UNDRAW-FN is a function to call for undrawing the shape.
      Arguments and return values for this function are
      described below.
    FILL-PRED is a function that is called to find out if the shape
      can have arrows.  The function must take no arguments and
      return nil or t.
    FILL-FN  is a function to call for filling the shape.
      Arguments and return values for this function are
      described below.

  If DRAW-HOW is 1:

    ()

Note! All symbols and keywords (both in the `function-call' INFO-PART
      as well as in the `graphics-operation' INFO-PART) must be unique.

The following table describe function arguments and return value
for different functions and DRAW-HOWs.

If DRAW-HOW is either `artist-do-continously' or 1:

  INIT-FN       X Y ==> ignored
  PREP-FILL-FN  X Y ==> ignored
  EXIT-FN       X Y ==> ignored
  ARROW-SET-FN  X Y ==> ignored
  DRAW-FN       X Y ==> ignored

If DRAW-HOW is 2:

  INIT-FN       X1 Y1  ==> ignored
  PREP-FILL-FN  X1 Y1 X2 Y2 ==> ignored
  EXIT-FN       X1 Y1 X2 Y2 ==> ignored
  ARROW-SET-FN  X1 Y1 X2 Y2 ==> ignored
  DRAW-FN       X1 Y1 X2 Y2 ==> (ENDPOINT-1 ENDPOINT-2 SHAPE)
  UNDRAW-FN     (ENDPOINT-1 ENDPOINT-2 SHAPE) ==> ignored
  FILL-FN	 (ENDPOINT-1 ENDPOINT-2 SHAPE) X1 Y1 X2 Y2 ==> ignored

  ENDPOINT-1 and ENDPOINT-2 are endpoints which are created with
  `artist-make-endpoint'
  SHAPE is an opaque structure, created by the DRAW-FN and intended
  to be used only by the UNDRAW-FN.

If DRAW-HOW is `artist-do-poly':

  INIT-FN       X1 Y1
  PREP-FILL-FN  POINT-LIST
  ARROW-SET-FN  POINT-LIST
  EXIT-FN       POINT-LIST
  DRAW-FN       X-LAST Y-LAST X-NEW Y-NEW ==> (ENDPOINT-1 ENDPOINT-2 SHAPE)
  UNDRAW-FN     (ENDPOINT-1 ENDPOINT-2 SHAPE)
  FILL-FN       POINT-LIST

  ENDPOINT-1 and ENDPOINT-2 are endpoints which are created with
  `artist-make-endpoint'.
  SHAPE is an opaque structure, created by the DRAW-FN and intended
  to be used only by the UNDRAW-FN.
  POINT-LIST is a list of vectors [X Y].")