:right-sidebar: True Tag =================================================================== .. currentmodule:: gi.repository.GtkSource .. class:: Tag(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.TextTag`, :class:`~gi.repository.GObject.Object` A tag that can be applied to text in a :obj:`~gi.repository.GtkSource.Buffer`\. ``GtkSourceTag`` is a subclass of :obj:`~gi.repository.Gtk.TextTag` that adds properties useful for the GtkSourceView library. If, for a certain tag, :obj:`~gi.repository.Gtk.TextTag` is sufficient, it's better that you create a :obj:`~gi.repository.Gtk.TextTag`\, not a :obj:`~gi.repository.GtkSource.Tag`\. Constructors ------------ .. rst-class:: interim-class .. class:: Tag :no-index: .. classmethod:: new(name: str | None = None) -> ~gi.repository.Gtk.TextTag Creates a ``GtkSourceTag``\. Configure the tag using object arguments, i.e. using :obj:`~gi.repository.GObject.Object.set`\. For usual cases, :obj:`~gi.repository.Buffer.create_source_tag` is more convenient to use. :param name: tag name, or :const:`None`. Properties ---------- .. rst-class:: interim-class .. class:: Tag :no-index: .. attribute:: props.draw_spaces :type: bool The type of the None singleton. .. attribute:: props.draw_spaces_set :type: bool The type of the None singleton. Fields ------ .. rst-class:: interim-class .. class:: Tag :no-index: .. attribute:: parent_instance