comparison man/lispref/glyphs.texi @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents abe6d1db359e
children a307f9a2021d
comparison
equal deleted inserted replaced
443:a8296e22da4e 444:576fb035e263
80 This graphical element could appear in a buffer, a margin, a gutter, or 80 This graphical element could appear in a buffer, a margin, a gutter, or
81 a toolbar, or as a mouse pointer or an icon, for example. 81 a toolbar, or as a mouse pointer or an icon, for example.
82 82
83 Creating a glyph using @code{make-glyph} does not specify @emph{where} 83 Creating a glyph using @code{make-glyph} does not specify @emph{where}
84 the glyph will be used, but it does specify @emph{what} the glyph will 84 the glyph will be used, but it does specify @emph{what} the glyph will
85 look like. In particular, SPEC-LIST is used to specify this, and it's 85 look like. In particular, @var{spec-list} is used to specify this, and it's
86 used to initialize the glyph's @code{image} property, which is an image 86 used to initialize the glyph's @code{image} property, which is an image
87 specifier. (Note that @dfn{image} as used in the context of a glyph's 87 specifier. (Note that @dfn{image} as used in the context of a glyph's
88 @code{image} property or in the terms @dfn{image specifier}, @dfn{image 88 @code{image} property or in the terms @dfn{image specifier}, @dfn{image
89 instantiator}, or @dfn{image instance} does not refer to what people 89 instantiator}, or @dfn{image instance} does not refer to what people
90 normally think of as an image (which in XEmacs is called a 90 normally think of as an image (which in XEmacs is called a
91 @dfn{pixmap}), but to any graphical element---a pixmap, a widget, or 91 @dfn{pixmap}), but to any graphical element---a pixmap, a widget, or
92 even a block of text, when used in the places that call for a glyph.) 92 even a block of text, when used in the places that call for a glyph.)
93 The format of the SPEC-LIST is typically an image instantiator (a string 93 The format of the @var{spec-list} is typically an image instantiator (a string
94 or a vector; @ref{Image Specifiers}), but can also be a list of such 94 or a vector; @ref{Image Specifiers}), but can also be a list of such
95 instantiators (each one in turn is tried until an image is successfully 95 instantiators (each one in turn is tried until an image is successfully
96 produced), a cons of a locale (frame, buffer, etc.) and an 96 produced), a cons of a locale (frame, buffer, etc.) and an
97 instantiator, a list of such conses, or any other form accepted by 97 instantiator, a list of such conses, or any other form accepted by
98 @code{canonicalize-spec-list}. @xref{Specifiers}, for more information 98 @code{canonicalize-spec-list}. @xref{Specifiers}, for more information
233 two-color image and the foreground and background of the image get 233 two-color image and the foreground and background of the image get
234 filled in with the corresponding colors from the face. 234 filled in with the corresponding colors from the face.
235 @end itemize 235 @end itemize
236 236
237 It is extremely rare that you will ever have to specify a value for 237 It is extremely rare that you will ever have to specify a value for
238 TYPE, which should be one of @code{buffer} (used for glyphs in an 238 @var{type}, which should be one of @code{buffer} (used for glyphs in an
239 extent, the modeline, the toolbar, or elsewhere in a buffer), 239 extent, the modeline, the toolbar, or elsewhere in a buffer),
240 @code{pointer} (used for the mouse-pointer), or @code{icon} (used for a 240 @code{pointer} (used for the mouse-pointer), or @code{icon} (used for a
241 frame's icon), and defaults to @code{buffer}. The only cases where it 241 frame's icon), and defaults to @code{buffer}. The only cases where it
242 needs to be specified is when creating icon or pointer glyphs, and in 242 needs to be specified is when creating icon or pointer glyphs, and in
243 both cases the necessary glyphs have already been created at startup and 243 both cases the necessary glyphs have already been created at startup and
878 the filename retained using a @code{:file} keyword. This implies that 878 the filename retained using a @code{:file} keyword. This implies that
879 the file must exist when the instantiator is added to the image, but 879 the file must exist when the instantiator is added to the image, but
880 does not need to exist at any other time (e.g. it may safely be a 880 does not need to exist at any other time (e.g. it may safely be a
881 temporary file). 881 temporary file).
882 882
883 @defun valid-image-instantiator-format-p format 883 @defun valid-image-instantiator-format-p format &optional locale
884 This function returns non-@code{nil} if @var{format} is a valid image 884 This function returns non-@code{nil} if @var{format} is a valid image
885 instantiator format. Note that the return value for many formats listed 885 instantiator format.
886 above depends on whether XEmacs was compiled with support for that format. 886
887 If @var{locale} is non-@code{nil} then the format is checked in that locale.
888 If @var{locale} is @code{nil} the current console is used.
889
890 Note that the return value for many formats listed above depends on
891 whether XEmacs was compiled with support for that format.
887 @end defun 892 @end defun
888 893
889 @defun image-instantiator-format-list 894 @defun image-instantiator-format-list
890 This function return a list of valid image-instantiator formats. 895 This function return a list of valid image-instantiator formats.
891 @end defun 896 @end defun
904 @samp{"foreground"} and @samp{"background"} to be the colors of the 909 @samp{"foreground"} and @samp{"background"} to be the colors of the
905 @code{default} face. 910 @code{default} face.
906 @end defvar 911 @end defvar
907 912
908 @defvar x-bitmap-file-path 913 @defvar x-bitmap-file-path
909 A list of the directories in which X bitmap files may be found. If nil, 914 A list of the directories in which X bitmap files may be found. If @code{nil},
910 this is initialized from the @samp{"*bitmapFilePath"} resource. This is 915 this is initialized from the @samp{"*bitmapFilePath"} resource. This is
911 used by the @code{make-image-instance} function (however, note that if 916 used by the @code{make-image-instance} function (however, note that if
912 the environment variable @samp{XBMLANGPATH} is set, it is consulted 917 the environment variable @samp{XBMLANGPATH} is set, it is consulted
913 first). 918 first).
914 @end defvar 919 @end defvar
1045 This function returns non-@code{nil} if @var{object} is an image 1050 This function returns non-@code{nil} if @var{object} is an image
1046 instance of type @code{nothing}. 1051 instance of type @code{nothing}.
1047 @end defun 1052 @end defun
1048 1053
1049 @defun widget-image-instance-p object 1054 @defun widget-image-instance-p object
1050 Return t if @var{object} is an image instance of type @code{widget}. 1055 Return @code{t} if @var{object} is an image instance of type @code{widget}.
1051 @end defun 1056 @end defun
1052 1057
1053 @node Image Instance Functions 1058 @node Image Instance Functions
1054 @subsubsection Image Instance Functions 1059 @subsubsection Image Instance Functions
1055 1060
1056 @defun make-image-instance data &optional domain dest-types no-error 1061 @defun make-image-instance data &optional domain dest-types noerror
1057 This function creates a new image-instance object. 1062 This function creates a new image-instance object.
1058 1063
1059 @var{data} is an image instantiator, which describes the image 1064 @var{data} is an image instantiator, which describes the image
1060 (@pxref{Image Specifiers}). 1065 (@pxref{Image Specifiers}).
1061 1066
1108 format of @code{inherit}, but we currently disallow this. #### We should 1113 format of @code{inherit}, but we currently disallow this. #### We should
1109 fix this.) 1114 fix this.)
1110 n 1115 n
1111 If omitted, @var{domain} defaults to the selected window. 1116 If omitted, @var{domain} defaults to the selected window.
1112 1117
1113 @var{no-error} controls what happens when the image cannot be generated. 1118 @var{noerror} controls what happens when the image cannot be generated.
1114 If @var{nil}, an error message is generated. If @var{t}, no messages 1119 If @code{nil}, an error message is generated. If @code{t}, no messages
1115 are generated and this function returns @var{nil}. If anything else, a 1120 are generated and this function returns @code{nil}. If anything else, a
1116 warning message is generated and this function returns @var{nil}. 1121 warning message is generated and this function returns @code{nil}.
1117 @end defun 1122 @end defun
1118 1123
1119 @defun colorize-image-instance image-instance foreground background 1124 @defun colorize-image-instance image-instance foreground background
1120 This function makes the image instance be displayed in the given 1125 This function makes the image instance be displayed in the given
1121 colors. Image instances come in two varieties: bitmaps, which are 1 1126 colors. Image instances come in two varieties: bitmaps, which are 1