:right-sidebar: True HoverContext =================================================================== .. currentmodule:: gi.repository.GtkSource .. class:: HoverContext(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Context for populating :obj:`~gi.repository.GtkSource.HoverDisplay` contents. ``GtkSourceHoverContext`` contains information about the request to populate contents for a :obj:`~gi.repository.GtkSource.HoverDisplay`\. It can be used to retrieve the :obj:`~gi.repository.GtkSource.View`\, :obj:`~gi.repository.GtkSource.Buffer`\, and :obj:`~gi.repository.Gtk.TextIter` for the regions of text which are being displayed. Use :obj:`~gi.repository.HoverContext.get_bounds` to get the word that was requested. :obj:`~gi.repository.HoverContext.get_iter` will get you the location of the pointer when the request was made. Methods ------- .. rst-class:: interim-class .. class:: HoverContext :no-index: .. method:: get_bounds() -> ~typing.Tuple[bool, ~gi.repository.Gtk.TextIter, ~gi.repository.Gtk.TextIter] Gets the current word bounds of the hover. If ``begin`` is non-:const:`None`, it will be set to the start position of the current word being hovered. If ``end`` is non-:const:`None`, it will be set to the end position for the current word being hovered. .. method:: get_buffer() -> ~gi.repository.GtkSource.Buffer A convenience function to get the buffer. .. method:: get_iter(iter: ~gi.repository.Gtk.TextIter) -> bool :param iter: .. method:: get_view() -> ~gi.repository.GtkSource.View