pub trait EntryExt:
IsA<Entry>
+ Sealed
+ 'static {
Show 140 methods
// Provided methods
fn activates_default(&self) -> bool { ... }
fn alignment(&self) -> f32 { ... }
fn attributes(&self) -> Option<AttrList> { ... }
fn buffer(&self) -> EntryBuffer { ... }
fn completion(&self) -> Option<EntryCompletion> { ... }
fn current_icon_drag_source(&self) -> i32 { ... }
fn extra_menu(&self) -> Option<MenuModel> { ... }
fn has_frame(&self) -> bool { ... }
fn icon_is_activatable(&self, icon_pos: EntryIconPosition) -> bool { ... }
fn icon_area(&self, icon_pos: EntryIconPosition) -> Rectangle { ... }
fn icon_at_pos(&self, x: i32, y: i32) -> i32 { ... }
fn icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<Icon> { ... }
fn icon_name(&self, icon_pos: EntryIconPosition) -> Option<GString> { ... }
fn icon_paintable(&self, icon_pos: EntryIconPosition) -> Option<Paintable> { ... }
fn icon_is_sensitive(&self, icon_pos: EntryIconPosition) -> bool { ... }
fn icon_storage_type(&self, icon_pos: EntryIconPosition) -> ImageType { ... }
fn icon_tooltip_markup(
&self,
icon_pos: EntryIconPosition,
) -> Option<GString> { ... }
fn icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option<GString> { ... }
fn input_hints(&self) -> InputHints { ... }
fn input_purpose(&self) -> InputPurpose { ... }
fn max_length(&self) -> i32 { ... }
fn is_overwrite_mode(&self) -> bool { ... }
fn placeholder_text(&self) -> Option<GString> { ... }
fn progress_fraction(&self) -> f64 { ... }
fn progress_pulse_step(&self) -> f64 { ... }
fn tabs(&self) -> Option<TabArray> { ... }
fn text_length(&self) -> u16 { ... }
fn is_visible(&self) -> bool { ... }
fn grab_focus_without_selecting(&self) -> bool { ... }
fn progress_pulse(&self) { ... }
fn reset_im_context(&self) { ... }
fn set_activates_default(&self, setting: bool) { ... }
fn set_alignment(&self, xalign: f32) { ... }
fn set_attributes(&self, attrs: &AttrList) { ... }
fn set_buffer(&self, buffer: &impl IsA<EntryBuffer>) { ... }
fn set_completion(&self, completion: Option<&EntryCompletion>) { ... }
fn set_extra_menu(&self, model: Option<&impl IsA<MenuModel>>) { ... }
fn set_has_frame(&self, setting: bool) { ... }
fn set_icon_activatable(
&self,
icon_pos: EntryIconPosition,
activatable: bool,
) { ... }
fn set_icon_drag_source(
&self,
icon_pos: EntryIconPosition,
provider: &impl IsA<ContentProvider>,
actions: DragAction,
) { ... }
fn set_icon_from_gicon(
&self,
icon_pos: EntryIconPosition,
icon: Option<&impl IsA<Icon>>,
) { ... }
fn set_icon_from_icon_name(
&self,
icon_pos: EntryIconPosition,
icon_name: Option<&str>,
) { ... }
fn set_icon_from_paintable(
&self,
icon_pos: EntryIconPosition,
paintable: Option<&impl IsA<Paintable>>,
) { ... }
fn set_icon_sensitive(&self, icon_pos: EntryIconPosition, sensitive: bool) { ... }
fn set_icon_tooltip_markup(
&self,
icon_pos: EntryIconPosition,
tooltip: Option<&str>,
) { ... }
fn set_icon_tooltip_text(
&self,
icon_pos: EntryIconPosition,
tooltip: Option<&str>,
) { ... }
fn set_input_hints(&self, hints: InputHints) { ... }
fn set_input_purpose(&self, purpose: InputPurpose) { ... }
fn set_invisible_char(&self, ch: Option<char>) { ... }
fn set_max_length(&self, max: i32) { ... }
fn set_overwrite_mode(&self, overwrite: bool) { ... }
fn set_placeholder_text(&self, text: Option<&str>) { ... }
fn set_progress_fraction(&self, fraction: f64) { ... }
fn set_progress_pulse_step(&self, fraction: f64) { ... }
fn set_tabs(&self, tabs: Option<&TabArray>) { ... }
fn set_visibility(&self, visible: bool) { ... }
fn unset_invisible_char(&self) { ... }
fn enables_emoji_completion(&self) -> bool { ... }
fn set_enable_emoji_completion(&self, enable_emoji_completion: bool) { ... }
fn im_module(&self) -> Option<GString> { ... }
fn set_im_module(&self, im_module: Option<&str>) { ... }
fn is_invisible_char_set(&self) -> bool { ... }
fn is_primary_icon_activatable(&self) -> bool { ... }
fn set_primary_icon_activatable(&self, primary_icon_activatable: bool) { ... }
fn primary_icon_gicon(&self) -> Option<Icon> { ... }
fn set_primary_icon_gicon<P: IsA<Icon>>(
&self,
primary_icon_gicon: Option<&P>,
) { ... }
fn primary_icon_name(&self) -> Option<GString> { ... }
fn set_primary_icon_name(&self, primary_icon_name: Option<&str>) { ... }
fn primary_icon_paintable(&self) -> Option<Paintable> { ... }
fn set_primary_icon_paintable<P: IsA<Paintable>>(
&self,
primary_icon_paintable: Option<&P>,
) { ... }
fn is_primary_icon_sensitive(&self) -> bool { ... }
fn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool) { ... }
fn primary_icon_storage_type(&self) -> ImageType { ... }
fn primary_icon_tooltip_markup(&self) -> Option<GString> { ... }
fn set_primary_icon_tooltip_markup(
&self,
primary_icon_tooltip_markup: Option<&str>,
) { ... }
fn primary_icon_tooltip_text(&self) -> Option<GString> { ... }
fn set_primary_icon_tooltip_text(
&self,
primary_icon_tooltip_text: Option<&str>,
) { ... }
fn scroll_offset(&self) -> i32 { ... }
fn is_secondary_icon_activatable(&self) -> bool { ... }
fn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool) { ... }
fn secondary_icon_gicon(&self) -> Option<Icon> { ... }
fn set_secondary_icon_gicon<P: IsA<Icon>>(
&self,
secondary_icon_gicon: Option<&P>,
) { ... }
fn secondary_icon_name(&self) -> Option<GString> { ... }
fn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>) { ... }
fn secondary_icon_paintable(&self) -> Option<Paintable> { ... }
fn set_secondary_icon_paintable<P: IsA<Paintable>>(
&self,
secondary_icon_paintable: Option<&P>,
) { ... }
fn is_secondary_icon_sensitive(&self) -> bool { ... }
fn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool) { ... }
fn secondary_icon_storage_type(&self) -> ImageType { ... }
fn secondary_icon_tooltip_markup(&self) -> Option<GString> { ... }
fn set_secondary_icon_tooltip_markup(
&self,
secondary_icon_tooltip_markup: Option<&str>,
) { ... }
fn secondary_icon_tooltip_text(&self) -> Option<GString> { ... }
fn set_secondary_icon_tooltip_text(
&self,
secondary_icon_tooltip_text: Option<&str>,
) { ... }
fn shows_emoji_icon(&self) -> bool { ... }
fn set_show_emoji_icon(&self, show_emoji_icon: bool) { ... }
fn must_truncate_multiline(&self) -> bool { ... }
fn set_truncate_multiline(&self, truncate_multiline: bool) { ... }
fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn emit_activate(&self) { ... }
fn connect_icon_press<F: Fn(&Self, EntryIconPosition) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_icon_release<F: Fn(&Self, EntryIconPosition) + '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_buffer_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_completion_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_extra_menu_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_has_frame_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_im_module_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_invisible_char_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_invisible_char_set_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_max_length_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_overwrite_mode_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_placeholder_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_primary_icon_activatable_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_primary_icon_gicon_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_primary_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_primary_icon_paintable_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_primary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_primary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_primary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_primary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_progress_fraction_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_progress_pulse_step_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_scroll_offset_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_secondary_icon_activatable_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_secondary_icon_gicon_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_secondary_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_secondary_icon_paintable_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_secondary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_secondary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_secondary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_secondary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_show_emoji_icon_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_tabs_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_text_length_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_truncate_multiline_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_visibility_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Provided Methods§
sourcefn activates_default(&self) -> bool
fn activates_default(&self) -> bool
sourcefn attributes(&self) -> Option<AttrList>
fn attributes(&self) -> Option<AttrList>
sourcefn buffer(&self) -> EntryBuffer
fn buffer(&self) -> EntryBuffer
sourcefn completion(&self) -> Option<EntryCompletion>
👎Deprecated: Since 4.10
fn completion(&self) -> Option<EntryCompletion>
sourcefn current_icon_drag_source(&self) -> i32
fn current_icon_drag_source(&self) -> i32
Returns the index of the icon which is the source of the current DND operation, or -1.
§Returns
index of the icon which is the source of the current DND operation, or -1.
sourcefn icon_is_activatable(&self, icon_pos: EntryIconPosition) -> bool
fn icon_is_activatable(&self, icon_pos: EntryIconPosition) -> bool
sourcefn icon_area(&self, icon_pos: EntryIconPosition) -> Rectangle
fn icon_area(&self, icon_pos: EntryIconPosition) -> Rectangle
Gets the area where entry’s icon at @icon_pos is drawn.
This function is useful when drawing something to the entry in a draw callback.
If the entry is not realized or has no icon at the given position, @icon_area is filled with zeros. Otherwise, @icon_area will be filled with the icon’s allocation, relative to @self’s allocation.
§icon_pos
Icon position
§Returns
§icon_area
Return location for the icon’s area
sourcefn icon_at_pos(&self, x: i32, y: i32) -> i32
fn icon_at_pos(&self, x: i32, y: i32) -> i32
Finds the icon at the given position and return its index.
The position’s coordinates are relative to the @self’s
top left corner. If @x, @y doesn’t lie inside an icon,
-1 is returned. This function is intended for use in a
query-tooltip
signal handler.
§x
the x coordinate of the position to find, relative to @self
§y
the y coordinate of the position to find, relative to @self
§Returns
the index of the icon at the given position, or -1
sourcefn icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<Icon>
fn icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<Icon>
Retrieves the GIcon
used for the icon.
None
will be returned if there is no icon or if the icon was
set by some other method (e.g., by gdk::Paintable
or icon name).
§icon_pos
Icon position
§Returns
A GIcon
sourcefn icon_name(&self, icon_pos: EntryIconPosition) -> Option<GString>
fn icon_name(&self, icon_pos: EntryIconPosition) -> Option<GString>
Retrieves the icon name used for the icon.
None
is returned if there is no icon or if the icon was set
by some other method (e.g., by gdk::Paintable
or gicon).
§icon_pos
Icon position
§Returns
An icon name
sourcefn icon_paintable(&self, icon_pos: EntryIconPosition) -> Option<Paintable>
fn icon_paintable(&self, icon_pos: EntryIconPosition) -> Option<Paintable>
Retrieves the gdk::Paintable
used for the icon.
If no gdk::Paintable
was used for the icon, None
is returned.
§icon_pos
Icon position
§Returns
A gdk::Paintable
if no icon is set for this position or the icon set is not
a gdk::Paintable
.
sourcefn icon_is_sensitive(&self, icon_pos: EntryIconPosition) -> bool
fn icon_is_sensitive(&self, icon_pos: EntryIconPosition) -> bool
sourcefn icon_storage_type(&self, icon_pos: EntryIconPosition) -> ImageType
fn icon_storage_type(&self, icon_pos: EntryIconPosition) -> ImageType
Gets the type of representation being used by the icon to store image data.
If the icon has no image data, the return value will
be ImageType::Empty
.
§icon_pos
Icon position
§Returns
image representation being used
sourcefn icon_tooltip_markup(&self, icon_pos: EntryIconPosition) -> Option<GString>
fn icon_tooltip_markup(&self, icon_pos: EntryIconPosition) -> Option<GString>
sourcefn icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option<GString>
fn icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option<GString>
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
fn max_length(&self) -> i32
Retrieves the maximum allowed length of the text in @self.
See set_max_length()
.
§Returns
the maximum allowed number of characters
in Entry
, or 0 if there is no maximum.
sourcefn is_overwrite_mode(&self) -> bool
fn is_overwrite_mode(&self) -> bool
sourcefn placeholder_text(&self) -> Option<GString>
fn placeholder_text(&self) -> Option<GString>
sourcefn progress_fraction(&self) -> f64
fn progress_fraction(&self) -> f64
sourcefn progress_pulse_step(&self) -> f64
fn progress_pulse_step(&self) -> f64
Retrieves the pulse step set with gtk_entry_set_progress_pulse_step().
§Returns
a fraction from 0.0 to 1.0
sourcefn text_length(&self) -> u16
fn text_length(&self) -> u16
Retrieves the current length of the text in @self.
This is equivalent to getting @self’s EntryBuffer
and calling EntryBufferExtManual::length()
on it.
§Returns
the current number of characters
in Entry
, or 0 if there are none.
sourcefn is_visible(&self) -> bool
fn is_visible(&self) -> bool
Retrieves whether the text in @self is visible.
See set_visibility()
.
§Returns
true
if the text is currently visible
sourcefn grab_focus_without_selecting(&self) -> bool
fn grab_focus_without_selecting(&self) -> bool
Causes @self to have keyboard focus.
It behaves like WidgetExt::grab_focus()
, except that it doesn’t
select the contents of the entry. You only want to call this on some
special entries which the user usually doesn’t want to replace all text
in, such as search-as-you-type entries.
§Returns
true
if focus is now inside @self_
sourcefn progress_pulse(&self)
fn progress_pulse(&self)
Indicates that some progress is made, but you don’t know how much.
Causes the entry’s progress indicator to enter “activity
mode”, where a block bounces back and forth. Each call to
gtk_entry_progress_pulse() causes the block to move by a
little bit (the amount of movement per pulse is determined
by set_progress_pulse_step()
).
sourcefn reset_im_context(&self)
fn reset_im_context(&self)
Reset the input method context of the entry if needed.
This can be necessary in the case where modifying the buffer would confuse on-going input method behavior.
sourcefn set_activates_default(&self, setting: bool)
fn set_activates_default(&self, setting: bool)
Sets whether pressing Enter in the @self will activate the default widget for the window containing the entry.
This usually means that the dialog containing the entry will be closed, since the default widget is usually one of the dialog buttons.
§setting
true
to activate window’s default widget on Enter keypress
sourcefn set_alignment(&self, xalign: f32)
fn set_alignment(&self, xalign: f32)
sourcefn set_attributes(&self, attrs: &AttrList)
fn set_attributes(&self, attrs: &AttrList)
Sets a pango::AttrList
.
The attributes in the list are applied to the entry text.
Since the attributes will be applied to text that changes as the user types, it makes most sense to use attributes with unlimited extent.
§attrs
sourcefn set_buffer(&self, buffer: &impl IsA<EntryBuffer>)
fn set_buffer(&self, buffer: &impl IsA<EntryBuffer>)
sourcefn set_completion(&self, completion: Option<&EntryCompletion>)
👎Deprecated: Since 4.10
fn set_completion(&self, completion: Option<&EntryCompletion>)
Sets @completion to be the auxiliary completion object to use with @self.
All further configuration of the completion mechanism is
done on @completion using the EntryCompletion
API.
Completion is disabled if @completion is set to None
.
§Deprecated since 4.10
GtkEntryCompletion will be removed in GTK 5.
§completion
The EntryCompletion
sourcefn set_has_frame(&self, setting: bool)
fn set_has_frame(&self, setting: bool)
sourcefn set_icon_activatable(&self, icon_pos: EntryIconPosition, activatable: bool)
fn set_icon_activatable(&self, icon_pos: EntryIconPosition, activatable: bool)
sourcefn set_icon_drag_source(
&self,
icon_pos: EntryIconPosition,
provider: &impl IsA<ContentProvider>,
actions: DragAction,
)
fn set_icon_drag_source( &self, icon_pos: EntryIconPosition, provider: &impl IsA<ContentProvider>, actions: DragAction, )
sourcefn set_icon_from_gicon(
&self,
icon_pos: EntryIconPosition,
icon: Option<&impl IsA<Icon>>,
)
fn set_icon_from_gicon( &self, icon_pos: EntryIconPosition, icon: Option<&impl IsA<Icon>>, )
sourcefn set_icon_from_icon_name(
&self,
icon_pos: EntryIconPosition,
icon_name: Option<&str>,
)
fn set_icon_from_icon_name( &self, icon_pos: EntryIconPosition, icon_name: Option<&str>, )
Sets the icon shown in the entry at the specified position from the current icon theme.
If the icon name isn’t known, a “broken image” icon will be displayed instead.
If @icon_name is None
, no icon will be shown in the
specified position.
§icon_pos
The position at which to set the icon
§icon_name
An icon name
sourcefn set_icon_from_paintable(
&self,
icon_pos: EntryIconPosition,
paintable: Option<&impl IsA<Paintable>>,
)
fn set_icon_from_paintable( &self, icon_pos: EntryIconPosition, paintable: Option<&impl IsA<Paintable>>, )
Sets the icon shown in the specified position using a gdk::Paintable
.
If @paintable is None
, no icon will be shown in the specified position.
§icon_pos
Icon position
§paintable
sourcefn set_icon_sensitive(&self, icon_pos: EntryIconPosition, sensitive: bool)
fn set_icon_sensitive(&self, icon_pos: EntryIconPosition, sensitive: bool)
sourcefn set_icon_tooltip_markup(
&self,
icon_pos: EntryIconPosition,
tooltip: Option<&str>,
)
fn set_icon_tooltip_markup( &self, icon_pos: EntryIconPosition, tooltip: Option<&str>, )
Sets @tooltip as the contents of the tooltip for the icon at the specified position.
@tooltip is assumed to be marked up with Pango Markup.
Use None
for @tooltip to remove an existing tooltip.
See also WidgetExt::set_tooltip_markup()
and
set_icon_tooltip_text()
.
§icon_pos
the icon position
§tooltip
the contents of the tooltip for the icon
sourcefn set_icon_tooltip_text(
&self,
icon_pos: EntryIconPosition,
tooltip: Option<&str>,
)
fn set_icon_tooltip_text( &self, icon_pos: EntryIconPosition, tooltip: Option<&str>, )
Sets @tooltip as the contents of the tooltip for the icon at the specified position.
Use None
for @tooltip to remove an existing tooltip.
See also WidgetExt::set_tooltip_text()
and
set_icon_tooltip_markup()
.
If you unset the widget tooltip via
WidgetExt::set_tooltip_text()
or
WidgetExt::set_tooltip_markup()
, this sets
has-tooltip
to false
, which suppresses
icon tooltips too. You can resolve this by then calling
WidgetExt::set_has_tooltip()
to set
has-tooltip
back to true
, or
setting at least one non-empty tooltip on any icon
achieves the same result.
§icon_pos
the icon position
§tooltip
the contents of the tooltip for the icon
sourcefn set_input_hints(&self, hints: InputHints)
fn set_input_hints(&self, hints: InputHints)
sourcefn set_input_purpose(&self, purpose: InputPurpose)
fn set_input_purpose(&self, purpose: InputPurpose)
Sets the input purpose which can be used by input methods to adjust their behavior.
§purpose
the purpose
sourcefn set_invisible_char(&self, ch: Option<char>)
fn set_invisible_char(&self, ch: Option<char>)
Sets the character to use in place of the actual text in “password mode”.
See set_visibility()
for how to enable
“password mode”.
By default, GTK picks the best invisible char available in the current font. If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type.
§ch
a Unicode character
sourcefn set_max_length(&self, max: i32)
fn set_max_length(&self, max: i32)
Sets the maximum allowed length of the contents of the widget.
If the current contents are longer than the given length, then they will be truncated to fit. The length is in characters.
This is equivalent to getting @self’s EntryBuffer
and
calling EntryBufferExtManual::set_max_length()
on it.
§max
the maximum length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536.
sourcefn set_overwrite_mode(&self, overwrite: bool)
fn set_overwrite_mode(&self, overwrite: bool)
sourcefn set_placeholder_text(&self, text: Option<&str>)
fn set_placeholder_text(&self, text: Option<&str>)
sourcefn set_progress_fraction(&self, fraction: f64)
fn set_progress_fraction(&self, fraction: f64)
Causes the entry’s progress indicator to “fill in” the given fraction of the bar.
The fraction should be between 0.0 and 1.0, inclusive.
§fraction
fraction of the task that’s been completed
sourcefn set_progress_pulse_step(&self, fraction: f64)
fn set_progress_pulse_step(&self, fraction: f64)
Sets the fraction of total entry width to move the progress bouncing block for each pulse.
Use progress_pulse()
to pulse
the progress.
§fraction
fraction between 0.0 and 1.0
sourcefn set_tabs(&self, tabs: Option<&TabArray>)
fn set_tabs(&self, tabs: Option<&TabArray>)
sourcefn set_visibility(&self, visible: bool)
fn set_visibility(&self, visible: bool)
Sets whether the contents of the entry are visible or not.
When visibility is set to false
, characters are displayed
as the invisible char, and will also appear that way when
the text in the entry widget is copied elsewhere.
By default, GTK picks the best invisible character available
in the current font, but it can be changed with
set_invisible_char()
.
Note that you probably want to set input-purpose
to InputPurpose::Password
or InputPurpose::Pin
to
inform input methods about the purpose of this entry,
in addition to setting visibility to false
.
§visible
true
if the contents of the entry are displayed as plaintext
sourcefn unset_invisible_char(&self)
fn unset_invisible_char(&self)
Unsets the invisible char, so that the default invisible char
is used again. See set_invisible_char()
.
sourcefn enables_emoji_completion(&self) -> bool
fn enables_emoji_completion(&self) -> bool
Whether to suggest Emoji replacements for :-delimited names
like :heart:
.
sourcefn set_enable_emoji_completion(&self, enable_emoji_completion: bool)
fn set_enable_emoji_completion(&self, enable_emoji_completion: bool)
Whether to suggest Emoji replacements for :-delimited names
like :heart:
.
sourcefn im_module(&self) -> Option<GString>
fn im_module(&self) -> Option<GString>
Which IM (input method) module should be used for this entry.
See IMContext
.
Setting this to a non-None
value overrides the system-wide IM
module setting. See the GtkSettings gtk-im-module
property.
sourcefn set_im_module(&self, im_module: Option<&str>)
fn set_im_module(&self, im_module: Option<&str>)
Which IM (input method) module should be used for this entry.
See IMContext
.
Setting this to a non-None
value overrides the system-wide IM
module setting. See the GtkSettings gtk-im-module
property.
sourcefn is_invisible_char_set(&self) -> bool
fn is_invisible_char_set(&self) -> bool
Whether the invisible char has been set for the Entry
.
sourcefn is_primary_icon_activatable(&self) -> bool
fn is_primary_icon_activatable(&self) -> bool
Whether the primary icon is activatable.
GTK emits the icon-press
and
icon-release
signals only on sensitive,
activatable icons.
Sensitive, but non-activatable icons can be used for purely informational purposes.
sourcefn set_primary_icon_activatable(&self, primary_icon_activatable: bool)
fn set_primary_icon_activatable(&self, primary_icon_activatable: bool)
Whether the primary icon is activatable.
GTK emits the icon-press
and
icon-release
signals only on sensitive,
activatable icons.
Sensitive, but non-activatable icons can be used for purely informational purposes.
sourcefn primary_icon_gicon(&self) -> Option<Icon>
fn primary_icon_gicon(&self) -> Option<Icon>
The GIcon
to use for the primary icon for the entry.
sourcefn set_primary_icon_gicon<P: IsA<Icon>>(&self, primary_icon_gicon: Option<&P>)
fn set_primary_icon_gicon<P: IsA<Icon>>(&self, primary_icon_gicon: Option<&P>)
The GIcon
to use for the primary icon for the entry.
sourcefn primary_icon_name(&self) -> Option<GString>
fn primary_icon_name(&self) -> Option<GString>
The icon name to use for the primary icon for the entry.
sourcefn set_primary_icon_name(&self, primary_icon_name: Option<&str>)
fn set_primary_icon_name(&self, primary_icon_name: Option<&str>)
The icon name to use for the primary icon for the entry.
sourcefn primary_icon_paintable(&self) -> Option<Paintable>
fn primary_icon_paintable(&self) -> Option<Paintable>
A gdk::Paintable
to use as the primary icon for the entry.
sourcefn set_primary_icon_paintable<P: IsA<Paintable>>(
&self,
primary_icon_paintable: Option<&P>,
)
fn set_primary_icon_paintable<P: IsA<Paintable>>( &self, primary_icon_paintable: Option<&P>, )
A gdk::Paintable
to use as the primary icon for the entry.
sourcefn is_primary_icon_sensitive(&self) -> bool
fn is_primary_icon_sensitive(&self) -> bool
Whether the primary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the
icon-press
and icon-release
signals and does not allow DND from insensitive icons.
An icon should be set insensitive if the action that would trigger when clicked is currently not available.
sourcefn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool)
fn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool)
Whether the primary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the
icon-press
and icon-release
signals and does not allow DND from insensitive icons.
An icon should be set insensitive if the action that would trigger when clicked is currently not available.
sourcefn primary_icon_storage_type(&self) -> ImageType
fn primary_icon_storage_type(&self) -> ImageType
The representation which is used for the primary icon of the entry.
sourcefn primary_icon_tooltip_markup(&self) -> Option<GString>
fn primary_icon_tooltip_markup(&self) -> Option<GString>
The contents of the tooltip on the primary icon, with markup.
Also see set_icon_tooltip_markup()
.
sourcefn set_primary_icon_tooltip_markup(
&self,
primary_icon_tooltip_markup: Option<&str>,
)
fn set_primary_icon_tooltip_markup( &self, primary_icon_tooltip_markup: Option<&str>, )
The contents of the tooltip on the primary icon, with markup.
Also see set_icon_tooltip_markup()
.
sourcefn primary_icon_tooltip_text(&self) -> Option<GString>
fn primary_icon_tooltip_text(&self) -> Option<GString>
The contents of the tooltip on the primary icon.
Also see set_icon_tooltip_text()
.
sourcefn set_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>)
fn set_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>)
The contents of the tooltip on the primary icon.
Also see set_icon_tooltip_text()
.
sourcefn scroll_offset(&self) -> i32
fn scroll_offset(&self) -> i32
Number of pixels of the entry scrolled off the screen to the left.
sourcefn is_secondary_icon_activatable(&self) -> bool
fn is_secondary_icon_activatable(&self) -> bool
Whether the secondary icon is activatable.
GTK emits the icon-press
and
icon-release
signals only on sensitive,
activatable icons.
Sensitive, but non-activatable icons can be used for purely informational purposes.
sourcefn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool)
fn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool)
Whether the secondary icon is activatable.
GTK emits the icon-press
and
icon-release
signals only on sensitive,
activatable icons.
Sensitive, but non-activatable icons can be used for purely informational purposes.
sourcefn secondary_icon_gicon(&self) -> Option<Icon>
fn secondary_icon_gicon(&self) -> Option<Icon>
The GIcon
to use for the secondary icon for the entry.
sourcefn set_secondary_icon_gicon<P: IsA<Icon>>(
&self,
secondary_icon_gicon: Option<&P>,
)
fn set_secondary_icon_gicon<P: IsA<Icon>>( &self, secondary_icon_gicon: Option<&P>, )
The GIcon
to use for the secondary icon for the entry.
sourcefn secondary_icon_name(&self) -> Option<GString>
fn secondary_icon_name(&self) -> Option<GString>
The icon name to use for the secondary icon for the entry.
sourcefn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>)
fn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>)
The icon name to use for the secondary icon for the entry.
sourcefn secondary_icon_paintable(&self) -> Option<Paintable>
fn secondary_icon_paintable(&self) -> Option<Paintable>
A gdk::Paintable
to use as the secondary icon for the entry.
sourcefn set_secondary_icon_paintable<P: IsA<Paintable>>(
&self,
secondary_icon_paintable: Option<&P>,
)
fn set_secondary_icon_paintable<P: IsA<Paintable>>( &self, secondary_icon_paintable: Option<&P>, )
A gdk::Paintable
to use as the secondary icon for the entry.
sourcefn is_secondary_icon_sensitive(&self) -> bool
fn is_secondary_icon_sensitive(&self) -> bool
Whether the secondary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the
icon-press
[ and icon-release
signals and does not allow DND from insensitive icons.
An icon should be set insensitive if the action that would trigger when clicked is currently not available.
sourcefn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool)
fn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool)
Whether the secondary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the
icon-press
[ and icon-release
signals and does not allow DND from insensitive icons.
An icon should be set insensitive if the action that would trigger when clicked is currently not available.
sourcefn secondary_icon_storage_type(&self) -> ImageType
fn secondary_icon_storage_type(&self) -> ImageType
The representation which is used for the secondary icon of the entry.
sourcefn secondary_icon_tooltip_markup(&self) -> Option<GString>
fn secondary_icon_tooltip_markup(&self) -> Option<GString>
The contents of the tooltip on the secondary icon, with markup.
Also see set_icon_tooltip_markup()
.
sourcefn set_secondary_icon_tooltip_markup(
&self,
secondary_icon_tooltip_markup: Option<&str>,
)
fn set_secondary_icon_tooltip_markup( &self, secondary_icon_tooltip_markup: Option<&str>, )
The contents of the tooltip on the secondary icon, with markup.
Also see set_icon_tooltip_markup()
.
sourcefn secondary_icon_tooltip_text(&self) -> Option<GString>
fn secondary_icon_tooltip_text(&self) -> Option<GString>
The contents of the tooltip on the secondary icon.
Also see set_icon_tooltip_text()
.
sourcefn set_secondary_icon_tooltip_text(
&self,
secondary_icon_tooltip_text: Option<&str>,
)
fn set_secondary_icon_tooltip_text( &self, secondary_icon_tooltip_text: Option<&str>, )
The contents of the tooltip on the secondary icon.
Also see set_icon_tooltip_text()
.
sourcefn shows_emoji_icon(&self) -> bool
fn shows_emoji_icon(&self) -> bool
Whether the entry will show an Emoji icon in the secondary icon position to open the Emoji chooser.
sourcefn set_show_emoji_icon(&self, show_emoji_icon: bool)
fn set_show_emoji_icon(&self, show_emoji_icon: bool)
Whether the entry will show an Emoji icon in the secondary icon position to open the Emoji chooser.
sourcefn must_truncate_multiline(&self) -> bool
fn must_truncate_multiline(&self) -> bool
When true
, pasted multi-line text is truncated to the first line.
sourcefn set_truncate_multiline(&self, truncate_multiline: bool)
fn set_truncate_multiline(&self, truncate_multiline: bool)
When true
, pasted multi-line text is truncated to the first line.
sourcefn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Emitted when the entry is activated.
The keybindings for this signal are all forms of the Enter key.
fn emit_activate(&self)
sourcefn connect_icon_press<F: Fn(&Self, EntryIconPosition) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_icon_press<F: Fn(&Self, EntryIconPosition) + 'static>( &self, f: F, ) -> SignalHandlerId
sourcefn connect_icon_release<F: Fn(&Self, EntryIconPosition) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_icon_release<F: Fn(&Self, EntryIconPosition) + 'static>( &self, f: F, ) -> SignalHandlerId
Emitted on the button release from a mouse click over an activatable icon.
§icon_pos
The position of the clicked icon