Dazzle.SuggestionEntry

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget Dazzle.SuggestionEntry Dazzle.SuggestionEntry GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.CellEditable Gtk.CellEditable GObject.GInterface->Gtk.CellEditable Gtk.Editable Gtk.Editable GObject.GInterface->Gtk.Editable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.Entry Gtk.Entry Gtk.CellEditable->Gtk.Entry Gtk.Editable->Gtk.Entry Gtk.Entry->Dazzle.SuggestionEntry Gtk.Widget->Gtk.Entry

Subclasses:

None

Methods

Inherited:

Gtk.Entry (76), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.Editable (13)

Structs:

Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

default_position_func (area, is_absolute, user_data)

get_activate_on_single_click ()

get_compact ()

get_model ()

get_popover ()

get_suggestion ()

get_typed_text ()

hide_suggestions ()

set_activate_on_single_click (activate_on_single_click)

set_compact (compact)

set_model (model)

set_position_func (func, *func_data)

set_suggestion (suggestion)

window_position_func (area, is_absolute, user_data)

Virtual Methods

Inherited:

Gtk.Entry (13), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.Editable (10)

do_hide_suggestions ()

do_move_suggestion (amount)

do_show_suggestions ()

do_suggestion_activated (suggestion)

do_suggestion_selected (suggestion)

Properties

Inherited:

Gtk.Entry (51), Gtk.Widget (39), Gtk.CellEditable (1)

Name

Type

Flags

Short Description

activate-on-single-click

bool

r/w/en

If entries should be activated upon a single click

compact

bool

r/w

If compact mode should be used

model

Gio.ListModel

r/w/en

The model to be visualized

suggestion

Dazzle.Suggestion

r/w/en

The currently selected suggestion

typed-text

str

r/en

Typed text into the entry, does not include suggested text

Style Properties

Inherited:

Gtk.Entry (4), Gtk.Widget (17)

Signals

Inherited:

Gtk.Entry (14), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2), Gtk.Editable (3)

Name

Short Description

action

activate-suggestion

hide-suggestions

move-suggestion

This moves the selected suggestion in the popover by the value provided.

show-suggestions

suggestion-activated

suggestion-selected

This signal is emitted when a selection has been specifically selected by the user, such as by clicking on the row or moving to the row with keyboard, such as with Dazzle.SuggestionEntry ::move-suggestion

Fields

Inherited:

Gtk.Entry (14), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2), Gtk.Editable (3)

Name

Type

Access

Description

parent_instance

Gtk.Entry

r

Class Details

class Dazzle.SuggestionEntry(**kwargs)
Bases:

Gtk.Entry

Abstract:

No

Structure:

Dazzle.SuggestionEntryClass

classmethod new()
Return type:

Gtk.Widget

default_position_func(area, is_absolute, user_data)
Parameters:
get_activate_on_single_click()
Return type:

bool

get_compact()
Returns:

True if compact-mode is in use.

Return type:

bool

Gets the Dazzle.SuggestionEntry :compact property.

New in version 3.34.

get_model()
Returns:

A Gio.ListModel or None.

Return type:

Gio.ListModel or None

Gets the model being visualized.

get_popover()
Returns:

a Gtk.Widget

Return type:

Gtk.Widget

Gets the result display widget for the entry. This is currently always a Dazzle.SuggestionPopover.

New in version 3.32.

get_suggestion()
Returns:

An Dazzle.Suggestion or None.

Return type:

Dazzle.Suggestion or None

Gets the currently selected suggestion.

get_typed_text()
Return type:

str

hide_suggestions()
set_activate_on_single_click(activate_on_single_click)
Parameters:

activate_on_single_click (bool) –

set_compact(compact)
Parameters:

compact (bool) – if compact mode should be used

Sets the Dazzle.SuggestionEntry :compact property.

New in version 3.34.

set_model(model)
Parameters:

model (Gio.ListModel) –

set_position_func(func, *func_data)
Parameters:

Sets a position func to position the popover.

In func, you should set the height of the rectangle to the maximum height that the popover should be allowed to grow.

New in version 3.26.

set_suggestion(suggestion)
Parameters:

suggestion (Dazzle.Suggestion) –

window_position_func(area, is_absolute, user_data)
Parameters:

This is a Dazzle.SuggestionPositionFunc that can be used to make the suggestion popover the full width of the window. It is similar to what you might find in a web browser.

do_hide_suggestions() virtual
do_move_suggestion(amount) virtual
Parameters:

amount (int) –

do_show_suggestions() virtual
do_suggestion_activated(suggestion) virtual
Parameters:

suggestion (Dazzle.Suggestion) –

do_suggestion_selected(suggestion) virtual
Parameters:

suggestion (Dazzle.Suggestion) –

Signal Details

Dazzle.SuggestionEntry.signals.action(suggestion_entry, object, p0, p1)
Signal Name:

action

Flags:

RUN_LAST, ACTION

Parameters:
Dazzle.SuggestionEntry.signals.activate_suggestion(suggestion_entry)
Signal Name:

activate-suggestion

Flags:

RUN_LAST, ACTION

Parameters:

suggestion_entry (Dazzle.SuggestionEntry) – The object which received the signal

Dazzle.SuggestionEntry.signals.hide_suggestions(suggestion_entry)
Signal Name:

hide-suggestions

Flags:

RUN_LAST, ACTION

Parameters:

suggestion_entry (Dazzle.SuggestionEntry) – The object which received the signal

Dazzle.SuggestionEntry.signals.move_suggestion(suggestion_entry, amount)
Signal Name:

move-suggestion

Flags:

RUN_LAST, ACTION

Parameters:
  • suggestion_entry (Dazzle.SuggestionEntry) – The object which received the signal

  • amount (int) – The number of items to move

This moves the selected suggestion in the popover by the value provided. -1 moves up one row, 1, moves down a row.

Dazzle.SuggestionEntry.signals.show_suggestions(suggestion_entry)
Signal Name:

show-suggestions

Flags:

RUN_LAST, ACTION

Parameters:

suggestion_entry (Dazzle.SuggestionEntry) – The object which received the signal

Dazzle.SuggestionEntry.signals.suggestion_activated(suggestion_entry, object)
Signal Name:

suggestion-activated

Flags:

RUN_LAST

Parameters:
Dazzle.SuggestionEntry.signals.suggestion_selected(suggestion_entry, suggestion)
Signal Name:

suggestion-selected

Flags:

RUN_LAST

Parameters:

This signal is emitted when a selection has been specifically selected by the user, such as by clicking on the row or moving to the row with keyboard, such as with Dazzle.SuggestionEntry ::move-suggestion

New in version 3.30.

Property Details

Dazzle.SuggestionEntry.props.activate_on_single_click
Name:

activate-on-single-click

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The “activate-on-single-click” property denotes if results should be activated simply by clicking on them. You may want to set this to False if you want the behavior to only select the item.

New in version 3.30.

Dazzle.SuggestionEntry.props.compact
Name:

compact

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

The “compact” property denotes if an alternate style should be used to reduce the width of the rows. This may be ideal in size contrained situations with portrait display.

New in version 3.34.

Dazzle.SuggestionEntry.props.model
Name:

model

Type:

Gio.ListModel

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The model to be visualized

Dazzle.SuggestionEntry.props.suggestion
Name:

suggestion

Type:

Dazzle.Suggestion

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The “suggestion” property is the currently selected suggestion, if any.

New in version 3.30.

Dazzle.SuggestionEntry.props.typed_text
Name:

typed-text

Type:

str

Default Value:

None

Flags:

READABLE, EXPLICIT_NOTIFY

Typed text into the entry, does not include suggested text