Package: gtk

Function gtk-text-buffer-create-tag

Lambda List

gtk-text-buffer-create-tag (buffer name &rest args)

Arguments

buffer -- a gtk-text-buffer object
name -- a string with the name of the new tag, or nil
args -- list of property keywords and values

Return Value

The new gtk-text-tag object.

Details

Creates a tag and adds it to the tag table for the text buffer. Equivalent to calling the gtk-text-tag-new function and then adding the tag to the tag table of the text buffer.

If the name argument is nil, the tag is anonymous. If the name argument is non-nil, a tag called name must not already exist in the tag table for this text buffer.

The args argument is a list of properties and values to set on the tag.

Example

Create and add a tag with name "font-italic" to the text buffer.
(defvar buffer (gtk-text-buffer-new)) => BUFFER
(gtk-text-buffer-create-tag buffer "font-italic"
                                   :font "fixed" :style :italic)
=> #<GTK-TEXT-TAG {1002193283}>    
 

See also

*2021-12-17