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.
GtkSourceHoverContextcontains 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:
Trueif 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.Bufferfor the view- Return type:
A convenience function to get the buffer.
- get_iter()¶
- Returns:
Trueif the mark is still valid and iter was set.- iter:
- Return type:
(
bool, iter:Gtk.TextIter)
Gets the location of the pointer where the request was made.
- get_view()¶
- Returns:
the
GtkSource.Viewthat owns the context- Return type: