EntryRow

A gtk.list_box_row.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>

adw.entry_row.EntryRow 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:show-apply-button is set to TRUE, adw.entry_row.EntryRow 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.

adw.entry_row.EntryRow provides only minimal API and should be used with the gtk.editable.Editable API.

See also class@PasswordEntryRow.

AdwEntryRow as GtkBuildable

The adw.entry_row.EntryRow implementation of the gtk.buildable.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

adw.entry_row.EntryRow has a single CSS node with name row and the .entry style class.

Constructors

this
this()

Creates a new adw.entry_row.EntryRow.

Members

Functions

addPrefix
void addPrefix(gtk.widget.Widget widget)

Adds a prefix widget to self.

addSuffix
void addSuffix(gtk.widget.Widget widget)

Adds a suffix widget to self.

connectApply
ulong connectApply(T callback, Flag!"After" after)

Connect to Apply signal.

connectEntryActivated
ulong connectEntryActivated(T callback, Flag!"After" after)

Connect to EntryActivated signal.

getActivatesDefault
bool getActivatesDefault()

Gets whether activating the embedded entry can activate the default widget.

getAttributes
pango.attr_list.AttrList getAttributes()

Gets Pango attributes applied to the text of the embedded entry.

getEnableEmojiCompletion
bool getEnableEmojiCompletion()

Gets whether to suggest emoji replacements on self.

getInputHints
gtk.types.InputHints getInputHints()

Gets the additional input hints of self.

getInputPurpose
gtk.types.InputPurpose getInputPurpose()

Gets the input purpose of self.

getShowApplyButton
bool getShowApplyButton()

Gets whether self can show the apply button.

getTextLength
uint getTextLength()

Retrieves the current length of the text in self.

grabFocusWithoutSelecting
bool grabFocusWithoutSelecting()

Causes self to have keyboard focus without selecting the text.

remove
void remove(gtk.widget.Widget widget)

Removes a child from self.

setActivatesDefault
void setActivatesDefault(bool activates)

Sets whether activating the embedded entry can activate the default widget.

setAttributes
void setAttributes(pango.attr_list.AttrList attributes)

Sets Pango attributes to apply to the text of the embedded entry.

setEnableEmojiCompletion
void setEnableEmojiCompletion(bool enableEmojiCompletion)

Sets whether to suggest emoji replacements on self.

setInputHints
void setInputHints(gtk.types.InputHints hints)

Set additional input hints for self.

setInputPurpose
void setInputPurpose(gtk.types.InputPurpose purpose)

Sets the input purpose of self.

setShowApplyButton
void setShowApplyButton(bool showApplyButton)

Sets whether self can show the apply button.

Mixed In Members

From mixin EditableT!()

delegateGetAccessiblePlatformState
bool delegateGetAccessiblePlatformState(gtk.types.AccessiblePlatformState state)

Retrieves the accessible platform state from the editable delegate.

deleteSelection
void deleteSelection()

Deletes the currently selected text of the editable.

deleteText
void deleteText(int startPos, int endPos)

Deletes a sequence of characters.

finishDelegate
void finishDelegate()

Undoes the setup done by gtk.editable.Editable.initDelegate.

getAlignment
float getAlignment()

Gets the alignment of the editable.

getChars
string getChars(int startPos, int endPos)

Retrieves a sequence of characters.

getDelegate
gtk.editable.Editable getDelegate()

Gets the gtk.editable.Editable that editable is delegating its implementation to.

getEditable
bool getEditable()

Retrieves whether editable is editable.

getEnableUndo
bool getEnableUndo()

Gets if undo/redo actions are enabled for editable

getMaxWidthChars
int getMaxWidthChars()

Retrieves the desired maximum width of editable, in characters.

getPosition
int getPosition()

Retrieves the current position of the cursor relative to the start of the content of the editable.

getSelectionBounds
bool getSelectionBounds(int startPos, int endPos)

Retrieves the selection bound of the editable.

getText
string getText()

Retrieves the contents of editable.

getWidthChars
int getWidthChars()

Gets the number of characters of space reserved for the contents of the editable.

initDelegate
void initDelegate()

Sets up a delegate for gtk.editable.Editable.

insertText
void insertText(string text, int position)

Inserts length bytes of text into the contents of the widget, at position position.

selectRegion
void selectRegion(int startPos, int endPos)

Selects a region of text.

setAlignment
void setAlignment(float xalign)

Sets the alignment for the contents of the editable.

setEditable
void setEditable(bool isEditable)

Determines if the user can edit the text in the editable widget.

setEnableUndo
void setEnableUndo(bool enableUndo)

If enabled, changes to editable will be saved for undo/redo actions.

setMaxWidthChars
void setMaxWidthChars(int nChars)

Sets the desired maximum width in characters of editable.

setPosition
void setPosition(int position)

Sets the cursor position in the editable to the given value.

setText
void setText(string text)

Sets the text in the editable to the given value.

setWidthChars
void setWidthChars(int nChars)

Changes the size request of the editable to be about the right size for n_chars characters.

connectChanged
ulong connectChanged(T callback, Flag!"After" after)

Connect to Changed signal.

connectDeleteText
ulong connectDeleteText(T callback, Flag!"After" after)

Connect to DeleteText signal.

Inherited Members

From PreferencesRow

getTitle
string getTitle()

Gets the title of the preference represented by self.

getTitleSelectable
bool getTitleSelectable()

Gets whether the user can copy the title from the label

getUseMarkup
bool getUseMarkup()

Gets whether to use Pango markup for the title label.

getUseUnderline
bool getUseUnderline()

Gets whether an embedded underline in the title indicates a mnemonic.

setTitle
void setTitle(string title)

Sets the title of the preference represented by self.

setTitleSelectable
void setTitleSelectable(bool titleSelectable)

Sets whether the user can copy the title from the label

setUseMarkup
void setUseMarkup(bool useMarkup)

Sets whether to use Pango markup for the title label.

setUseUnderline
void setUseUnderline(bool useUnderline)

Sets whether an embedded underline in the title indicates a mnemonic.

From Editable

delegateGetProperty
bool delegateGetProperty(gobject.object.ObjectG object, uint propId, gobject.value.Value value, gobject.param_spec.ParamSpec pspec)

Gets a property of the gtk.editable.Editable delegate for object.

delegateSetProperty
bool delegateSetProperty(gobject.object.ObjectG object, uint propId, gobject.value.Value value, gobject.param_spec.ParamSpec pspec)

Sets a property on the gtk.editable.Editable delegate for object.

delegateGetAccessiblePlatformState
bool delegateGetAccessiblePlatformState(gtk.types.AccessiblePlatformState state)

Retrieves the accessible platform state from the editable delegate.

deleteSelection
void deleteSelection()

Deletes the currently selected text of the editable.

deleteText
void deleteText(int startPos, int endPos)

Deletes a sequence of characters.

finishDelegate
void finishDelegate()

Undoes the setup done by gtk.editable.Editable.initDelegate.

getAlignment
float getAlignment()

Gets the alignment of the editable.

getChars
string getChars(int startPos, int endPos)

Retrieves a sequence of characters.

getDelegate
gtk.editable.Editable getDelegate()

Gets the gtk.editable.Editable that editable is delegating its implementation to.

getEditable
bool getEditable()

Retrieves whether editable is editable.

getEnableUndo
bool getEnableUndo()

Gets if undo/redo actions are enabled for editable

getMaxWidthChars
int getMaxWidthChars()

Retrieves the desired maximum width of editable, in characters.

getPosition
int getPosition()

Retrieves the current position of the cursor relative to the start of the content of the editable.

getSelectionBounds
bool getSelectionBounds(int startPos, int endPos)

Retrieves the selection bound of the editable.

getText
string getText()

Retrieves the contents of editable.

getWidthChars
int getWidthChars()

Gets the number of characters of space reserved for the contents of the editable.

initDelegate
void initDelegate()

Sets up a delegate for gtk.editable.Editable.

insertText
void insertText(string text, int position)

Inserts length bytes of text into the contents of the widget, at position position.

selectRegion
void selectRegion(int startPos, int endPos)

Selects a region of text.

setAlignment
void setAlignment(float xalign)

Sets the alignment for the contents of the editable.

setEditable
void setEditable(bool isEditable)

Determines if the user can edit the text in the editable widget.

setEnableUndo
void setEnableUndo(bool enableUndo)

If enabled, changes to editable will be saved for undo/redo actions.

setMaxWidthChars
void setMaxWidthChars(int nChars)

Sets the desired maximum width in characters of editable.

setPosition
void setPosition(int position)

Sets the cursor position in the editable to the given value.

setText
void setText(string text)

Sets the text in the editable to the given value.

setWidthChars
void setWidthChars(int nChars)

Changes the size request of the editable to be about the right size for n_chars characters.

connectChanged
ulong connectChanged(T callback, Flag!"After" after)

Connect to Changed signal.

connectDeleteText
ulong connectDeleteText(T callback, Flag!"After" after)

Connect to DeleteText signal.