Dazzle.Suggestion¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/en |
The |
||
r/w/en |
The name of the icon to display |
||
r/w/en |
The suggestion identifier |
||
r/en |
The secondary |
||
r/w/en |
The name of the secondary icon to display |
||
r/w/en |
The subtitle of the suggestion |
||
r/w/en |
The title of the suggestion |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Dazzle.Suggestion(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Return type:
- get_icon()¶
-
Gets the icon for the suggestion, if any.
New in version 3.30.
- get_icon_surface(widget)¶
- Parameters:
widget (
Gtk.Widget
) – a widget that may contain the surface- Returns:
a
cairo.Surface
orNone
- Return type:
This function allows subclasses to dynamicly generate content for the suggestion such as may be required when integrating with favicons or similar.
widget is provided so that the implementation may determine scale or any other style-specific settings from the style context.
New in version 3.30.
- get_secondary_icon()¶
-
Gets the secondary icon for the suggestion, if any.
New in version 3.36.
- get_secondary_icon_surface(widget)¶
- Parameters:
widget (
Gtk.Widget
) – a widget that may contain the surface- Returns:
a
cairo.Surface
orNone
- Return type:
This function allows subclasses to dynamicly generate content for the suggestion such as may be required when integrating with favicons or similar.
widget is provided so that the implementation may determine scale or any other style-specific settings from the style context.
New in version 3.36.
- replace_typed_text(typed_text)¶
- Parameters:
typed_text (
str
) – the text that was typed into the entry- Returns:
The replacement text to insert into the entry when “tab” is pressed to complete the insertion.
- Return type:
This function is meant to be used to replace the text in the entry with text that represents the suggestion most accurately. This happens when the user presses tab while typing a suggestion. For example, if typing “gno” in the entry, you might have a suggest_suffix of “me.org” so that the user sees “gnome.org”. But the replace_typed_text might include more data such as “https://gnome.org” as it more closely represents the suggestion.
- suggest_suffix(typed_text)¶
- Parameters:
typed_text (
str
) – The user entered text- Returns:
Suffix to append to typed_text or
None
to leave it unchanged.- Return type:
This function requests potential text to append to typed_text to make it more clear to the user what they will be activating by selecting this suggestion. For example, if they start typing “gno”, a potential suggested suffix might be “me.org” to create “gnome.org”.
- do_get_icon() virtual¶
-
Gets the icon for the suggestion, if any.
New in version 3.30.
- do_get_icon_surface(widget) virtual¶
- Parameters:
widget (
Gtk.Widget
) – a widget that may contain the surface- Returns:
a
cairo.Surface
orNone
- Return type:
This function allows subclasses to dynamicly generate content for the suggestion such as may be required when integrating with favicons or similar.
widget is provided so that the implementation may determine scale or any other style-specific settings from the style context.
New in version 3.30.
- do_get_secondary_icon() virtual¶
-
Gets the secondary icon for the suggestion, if any.
New in version 3.36.
- do_get_secondary_icon_surface(widget) virtual¶
- Parameters:
widget (
Gtk.Widget
) – a widget that may contain the surface- Returns:
a
cairo.Surface
orNone
- Return type:
This function allows subclasses to dynamicly generate content for the suggestion such as may be required when integrating with favicons or similar.
widget is provided so that the implementation may determine scale or any other style-specific settings from the style context.
New in version 3.36.
- do_replace_typed_text(typed_text) virtual¶
- Parameters:
typed_text (
str
) – the text that was typed into the entry- Returns:
The replacement text to insert into the entry when “tab” is pressed to complete the insertion.
- Return type:
This function is meant to be used to replace the text in the entry with text that represents the suggestion most accurately. This happens when the user presses tab while typing a suggestion. For example, if typing “gno” in the entry, you might have a suggest_suffix of “me.org” so that the user sees “gnome.org”. But the replace_typed_text might include more data such as “https://gnome.org” as it more closely represents the suggestion.
- do_suggest_suffix(typed_text) virtual¶
- Parameters:
typed_text (
str
) – The user entered text- Returns:
Suffix to append to typed_text or
None
to leave it unchanged.- Return type:
This function requests potential text to append to typed_text to make it more clear to the user what they will be activating by selecting this suggestion. For example, if they start typing “gno”, a potential suggested suffix might be “me.org” to create “gnome.org”.
Signal Details¶
- Dazzle.Suggestion.signals.replace_typed_text(suggestion, object)¶
- Signal Name:
replace-typed-text
- Flags:
- Parameters:
suggestion (
Dazzle.Suggestion
) – The object which received the signalobject (
str
) –
- Return type:
- Dazzle.Suggestion.signals.suggest_suffix(suggestion, object)¶
- Signal Name:
suggest-suffix
- Flags:
- Parameters:
suggestion (
Dazzle.Suggestion
) – The object which received the signalobject (
str
) –
- Return type:
Property Details¶
- Dazzle.Suggestion.props.icon¶
- Name:
icon
- Type:
- Default Value:
- Flags:
The
Gio.Icon
for the suggestion
- Dazzle.Suggestion.props.icon_name¶
- Name:
icon-name
- Type:
- Default Value:
- Flags:
The name of the icon to display
- Dazzle.Suggestion.props.id¶
- Name:
id
- Type:
- Default Value:
- Flags:
The suggestion identifier
- Dazzle.Suggestion.props.secondary_icon¶
- Name:
secondary-icon
- Type:
- Default Value:
- Flags:
The secondary
Gio.Icon
for the suggestion on the right
- Dazzle.Suggestion.props.secondary_icon_name¶
- Name:
secondary-icon-name
- Type:
- Default Value:
- Flags:
The name of the secondary icon to display
- Dazzle.Suggestion.props.subtitle¶
- Name:
subtitle
- Type:
- Default Value:
- Flags:
The subtitle of the suggestion