Dazzle.SuggestionEntry¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Entry (76), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.Editable (13)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Entry (13), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.Editable (10)
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
If entries should be activated upon a single click |
||
r/w |
If compact mode should be used |
||
r/w/en |
The model to be visualized |
||
r/w/en |
The currently selected suggestion |
||
r/en |
Typed text into the entry, does not include suggested text |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Gtk.Entry (14), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2), Gtk.Editable (3)
Name |
Short Description |
---|---|
This moves the selected suggestion in the popover by the value provided. |
|
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 |
Fields¶
- Inherited:
Gtk.Entry (14), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2), Gtk.Editable (3)
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Dazzle.SuggestionEntry(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Return type:
- default_position_func(area, is_absolute, user_data)¶
- Parameters:
area (
Gdk.Rectangle
) –is_absolute (
bool
) –
- get_compact()¶
-
Gets the
Dazzle.SuggestionEntry
:compact
property.New in version 3.34.
- get_model()¶
- Returns:
A
Gio.ListModel
orNone
.- Return type:
Gets the model being visualized.
- get_popover()¶
- Returns:
- Return type:
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
orNone
.- Return type:
Gets the currently selected suggestion.
- 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:
func (
Dazzle.SuggestionPositionFunc
orNone
) – A function to call to position the popover, orNone
to set the default.
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:
area (
Gdk.Rectangle
) –is_absolute (
bool
) –
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_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)¶
- Dazzle.SuggestionEntry.signals.activate_suggestion(suggestion_entry)¶
- Signal Name:
activate-suggestion
- Flags:
- Parameters:
suggestion_entry (
Dazzle.SuggestionEntry
) – The object which received the signal
- Dazzle.SuggestionEntry.signals.hide_suggestions(suggestion_entry)¶
- Signal Name:
hide-suggestions
- Flags:
- Parameters:
suggestion_entry (
Dazzle.SuggestionEntry
) – The object which received the signal
- Dazzle.SuggestionEntry.signals.move_suggestion(suggestion_entry, amount)¶
- Signal Name:
move-suggestion
- Flags:
- Parameters:
suggestion_entry (
Dazzle.SuggestionEntry
) – The object which received the signalamount (
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:
- Parameters:
suggestion_entry (
Dazzle.SuggestionEntry
) – The object which received the signal
- Dazzle.SuggestionEntry.signals.suggestion_activated(suggestion_entry, object)¶
- Signal Name:
suggestion-activated
- Flags:
- Parameters:
suggestion_entry (
Dazzle.SuggestionEntry
) – The object which received the signalobject (
Dazzle.Suggestion
) –
- Dazzle.SuggestionEntry.signals.suggestion_selected(suggestion_entry, suggestion)¶
- Signal Name:
suggestion-selected
- Flags:
- Parameters:
suggestion_entry (
Dazzle.SuggestionEntry
) – The object which received the signalsuggestion (
Dazzle.Suggestion
) – aDazzle.Suggestion
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:
- Default Value:
- Flags:
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¶
-
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:
- Default Value:
- Flags:
The model to be visualized
- Dazzle.SuggestionEntry.props.suggestion¶
- Name:
suggestion
- Type:
- Default Value:
- Flags:
The “suggestion” property is the currently selected suggestion, if any.
New in version 3.30.
- Dazzle.SuggestionEntry.props.typed_text¶
- Name:
typed-text
- Type:
- Default Value:
- Flags:
Typed text into the entry, does not include suggested text