annotate man/lispref/glyphs.texi @ 408:501cfd01ee6d r21-2-34

Import from CVS: tag r21-2-34
author cvs
date Mon, 13 Aug 2007 11:18:11 +0200
parents 2f8bb876ab1d
children de805c49cfc1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 @c -*-texinfo-*-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 @c This is part of the XEmacs Lisp Reference Manual.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 @c Copyright (C) 1995, 1996 Ben Wing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 @c See the file lispref.texi for copying conditions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 @setfilename ../../info/glyphs.info
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 @node Glyphs, Annotations, Faces and Window-System Objects, top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 @chapter Glyphs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 @cindex glyphs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
10 A @dfn{glyph} is an object that is used for pixmaps, widgets and
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
11 images of all sorts, as well as for things that ``act'' like pixmaps,
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
12 such as non-textual strings (@dfn{annotations}) displayed in a buffer or
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
13 in the margins. It is used in begin-glyphs and end-glyphs attached to
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
14 extents, marginal and textual annotations, overlay arrows
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
15 (@code{overlay-arrow-*} variables), toolbar buttons, mouse pointers,
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
16 frame icons, truncation and continuation markers, and the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
17 like. (Basically, any place there is an image or something that acts
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
18 like an image, there will be a glyph object representing it.)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 The actual image that is displayed (as opposed to its position or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 clipping) is defined by an @dfn{image specifier} object contained
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 within the glyph. The separation between an image specifier object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 and a glyph object is made because the glyph includes other properties
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 than just the actual image: e.g. the face it is displayed in (for text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 images), the alignment of the image (when it is in a buffer), etc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 @defun glyphp object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 This function returns @code{t} if @var{object} is a glyph.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 * Glyph Functions:: Functions for working with glyphs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 * Images:: Graphical images displayed in a frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 * Glyph Types:: Each glyph has a particular type.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 * Mouse Pointer:: Controlling the mouse pointer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 * Redisplay Glyphs:: Glyphs controlling various redisplay functions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 * Subwindows:: Inserting an externally-controlled subwindow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 into a buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 @node Glyph Functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 @section Glyph Functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 * Creating Glyphs:: Creating new glyphs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 * Glyph Properties:: Accessing and modifying a glyph's properties.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 * Glyph Convenience Functions::
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 Convenience functions for accessing particular
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 properties of a glyph.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 * Glyph Dimensions:: Determining the height, width, etc. of a glyph.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 @node Creating Glyphs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 @subsection Creating Glyphs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 @defun make-glyph &optional spec-list type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 This function creates a new glyph object of type @var{type}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 @var{spec-list} is used to initialize the glyph's image. It is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 typically an image instantiator (a string or a vector; @ref{Image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 Specifiers}), but can also be a list of such instantiators (each one in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 turn is tried until an image is successfully produced), a cons of a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 locale (frame, buffer, etc.) and an instantiator, a list of such conses,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 or any other form accepted by @code{canonicalize-spec-list}.
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 371
diff changeset
65 @xref{Specifiers}, for more information about specifiers.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 @var{type} specifies the type of the glyph, which specifies in which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 contexts the glyph can be used, and controls the allowable image types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 into which the glyph's image can be instantiated. @var{type} should be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 one of @code{buffer} (used for glyphs in an extent, the modeline, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 toolbar, or elsewhere in a buffer), @code{pointer} (used for the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 mouse-pointer), or @code{icon} (used for a frame's icon), and defaults
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 to @code{buffer}. @xref{Glyph Types}.
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
74
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
75 A glyph in XEmacs does @strong{NOT} refer to a single unit of textual
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
76 display (the XEmacs term for this is @dfn{rune}), but rather is an
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
77 object encapsulating a graphical element, such as an image or widget (an
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
78 element such as a button or text field; @dfn{widget} is the term for
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
79 this under X Windows, and it's called a @dfn{control} under MS Windows).
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
80 This graphical element could appear in a buffer, a margin, a gutter, or
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
81 a toolbar, or as a mouse pointer or an icon, for example.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
82
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
83 Creating a glyph using @code{make-glyph} does not specify @emph{where}
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
84 the glyph will be used, but it does specify @emph{what} the glyph will
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
85 look like. In particular, SPEC-LIST is used to specify this, and it's
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
86 used to initialize the glyph's @code{image} property, which is an image
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
87 specifier. (Note that @dfn{image} as used in the context of a glyph's
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
88 @code{image} property or in the terms @dfn{image specifier}, @dfn{image
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
89 instantiator}, or @dfn{image instance} does not refer to what people
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
90 normally think of as an image (which in XEmacs is called a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
91 @dfn{pixmap}), but to any graphical element---a pixmap, a widget, or
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
92 even a block of text, when used in the places that call for a glyph.)
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
93 The format of the SPEC-LIST is typically an image instantiator (a string
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
94 or a vector; @ref{Image Specifiers}), but can also be a list of such
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
95 instantiators (each one in turn is tried until an image is successfully
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
96 produced), a cons of a locale (frame, buffer, etc.) and an
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
97 instantiator, a list of such conses, or any other form accepted by
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
98 @code{canonicalize-spec-list}. @xref{Specifiers}, for more information
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
99 about specifiers.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
100
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
101 If you're not familiar with specifiers, you should be in order to
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
102 understand how glyphs work. The clearest introduction to specifiers
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
103 is in the Lispref manual, available under Info. (Choose
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
104 Help->Info->Info Contents on the menubar or type C-h i.) You can
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
105 also see @code{make-specifier} for a capsule summary. What's important to
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
106 keep in mind is that a specifier lets you set a different value for
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
107 any particular buffer, window, frame, device, or console. This allows
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
108 for a great deal of flexibility; in particular, only one global glyph
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
109 needs to exist for a particular purpose (e.g. the icon used to represent
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
110 an iconified frame, the mouse pointer used over particular areas of a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
111 frame, etc.), and in these cases you do not create your own glyph, but
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
112 rather modify the existing one.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
113
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
114 As well as using @var{spec-list} to initialize the glyph, you can set
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
115 specifications using @code{set-glyph-image}. Note that, due to a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
116 possibly questionable historical design decision, a glyph itself is not
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
117 actually a specifier, but rather is an object containing an image
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
118 specifier (as well as other, seldom-used properties). Therefore, you
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
119 cannot set or access specifications for the glyph's image by directly
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
120 using @code{set-specifier}, @code{specifier-instance} or the like on the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
121 glyph; instead use them on @code{(glyph-image @var{glyph})} or use the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
122 convenience functions @code{set-glyph-image},
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
123 @code{glyph-image-instance}, and @code{glyph-image}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
124
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
125 Once you have created a glyph, you specify where it will be used as
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
126 follows:
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
127
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
128 @itemize @bullet
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
129 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
130 To insert a glyph into a buffer, create an extent in the buffer and then
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
131 use @code{set-extent-begin-glyph} or @code{set-extent-end-glyph} to set
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
132 a glyph to be displayed at the corresponding edge of the extent. (It is
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
133 common to create zero-width extents for this purpose.)
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
134
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
135 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
136 To insert a glyph into the left or right margin of a buffer, first
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
137 make sure the margin is visible by setting a value for the specifiers
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
138 @code{left-margin-width} or @code{right-margin-width}. (Not strictly necessary
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
139 when using margin glyphs with layout policy @code{whitespace}.) Then follow
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
140 the same procedure above for inserting a glyph in a buffer, and then
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
141 set a non-default layout policy for the glyph using
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
142 @code{set-extent-begin-glyph-layout} or @code{set-extent-end-glyph-layout}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
143 Alternatively, use the high-level annotations API (see
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
144 @code{make-annotation}). (In point of fact, you can also use the annotations
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
145 API for glyphs in a buffer, by setting a layout policy of @code{text}.)
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
146
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
147 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
148 To insert a glyph into the modeline, just put the glyph directly as one
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
149 of the modeline elements. (Unfortunately you can't currently put a begin
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
150 glyph or end glyph on one of the modeline extents---they're ignored.)
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
151
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
152 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
153 To insert a glyph into a toolbar, specify it as part of a toolbar
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
154 instantiator (typically set on the specifier @code{default-toolbar}).
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
155 See @code{default-toolbar} for more information. (Note that it is
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
156 standard practice to use a symbol in place of the glyph list in the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
157 toolbar instantiator; the symbol is evalled to get the glyph list. This
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
158 facilitates both creating the toolbar instantiator and modifying
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
159 individual glyphs in a toolbar later on. For example, you can change
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
160 the way that the Mail toolbar button looks by modifying the value of the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
161 variable @code{toolbar-mail-icon} (in general, @code{toolbar-*-icon})
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
162 and then calling @code{(set-specifier-dirty-flag default-toolbar)}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
163 (#### Unfortunately this doesn't quite work the way it should; the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
164 change will appear in new frames, but not existing ones.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
165
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
166 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
167 To insert a glyph into a gutter, create or modify a gutter instantiator
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
168 (typically set on the specifier @code{default-gutter}). Gutter
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
169 instantiators consist of strings or lists of strings, so to insert a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
170 glyph, create an extent over the string, and use
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
171 @code{set-extent-begin-glyph} or @code{set-extent-end-glyph} to set a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
172 glyph to be displayed at the corresponding edge of the extent, just like
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
173 for glyphs in a buffer.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
174
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
175 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
176 To use a glyph as the icon for a frame, you do not actually create a new
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
177 glyph; rather, you change the specifications for the existing glyph
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
178 @code{frame-icon-glyph}. (Remember that, because of the specifier nature
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
179 of glyphs, you can set different values for any particular buffer or
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
180 frame.)
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
181
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
182 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
183 To use a glyph as the mouse pointer, in general you do not create a new
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
184 glyph, but rather you change the specifications of various existing
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
185 glyphs, such as @code{text-pointer-glyph} for the pointer used over
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
186 text, @code{modeline-pointer-glyph} for the pointer used over the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
187 modeline, etc. Do an apropos over @code{*-pointer-glyph} to find all of
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
188 them. (Note also that you can temporarily set the mouse pointer to some
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
189 specific shape by using @code{set-frame-pointer}, which takes an image
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
190 instace, as obtained from calling @code{glyph-image-instance} on a glyph
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
191 of type @code{pointer} -- either one of the above-mentioned variables or
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
192 one you created yourself. (See below for what it means to create a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
193 glyph of type @code{pointer}.) This pointer will last only until the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
194 next mouse motion event is processed or certain other things happen,
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
195 such as creating or deleting a window. (In fact, the above-mentioned
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
196 pointer glyph variables are implemented as part of the default handler
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
197 for mouse motion events. If you want to customize this behavior, take a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
198 look at @code{mode-motion-hook}, or @code{mouse-motion-handler} if you
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
199 really want to get low-level.)
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
200
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
201 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
202 To use a glyph to control the shape of miscellaneous redisplay effects
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
203 such as the truncation and continuation markers, set the appropriate
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
204 existing glyph variables, as for icons and pointers above. See
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
205 @code{continuation-glyph}, @code{control-arrow-glyph},
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
206 @code{hscroll-glyph}, @code{invisible-text-glyph},
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
207 @code{octal-escape-glyph}, and @code{truncation-glyph}. See also
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
208 @code{overlay-arrow-string}, an odd redisplay leftover which can be set
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
209 to a glyph you created, and will cause the glyph to be displayed on top
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
210 of the text position specified in the marker stored in
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
211 @code{overlay-arrow-position}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
212
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
213 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
214 To use a glyph in a display table (i.e. to control the appearance of any
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
215 individual character), create the appropriate character glyphs and then
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
216 set a specification for the specifier @code{current-display-table},
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
217 which controls the appearance of characters. You can also set an
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
218 overriding display table for use with text displayed in a particular
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
219 face; see @code{set-face-display-table} and @code{make-display-table}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
220 #### Note: Display tables do not currently support general Mule
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
221 characters. They will be overhauled at some point to support this
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
222 and to provide other features required under Mule.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
223
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
224 @item
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
225 To use a glyph as the background pixmap of a face: Note that the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
226 background pixmap of a face is actually an image specifier -- probably
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
227 the only place in XEmacs where an image specifier occurs outside of a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
228 glyph. Similarly to how the glyph's image specifier works, you don't
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
229 create your own image specifier, but rather add specifications to the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
230 existing one (using @code{set-face-background-pixmap}). Note that the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
231 image instance that is generated in order to actually display the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
232 background pixmap is of type @code{mono-pixmap}, meaning that it's a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
233 two-color image and the foreground and background of the image get
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
234 filled in with the corresponding colors from the face.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
235 @end itemize
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
236
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
237 It is extremely rare that you will ever have to specify a value for
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
238 TYPE, which should be one of @code{buffer} (used for glyphs in an
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
239 extent, the modeline, the toolbar, or elsewhere in a buffer),
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
240 @code{pointer} (used for the mouse-pointer), or @code{icon} (used for a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
241 frame's icon), and defaults to @code{buffer}. The only cases where it
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
242 needs to be specified is when creating icon or pointer glyphs, and in
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
243 both cases the necessary glyphs have already been created at startup and
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
244 are accessed through the appropriate variables,
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
245 e.g. @code{text-pointer-glyph} (or in general, @code{*-pointer-glyph})
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
246 and @code{frame-icon-glyph}. @xref{Glyph Types}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 @defun make-glyph-internal &optional type
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
250 This function creates a new, uninitialized glyph of type @var{type}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 @defun make-pointer-glyph &optional spec-list
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
254
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
255 Return a new @code{pointer-glyph} object with the specification list
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
256 @var{spec-list}. This function is equivalent to calling
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
257 @code{make-glyph} with a @var{type} of @code{pointer}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
258
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
259 It is extremely unlikely that you will ever need to create a pointer
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
260 glyph. Instead, you probably want to be calling @code{set-glyph-image}
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
261 on an existing glyph, e.g. @code{text-pointer-glyph}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 @defun make-icon-glyph &optional spec-list
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
265
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
266 Return a new @code{pointer-glyph} object with the specification list
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
267 @var{spec-list}. This function is equivalent to calling
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
268 @code{make-glyph} with a @var{type} of @code{icon}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
269
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
270 It is extremely unlikely that you will ever need to create a pointer
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
271 glyph. Instead, you probably want to be calling @code{set-glyph-image}
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
272 on an existing glyph, e.g. @code{text-pointer-glyph}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 @node Glyph Properties
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 @subsection Glyph Properties
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 Each glyph has a list of properties, which control all of the aspects of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 the glyph's appearance. The following symbols have predefined meanings:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 @table @code
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 @item image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 The image used to display the glyph.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 @item baseline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 Percent above baseline that glyph is to be displayed. Only for glyphs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 displayed inside of a buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 @item contrib-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 Whether the glyph contributes to the height of the line it's on.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 Only for glyphs displayed inside of a buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 @item face
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 Face of this glyph (@emph{not} a specifier).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297 @defun set-glyph-property glyph property value &optional locale tag-set how-to-add
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 This function changes a property of a @var{glyph}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 For built-in properties, the actual value of the property is a specifier
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 and you cannot change this; but you can change the specifications within
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 the specifier, and that is what this function will do. For user-defined
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 properties, you can use this function to either change the actual value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 of the property or, if this value is a specifier, change the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 specifications within it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 If @var{property} is a built-in property, the specifications to be added
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 to this property can be supplied in many different ways:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 @itemize @bullet
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 If @var{value} is a simple instantiator (e.g. a string naming a pixmap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 filename) or a list of instantiators, then the instantiator(s) will be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 added as a specification of the property for the given @var{locale}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 (which defaults to @code{global} if omitted).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 If @var{value} is a list of specifications (each of which is a cons of a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 locale and a list of instantiators), then @var{locale} must be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 @code{nil} (it does not make sense to explicitly specify a locale in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 this case), and specifications will be added as given.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 If @var{value} is a specifier (as would be returned by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 @code{glyph-property} if no @var{locale} argument is given), then some
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 or all of the specifications in the specifier will be added to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 property. In this case, the function is really equivalent to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 @code{copy-specifier} and @var{locale} has the same semantics (if it is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 a particular locale, the specification for the locale will be copied; if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 a locale type, specifications for all locales of that type will be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 copied; if @code{nil} or @code{all}, then all specifications will be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 copied).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 @end itemize
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 @var{how-to-add} should be either @code{nil} or one of the symbols
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 @code{prepend}, @code{append}, @code{remove-tag-set-prepend},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 @code{remove-tag-set-append}, @code{remove-locale},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 @code{remove-locale-type}, or @code{remove-all}. See
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 @code{copy-specifier} and @code{add-spec-to-specifier} for a description
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 of what each of these means. Most of the time, you do not need to worry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 about this argument; the default behavior usually is fine.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 In general, it is OK to pass an instance object (e.g. as returned by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 @code{glyph-property-instance}) as an instantiator in place of an actual
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 instantiator. In such a case, the instantiator used to create that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 instance object will be used (for example, if you set a font-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 object as the value of the @code{font} property, then the font name used
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 to create that object will be used instead). If some cases, however,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 doing this conversion does not make sense, and this will be noted in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 documentation for particular types of instance objects.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 If @var{property} is not a built-in property, then this function will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 simply set its value if @var{locale} is @code{nil}. However, if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 @var{locale} is given, then this function will attempt to add
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 @var{value} as the instantiator for the given @var{locale}, using
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 @code{add-spec-to-specifier}. If the value of the property is not a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 specifier, it will automatically be converted into a @code{generic}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 specifier.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 @defun glyph-property glyph property &optional locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 This function returns @var{glyph}'s value of the given @var{property}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 If @var{locale} is omitted, the @var{glyph}'s actual value for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 @var{property} will be returned. For built-in properties, this will be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 a specifier object of a type appropriate to the property (e.g. a font or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 color specifier). For other properties, this could be anything.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 If @var{locale} is supplied, then instead of returning the actual value,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 the specification(s) for the given locale or locale type will be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 returned. This will only work if the actual value of @var{property} is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 a specifier (this will always be the case for built-in properties, but
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
373 may or may not apply to user-defined properties). If the actual value
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 of @var{property} is not a specifier, this value will simply be returned
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 regardless of @var{locale}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 The return value will be a list of instantiators (e.g. vectors
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 specifying pixmap data), or a list of specifications, each of which is a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 cons of a locale and a list of instantiators. Specifically, if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 @var{locale} is a particular locale (a buffer, window, frame, device, or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 @code{global}), a list of instantiators for that locale will be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 returned. Otherwise, if @var{locale} is a locale type (one of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 symbols @code{buffer}, @code{window}, @code{frame}, or @code{device}),
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 the specifications for all locales of that type will be returned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 Finally, if @var{locale} is @code{all}, the specifications for all
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 locales of all types will be returned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 The specifications in a specifier determine what the value of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 @var{property} will be in a particular @dfn{domain} or set of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 circumstances, which is typically a particular Emacs window along with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 the buffer it contains and the frame and device it lies within. The
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 value is derived from the instantiator associated with the most specific
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 locale (in the order buffer, window, frame, device, and @code{global})
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 that matches the domain in question. In other words, given a domain
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 (i.e. an Emacs window, usually), the specifier for @var{property} will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 first be searched for a specification whose locale is the buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 contained within that window; then for a specification whose locale is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 the window itself; then for a specification whose locale is the frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 that the window is contained within; etc. The first instantiator that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 is valid for the domain (usually this means that the instantiator is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 recognized by the device [i.e. the X server or TTY device] that the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 domain is on). The function @code{glyph-property-instance} actually does
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 all this, and is used to determine how to display the glyph.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 @defun glyph-property-instance glyph property &optional domain default no-fallback
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 This function returns the instance of @var{glyph}'s @var{property} in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 specified @var{domain}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410 Under most circumstances, @var{domain} will be a particular window, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 the returned instance describes how the specified property actually is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 displayed for that window and the particular buffer in it. Note that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 this may not be the same as how the property appears when the buffer is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 displayed in a different window or frame, or how the property appears in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 the same window if you switch to another buffer in that window; and in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 those cases, the returned instance would be different.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 The returned instance is an image-instance object, and you can query it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 using the appropriate image instance functions. For example, you could use
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 @code{image-instance-depth} to find out the depth (number of color
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 planes) of a pixmap displayed in a particular window. The results might
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 be different from the results you would get for another window (perhaps
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 the user specified a different image for the frame that window is on; or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 perhaps the same image was specified but the window is on a different X
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 server, and that X server has different color capabilities from this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 one).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 @var{domain} defaults to the selected window if omitted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 @var{domain} can be a frame or device, instead of a window. The value
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
431 returned for such a domain is used in special circumstances when a
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 more specific domain does not apply; for example, a frame value might be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 used for coloring a toolbar, which is conceptually attached to a frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434 rather than a particular window. The value is also useful in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 determining what the value would be for a particular window within the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436 frame or device, if it is not overridden by a more specific
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 specification.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439 If @var{property} does not name a built-in property, its value will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440 simply be returned unless it is a specifier object, in which case it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441 will be instanced using @code{specifier-instance}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 Optional arguments @var{default} and @var{no-fallback} are the same as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 in @code{specifier-instance}. @xref{Specifiers}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447 @defun remove-glyph-property glyph property &optional locale tag-set exact-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448 This function removes a property from a glyph. For built-in properties,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 this is analogous to @code{remove-specifier}. @xref{Specifiers,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450 remove-specifier-p}, for the meaning of the @var{locale}, @var{tag-set},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451 and @var{exact-p} arguments.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 @node Glyph Convenience Functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455 @subsection Glyph Convenience Functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457 The following functions are provided for working with specific
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458 properties of a glyph. Note that these are exactly like calling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459 the general functions described above and passing in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 appropriate value for @var{property}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462 Remember that if you want to determine the ``value'' of a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 specific glyph property, you probably want to use the @code{*-instance}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 functions. For example, to determine whether a glyph contributes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465 to its line height, use @code{glyph-contrib-p-instance}, not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 @code{glyph-contrib-p}. (The latter will return a boolean specifier
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467 or a list of specifications, and you probably aren't concerned with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468 these.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470 @defun glyph-image glyph &optional locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 This function is equivalent to calling @code{glyph-property} with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472 a property of @code{image}. The return value will be an image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473 specifier if @var{locale} is @code{nil} or omitted; otherwise,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474 it will be a specification or list of specifications.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477 @defun set-glyph-image glyph spec &optional locale tag-set how-to-add
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478 This function is equivalent to calling @code{set-glyph-property} with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 a property of @code{image}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 @defun glyph-image-instance glyph &optional domain default no-fallback
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483 This function returns the instance of @var{glyph}'s image in the given
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 @var{domain}, and is equivalent to calling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 @code{glyph-property-instance} with a property of @code{image}. The
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 return value will be an image instance.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488 Normally @var{domain} will be a window or @code{nil} (meaning the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 selected window), and an instance object describing how the image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 appears in that particular window and buffer will be returned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 @defun glyph-contrib-p glyph &optional locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 This function is equivalent to calling @code{glyph-property} with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495 a property of @code{contrib-p}. The return value will be a boolean
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496 specifier if @var{locale} is @code{nil} or omitted; otherwise,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 it will be a specification or list of specifications.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 @defun set-glyph-contrib-p glyph spec &optional locale tag-set how-to-add
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 This function is equivalent to calling @code{set-glyph-property} with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 a property of @code{contrib-p}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 @defun glyph-contrib-p-instance glyph &optional domain default no-fallback
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 This function returns whether the glyph contributes to its line height
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507 in the given @var{domain}, and is equivalent to calling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 @code{glyph-property-instance} with a property of @code{contrib-p}. The
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 return value will be either @code{nil} or @code{t}. (Normally @var{domain}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510 will be a window or @code{nil}, meaning the selected window.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513 @defun glyph-baseline glyph &optional locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 This function is equivalent to calling @code{glyph-property} with a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 property of @code{baseline}. The return value will be a specifier if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 @var{locale} is @code{nil} or omitted; otherwise, it will be a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 specification or list of specifications.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520 @defun set-glyph-baseline glyph spec &optional locale tag-set how-to-add
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521 This function is equivalent to calling @code{set-glyph-property} with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 a property of @code{baseline}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525 @defun glyph-baseline-instance glyph &optional domain default no-fallback
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 This function returns the instance of @var{glyph}'s baseline value in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527 the given @var{domain}, and is equivalent to calling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 @code{glyph-property-instance} with a property of @code{baseline}. The
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529 return value will be an integer or @code{nil}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531 Normally @var{domain} will be a window or @code{nil} (meaning the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 selected window), and an instance object describing the baseline value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533 appears in that particular window and buffer will be returned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 @defun glyph-face glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 This function returns the face of @var{glyph}. (Remember, this is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 not a specifier, but a simple property.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
541 @defun set-glyph-face glyph face
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 This function changes the face of @var{glyph} to @var{face}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545 @node Glyph Dimensions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546 @subsection Glyph Dimensions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548 @defun glyph-width glyph &optional window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 This function returns the width of @var{glyph} on @var{window}. This
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 may not be exact as it does not take into account all of the context
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 that redisplay will.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 @defun glyph-ascent glyph &optional window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 This function returns the ascent value of @var{glyph} on @var{window}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 This may not be exact as it does not take into account all of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557 context that redisplay will.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560 @defun glyph-descent glyph &optional window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561 This function returns the descent value of @var{glyph} on @var{window}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562 This may not be exact as it does not take into account all of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 context that redisplay will.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566 @defun glyph-height glyph &optional window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 This function returns the height of @var{glyph} on @var{window}. (This
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 is equivalent to the sum of the ascent and descent values.) This may
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 not be exact as it does not take into account all of the context that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570 redisplay will.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 @node Images
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574 @section Images
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
577 * Image Specifiers:: Specifying how an image will appear.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578 * Image Instantiator Conversion::
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579 Conversion is applied to image instantiators
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580 at the time they are added to an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 image specifier or at the time they
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582 are passed to @code{make-image-instance}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 * Image Instances:: What an image specifier gets instanced as.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
584 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
585
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
586 @node Image Specifiers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
587 @subsection Image Specifiers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
588 @cindex image specifiers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
590 An image specifier is used to describe the actual image of a glyph.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
591 It works like other specifiers (@pxref{Specifiers}), in that it contains
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592 a number of specifications describing how the image should appear in a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
593 variety of circumstances. These specifications are called @dfn{image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
594 instantiators}. When XEmacs wants to display the image, it instantiates
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
595 the image into an @dfn{image instance}. Image instances are their own
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
596 primitive object type (similar to font instances and color instances),
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
597 describing how the image appears in a particular domain. (On the other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
598 hand, image instantiators, which are just descriptions of how the image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
599 should appear, are represented using strings or vectors.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
600
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
601 @defun image-specifier-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
602 This function returns non-@code{nil} if @var{object} is an image specifier.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
603 Usually, an image specifier results from calling @code{glyph-image} on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
604 a glyph.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
605 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
606
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
607 @defun make-image-specifier spec-list
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
608 This function creates a new image specifier object and initializes it
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
609 according to @var{spec-list}. @xref{Specifiers}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
610
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
611 Note that, in practice, you rarely, if ever, need to actually create an
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
612 image specifier! (This function exists mainly for completeness.) Pretty
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
613 much the only use for image specifiers is to control how glyphs are
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
614 displayed, and the image specifier associated with a glyph (the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
615 @code{image} property of a glyph) is created automatically when a glyph
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
616 is created and need not (and cannot, for that matter) ever be changed
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
617 (@pxref{Glyphs}). In fact, the design decision to create a separate
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
618 image specifier type, rather than make glyphs themselves be specifiers,
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
619 is debatable---the other properties of glyphs are rarely used and could
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
620 conceivably have been incorporated into the glyph's instantiator. The
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
621 rarely used glyph types (buffer, pointer, icon) could also have been
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
622 incorporated into the instantiator.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
623 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
624
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
625 Image instantiators come in many formats: @code{xbm}, @code{xpm},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
626 @code{gif}, @code{jpeg}, etc. This describes the format of the data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
627 describing the image. The resulting image instances also come in many
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 394
diff changeset
628 types---@code{mono-pixmap}, @code{color-pixmap}, @code{text},
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
629 @code{pointer}, etc. This refers to the behavior of the image and the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
630 sorts of places it can appear. (For example, a color-pixmap image has
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
631 fixed colors specified for it, while a mono-pixmap image comes in two
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
632 unspecified shades ``foreground'' and ``background'' that are determined
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
633 from the face of the glyph or surrounding text; a text image appears as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
634 a string of text and has an unspecified foreground, background, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
635 font; a pointer image behaves like a mono-pixmap image but can only be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
636 used as a mouse pointer [mono-pixmap images cannot be used as mouse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
637 pointers]; etc.) It is important to keep the distinction between image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
638 instantiator format and image instance type in mind. Typically, a given
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
639 image instantiator format can result in many different image instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
640 types (for example, @code{xpm} can be instanced as @code{color-pixmap},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
641 @code{mono-pixmap}, or @code{pointer}; whereas @code{cursor-font} can be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
642 instanced only as @code{pointer}), and a particular image instance type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
643 can be generated by many different image instantiator formats (e.g.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
644 @code{color-pixmap} can be generated by @code{xpm}, @code{gif},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
645 @code{jpeg}, etc.).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
646
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 371
diff changeset
647 @xref{Image Instances}, for a more detailed discussion of image
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
648 instance types.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
649
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
650 An image instantiator should be a string or a vector of the form
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
651
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
652 @example
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
653 @code{[@var{format} @var{:keyword} @var{value} ...]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
654 @end example
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
655
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
656 i.e. a format symbol followed by zero or more alternating keyword-value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
657 pairs. The @dfn{format} field should be a symbol, one of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
658
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
659 @table @code
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
660 @item nothing
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
661 Don't display anything; no keywords are valid for this. Can only be
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
662 instanced as @code{nothing}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
663 @item string
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
664 Display this image as a text string. Can only be instanced
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
665 as @code{text}, although support for instancing as @code{mono-pixmap}
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
666 should be added.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
667 @item formatted-string
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
668 Display this image as a text string with replaceable fields,
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
669 similar to a modeline format string; not currently implemented.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
670 @item xbm
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
671 An X bitmap; only if X support was compiled into this XEmacs. Can be
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
672 instanced as @code{mono-pixmap}, @code{color-pixmap}, or
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
673 @code{pointer}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
674 @item xpm
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
675 An XPM pixmap; only if XPM support was compiled into this XEmacs. Can
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
676 be instanced as @code{color-pixmap}, @code{mono-pixmap}, or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
677 @code{pointer}. XPM is an add-on library for X that was designed to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
678 rectify the shortcomings of the XBM format. Most implementations of X
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
679 include the XPM library as a standard part. If your vendor does not, it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
680 is highly recommended that you download it and install it. You can get
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
681 it from the standard XEmacs FTP site, among other places.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
682 @item xface
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
683 An X-Face bitmap, used to encode people's faces in e-mail messages;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
684 only if X-Face support was compiled into this XEmacs. Can be instanced
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
685 as @code{mono-pixmap}, @code{color-pixmap}, or @code{pointer}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
686 @item gif
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
687 A GIF87 or GIF89 image; only if GIF support was compiled into this
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
688 XEmacs. Can be instanced as @code{color-pixmap}. Note that XEmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
689 includes GIF decoding functions as a standard part of it, so if you have
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
690 X support, you will normally have GIF support, unless you explicitly
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
691 disable it at configure time.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
692 @item jpeg
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
693 A JPEG-format image; only if JPEG support was compiled into this
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
694 XEmacs. Can be instanced as @code{color-pixmap}. If you have the JPEG
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
695 libraries present on your system when XEmacs is built, XEmacs will
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
696 automatically detect this and use them, unless you explicitly disable it
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
697 at configure time.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
698 @item png
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
699 A PNG/GIF24 image; only if PNG support was compiled into this XEmacs.
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
700 Can be instanced as @code{color-pixmap}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
701 @item tiff
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
702 A TIFF-format image; only if TIFF support was compiled into this XEmacs.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
703 @item cursor-font
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
704 One of the standard cursor-font names, such as @samp{watch} or
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
705 @samp{right_ptr} under X. Under X, this is, more specifically, any of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
706 the standard cursor names from appendix B of the Xlib manual [also known
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
707 as the file @file{<X11/cursorfont.h>}] minus the @samp{XC_} prefix. On
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
708 other window systems, the valid names will be specific to the type of
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
709 window system. Can only be instanced as @code{pointer}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
710 @item font
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
711 A glyph from a font; i.e. the name of a font, and glyph index into it
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
712 of the form @samp{@var{font} fontname index [[mask-font] mask-index]}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
713 Only if X support was compiled into this XEmacs. Currently can only be
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
714 instanced as @code{pointer}, although this should probably be fixed.
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
715 @item mswindows-resource
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
716 An MS Windows pointer resource. Specifies a resource to retrieve
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
717 directly from the system (an OEM resource) or from a file, particularly
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
718 an executable file. If the resource is to be retrieved from a file, use
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
719 :file and optionally :resource-id. Otherwise use :resource-id. Always
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
720 specify :resource-type to specify the type (cursor, bitmap or icon) of
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
721 the resource. Possible values for :resource-id are listed below. Can
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
722 be instanced as @code{pointer} or @code{color-pixmap}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
723 @item subwindow
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
724 An embedded windowing system window. Can only be instanced as
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
725 @code{subwindow}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
726 @item button
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
727 A button widget; either a push button, radio button or toggle button.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
728 Can only be instanced as @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
729 @item combo-box
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
730 A drop list of selectable items in a widget, for editing text.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
731 Can only be instanced as @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
732 @item edit-field
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
733 A text editing widget. Can only be instanced as @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
734 @item label
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
735 A static, text-only, widget; for displaying text. Can only be instanced
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
736 as @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
737 @item layout
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
738 A widget for controlling the positioning of children underneath it.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
739 Through the use of nested layouts, a widget hierarchy can be created
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
740 which can have the appearance of any standard dialog box or similar
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
741 arrangement; all of this is counted as one @dfn{glyph} and could appear
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
742 in many of the places that expect a single glyph. Can only be instanced
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
743 as @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
744 @item native-layout
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
745 @c #### Document me better!
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
746 The native version of a layout widget.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
747 Can only be instanced as @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
748 @item progress-gauge
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
749 A sliding widget, for showing progress. Can only be instanced as
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
750 @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
751 @item tab-control
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
752 A tab widget; a series of user selectable tabs. Can only be instanced
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
753 as @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
754 @item tree-view
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
755 A folding widget. Can only be instanced as @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
756 @item scrollbar
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
757 A scrollbar widget. Can only be instanced as @code{widget}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
758 @item autodetect
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
759 XEmacs tries to guess what format the data is in. If X support exists,
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
760 the data string will be checked to see if it names a filename. If so,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
761 and this filename contains XBM or XPM data, the appropriate sort of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
762 pixmap or pointer will be created. [This includes picking up any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
763 specified hotspot or associated mask file.] Otherwise, if @code{pointer}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
764 is one of the allowable image-instance types and the string names a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
765 valid cursor-font name, the image will be created as a pointer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
766 Otherwise, the image will be displayed as text. If no X support exists,
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
767 the image will always be displayed as text.
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
768 @item inherit
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
769 Inherit from the background-pixmap property of a face. Can only be
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
770 instanced as @code{mono-pixmap}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
771 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
772
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
773 The valid keywords are:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
774
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
775 @table @code
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
776 @item :data
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
777 Inline data. For most formats above, this should be a string. For
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
778 XBM images, this should be a list of three elements: width, height, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
779 a string of bit data. This keyword is not valid for instantiator
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
780 format @code{nothing}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
781
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
782 @item :file
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
783 Data is contained in a file. The value is the name of this file. If
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
784 both @code{:data} and @code{:file} are specified, the image is created
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
785 from what is specified in @code{:data} and the string in @code{:file}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
786 becomes the value of the @code{image-instance-file-name} function when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
787 applied to the resulting image-instance. This keyword is not valid for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
788 instantiator formats @code{nothing}, @code{string},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
789 @code{formatted-string}, @code{cursor-font}, @code{font}, and
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
790 @code{autodetect}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
791
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
792 @item :foreground
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
793 @itemx :background
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
794 For @code{xbm}, @code{xface}, @code{cursor-font}, and @code{font}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
795 These keywords allow you to explicitly specify foreground and background
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
796 colors. The argument should be anything acceptable to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
797 @code{make-color-instance}. This will cause what would be a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
798 @code{mono-pixmap} to instead be colorized as a two-color color-pixmap,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
799 and specifies the foreground and/or background colors for a pointer
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
800 instead of black and white.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
801
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
802 @item :mask-data
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
803 For @code{xbm} and @code{xface}. This specifies a mask to be used with the
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
804 bitmap. The format is a list of width, height, and bits, like for
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
805 @code{:data}.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
806
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
807 @item :mask-file
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
808 For @code{xbm} and @code{xface}. This specifies a file containing the
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
809 mask data. If neither a mask file nor inline mask data is given for an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
810 XBM image, and the XBM image comes from a file, XEmacs will look for a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
811 mask file with the same name as the image file but with @samp{Mask} or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
812 @samp{msk} appended. For example, if you specify the XBM file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
813 @file{left_ptr} [usually located in @file{/usr/include/X11/bitmaps}],
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
814 the associated mask file @file{left_ptrmsk} will automatically be picked
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
815 up.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
816
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
817 @item :hotspot-x
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
818 @itemx :hotspot-y
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
819 For @code{xbm} and @code{xface}. These keywords specify a hotspot if
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
820 the image is instantiated as a @code{pointer}. Note that if the XBM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
821 image file specifies a hotspot, it will automatically be picked up if no
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
822 explicit hotspot is given.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
823
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
824 @item :color-symbols
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
825 Only for @code{xpm}. This specifies an alist that maps strings that
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
826 specify symbolic color names to the actual color to be used for that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
827 symbolic color (in the form of a string or a color-specifier object).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
828 If this is not specified, the contents of @code{xpm-color-symbols} are
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
829 used to generate the alist.
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
830 @item :resource-id
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
831 Only for @code{mswindows-resource}. This must be either an integer
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
832 (which directly specifies a resource number) or a string. Valid strings
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
833 are
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
834
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
835 For bitmaps:
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
836
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
837 "close", "uparrow", "dnarrow", "rgarrow", "lfarrow",
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
838 "reduce", "zoom", "restore", "reduced", "zoomd",
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
839 "restored", "uparrowd", "dnarrowd", "rgarrowd", "lfarrowd",
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
840 "mnarrow", "combo", "uparrowi", "dnarrowi", "rgarrowi",
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
841 "lfarrowi", "size", "btsize", "check", "checkboxes", and
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
842 "btncorners".
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
843
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
844 For cursors:
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
845
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
846 "normal", "ibeam", "wait", "cross", "up", "sizenwse",
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
847 "sizenesw", "sizewe", "sizens", "sizeall", and "no".
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
848
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
849 For icons:
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
850
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
851 "sample", "hand", "ques", "bang", "note", and "winlogo".
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
852 @item :resource-type
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
853 Only for @code{mswindows-resource}. This must be a symbol, either
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
854 @code{cursor}, @code{icon}, or @code{bitmap}, specifying the type of
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
855 resource to be retrieved.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
856 @item :face
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
857 Only for @code{inherit}. This specifies the face to inherit from. For
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
858 widgets this also specifies the face to use for display. It defaults to
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
859 gui-element-face.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
860 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
861
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
862 Keywords accepted as menu item specs are also accepted by widgets.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
863 These are @code{:selected}, @code{:active}, @code{:suffix},
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
864 @code{:keys}, @code{:style}, @code{:filter}, @code{:config},
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
865 @code{:included}, @code{:key-sequence}, @code{:accelerator},
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
866 @code{:label} and @code{:callback}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
867
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
868 If instead of a vector, the instantiator is a string, it will be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
869 converted into a vector by looking it up according to the specs in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
870 @code{console-type-image-conversion-list} for the console type of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
871 the domain (usually a window; sometimes a frame or device) over which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
872 the image is being instantiated.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
873
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
874 If the instantiator specifies data from a file, the data will be read in
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
875 at the time that the instantiator is added to the image specifier (which
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
876 may be well before the image is actually displayed), and the
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
877 instantiator will be converted into one of the inline-data forms, with
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
878 the filename retained using a @code{:file} keyword. This implies that
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
879 the file must exist when the instantiator is added to the image, but
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
880 does not need to exist at any other time (e.g. it may safely be a
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
881 temporary file).
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
882
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
883 @defun valid-image-instantiator-format-p format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
884 This function returns non-@code{nil} if @var{format} is a valid image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
885 instantiator format. Note that the return value for many formats listed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
886 above depends on whether XEmacs was compiled with support for that format.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
887 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
888
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
889 @defun image-instantiator-format-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
890 This function return a list of valid image-instantiator formats.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
891 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
892
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
893 @defvar xpm-color-symbols
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
894 This variable holds definitions of logical color-names used when reading
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
895 XPM files. Elements of this list should be of the form
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
896 @code{(@var{color-name} @var{form-to-evaluate})}. The @var{color-name}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
897 should be a string, which is the name of the color to define; the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
898 @var{form-to-evaluate} should evaluate to a color specifier object, or a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
899 string to be passed to @code{make-color-instance} (@pxref{Colors}). If
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
900 a loaded XPM file references a symbolic color called @var{color-name},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
901 it will display as the computed color instead.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
902
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
903 The default value of this variable defines the logical color names
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
904 @samp{"foreground"} and @samp{"background"} to be the colors of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
905 @code{default} face.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
906 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
907
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
908 @defvar x-bitmap-file-path
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
909 A list of the directories in which X bitmap files may be found. If nil,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
910 this is initialized from the @samp{"*bitmapFilePath"} resource. This is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
911 used by the @code{make-image-instance} function (however, note that if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
912 the environment variable @samp{XBMLANGPATH} is set, it is consulted
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
913 first).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
914 @end defvar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
915
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
916 @node Image Instantiator Conversion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
917 @subsection Image Instantiator Conversion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
918 @cindex image instantiator conversion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
919 @cindex conversion of image instantiators
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
920
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
921 @defun set-console-type-image-conversion-list console-type list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
922 This function sets the image-conversion-list for consoles of the given
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
923 @var{console-type}. The image-conversion-list specifies how image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
924 instantiators that are strings should be interpreted. Each element of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
925 the list should be a list of two elements (a regular expression string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
926 and a vector) or a list of three elements (the preceding two plus an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
927 integer index into the vector). The string is converted to the vector
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
928 associated with the first matching regular expression. If a vector
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
929 index is specified, the string itself is substituted into that position
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
930 in the vector.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
931
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
932 Note: The conversion above is applied when the image instantiator is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
933 added to an image specifier, not when the specifier is actually
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
934 instantiated. Therefore, changing the image-conversion-list only affects
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
935 newly-added instantiators. Existing instantiators in glyphs and image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
936 specifiers will not be affected.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
937 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
938
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
939 @defun console-type-image-conversion-list console-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
940 This function returns the image-conversion-list for consoles of the given
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
941 @var{console-type}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
942 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
943
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
944 @node Image Instances
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
945 @subsection Image Instances
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
946 @cindex image instances
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
947
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
948 Image-instance objects encapsulate the way a particular image (pixmap,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
949 etc.) is displayed on a particular device.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
950
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
951 In most circumstances, you do not need to directly create image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
952 instances; use a glyph instead. However, it may occasionally be useful
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
953 to explicitly create image instances, if you want more control over the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
954 instantiation process.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
955
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
956 @defun image-instance-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
957 This function returns non-@code{nil} if @var{object} is an image instance.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
958 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
959
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
960 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
961 * Image Instance Types:: Each image instances has a particular type.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
962 * Image Instance Functions:: Functions for working with image instances.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
963 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
964
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
965 @node Image Instance Types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
966 @subsubsection Image Instance Types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
967 @cindex image instance types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
968
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
969 Image instances come in a number of different types. The type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
970 of an image instance specifies the nature of the image: Whether
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
971 it is a text string, a mono pixmap, a color pixmap, etc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
972
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
973 The valid image instance types are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
974
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
975 @table @code
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
976 @item nothing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
977 Nothing is displayed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
978
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
979 @item text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
980 Displayed as text. The foreground and background colors and the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
981 font of the text are specified independent of the pixmap. Typically
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
982 these attributes will come from the face of the surrounding text,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
983 unless a face is specified for the glyph in which the image appears.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
984
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
985 @item mono-pixmap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
986 Displayed as a mono pixmap (a pixmap with only two colors where the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
987 foreground and background can be specified independent of the pixmap;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
988 typically the pixmap assumes the foreground and background colors of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
989 the text around it, unless a face is specified for the glyph in which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
990 the image appears).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
991 @item color-pixmap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
992
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
993 Displayed as a color pixmap.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
994
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
995 @item pointer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
996 Used as the mouse pointer for a window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
997
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
998 @item subwindow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
999 A child window that is treated as an image. This allows (e.g.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1000 another program to be responsible for drawing into the window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1001 Not currently implemented.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1002 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1003
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1004 @defun valid-image-instance-type-p type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1005 This function returns non-@code{nil} if @var{type} is a valid image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1006 instance type.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1007 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1008
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1009 @defun image-instance-type-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1010 This function returns a list of the valid image instance types.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1011 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1012
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1013 @defun image-instance-type image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1014 This function returns the type of the given image instance. The return
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1015 value will be one of @code{nothing}, @code{text}, @code{mono-pixmap},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1016 @code{color-pixmap}, @code{pointer}, or @code{subwindow}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1017 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1018
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1019 @defun text-image-instance-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1020 This function returns non-@code{nil} if @var{object} is an image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1021 instance of type @code{text}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1022 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1023
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1024 @defun mono-pixmap-image-instance-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1025 This function returns non-@code{nil} if @var{object} is an image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1026 instance of type @code{mono-pixmap}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1027 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1028
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1029 @defun color-pixmap-image-instance-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1030 This function returns non-@code{nil} if @var{object} is an image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1031 instance of type @code{color-pixmap}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1032 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1033
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1034 @defun pointer-image-instance-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1035 This function returns non-@code{nil} if @var{object} is an image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1036 instance of type @code{pointer}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1037 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1038
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1039 @defun subwindow-image-instance-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1040 This function returns non-@code{nil} if @var{object} is an image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1041 instance of type @code{subwindow}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1042 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1043
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1044 @defun nothing-image-instance-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1045 This function returns non-@code{nil} if @var{object} is an image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1046 instance of type @code{nothing}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1047 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1048
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1049 @defun widget-image-instance-p object
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1050 Return t if @var{object} is an image instance of type @code{widget}.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1051 @end defun
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1052
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1053 @node Image Instance Functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1054 @subsubsection Image Instance Functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1055
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1056 @defun make-image-instance data &optional domain dest-types no-error
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1057 This function creates a new image-instance object.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1058
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1059 @var{data} is an image instantiator, which describes the image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1060 (@pxref{Image Specifiers}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1061
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1062 @var{dest-types} should be a list of allowed image instance types that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1063 can be generated. The @var{dest-types} list is unordered. If multiple
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1064 destination types are possible for a given instantiator, the ``most
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1065 natural'' type for the instantiator's format is chosen. (For XBM, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1066 most natural types are @code{mono-pixmap}, followed by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1067 @code{color-pixmap}, followed by @code{pointer}. For the other normal
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1068 image formats, the most natural types are @code{color-pixmap}, followed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1069 by @code{mono-pixmap}, followed by @code{pointer}. For the string and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1070 formatted-string formats, the most natural types are @code{text},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1071 followed by @code{mono-pixmap} (not currently implemented), followed by
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1072 @code{color-pixmap} (not currently implemented). For MS Windows
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1073 resources, the most natural type for pointer resources is
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1074 @code{pointer}, and for the others it's @code{color-pixmap}. The other
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1075 formats can only be instantiated as one type. (If you want to control
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1076 more specifically the order of the types into which an image is
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1077 instantiated, just call @code{make-image-instance} repeatedly until it
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1078 succeeds, passing less and less preferred destination types each time.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1079
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1080 If @var{dest-types} is omitted, all possible types are allowed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1081
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1082 @var{domain} specifies the domain to which the image instance will be
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1083 attached. This domain is termed the @dfn{governing domain}. The type
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1084 of the governing domain depends on the image instantiator
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1085 format. (Although, more correctly, it should probably depend on the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1086 image instance type.) For example, pixmap image instances are specific
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1087 to a device, but widget image instances are specific to a particular
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1088 XEmacs window because in order to display such a widget when two windows
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1089 onto the same buffer want to display the widget, two separate underlying
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1090 widgets must be created. (That's because a widget is actually a child
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1091 window-system window, and all window-system windows have a unique
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1092 existence on the screen.) This means that the governing domain for a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1093 pixmap image instance will be some device (most likely, the only
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1094 existing device), whereas the governing domain for a widget image
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1095 instance will be some XEmacs window.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1096
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1097 If you specify an overly general @var{domain} (e.g. a frame when a
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1098 window was wanted), an error is signaled. If you specify an overly
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1099 specific @var{domain} (e.g. a window when a device was wanted), the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1100 corresponding general domain is fetched and used instead. For
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1101 @code{make-image-instance}, it makes no difference whether you specify
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1102 an overly specific domain or the properly general domain derived from
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1103 it. However, it does matter when creating an image instance by
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1104 instantiating a specifier or glyph (e.g. with
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1105 @code{glyph-image-instance}), because the more specific domain causes
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1106 spec lookup to start there and proceed to more general domains. (It
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1107 would also matter when creating an image instance with an instantiator
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1108 format of @code{inherit}, but we currently disallow this. #### We should
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1109 fix this.)
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1110 n
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1111 If omitted, @var{domain} defaults to the selected window.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1112
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1113 @var{no-error} controls what happens when the image cannot be generated.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1114 If @var{nil}, an error message is generated. If @var{t}, no messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1115 are generated and this function returns @var{nil}. If anything else, a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1116 warning message is generated and this function returns @var{nil}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1117 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1119 @defun colorize-image-instance image-instance foreground background
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1120 This function makes the image instance be displayed in the given
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1121 colors. Image instances come in two varieties: bitmaps, which are 1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1122 bit deep which are rendered in the prevailing foreground and background
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1123 colors; and pixmaps, which are of arbitrary depth (including 1) and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1124 which have the colors explicitly specified. This function converts a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1125 bitmap to a pixmap. If the image instance was a pixmap already,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1126 nothing is done (and @code{nil} is returned). Otherwise @code{t} is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1127 returned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1128 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1130 @defun image-instance-name image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1131 This function returns the name of the given image instance.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1132 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1133
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1134 @defun image-instance-domain image-instance
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1135
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1136 Return the governing domain of the given @var{image-instance}. The
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1137 governing domain of an image instance is the domain that the image
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1138 instance is specific to. It is @emph{NOT} necessarily the domain that
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1139 was given to the call to @code{specifier-instance} that resulted in the
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1140 creation of this image instance. See @code{make-image-instance} for
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1141 more information on governing domains.
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1142 @end defun
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1143
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
1144
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1145 @defun image-instance-string image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1146 This function returns the string of the given image instance. This will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1147 only be non-@code{nil} for text image instances.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1148 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1149
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1150 @defun image-instance-file-name image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1151 This function returns the file name from which @var{image-instance} was
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1152 read, if known.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1153 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1154
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1155 @defun image-instance-mask-file-name image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1156 This function returns the file name from which @var{image-instance}'s
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1157 mask was read, if known.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1158 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1159
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1160 @defun image-instance-depth image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1161 This function returns the depth of the image instance. This is 0 for a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1162 mono pixmap, or a positive integer for a color pixmap.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1163 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1164
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1165 @defun image-instance-height image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1166 This function returns the height of the image instance, in pixels.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1167 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1169 @defun image-instance-width image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1170 This function returns the width of the image instance, in pixels.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1171 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1172
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1173 @defun image-instance-hotspot-x image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1174 This function returns the X coordinate of the image instance's hotspot,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1175 if known. This is a point relative to the origin of the pixmap. When
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1176 an image is used as a mouse pointer, the hotspot is the point on the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1177 image that sits over the location that the pointer points to. This is,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1178 for example, the tip of the arrow or the center of the crosshairs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1180 This will always be @code{nil} for a non-pointer image instance.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1181 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1182
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1183 @defun image-instance-hotspot-y image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1184 This function returns the Y coordinate of the image instance's hotspot,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1185 if known.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1186 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1187
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1188 @defun image-instance-foreground image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1189 This function returns the foreground color of @var{image-instance}, if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1190 applicable. This will be a color instance or @code{nil}. (It will only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1191 be non-@code{nil} for colorized mono pixmaps and for pointers.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1192 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1193
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1194 @defun image-instance-background image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1195 This function returns the background color of @var{image-instance}, if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1196 applicable. This will be a color instance or @code{nil}. (It will only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1197 be non-@code{nil} for colorized mono pixmaps and for pointers.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1198 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1199
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1200
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1201 @node Glyph Types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1202 @section Glyph Types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1203
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1204 Each glyph has a particular type, which controls how the glyph's image
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1205 is generated. Each glyph type has a corresponding list of allowable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1206 image instance types that can be generated. When you call
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1207 @code{glyph-image-instance} to retrieve the image instance of a glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1208 XEmacs does the equivalent of calling @code{make-image-instance} and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1209 passing in @var{dest-types} the list of allowable image instance types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1210 for the glyph's type.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1211
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1212 @itemize @bullet
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1213 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1214 @code{buffer} glyphs can be used as the begin-glyph or end-glyph of an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1215 extent, in the modeline, and in the toolbar. Their image can be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1216 instantiated as @code{nothing}, @code{mono-pixmap}, @code{color-pixmap},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1217 @code{text}, and @code{subwindow}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1218
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1219 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1220 @code{pointer} glyphs can be used to specify the mouse pointer. Their
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1221 image can be instantiated as @code{pointer}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1222
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1223 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1224 @code{icon} glyphs can be used to specify the icon used when a frame is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1225 iconified. Their image can be instantiated as @code{mono-pixmap} and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1226 @code{color-pixmap}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1227 @end itemize
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1228
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1229 @defun glyph-type glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1230 This function returns the type of the given glyph. The return value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1231 will be a symbol, one of @code{buffer}, @code{pointer}, or @code{icon}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1232 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1233
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1234 @defun valid-glyph-type-p glyph-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1235 Given a @var{glyph-type}, this function returns non-@code{nil} if it is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1236 valid.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1237 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1238
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1239 @defun glyph-type-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1240 This function returns a list of valid glyph types.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1241 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1242
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1243 @defun buffer-glyph-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1244 This function returns non-@code{nil} if @var{object} is a glyph of type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1245 @code{buffer}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1246 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1247
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1248 @defun icon-glyph-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1249 This function returns non-@code{nil} if @var{object} is a glyph of type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1250 @code{icon}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1251 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1252
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1253 @defun pointer-glyph-p object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1254 This function returns non-@code{nil} if @var{object} is a glyph of type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1255 @code{pointer}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1256 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1257
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1258 @node Mouse Pointer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1259 @section Mouse Pointer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1260 @cindex mouse cursor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1261 @cindex cursor (mouse)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1262 @cindex pointer (mouse)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1263 @cindex mouse pointer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1264
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1265 The shape of the mouse pointer when over a particular section of a frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1266 is controlled using various glyph variables. Since the image of a glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1267 is a specifier, it can be controlled on a per-buffer, per-frame, per-window,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1268 or per-device basis.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1269
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1270 You should use @code{set-glyph-image} to set the following variables,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1271 @emph{not} @code{setq}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1272
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1273 @defvr Glyph text-pointer-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1274 This variable specifies the shape of the mouse pointer when over text.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1275 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1276
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1277 @defvr Glyph nontext-pointer-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1278 This variable specifies the shape of the mouse pointer when over a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1279 buffer, but not over text. If unspecified in a particular domain,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1280 @code{text-pointer-glyph} is used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1281 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1282
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1283 @defvr Glyph modeline-pointer-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1284 This variable specifies the shape of the mouse pointer when over the modeline.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1285 If unspecified in a particular domain, @code{nontext-pointer-glyph} is used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1286 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1287
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1288 @defvr Glyph selection-pointer-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1289 This variable specifies the shape of the mouse pointer when over a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1290 selectable text region. If unspecified in a particular domain,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1291 @code{text-pointer-glyph} is used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1292 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1293
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1294 @defvr Glyph gc-pointer-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1295 This variable specifies the shape of the mouse pointer when a garbage
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1296 collection is in progress. If the selected window is on a window system
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1297 and this glyph specifies a value (i.e. a pointer image instance) in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1298 domain of the selected window, the pointer will be changed as specified
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1299 during garbage collection. Otherwise, a message will be printed in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1300 echo area, as controlled by @code{gc-message}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1301 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1302
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1303 @defvr Glyph busy-pointer-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1304 This variable specifies the shape of the mouse pointer when XEmacs is busy.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1305 If unspecified in a particular domain, the pointer is not changed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1306 when XEmacs is busy.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1307 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1308
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1309 @defvr Glyph menubar-pointer-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1310 This variable specifies the shape of the mouse pointer when over the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1311 menubar. If unspecified in a particular domain, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1312 window-system-provided default pointer is used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1313 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1314
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1315 @defvr Glyph scrollbar-pointer-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1316 This variable specifies the shape of the mouse pointer when over a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1317 scrollbar. If unspecified in a particular domain, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1318 window-system-provided default pointer is used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1319 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1320
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1321 @defvr Glyph toolbar-pointer-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1322 This variable specifies the shape of the mouse pointer when over a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1323 toolbar. If unspecified in a particular domain,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1324 @code{nontext-pointer-glyph} is used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1325 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1326
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1327 Internally, these variables are implemented in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1328 @code{default-mouse-motion-handler}, and thus only take effect when the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1329 mouse moves. That function calls @code{set-frame-pointer}, which sets
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1330 the current mouse pointer for a frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1331
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1332 @defun set-frame-pointer frame image-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1333 This function sets the mouse pointer of @var{frame} to the given pointer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1334 image instance. You should not call this function directly.
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1335 (If you do, the pointer will change again the next time the mouse moves.)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1336 @end defun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1337
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1338 @node Redisplay Glyphs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1339 @section Redisplay Glyphs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1340
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1341 @defvr Glyph truncation-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1342 This variable specifies what is displayed at the end of truncated lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1343 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1344
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1345 @defvr Glyph continuation-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1346 This variable specifies what is displayed at the end of wrapped lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1347 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1348
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1349 @defvr Glyph octal-escape-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1350 This variable specifies what to prefix character codes displayed in octal
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1351 with.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1352 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1353
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1354 @defvr Glyph hscroll-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1355 This variable specifies what to display at the beginning of horizontally
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1356 scrolled lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1357 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1358
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1359 @defvr Glyph invisible-text-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1360 This variable specifies what to use to indicate the presence of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1361 invisible text. This is the glyph that is displayed when an ellipsis is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1362 called for, according to @code{selective-display-ellipses} or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1363 @code{buffer-invisibility-spec}). Normally this is three dots (``...'').
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1364 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1365
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1366 @defvr Glyph control-arrow-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1367 This variable specifies what to use as an arrow for control characters.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1368 @end defvr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1369
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1370 @node Subwindows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1371 @section Subwindows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1372
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1373 Subwindows are not currently implemented.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1374
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1375 @defun subwindowp object
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1376 This function returns non-@code{nil} if @var{object} is a subwindow.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1377 @end defun