HoverContext
-
class HoverContext(**properties: Any)
Superclasses: Object
Context for populating HoverDisplay
contents.
GtkSourceHoverContext
contains information about the request to populate
contents for a HoverDisplay
.
It can be used to retrieve the View
, Buffer
, and
TextIter
for the regions of text which are being displayed.
Use get_bounds
to get the word that was
requested. get_iter
will get you the location
of the pointer when the request was made.
Methods
-
class HoverContext
-
get_bounds() → Tuple[bool, TextIter, TextIter]
Gets the current word bounds of the hover.
If begin
is non-None
, it will be set to the start position of the
current word being hovered.
If end
is non-None
, it will be set to the end position for the
current word being hovered.
-
get_buffer() → Buffer
A convenience function to get the buffer.
-
get_iter(iter: TextIter) → bool
- Parameters:
iter
-
get_view() → View