Adw.EntryRow¶
- Subclasses:
Methods¶
- Inherited:
Adw.PreferencesRow (9), Gtk.ListBoxRow (12), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Actionable (5), Gtk.Editable (27)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Adw.PreferencesRow (4), Gtk.ListBoxRow (3), Gtk.Widget (34), Gtk.Accessible (1), Gtk.Actionable (2), Gtk.Editable (8)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r |
Signals¶
- Inherited:
Gtk.ListBoxRow (1), Gtk.Widget (13), GObject.Object (1), Gtk.Editable (3)
Name |
Short Description |
---|---|
Emitted when the apply button is pressed. |
|
Emitted when the embedded entry is activated. |
Fields¶
- Inherited:
Gtk.ListBoxRow (1), Gtk.Widget (13), GObject.Object (1), Gtk.Editable (3)
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Adw.EntryRow(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A [class`Gtk`.ListBoxRow] with an embedded text entry.
<picture> <source srcset=”entry-row-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”entry-row.png” alt=”entry-row”> </picture>
AdwEntryRow
has a title that doubles as placeholder text. It shows an icon indicating that it’s editable and can receive additional widgets before or after the editable part.If [property`EntryRow`:py:data::show-apply-button<Adw.EntryRow.props.show_apply_button>] is set to
TRUE
,AdwEntryRow
can show an apply button when editing its contents. This can be useful if changing its contents can result in an expensive operation, such as network activity.AdwEntryRow
provides only minimal API and should be used with the [iface`Gtk`.Editable] API.See also [class`PasswordEntryRow`].
The
AdwEntryRow
implementation of the [iface`Gtk`.Buildable] interface supports adding a child at its end by specifying “suffix” or omitting the “type” attribute of a <child> element.It also supports adding a child as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.
- CSS nodes
AdwEntryRow
has a single CSS node with namerow
and the.entry
style class.New in version 1.2.
- classmethod new()¶
- Returns:
the newly created
AdwEntryRow
- Return type:
Creates a new
AdwEntryRow
.New in version 1.2.
- add_prefix(widget)¶
- Parameters:
widget (
Gtk.Widget
) – a widget
Adds a prefix widget to self.
New in version 1.2.
- add_suffix(widget)¶
- Parameters:
widget (
Gtk.Widget
) – a widget
Adds a suffix widget to self.
New in version 1.2.
- get_activates_default()¶
- Returns:
whether to activate the default widget
- Return type:
Gets whether activating the embedded entry can activate the default widget.
New in version 1.2.
- get_attributes()¶
- Returns:
the list of attributes
- Return type:
Gets Pango attributes applied to the text of the embedded entry.
New in version 1.2.
- get_enable_emoji_completion()¶
- Returns:
whether or not emoji completion is enabled
- Return type:
Gets whether to suggest emoji replacements on self.
New in version 1.2.
- get_input_hints()¶
- Returns:
The input hints
- Return type:
Gets the additional input hints of self.
New in version 1.2.
- get_input_purpose()¶
- Returns:
the input purpose
- Return type:
Gets the input purpose of self.
New in version 1.2.
- get_show_apply_button()¶
- Returns:
whether to show the apply button
- Return type:
Gets whether self can show the apply button.
New in version 1.2.
- get_text_length()¶
- Returns:
The current number of characters in self, or 0 if there are none.
- Return type:
Retrieves the current length of the text in self.
New in version 1.5.
- grab_focus_without_selecting()¶
- Returns:
whether the focus is now inside self
- Return type:
Causes self to have keyboard focus without selecting the text.
See [method`Gtk`.Text.grab_focus_without_selecting] for more information.
New in version 1.3.
- remove(widget)¶
- Parameters:
widget (
Gtk.Widget
) – the child to be removed
Removes a child from self.
New in version 1.2.
- set_activates_default(activates)¶
- Parameters:
activates (
bool
) – whether to activate the default widget
Sets whether activating the embedded entry can activate the default widget.
New in version 1.2.
- set_attributes(attributes)¶
- Parameters:
attributes (
Pango.AttrList
orNone
) – a list of attributes
Sets Pango attributes to apply to the text of the embedded entry.
The [struct`Pango`.Attribute]’s
start_index
andend_index
must refer to the [class`Gtk`.EntryBuffer] text, i.e. without the preedit string.New in version 1.2.
- set_enable_emoji_completion(enable_emoji_completion)¶
- Parameters:
enable_emoji_completion (
bool
) – Whether emoji completion should be enabled or not
Sets whether to suggest emoji replacements on self.
Emoji replacement is done with
:-delimited
names, like:heart:
.New in version 1.2.
- set_input_hints(hints)¶
- Parameters:
hints (
Gtk.InputHints
) – the hints
Set additional input hints for self.
Input hints allow input methods to fine-tune their behavior.
See also: [property`AdwEntryRow`:py:data::input-purpose<Adw.EntryRow.props.input_purpose>]
New in version 1.2.
- set_input_purpose(purpose)¶
- Parameters:
purpose (
Gtk.InputPurpose
) – the purpose
Sets the input purpose of self.
The input purpose can be used by input methods to adjust their behavior.
New in version 1.2.
- set_show_apply_button(show_apply_button)¶
- Parameters:
show_apply_button (
bool
) – whether to show the apply button
Sets whether self can show the apply button.
When set to
TRUE
, typing text in the entry will reveal an apply button. Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and emit the [signal`EntryRow`:py:func:::apply<Adw.EntryRow.signals.apply>] signal.This is useful if changing the entry contents can trigger an expensive operation, e.g. network activity, to avoid triggering it after typing every character.
New in version 1.2.
Signal Details¶
- Adw.EntryRow.signals.apply(entry_row)¶
- Signal Name:
apply
- Flags:
- Parameters:
entry_row (
Adw.EntryRow
) – The object which received the signal
Emitted when the apply button is pressed.
See [property`EntryRow`:py:data::show-apply-button<Adw.EntryRow.props.show_apply_button>].
New in version 1.2.
- Adw.EntryRow.signals.entry_activated(entry_row)¶
- Signal Name:
entry-activated
- Flags:
- Parameters:
entry_row (
Adw.EntryRow
) – The object which received the signal
Emitted when the embedded entry is activated.
New in version 1.2.
Property Details¶
- Adw.EntryRow.props.activates_default¶
- Name:
activates-default
- Type:
- Default Value:
- Flags:
Whether activating the embedded entry can activate the default widget.
New in version 1.2.
- Adw.EntryRow.props.attributes¶
- Name:
attributes
- Type:
- Default Value:
- Flags:
A list of Pango attributes to apply to the text of the embedded entry.
The [struct`Pango`.Attribute]’s
start_index
andend_index
must refer to the [class`Gtk`.EntryBuffer] text, i.e. without the preedit string.New in version 1.2.
- Adw.EntryRow.props.enable_emoji_completion¶
- Name:
enable-emoji-completion
- Type:
- Default Value:
- Flags:
Whether to suggest emoji replacements on the entry row.
Emoji replacement is done with
:-delimited
names, like:heart:
.New in version 1.2.
- Adw.EntryRow.props.input_hints¶
- Name:
input-hints
- Type:
- Default Value:
- Flags:
Additional input hints for the entry row.
Input hints allow input methods to fine-tune their behavior.
See also: [property`Adw`.EntryRow:input-purpose]
New in version 1.2.
- Adw.EntryRow.props.input_purpose¶
- Name:
input-purpose
- Type:
- Default Value:
- Flags:
The input purpose of the entry row.
The input purpose can be used by input methods to adjust their behavior.
New in version 1.2.
- Adw.EntryRow.props.show_apply_button¶
- Name:
show-apply-button
- Type:
- Default Value:
- Flags:
Whether to show the apply button.
When set to
TRUE
, typing text in the entry will reveal an apply button. Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and emit the [signal`EntryRow`:py:func:::apply<Adw.EntryRow.signals.apply>] signal.This is useful if changing the entry contents can trigger an expensive operation, e.g. network activity, to avoid triggering it after typing every character.
New in version 1.2.