GtkSource.Hover

g GObject.Object GObject.Object GtkSource.Hover GtkSource.Hover GObject.Object->GtkSource.Hover

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

add_provider (provider)

remove_provider (provider)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

hover-delay

int

r/w

Number of milliseconds to delay before showing assistant

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class GtkSource.Hover(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GtkSource.HoverClass

Interactive tooltips.

GtkSourceHover allows a [class`View`] to provide contextual information. When enabled, if the user hovers over a word in the text editor, a series of registered [iface`HoverProvider`] can populate a [class`HoverDisplay`] with useful information.

To enable call [method`View`.get_hover] and add [iface`HoverProvider`] using [method`Hover`.add_provider]. To disable, remove all registered providers with [method`Hover`.remove_provider].

You can change how long to wait to display the interactive tooltip by setting the [property`Hover`:py:data::hover-delay<GtkSource.Hover.props.hover_delay>] property in milliseconds.

add_provider(provider)
Parameters:

provider (GtkSource.HoverProvider) –

remove_provider(provider)
Parameters:

provider (GtkSource.HoverProvider) –

Property Details

GtkSource.Hover.props.hover_delay
Name:

hover-delay

Type:

int

Default Value:

500

Flags:

READABLE, WRITABLE

Contains the number of milliseconds to delay before showing the hover assistant.