Skip to main content

EntryExt

Trait EntryExt 

Source
pub trait EntryExt: IsA<Entry> + 'static {
Show 192 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 cursor_hadjustment(&self) -> Option<Adjustment> { ... } 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_pixbuf(&self, icon_pos: EntryIconPosition) -> Option<Pixbuf> { ... } 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 layout(&self) -> Option<Layout> { ... } fn layout_offsets(&self) -> (i32, i32) { ... } fn max_length(&self) -> i32 { ... } fn max_width_chars(&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(&self) -> GString { ... } fn text_area(&self) -> Rectangle { ... } fn text_length(&self) -> u16 { ... } fn is_visible(&self) -> bool { ... } fn width_chars(&self) -> i32 { ... } fn grab_focus_without_selecting(&self) { ... } fn im_context_filter_keypress(&self, event: &EventKey) -> bool { ... } fn layout_index_to_text_index(&self, layout_index: i32) -> i32 { ... } 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<&impl IsA<EntryCompletion>>) { ... } fn set_cursor_hadjustment(&self, adjustment: Option<&impl IsA<Adjustment>>) { ... } 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, target_list: &TargetList, 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_pixbuf( &self, icon_pos: EntryIconPosition, pixbuf: Option<&Pixbuf>, ) { ... } 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_max_width_chars(&self, n_chars: 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: &TabArray) { ... } fn set_text(&self, text: &str) { ... } fn set_visibility(&self, visible: bool) { ... } fn set_width_chars(&self, n_chars: i32) { ... } fn text_index_to_layout_index(&self, text_index: i32) -> i32 { ... } fn unset_invisible_char(&self) { ... } fn is_caps_lock_warning(&self) -> bool { ... } fn set_caps_lock_warning(&self, caps_lock_warning: bool) { ... } fn cursor_position(&self) -> i32 { ... } 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 set_invisible_char_set(&self, invisible_char_set: bool) { ... } fn populates_all(&self) -> bool { ... } fn set_populate_all(&self, populate_all: 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_pixbuf(&self) -> Option<Pixbuf> { ... } fn set_primary_icon_pixbuf(&self, primary_icon_pixbuf: Option<&Pixbuf>) { ... } 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_pixbuf(&self) -> Option<Pixbuf> { ... } fn set_secondary_icon_pixbuf(&self, secondary_icon_pixbuf: Option<&Pixbuf>) { ... } 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 selection_bound(&self) -> i32 { ... } 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 xalign(&self) -> f32 { ... } fn set_xalign(&self, xalign: f32) { ... } fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... } fn emit_activate(&self) { ... } fn connect_backspace<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... } fn emit_backspace(&self) { ... } fn connect_copy_clipboard<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_copy_clipboard(&self) { ... } fn connect_cut_clipboard<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_cut_clipboard(&self) { ... } fn connect_delete_from_cursor<F: Fn(&Self, DeleteType, i32) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_delete_from_cursor(&self, type_: DeleteType, count: i32) { ... } fn connect_icon_press<F: Fn(&Self, EntryIconPosition, &Event) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_icon_release<F: Fn(&Self, EntryIconPosition, &Event) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_insert_at_cursor<F: Fn(&Self, &str) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_insert_at_cursor(&self, string: &str) { ... } fn connect_insert_emoji<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_insert_emoji(&self) { ... } fn connect_move_cursor<F: Fn(&Self, MovementStep, i32, bool) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_move_cursor( &self, step: MovementStep, count: i32, extend_selection: bool, ) { ... } fn connect_paste_clipboard<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_paste_clipboard(&self) { ... } fn connect_populate_popup<F: Fn(&Self, &Widget) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_preedit_changed<F: Fn(&Self, &str) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_preedit_changed(&self, preedit: &str) { ... } fn connect_toggle_direction<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_toggle_direction(&self) { ... } fn connect_toggle_overwrite<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_toggle_overwrite(&self) { ... } 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_caps_lock_warning_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_completion_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_cursor_position_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_editable_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_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_max_width_chars_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_populate_all_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_pixbuf_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_pixbuf_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_selection_bound_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_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 { ... } fn connect_width_chars_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_xalign_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Entry methods.

§Implementors

Entry, SearchEntry, SpinButton

Provided Methods§

Source

fn activates_default(&self) -> bool

Retrieves the value set by set_activates_default().

§Returns

true if the entry will activate the default widget

Source

fn alignment(&self) -> f32

Gets the value set by set_alignment().

§Returns

the alignment

Source

fn attributes(&self) -> Option<AttrList>

Gets the attribute list that was set on the entry using set_attributes(), if any.

§Returns

the attribute list, or None if none was set.

Source

fn buffer(&self) -> EntryBuffer

Get the EntryBuffer object which holds the text for this widget.

§Returns

A EntryBuffer object.

Source

fn completion(&self) -> Option<EntryCompletion>

Returns the auxiliary completion object currently in use by self.

§Returns

The auxiliary completion object currently in use by self.

Source

fn current_icon_drag_source(&self) -> i32

Returns the index of the icon which is the source of the current DND operation, or -1.

This function is meant to be used in a drag-data-get callback.

§Returns

index of the icon which is the source of the current DND operation, or -1.

Source

fn cursor_hadjustment(&self) -> Option<Adjustment>

Retrieves the horizontal cursor adjustment for the entry. See set_cursor_hadjustment().

§Returns

the horizontal cursor adjustment, or None if none has been set.

Source

fn has_frame(&self) -> bool

Gets the value set by set_has_frame().

§Returns

whether the entry has a beveled frame

Source

fn icon_is_activatable(&self, icon_pos: EntryIconPosition) -> bool

Returns whether the icon is activatable.

§icon_pos

Icon position

§Returns

true if the icon is activatable.

Source

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.

See also text_area()

§icon_pos

Icon position

§Returns
§icon_area

Return location for the icon’s area

Source

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

§y

the y coordinate of the position to find

§Returns

the index of the icon at the given position, or -1

Source

fn icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<Icon>

Retrieves the gio::Icon used for the icon, or None if there is no icon or if the icon was set by some other method (e.g., by stock, pixbuf, or icon name).

§icon_pos

Icon position

§Returns

A gio::Icon, or None if no icon is set or if the icon is not a gio::Icon

Source

fn icon_name(&self, icon_pos: EntryIconPosition) -> Option<GString>

Retrieves the icon name used for the icon, or None if there is no icon or if the icon was set by some other method (e.g., by pixbuf, stock or gicon).

§icon_pos

Icon position

§Returns

An icon name, or None if no icon is set or if the icon wasn’t set from an icon name

Source

fn icon_pixbuf(&self, icon_pos: EntryIconPosition) -> Option<Pixbuf>

Retrieves the image used for the icon.

Unlike the other methods of setting and getting icon data, this method will work regardless of whether the icon was set using a gdk_pixbuf::Pixbuf, a gio::Icon, a stock item, or an icon name.

§icon_pos

Icon position

§Returns

A gdk_pixbuf::Pixbuf, or None if no icon is set for this position.

Source

fn icon_is_sensitive(&self, icon_pos: EntryIconPosition) -> bool

Returns whether the icon appears sensitive or insensitive.

§icon_pos

Icon position

§Returns

true if the icon is sensitive.

Source

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

Source

fn icon_tooltip_markup(&self, icon_pos: EntryIconPosition) -> Option<GString>

Gets the contents of the tooltip on the icon at the specified position in self.

§icon_pos

the icon position

§Returns

the tooltip text, or None. Free the returned string with g_free() when done.

Source

fn icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option<GString>

Gets the contents of the tooltip on the icon at the specified position in self.

§icon_pos

the icon position

§Returns

the tooltip text, or None. Free the returned string with g_free() when done.

Source

fn input_hints(&self) -> InputHints

Gets the value of the input-hints property.

Source

fn input_purpose(&self) -> InputPurpose

Gets the value of the input-purpose property.

Source

fn layout(&self) -> Option<Layout>

Gets the pango::Layout used to display the entry. The layout is useful to e.g. convert text positions to pixel positions, in combination with layout_offsets(). The returned layout is owned by the entry and must not be modified or freed by the caller.

Keep in mind that the layout text may contain a preedit string, so layout_index_to_text_index() and text_index_to_layout_index() are needed to convert byte indices in the layout to byte indices in the entry contents.

§Returns

the pango::Layout for this entry

Source

fn layout_offsets(&self) -> (i32, i32)

Obtains the position of the pango::Layout used to render text in the entry, in widget coordinates. Useful if you want to line up the text in an entry with some other text, e.g. when using the entry to implement editable cells in a sheet widget.

Also useful to convert mouse events into coordinates inside the pango::Layout, e.g. to take some action if some part of the entry text is clicked.

Note that as the user scrolls around in the entry the offsets will change; you’ll need to connect to the “notify::scroll-offset” signal to track this. Remember when using the pango::Layout functions you need to convert to and from pixels using PANGO_PIXELS() or PANGO_SCALE.

Keep in mind that the layout text may contain a preedit string, so layout_index_to_text_index() and text_index_to_layout_index() are needed to convert byte indices in the layout to byte indices in the entry contents.

§Returns
§x

location to store X offset of layout, or None

§y

location to store Y offset of layout, or None

Source

fn max_length(&self) -> i32

Retrieves the maximum allowed length of the text in self. See set_max_length().

This is equivalent to getting self’s EntryBuffer and calling [EntryBufferExtManual::max_length()][crate::prelude::EntryBufferExtManual::max_length()] on it.

§Returns

the maximum allowed number of characters in Entry, or 0 if there is no maximum.

Source

fn max_width_chars(&self) -> i32

Retrieves the desired maximum width of self, in characters. See set_max_width_chars().

§Returns

the maximum width of the entry, in characters

Source

fn is_overwrite_mode(&self) -> bool

Gets the value set by set_overwrite_mode().

§Returns

whether the text is overwritten when typing.

Source

fn placeholder_text(&self) -> Option<GString>

Retrieves the text that will be displayed when self is empty and unfocused

§Returns

a pointer to the placeholder text as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored.

Source

fn progress_fraction(&self) -> f64

Returns the current fraction of the task that’s been completed. See set_progress_fraction().

§Returns

a fraction from 0.0 to 1.0

Source

fn progress_pulse_step(&self) -> f64

Retrieves the pulse step set with set_progress_pulse_step().

§Returns

a fraction from 0.0 to 1.0

Source

fn tabs(&self) -> Option<TabArray>

Gets the tabstops that were set on the entry using set_tabs(), if any.

§Returns

the tabstops, or None if none was set.

Source

fn text(&self) -> GString

Retrieves the contents of the entry widget. See also EditableExt::chars().

This is equivalent to getting self’s EntryBuffer and calling [EntryBufferExtManual::text()][crate::prelude::EntryBufferExtManual::text()] on it.

§Returns

a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored.

Source

fn text_area(&self) -> Rectangle

Gets the area where the entry’s text is drawn. This function is useful when drawing something to the entry in a draw callback.

If the entry is not realized, text_area is filled with zeros.

See also icon_area().

§Returns
§text_area

Return location for the text area.

Source

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()][crate::prelude::EntryBufferExtManual::length()] on it.

§Returns

the current number of characters in Entry, or 0 if there are none.

Source

fn is_visible(&self) -> bool

Retrieves whether the text in self is visible. See set_visibility().

§Returns

true if the text is currently visible

Source

fn width_chars(&self) -> i32

Gets the value set by set_width_chars().

§Returns

number of chars to request space for, or negative if unset

Source

fn grab_focus_without_selecting(&self)

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.

Source

fn im_context_filter_keypress(&self, event: &EventKey) -> bool

Allow the Entry input method to internally handle key press and release events. If this function returns true, then no further processing should be done for this key event. See IMContextExt::filter_keypress().

Note that you are expected to call this function from your handler when overriding key event handling. This is needed in the case when you need to insert your own key handling between the input method and the default key event handling of the Entry. See TextViewExt::reset_im_context() for an example of use.

§event

the key event

§Returns

true if the input method handled the key event.

Source

fn layout_index_to_text_index(&self, layout_index: i32) -> i32

Converts from a position in the entry’s pango::Layout (returned by layout()) to a position in the entry contents (returned by text()).

§layout_index

byte index into the entry layout text

§Returns

byte index into the entry contents

Source

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 progress_pulse() causes the block to move by a little bit (the amount of movement per pulse is determined by set_progress_pulse_step()).

Source

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.

Source

fn set_activates_default(&self, setting: bool)

If setting is true, pressing Enter in the self will activate the default widget for the window containing the entry. This usually means that the dialog box containing the entry will be closed, since the default widget is usually one of the dialog buttons.

