: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` :Constructors: :: Tag(**properties) new(name:str=None) -> Gtk.TextTag 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 Whether to draw white spaces. This property takes precedence over the value defined by the :obj:`~gi.repository.GtkSource.SpaceDrawer`'s :obj:`~gi.repository.GtkSource.SpaceDrawer.props.matrix` property (only where the tag is applied). Setting this property also changes :obj:`~gi.repository.GtkSource.Tag.props.draw_spaces_set` to :const:`True`. .. attribute:: props.draw_spaces_set :type: bool Whether the :obj:`~gi.repository.GtkSource.Tag.props.draw_spaces` property is set and must be taken into account. Fields ------ .. rst-class:: interim-class .. class:: Tag :no-index: .. attribute:: parent_instance