GtkSource.HoverContext¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GtkSource.HoverContext(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Context for populating [class`HoverDisplay`] contents.
GtkSourceHoverContext
contains information about the request to populate contents for a [class`HoverDisplay`].It can be used to retrieve the [class`View`], [class`Buffer`], and [struct`Gtk`.TextIter] for the regions of text which are being displayed.
Use [method`HoverContext`.get_bounds] to get the word that was requested. [method`HoverContext`.get_iter] will get you the location of the pointer when the request was made.
- get_bounds()¶
- Returns:
True
if the marks are still valid and begin or end was set.- begin:
- end:
- Return type:
(
bool
, begin:Gtk.TextIter
, end:Gtk.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()¶
- Returns:
The
GtkSource.Buffer
for the view- Return type:
A convenience function to get the buffer.
- get_iter(iter)¶
- Parameters:
iter (
Gtk.TextIter
) –- Return type:
- get_view()¶
- Returns:
the
GtkSource.View
that owns the context- Return type: