[][src]Trait gtk::EntryExt

pub trait EntryExt: 'static {
    fn get_activates_default(&self) -> bool;
fn get_alignment(&self) -> f32;
fn get_attributes(&self) -> Option<AttrList>;
fn get_buffer(&self) -> EntryBuffer;
fn get_completion(&self) -> Option<EntryCompletion>;
fn get_current_icon_drag_source(&self) -> i32;
fn get_cursor_hadjustment(&self) -> Option<Adjustment>;
fn get_has_frame(&self) -> bool;
fn get_icon_activatable(&self, icon_pos: EntryIconPosition) -> bool;
fn get_icon_area(&self, icon_pos: EntryIconPosition) -> Rectangle;
fn get_icon_at_pos(&self, x: i32, y: i32) -> i32;
fn get_icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<Icon>;
fn get_icon_name(&self, icon_pos: EntryIconPosition) -> Option<GString>;
fn get_icon_pixbuf(&self, icon_pos: EntryIconPosition) -> Option<Pixbuf>;
fn get_icon_sensitive(&self, icon_pos: EntryIconPosition) -> bool;
fn get_icon_storage_type(&self, icon_pos: EntryIconPosition) -> ImageType;
fn get_icon_tooltip_markup(
        &self,
        icon_pos: EntryIconPosition
    ) -> Option<GString>;
fn get_icon_tooltip_text(
        &self,
        icon_pos: EntryIconPosition
    ) -> Option<GString>;
fn get_input_hints(&self) -> InputHints;
fn get_input_purpose(&self) -> InputPurpose;
fn get_invisible_char(&self) -> Option<char>;
fn get_layout(&self) -> Option<Layout>;
fn get_layout_offsets(&self) -> (i32, i32);
fn get_max_length(&self) -> i32;
fn get_max_width_chars(&self) -> i32;
fn get_overwrite_mode(&self) -> bool;
fn get_placeholder_text(&self) -> Option<GString>;
fn get_progress_fraction(&self) -> f64;
fn get_progress_pulse_step(&self) -> f64;
fn get_tabs(&self) -> Option<TabArray>;
fn get_text(&self) -> GString;
fn get_text_area(&self) -> Rectangle;
fn get_text_length(&self) -> u16;
fn get_visibility(&self) -> bool;
fn get_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<P: IsA<EntryBuffer>>(&self, buffer: &P);
fn set_completion<P: IsA<EntryCompletion>>(&self, completion: Option<&P>);
fn set_cursor_hadjustment<P: IsA<Adjustment>>(&self, adjustment: Option<&P>);
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<P: IsA<Icon>>(
        &self,
        icon_pos: EntryIconPosition,
        icon: Option<&P>
    );
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 get_property_caps_lock_warning(&self) -> bool;
fn set_property_caps_lock_warning(&self, caps_lock_warning: bool);
fn get_property_cursor_position(&self) -> i32;
fn get_property_enable_emoji_completion(&self) -> bool;
fn set_property_enable_emoji_completion(
        &self,
        enable_emoji_completion: bool
    );
fn get_property_im_module(&self) -> Option<GString>;
fn set_property_im_module(&self, im_module: Option<&str>);
fn get_property_invisible_char_set(&self) -> bool;
fn set_property_invisible_char_set(&self, invisible_char_set: bool);
fn get_property_populate_all(&self) -> bool;
fn set_property_populate_all(&self, populate_all: bool);
fn get_property_primary_icon_activatable(&self) -> bool;
fn set_property_primary_icon_activatable(
        &self,
        primary_icon_activatable: bool
    );
fn get_property_primary_icon_gicon(&self) -> Option<Icon>;
fn set_property_primary_icon_gicon<P: IsA<Icon> + SetValueOptional>(
        &self,
        primary_icon_gicon: Option<&P>
    );
fn get_property_primary_icon_name(&self) -> Option<GString>;
fn set_property_primary_icon_name(&self, primary_icon_name: Option<&str>);
fn get_property_primary_icon_pixbuf(&self) -> Option<Pixbuf>;
fn set_property_primary_icon_pixbuf(
        &self,
        primary_icon_pixbuf: Option<&Pixbuf>
    );
fn get_property_primary_icon_sensitive(&self) -> bool;
fn set_property_primary_icon_sensitive(&self, primary_icon_sensitive: bool);
fn get_property_primary_icon_storage_type(&self) -> ImageType;
fn get_property_primary_icon_tooltip_markup(&self) -> Option<GString>;
fn set_property_primary_icon_tooltip_markup(
        &self,
        primary_icon_tooltip_markup: Option<&str>
    );
fn get_property_primary_icon_tooltip_text(&self) -> Option<GString>;
fn set_property_primary_icon_tooltip_text(
        &self,
        primary_icon_tooltip_text: Option<&str>
    );
fn get_property_scroll_offset(&self) -> i32;
fn get_property_secondary_icon_activatable(&self) -> bool;
fn set_property_secondary_icon_activatable(
        &self,
        secondary_icon_activatable: bool
    );
fn get_property_secondary_icon_gicon(&self) -> Option<Icon>;
fn set_property_secondary_icon_gicon<P: IsA<Icon> + SetValueOptional>(
        &self,
        secondary_icon_gicon: Option<&P>
    );
fn get_property_secondary_icon_name(&self) -> Option<GString>;
fn set_property_secondary_icon_name(
        &self,
        secondary_icon_name: Option<&str>
    );
fn get_property_secondary_icon_pixbuf(&self) -> Option<Pixbuf>;
fn set_property_secondary_icon_pixbuf(
        &self,
        secondary_icon_pixbuf: Option<&Pixbuf>
    );
fn get_property_secondary_icon_sensitive(&self) -> bool;
fn set_property_secondary_icon_sensitive(
        &self,
        secondary_icon_sensitive: bool
    );
fn get_property_secondary_icon_storage_type(&self) -> ImageType;
fn get_property_secondary_icon_tooltip_markup(&self) -> Option<GString>;
fn set_property_secondary_icon_tooltip_markup(
        &self,
        secondary_icon_tooltip_markup: Option<&str>
    );
fn get_property_secondary_icon_tooltip_text(&self) -> Option<GString>;
fn set_property_secondary_icon_tooltip_text(
        &self,
        secondary_icon_tooltip_text: Option<&str>
    );
fn get_property_selection_bound(&self) -> i32;
fn get_property_shadow_type(&self) -> ShadowType;
fn set_property_shadow_type(&self, shadow_type: ShadowType);
fn get_property_show_emoji_icon(&self) -> bool;
fn set_property_show_emoji_icon(&self, show_emoji_icon: bool);
fn get_property_truncate_multiline(&self) -> bool;
fn set_property_truncate_multiline(&self, truncate_multiline: bool);
fn get_property_xalign(&self) -> f32;
fn set_property_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, &EventButton) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_icon_release<F: Fn(&Self, EntryIconPosition, &EventButton) + '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_overwrite<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn emit_toggle_overwrite(&self);
fn connect_property_activates_default_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_attributes_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_buffer_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_caps_lock_warning_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_completion_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_cursor_position_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_editable_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_enable_emoji_completion_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_has_frame_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_im_module_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_input_hints_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_input_purpose_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_invisible_char_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_invisible_char_set_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_max_length_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_max_width_chars_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_overwrite_mode_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_placeholder_text_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_populate_all_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_primary_icon_activatable_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_primary_icon_gicon_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_primary_icon_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_primary_icon_pixbuf_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_primary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_primary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_primary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_primary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_progress_fraction_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_progress_pulse_step_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_scroll_offset_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_secondary_icon_activatable_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_secondary_icon_gicon_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_secondary_icon_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_secondary_icon_pixbuf_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_secondary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_secondary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_secondary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_secondary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_selection_bound_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_shadow_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_show_emoji_icon_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_tabs_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_text_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_text_length_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_truncate_multiline_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_visibility_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_width_chars_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_xalign_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all Entry methods.

Implementors

Entry, SearchEntry, SpinButton

Required methods

fn get_activates_default(&self) -> bool

Retrieves the value set by EntryExt::set_activates_default.

Returns

true if the entry will activate the default widget

fn get_alignment(&self) -> f32

Gets the value set by EntryExt::set_alignment.

Returns

the alignment

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

Gets the attribute list that was set on the entry using EntryExt::set_attributes, if any.

Returns

the attribute list, or None if none was set.

fn get_buffer(&self) -> EntryBuffer

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

Returns

A EntryBuffer object.

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

Returns the auxiliary completion object currently in use by self.

Returns

The auxiliary completion object currently in use by self.

fn get_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 Widget::drag-data-get callback.

Returns

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

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

Retrieves the horizontal cursor adjustment for the entry. See EntryExt::set_cursor_hadjustment.

Returns

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

fn get_has_frame(&self) -> bool

Gets the value set by EntryExt::set_has_frame.

Returns

whether the entry has a beveled frame

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

Returns whether the icon is activatable.

icon_pos

Icon position

Returns

true if the icon is activatable.

fn get_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 EntryExt::get_text_area

icon_pos

Icon position

icon_area

Return location for the icon’s area

fn get_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 Widget::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

fn get_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

fn get_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

fn get_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.

fn get_icon_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.

fn get_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

fn get_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.

fn get_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.

fn get_input_hints(&self) -> InputHints

Gets the value of the Entry:input-hints property.

fn get_input_purpose(&self) -> InputPurpose

Gets the value of the Entry:input-purpose property.

fn get_invisible_char(&self) -> Option<char>

Retrieves the character displayed in place of the real characters for entries with visibility set to false. See EntryExt::set_invisible_char.

Returns

the current invisible char, or 0, if the entry does not show invisible text at all.

fn get_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 EntryExt::get_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 EntryExt::layout_index_to_text_index and EntryExt::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

fn get_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 EntryExt::layout_index_to_text_index and EntryExt::text_index_to_layout_index are needed to convert byte indices in the layout to byte indices in the entry contents.

x

location to store X offset of layout, or None

y

location to store Y offset of layout, or None

fn get_max_length(&self) -> i32

Retrieves the maximum allowed length of the text in self. See EntryExt::set_max_length.

This is equivalent to getting self's EntryBuffer and calling EntryBufferExt::get_max_length on it.

Returns

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

fn get_max_width_chars(&self) -> i32

Retrieves the desired maximum width of self, in characters. See EntryExt::set_max_width_chars.

Returns

the maximum width of the entry, in characters

fn get_overwrite_mode(&self) -> bool

Gets the value set by EntryExt::set_overwrite_mode.

Returns

whether the text is overwritten when typing.

fn get_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.

fn get_progress_fraction(&self) -> f64

Returns the current fraction of the task that’s been completed. See EntryExt::set_progress_fraction.

Returns

a fraction from 0.0 to 1.0

fn get_progress_pulse_step(&self) -> f64

Retrieves the pulse step set with EntryExt::set_progress_pulse_step.

Returns

a fraction from 0.0 to 1.0

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

Gets the tabstops that were set on the entry using EntryExt::set_tabs, if any.

Returns

the tabstops, or None if none was set.

fn get_text(&self) -> GString

Retrieves the contents of the entry widget. See also Editable::get_chars.

This is equivalent to getting self's EntryBuffer and calling EntryBufferExt::get_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.

fn get_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 EntryExt::get_icon_area.

text_area

Return location for the text area.

fn get_text_length(&self) -> u16

Retrieves the current length of the text in self.

This is equivalent to getting self's EntryBuffer and calling EntryBufferExt::get_length on it.

Returns

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

fn get_visibility(&self) -> bool

Retrieves whether the text in self is visible. See EntryExt::set_visibility.

Returns

true if the text is currently visible

fn get_width_chars(&self) -> i32

Gets the value set by EntryExt::set_width_chars.

Returns

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

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.

Feature: v3_16

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.

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

Converts from a position in the entry’s pango::Layout (returned by EntryExt::get_layout) to a position in the entry contents (returned by EntryExt::get_text).

layout_index

byte index into the entry layout text

Returns

byte index into the entry contents

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

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.

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 Entry::activate signal.)

setting

true to activate window’s default widget on Enter keypress

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

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

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

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

buffer

a EntryBuffer

fn set_completion<P: IsA<EntryCompletion>>(&self, completion: Option<&P>)

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

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

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::get_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

fn set_has_frame(&self, setting: bool)

Sets whether the entry has a beveled frame around it.

setting

new value

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

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 Widget::drag-data-get (or possibly Widget::drag-data-delete) signal, and use EntryExt::get_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 Widget::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

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

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

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

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

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

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 EntryExt::set_icon_tooltip_text.

icon_pos

the icon position

tooltip

the contents of the tooltip for the icon, or None

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 EntryExt::set_icon_tooltip_markup.

If you unset the widget tooltip via WidgetExt::set_tooltip_text or WidgetExt::set_tooltip_markup, this sets Widget:has-tooltip to false, which suppresses icon tooltips too. You can resolve this by then calling WidgetExt::set_has_tooltip to set Widget: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

fn set_input_hints(&self, hints: InputHints)

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

hints

the hints

fn set_input_purpose(&self, purpose: InputPurpose)

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

purpose

the purpose

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

Sets the character to use in place of the actual text when EntryExt::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

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 EntryBufferExt::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.

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

fn set_overwrite_mode(&self, overwrite: bool)

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

overwrite

new value

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

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

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 EntryExt::progress_pulse.

fraction

fraction between 0.0 and 1.0

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

fn set_text(&self, text: &str)

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

See EntryBufferExt::set_text.

text

the new text

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 EntryExt::set_invisible_char.

Note that you probably want to set Entry: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

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

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

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

text_index

byte index into the entry contents

Returns

byte index into the entry layout text

fn unset_invisible_char(&self)

Unsets the invisible char previously set with EntryExt::set_invisible_char. So that the default invisible char is used again.

fn get_property_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.

fn set_property_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.

fn get_property_cursor_position(&self) -> i32

fn get_property_enable_emoji_completion(&self) -> bool

fn set_property_enable_emoji_completion(&self, enable_emoji_completion: bool)

fn get_property_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 Settings Settings:gtk-im-module property.

fn set_property_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 Settings Settings:gtk-im-module property.

fn get_property_invisible_char_set(&self) -> bool

Whether the invisible char has been set for the Entry.

fn set_property_invisible_char_set(&self, invisible_char_set: bool)

Whether the invisible char has been set for the Entry.

fn get_property_populate_all(&self) -> bool

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

fn set_property_populate_all(&self, populate_all: bool)

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

fn get_property_primary_icon_activatable(&self) -> bool

Whether the primary icon is activatable.

GTK+ emits the Entry::icon-press and Entry::icon-release signals only on sensitive, activatable icons.

Sensitive, but non-activatable icons can be used for purely informational purposes.

fn set_property_primary_icon_activatable(&self, primary_icon_activatable: bool)

Whether the primary icon is activatable.

GTK+ emits the Entry::icon-press and Entry::icon-release signals only on sensitive, activatable icons.

Sensitive, but non-activatable icons can be used for purely informational purposes.

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

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

fn set_property_primary_icon_gicon<P: IsA<Icon> + SetValueOptional>(
    &self,
    primary_icon_gicon: Option<&P>
)

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

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

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

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

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

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

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

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

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

fn get_property_primary_icon_sensitive(&self) -> bool

Whether the primary icon is sensitive.

An insensitive icon appears grayed out. GTK+ does not emit the Entry::icon-press and Entry::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.

fn set_property_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 Entry::icon-press and Entry::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.

fn get_property_primary_icon_storage_type(&self) -> ImageType

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

fn get_property_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 EntryExt::set_icon_tooltip_markup.

fn set_property_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 EntryExt::set_icon_tooltip_markup.

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

The contents of the tooltip on the primary icon.

Also see EntryExt::set_icon_tooltip_text.

fn set_property_primary_icon_tooltip_text(
    &self,
    primary_icon_tooltip_text: Option<&str>
)

The contents of the tooltip on the primary icon.

Also see EntryExt::set_icon_tooltip_text.

fn get_property_scroll_offset(&self) -> i32

fn get_property_secondary_icon_activatable(&self) -> bool

Whether the secondary icon is activatable.

GTK+ emits the Entry::icon-press and Entry::icon-release signals only on sensitive, activatable icons.

Sensitive, but non-activatable icons can be used for purely informational purposes.

fn set_property_secondary_icon_activatable(
    &self,
    secondary_icon_activatable: bool
)

Whether the secondary icon is activatable.

GTK+ emits the Entry::icon-press and Entry::icon-release signals only on sensitive, activatable icons.

Sensitive, but non-activatable icons can be used for purely informational purposes.

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

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

fn set_property_secondary_icon_gicon<P: IsA<Icon> + SetValueOptional>(
    &self,
    secondary_icon_gicon: Option<&P>
)

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

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

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

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

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

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

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

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

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

fn get_property_secondary_icon_sensitive(&self) -> bool

Whether the secondary icon is sensitive.

An insensitive icon appears grayed out. GTK+ does not emit the Entry::icon-press and Entry::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.

fn set_property_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 Entry::icon-press and Entry::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.

fn get_property_secondary_icon_storage_type(&self) -> ImageType

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

fn get_property_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 EntryExt::set_icon_tooltip_markup.

fn set_property_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 EntryExt::set_icon_tooltip_markup.

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

The contents of the tooltip on the secondary icon.

Also see EntryExt::set_icon_tooltip_text.

fn set_property_secondary_icon_tooltip_text(
    &self,
    secondary_icon_tooltip_text: Option<&str>
)

The contents of the tooltip on the secondary icon.

Also see EntryExt::set_icon_tooltip_text.

fn get_property_selection_bound(&self) -> i32

fn get_property_shadow_type(&self) -> ShadowType

Which kind of shadow to draw around the entry when Entry:has-frame is set to true.

Deprecated since 3.20

Use CSS to determine the style of the border; the value of this style property is ignored.

fn set_property_shadow_type(&self, shadow_type: ShadowType)

Which kind of shadow to draw around the entry when Entry:has-frame is set to true.

Deprecated since 3.20

Use CSS to determine the style of the border; the value of this style property is ignored.

fn get_property_show_emoji_icon(&self) -> bool

fn set_property_show_emoji_icon(&self, show_emoji_icon: bool)

fn get_property_truncate_multiline(&self) -> bool

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

fn set_property_truncate_multiline(&self, truncate_multiline: bool)

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

fn get_property_xalign(&self) -> f32

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

fn set_property_xalign(&self, xalign: f32)

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

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][BindingSignal], 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.

fn emit_activate(&self)

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

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

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

fn emit_backspace(&self)

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

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

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

fn emit_copy_clipboard(&self)

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

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

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

fn emit_cut_clipboard(&self)

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

The ::delete-from-cursor signal is a [keybinding signal][BindingSignal] 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

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

fn connect_icon_press<F: Fn(&Self, EntryIconPosition, &EventButton) + '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

fn connect_icon_release<F: Fn(&Self, EntryIconPosition, &EventButton) + '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

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

The ::insert-at-cursor signal is a [keybinding signal][BindingSignal] 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

fn emit_insert_at_cursor(&self, string: &str)

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

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

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

Feature: v3_22_27

fn emit_insert_emoji(&self)

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

The ::move-cursor signal is a [keybinding signal][BindingSignal] 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

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

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

The ::paste-clipboard signal is a [keybinding signal][BindingSignal] 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.

fn emit_paste_clipboard(&self)

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 Entry: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

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

fn emit_preedit_changed(&self, preedit: &str)

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

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

The default bindings for this signal is Insert.

fn emit_toggle_overwrite(&self)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading content...

Implementors

impl<O: IsA<Entry>> EntryExt for O[src]

Loading content...