Trait libadwaita::prelude::EntryRowExt
source · pub trait EntryRowExt: IsA<EntryRow> + Sealed + 'static {
Show 29 methods
// Provided methods
fn add_prefix(&self, widget: &impl IsA<Widget>) { ... }
fn add_suffix(&self, widget: &impl IsA<Widget>) { ... }
fn activates_default(&self) -> bool { ... }
fn attributes(&self) -> Option<AttrList> { ... }
fn enables_emoji_completion(&self) -> bool { ... }
fn input_hints(&self) -> InputHints { ... }
fn input_purpose(&self) -> InputPurpose { ... }
fn max_length(&self) -> i32 { ... }
fn shows_apply_button(&self) -> bool { ... }
fn text_length(&self) -> u32 { ... }
fn grab_focus_without_selecting(&self) -> bool { ... }
fn remove(&self, widget: &impl IsA<Widget>) { ... }
fn set_activates_default(&self, activates: bool) { ... }
fn set_attributes(&self, attributes: Option<&AttrList>) { ... }
fn set_enable_emoji_completion(&self, enable_emoji_completion: bool) { ... }
fn set_input_hints(&self, hints: InputHints) { ... }
fn set_input_purpose(&self, purpose: InputPurpose) { ... }
fn set_max_length(&self, max_length: i32) { ... }
fn set_show_apply_button(&self, show_apply_button: bool) { ... }
fn connect_apply<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_entry_activated<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_activates_default_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_attributes_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_enable_emoji_completion_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_input_hints_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_input_purpose_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_max_length_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_show_apply_button_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_text_length_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
v1_2
only.Expand description
Provided Methods§
sourcefn add_prefix(&self, widget: &impl IsA<Widget>)
fn add_prefix(&self, widget: &impl IsA<Widget>)
sourcefn add_suffix(&self, widget: &impl IsA<Widget>)
fn add_suffix(&self, widget: &impl IsA<Widget>)
sourcefn activates_default(&self) -> bool
fn activates_default(&self) -> bool
Gets whether activating the embedded entry can activate the default widget.
§Returns
whether to activate the default widget
sourcefn attributes(&self) -> Option<AttrList>
fn attributes(&self) -> Option<AttrList>
sourcefn enables_emoji_completion(&self) -> bool
fn enables_emoji_completion(&self) -> bool
Gets whether to suggest emoji replacements on @self.
§Returns
whether or not emoji completion is enabled
sourcefn input_hints(&self) -> InputHints
fn input_hints(&self) -> InputHints
sourcefn input_purpose(&self) -> InputPurpose
fn input_purpose(&self) -> InputPurpose
sourcefn max_length(&self) -> i32
Available on crate feature v1_6
only.
fn max_length(&self) -> i32
v1_6
only.sourcefn text_length(&self) -> u32
Available on crate feature v1_5
only.
fn text_length(&self) -> u32
v1_5
only.Retrieves the current length of the text in @self.
§Returns
The current number of characters in @self, or 0 if there are none.
sourcefn grab_focus_without_selecting(&self) -> bool
Available on crate feature v1_3
only.
fn grab_focus_without_selecting(&self) -> bool
v1_3
only.Causes @self to have keyboard focus without selecting the text.
See Gtk::Text::grab_focus_without_selecting()
for more information.
§Returns
whether the focus is now inside @self
sourcefn set_activates_default(&self, activates: bool)
fn set_activates_default(&self, activates: bool)
Sets whether activating the embedded entry can activate the default widget.
§activates
whether to activate the default widget
sourcefn set_attributes(&self, attributes: Option<&AttrList>)
fn set_attributes(&self, attributes: Option<&AttrList>)
Sets Pango attributes to apply to the text of the embedded entry.
The Pango::Attribute
’s start_index
and end_index
must refer to
the Gtk::EntryBuffer
text, i.e. without the preedit string.
§attributes
a list of attributes
sourcefn set_enable_emoji_completion(&self, enable_emoji_completion: bool)
fn set_enable_emoji_completion(&self, enable_emoji_completion: bool)
Sets whether to suggest emoji replacements on @self.
Emoji replacement is done with :-delimited names, like :heart:
.
§enable_emoji_completion
Whether emoji completion should be enabled or not
sourcefn set_input_hints(&self, hints: InputHints)
fn set_input_hints(&self, hints: InputHints)
Set additional input hints for @self.
Input hints allow input methods to fine-tune their behavior.
See also: [input-purpose
][struct@crate::AdwEntryRow#input-purpose]
§hints
the hints
sourcefn set_input_purpose(&self, purpose: InputPurpose)
fn set_input_purpose(&self, purpose: InputPurpose)
Sets the input purpose of @self.
The input purpose can be used by input methods to adjust their behavior.
§purpose
the purpose
sourcefn set_max_length(&self, max_length: i32)
Available on crate feature v1_6
only.
fn set_max_length(&self, max_length: i32)
v1_6
only.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 Enter key will hide the button and
emit the 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.
§show_apply_button
whether to show the apply button
sourcefn connect_apply<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_apply<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Emitted when the apply button is pressed.
See show-apply-button
.
sourcefn connect_entry_activated<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_entry_activated<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Emitted when the embedded entry is activated.
fn connect_activates_default_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_attributes_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_enable_emoji_completion_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_input_hints_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_input_purpose_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_max_length_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v1_6
only.fn connect_text_length_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v1_5
only.