(For experts: if setting is true, the entry calls GtkWindowExt::activate_default() on the window containing the entry, in the default handler for the activate signal.)

§setting

true to activate window’s default widget on Enter keypress

Source

fn set_alignment(&self, xalign: f32)

Sets the alignment for the contents of the entry. This controls the horizontal positioning of the contents when the displayed text is shorter than the width of the entry.

§xalign

The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts

Source

fn set_attributes(&self, attrs: &AttrList)

Sets a pango::AttrList; the attributes in the list are applied to the entry text.

§attrs

a pango::AttrList

Source

fn set_buffer(&self, buffer: &impl IsA<EntryBuffer>)

Set the EntryBuffer object which holds the text for this widget.

§buffer

a EntryBuffer

Source

fn set_completion(&self, completion: Option<&impl IsA<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.

§completion

The EntryCompletion or None

Source

fn set_cursor_hadjustment(&self, adjustment: Option<&impl IsA<Adjustment>>)

Hooks up an adjustment to the cursor position in an entry, so that when the cursor is moved, the adjustment is scrolled to show that position. See ScrolledWindowExt::hadjustment() for a typical way of obtaining the adjustment.

The adjustment has to be in pixel units and in the same coordinate system as the entry.

§adjustment

an adjustment which should be adjusted when the cursor is moved, or None

Source

fn set_has_frame(&self, setting: bool)

Sets whether the entry has a beveled frame around it.

§setting

new value

Source

fn set_icon_activatable(&self, icon_pos: EntryIconPosition, activatable: bool)

Sets whether the icon is activatable.

§icon_pos

Icon position

§activatable

true if the icon should be activatable

Source

fn set_icon_drag_source( &self, icon_pos: EntryIconPosition, target_list: &TargetList, actions: DragAction, )

Sets up the icon at the given position so that GTK+ will start a drag operation when the user clicks and drags the icon.

To handle the drag operation, you need to connect to the usual drag-data-get (or possibly drag-data-delete) signal, and use current_icon_drag_source() in your signal handler to find out if the drag was started from an icon.

By default, GTK+ uses the icon as the drag icon. You can use the drag-begin signal to set a different icon. Note that you have to use g_signal_connect_after() to ensure that your signal handler gets executed after the default handler.

§icon_pos

icon position

§target_list

the targets (data formats) in which the data can be provided

§actions

a bitmask of the allowed drag actions

Source

fn set_icon_from_gicon( &self, icon_pos: EntryIconPosition, icon: Option<&impl IsA<Icon>>, )

Sets the icon shown in the entry at the specified position from the current icon theme. If the icon isn’t known, a “broken image” icon will be displayed instead.

If icon is None, no icon will be shown in the specified position.

§icon_pos

The position at which to set the icon

§icon

The icon to set, or None

Source

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, or None

Source

fn set_icon_from_pixbuf( &self, icon_pos: EntryIconPosition, pixbuf: Option<&Pixbuf>, )

Sets the icon shown in the specified position using a pixbuf.

If pixbuf is None, no icon will be shown in the specified position.

§icon_pos

Icon position

§pixbuf

A gdk_pixbuf::Pixbuf, or None

Source

fn set_icon_sensitive(&self, icon_pos: EntryIconPosition, sensitive: bool)

Sets the sensitivity for the specified icon.

§icon_pos

Icon position

§sensitive

Specifies whether the icon should appear sensitive or insensitive

Source

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 the [Pango text markup language][PangoMarkupFormat].

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, or None

Source

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 GtkWidget:has-tooltip to false, which suppresses icon tooltips too. You can resolve this by then calling WidgetExt::set_has_tooltip() to set GtkWidget: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, or None

Source

fn set_input_hints(&self, hints: InputHints)

Sets the input-hints property, which allows input methods to fine-tune their behaviour.

§hints

the hints

Source

fn set_input_purpose(&self, purpose: InputPurpose)

Sets the input-purpose property which can be used by on-screen keyboards and other input methods to adjust their behaviour.

§purpose

the purpose

Source

fn set_invisible_char(&self, ch: Option<char>)

Sets the character to use in place of the actual text when set_visibility() has been called to set text visibility to false. i.e. this is the character used in “password mode” to show the user how many characters have been typed. 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

Source

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.

This is equivalent to getting self’s EntryBuffer and calling [EntryBufferExtManual::set_max_length()][crate::prelude::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.

Source

fn set_max_width_chars(&self, n_chars: i32)

Sets the desired maximum width in characters of self.

§n_chars

the new desired maximum width, in characters

Source

fn set_overwrite_mode(&self, overwrite: bool)

Sets whether the text is overwritten when typing in the Entry.

§overwrite

new value

Source

fn set_placeholder_text(&self, text: Option<&str>)

Sets text to be displayed in self when it is empty and unfocused. This can be used to give a visual hint of the expected contents of the Entry.

Note that since the placeholder text gets removed when the entry received focus, using this feature is a bit problematic if the entry is given the initial focus in a window. Sometimes this can be worked around by delaying the initial focus setting until the first key event arrives.

§text

a string to be displayed when self is empty and unfocused, or None

Source

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

Source

fn set_progress_pulse_step(&self, fraction: f64)

Sets the fraction of total entry width to move the progress bouncing block for each call to progress_pulse().

§fraction

fraction between 0.0 and 1.0

Source

fn set_tabs(&self, tabs: &TabArray)

Sets a pango::TabArray; the tabstops in the array are applied to the entry text.

§tabs

a pango::TabArray

Source

fn set_text(&self, text: &str)

Sets the text in the widget to the given value, replacing the current contents.

See [EntryBufferExtManual::set_text()][crate::prelude::EntryBufferExtManual::set_text()].

§text

the new text

Source

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

Source

fn set_width_chars(&self, n_chars: i32)

Changes the size request of the entry to be about the right size for n_chars characters. Note that it changes the size request, the size can still be affected by how you pack the widget into containers. If n_chars is -1, the size reverts to the default entry size.

§n_chars

width in chars

Source

fn text_index_to_layout_index(&self, text_index: i32) -> i32

Converts from a position in the entry contents (returned by text()) to a position in the entry’s pango::Layout (returned by layout(), with text retrieved via Layout::text()).

§text_index

byte index into the entry contents

§Returns

byte index into the entry layout text

Source

fn unset_invisible_char(&self)

Unsets the invisible char previously set with set_invisible_char(). So that the default invisible char is used again.

Source

fn is_caps_lock_warning(&self) -> bool

Whether password entries will show a warning when Caps Lock is on.

Note that the warning is shown using a secondary icon, and thus does not work if you are using the secondary icon position for some other purpose.

Source

fn set_caps_lock_warning(&self, caps_lock_warning: bool)

Whether password entries will show a warning when Caps Lock is on.

Note that the warning is shown using a secondary icon, and thus does not work if you are using the secondary icon position for some other purpose.

Source

fn cursor_position(&self) -> i32

Source

fn enables_emoji_completion(&self) -> bool

Source

fn set_enable_emoji_completion(&self, enable_emoji_completion: bool)

Source

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.

Source

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.

Source

fn is_invisible_char_set(&self) -> bool

Whether the invisible char has been set for the Entry.

Source

fn set_invisible_char_set(&self, invisible_char_set: bool)

Whether the invisible char has been set for the Entry.

Source

fn populates_all(&self) -> bool

If :populate-all is true, the populate-popup signal is also emitted for touch popups.

Source

fn set_populate_all(&self, populate_all: bool)

If :populate-all is true, the populate-popup signal is also emitted for touch popups.

Source

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.

Source

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.

Source

fn primary_icon_gicon(&self) -> Option<Icon>

The gio::Icon to use for the primary icon for the entry.

Source

fn set_primary_icon_gicon<P: IsA<Icon>>(&self, primary_icon_gicon: Option<&P>)

The gio::Icon to use for the primary icon for the entry.

Source

fn primary_icon_name(&self) -> Option<GString>

The icon name to use for the primary icon for the entry.

Source

fn set_primary_icon_name(&self, primary_icon_name: Option<&str>)

The icon name to use for the primary icon for the entry.

Source

fn primary_icon_pixbuf(&self) -> Option<Pixbuf>

A pixbuf to use as the primary icon for the entry.

Source

fn set_primary_icon_pixbuf(&self, primary_icon_pixbuf: Option<&Pixbuf>)

A pixbuf to use as the primary icon for the entry.

Source

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.

Source

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.

Source

fn primary_icon_storage_type(&self) -> ImageType

The representation which is used for the primary icon of the entry.

Source

fn primary_icon_tooltip_markup(&self) -> Option<GString>

The contents of the tooltip on the primary icon, which is marked up with the [Pango text markup language][PangoMarkupFormat].

Also see set_icon_tooltip_markup().

Source

fn set_primary_icon_tooltip_markup( &self, primary_icon_tooltip_markup: Option<&str>, )

The contents of the tooltip on the primary icon, which is marked up with the [Pango text markup language][PangoMarkupFormat].

Also see set_icon_tooltip_markup().

Source

fn primary_icon_tooltip_text(&self) -> Option<GString>

The contents of the tooltip on the primary icon.

Also see set_icon_tooltip_text().

Source

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().

Source

fn scroll_offset(&self) -> i32

Source

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.

Source

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.

Source

fn secondary_icon_gicon(&self) -> Option<Icon>

The gio::Icon to use for the secondary icon for the entry.

Source

fn set_secondary_icon_gicon<P: IsA<Icon>>( &self, secondary_icon_gicon: Option<&P>, )

The gio::Icon to use for the secondary icon for the entry.

Source

fn secondary_icon_name(&self) -> Option<GString>

The icon name to use for the secondary icon for the entry.

Source

fn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>)

The icon name to use for the secondary icon for the entry.

Source

fn secondary_icon_pixbuf(&self) -> Option<Pixbuf>

An pixbuf to use as the secondary icon for the entry.

Source

fn set_secondary_icon_pixbuf(&self, secondary_icon_pixbuf: Option<&Pixbuf>)

An pixbuf to use as the secondary icon for the entry.

Source

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.

Source

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.

Source

fn secondary_icon_storage_type(&self) -> ImageType

The representation which is used for the secondary icon of the entry.

Source

fn secondary_icon_tooltip_markup(&self) -> Option<GString>

The contents of the tooltip on the secondary icon, which is marked up with the [Pango text markup language][PangoMarkupFormat].

Also see set_icon_tooltip_markup().

Source

fn set_secondary_icon_tooltip_markup( &self, secondary_icon_tooltip_markup: Option<&str>, )

The contents of the tooltip on the secondary icon, which is marked up with the [Pango text markup language][PangoMarkupFormat].

Also see set_icon_tooltip_markup().

Source

fn secondary_icon_tooltip_text(&self) -> Option<GString>

The contents of the tooltip on the secondary icon.

Also see set_icon_tooltip_text().

Source

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().

Source

fn selection_bound(&self) -> i32

Source

fn shows_emoji_icon(&self) -> bool

Source

fn set_show_emoji_icon(&self, show_emoji_icon: bool)

Source

fn must_truncate_multiline(&self) -> bool

When true, pasted multi-line text is truncated to the first line.

Source

fn set_truncate_multiline(&self, truncate_multiline: bool)

When true, pasted multi-line text is truncated to the first line.

Source

fn xalign(&self) -> f32

The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.

Source

fn set_xalign(&self, xalign: f32)

The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.

Source

fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

The ::activate signal is emitted when the user hits the Enter key.

While this signal is used as a [keybinding signal][GtkBindingSignal], it is also commonly used by applications to intercept activation of entries.

The default bindings for this signal are all forms of the Enter key.

Source

fn emit_activate(&self)

Source

fn connect_backspace<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

The ::backspace signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user asks for it.

The default bindings for this signal are Backspace and Shift-Backspace.

Source

fn emit_backspace(&self)

Source

fn connect_copy_clipboard<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::copy-clipboard signal is a [keybinding signal][GtkBindingSignal] which gets emitted to copy the selection to the clipboard.

The default bindings for this signal are Ctrl-c and Ctrl-Insert.

Source

fn emit_copy_clipboard(&self)

Source

fn connect_cut_clipboard<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

The ::cut-clipboard signal is a [keybinding signal][GtkBindingSignal] which gets emitted to cut the selection to the clipboard.

The default bindings for this signal are Ctrl-x and Shift-Delete.

Source

fn emit_cut_clipboard(&self)

Source

fn connect_delete_from_cursor<F: Fn(&Self, DeleteType, i32) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::delete-from-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a text deletion.

If the type_ is DeleteType::Chars, GTK+ deletes the selection if there is one, otherwise it deletes the requested number of characters.

The default bindings for this signal are Delete for deleting a character and Ctrl-Delete for deleting a word.

§type_

the granularity of the deletion, as a DeleteType

§count

the number of type_ units to delete

Source

fn emit_delete_from_cursor(&self, type_: DeleteType, count: i32)

Source

fn connect_icon_press<F: Fn(&Self, EntryIconPosition, &Event) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::icon-press signal is emitted when an activatable icon is clicked.

§icon_pos

The position of the clicked icon

§event

the button press event

Source

fn connect_icon_release<F: Fn(&Self, EntryIconPosition, &Event) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::icon-release signal is emitted on the button release from a mouse click over an activatable icon.

§icon_pos

The position of the clicked icon

§event

the button release event

Source

fn connect_insert_at_cursor<F: Fn(&Self, &str) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::insert-at-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates the insertion of a fixed string at the cursor.

This signal has no default bindings.

§string

the string to insert

Source

fn emit_insert_at_cursor(&self, string: &str)

Source

fn connect_insert_emoji<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

The ::insert-emoji signal is a [keybinding signal][GtkBindingSignal] which gets emitted to present the Emoji chooser for the entry.

The default bindings for this signal are Ctrl-. and Ctrl-;

Source

fn emit_insert_emoji(&self)

Source

fn connect_move_cursor<F: Fn(&Self, MovementStep, i32, bool) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::move-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a cursor movement. If the cursor is not visible in entry, this signal causes the viewport to be moved instead.

Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically.

The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here.

  • Arrow keys move by individual characters/lines
  • Ctrl-arrow key combinations move by words/paragraphs
  • Home/End keys move to the ends of the buffer
§step

the granularity of the move, as a MovementStep

§count

the number of step units to move

§extend_selection

true if the move should extend the selection

Source

fn emit_move_cursor( &self, step: MovementStep, count: i32, extend_selection: bool, )

Source

fn connect_paste_clipboard<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::paste-clipboard signal is a [keybinding signal][GtkBindingSignal] which gets emitted to paste the contents of the clipboard into the text view.

The default bindings for this signal are Ctrl-v and Shift-Insert.

Source

fn emit_paste_clipboard(&self)

Source

fn connect_populate_popup<F: Fn(&Self, &Widget) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::populate-popup signal gets emitted before showing the context menu of the entry.

If you need to add items to the context menu, connect to this signal and append your items to the widget, which will be a Menu in this case.

If populate-all is true, this signal will also be emitted to populate touch popups. In this case, widget will be a different container, e.g. a Toolbar. The signal handler should not make assumptions about the type of widget.

§widget

the container that is being populated

Source

fn connect_preedit_changed<F: Fn(&Self, &str) + 'static>( &self, f: F, ) -> SignalHandlerId

If an input method is used, the typed text will not immediately be committed to the buffer. So if you are interested in the text, connect to this signal.

§preedit

the current preedit string

Source

fn emit_preedit_changed(&self, preedit: &str)

Source

fn connect_toggle_direction<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn emit_toggle_direction(&self)

Source

fn connect_toggle_overwrite<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::toggle-overwrite signal is a [keybinding signal][GtkBindingSignal] which gets emitted to toggle the overwrite mode of the entry.

The default bindings for this signal is Insert.

Source

fn emit_toggle_overwrite(&self)

Source

fn connect_activates_default_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_attributes_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_buffer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_caps_lock_warning_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_completion_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_cursor_position_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_editable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_enable_emoji_completion_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_has_frame_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_im_module_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_input_hints_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_input_purpose_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_invisible_char_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_invisible_char_set_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_max_length_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_max_width_chars_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_overwrite_mode_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_placeholder_text_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_populate_all_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_primary_icon_activatable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_primary_icon_gicon_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_primary_icon_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_primary_icon_pixbuf_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_primary_icon_sensitive_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_primary_icon_storage_type_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_primary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_primary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_progress_fraction_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_progress_pulse_step_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_scroll_offset_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_secondary_icon_activatable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_secondary_icon_gicon_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_secondary_icon_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_secondary_icon_pixbuf_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_secondary_icon_sensitive_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_secondary_icon_storage_type_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_secondary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_secondary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_selection_bound_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_show_emoji_icon_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_tabs_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_text_length_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_truncate_multiline_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_visibility_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_width_chars_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_xalign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<O: IsA<Entry>> EntryExt for O