Class: Gtk::Entry

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

Class structure for Gtk::Entry. All virtual functions have a default implementation. Derived classes may set the virtual function pointers for the signal handlers to nil, but must keep get_text_area_size and get_frame_size non-nil; either use the default implementation, or provide a custom one.

Instance Method Summary collapse

Instance Method Details

#activates_defaultTrueClass

Retrieves the value set by gtk_entry_set_activates_default().

Returns:

  • (TrueClass)

    true if the entry will activate the default widget

#activates_default=(activates_default) ⇒ TrueClass

Parameters:

  • activates_default (TrueClass)

Returns:

  • (TrueClass)

    activates-default

  • (TrueClass)

    activates-default

#activates_default?TrueClass

Returns activates-default.

Returns:

  • (TrueClass)

    activates-default

#alignmentGtk::gfloat

Gets the value set by gtk_entry_set_alignment().

Returns:

  • (Gtk::gfloat)

    the alignment

#alignment=(xalign) ⇒ nil

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.

Parameters:

  • xalign (Gtk::gfloat)

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

Returns:

  • (nil)

#attributesPango::AttrList

A list of Pango attributes to apply to the text of the entry.

This is mainly useful to change the size or weight of the text.

The Pango::Attribute’s start_index and end_index must refer to the Gtk::EntryBuffer text, i.e. without the preedit string.

Returns:

  • (Pango::AttrList)

    attributes

#attributes=(attributes) ⇒ Pango::AttrList

A list of Pango attributes to apply to the text of the entry.

This is mainly useful to change the size or weight of the text.

The Pango::Attribute’s start_index and end_index must refer to the Gtk::EntryBuffer text, i.e. without the preedit string.

Parameters:

  • attributes (Pango::AttrList)

Returns:

  • (Pango::AttrList)

    attributes

  • (Pango::AttrList)

    attributes

#bufferGtk::EntryBuffer

Returns buffer.

Returns:

#buffer=(buffer) ⇒ Gtk::EntryBuffer

Parameters:

Returns:

#caps_lock_warning=(caps_lock_warning) ⇒ TrueClass

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.

Parameters:

  • caps_lock_warning (TrueClass)

Returns:

  • (TrueClass)

    caps-lock-warning

  • (TrueClass)

    caps-lock-warning

#caps_lock_warning?TrueClass

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.

Returns:

  • (TrueClass)

    caps-lock-warning

#completionGtk::EntryCompletion

The auxiliary completion object to use with the entry.

Returns:

#completion=(completion) ⇒ Gtk::EntryCompletion

The auxiliary completion object to use with the entry.

Parameters:

Returns:

#current_icon_drag_sourceInteger

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

Returns:

  • (Integer)

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

#cursor_hadjustmentGtk::Adjustment

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

Returns:

  • (Gtk::Adjustment)

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

#cursor_hadjustment=(adjustment) ⇒ nil

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 gtk_scrolled_window_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.

Parameters:

  • adjustment (Gtk::Adjustment)

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

Returns:

  • (nil)

#cursor_positionInteger

Returns cursor-position.

Returns:

  • (Integer)

    cursor-position

#cursor_position=(cursor_position) ⇒ Integer

Parameters:

  • cursor_position (Integer)

Returns:

  • (Integer)

    cursor-position

  • (Integer)

    cursor-position

#editable=(editable) ⇒ TrueClass

Parameters:

  • editable (TrueClass)

Returns:

  • (TrueClass)

    editable

  • (TrueClass)

    editable

#editable?TrueClass

Returns editable.

Returns:

  • (TrueClass)

    editable

#enable_emoji_completion=(enable_emoji_completion) ⇒ TrueClass

Parameters:

  • enable_emoji_completion (TrueClass)

Returns:

  • (TrueClass)

    enable-emoji-completion

  • (TrueClass)

    enable-emoji-completion

#enable_emoji_completion?TrueClass

Returns enable-emoji-completion.

Returns:

  • (TrueClass)

    enable-emoji-completion

#get_icon_activatable(icon_pos) ⇒ TrueClass

Returns whether the icon is activatable.

Parameters:

Returns:

  • (TrueClass)

    true if the icon is activatable.

#get_icon_area(icon_pos, icon_area) ⇒ nil

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 entry’s allocation.

See also gtk_entry_get_text_area()

Parameters:

  • icon_pos (Gtk::EntryIconPosition)

    Icon position

  • icon_area (Gdk::Rectangle)

    Return location for the icon’s area

Returns:

  • (nil)

#get_icon_at_pos(x, y) ⇒ Integer

Finds the icon at the given position and return its index. The position’s coordinates are relative to the entry’s top left corner. If x, y doesn’t lie inside an icon, -1 is returned. This function is intended for use in a Gtk::Widget::query-tooltip signal handler.

Parameters:

  • x (Integer)

    the x coordinate of the position to find

  • y (Integer)

    the y coordinate of the position to find

Returns:

  • (Integer)

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

#get_icon_gicon(icon_pos) ⇒ Gio::Icon

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

Parameters:

Returns:

  • (Gio::Icon)

    A #GIcon, or nil if no icon is set or if the icon is not a #GIcon

#get_icon_name(icon_pos) ⇒ String

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

Parameters:

Returns:

  • (String)

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

#get_icon_pixbuf(icon_pos) ⇒ GdkPixbuf::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, a #GIcon, a stock item, or an icon name.

Parameters:

Returns:

#get_icon_sensitive(icon_pos) ⇒ TrueClass

Returns whether the icon appears sensitive or insensitive.

Parameters:

Returns:

  • (TrueClass)

    true if the icon is sensitive.

#get_icon_stock(icon_pos) ⇒ String

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

Parameters:

Returns:

  • (String)

    A stock id, or nil if no icon is set or if the icon wasn’t set from a stock id

#get_icon_storage_type(icon_pos) ⇒ Gtk::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 %GTK_IMAGE_EMPTY.

Parameters:

Returns:

#get_icon_tooltip_markup(icon_pos) ⇒ String

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

Parameters:

Returns:

  • (String)

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

#get_icon_tooltip_text(icon_pos) ⇒ String

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

Parameters:

Returns:

  • (String)

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

#get_layout_offsets(x, y) ⇒ nil

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 gtk_entry_layout_index_to_text_index() and gtk_entry_text_index_to_layout_index() are needed to convert byte indices in the layout to byte indices in the entry contents.

Parameters:

  • x (Integer)

    location to store X offset of layout, or nil

  • y (Integer)

    location to store Y offset of layout, or nil

Returns:

  • (nil)

#get_text_area(text_area) ⇒ nil

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

Parameters:

  • text_area (Gdk::Rectangle)

    Return location for the text area.

Returns:

  • (nil)

#grab_focus_without_selectingnil

Causes entry to have keyboard focus.

It behaves like gtk_widget_grab_focus(), except that it doesn’t select the contents of the entry. You only want to call this on some special entries which the user usually doesn’t want to replace all text in, such as search-as-you-type entries.

Returns:

  • (nil)

#has_frameTrueClass

Gets the value set by gtk_entry_set_has_frame().

Returns:

  • (TrueClass)

    whether the entry has a beveled frame

#has_frame=(has_frame) ⇒ TrueClass

Parameters:

  • has_frame (TrueClass)

Returns:

  • (TrueClass)

    has-frame

  • (TrueClass)

    has-frame

#has_frame?TrueClass

Returns has-frame.

Returns:

  • (TrueClass)

    has-frame

#im_context_filter_keypress(event) ⇒ TrueClass

Allow the Gtk::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 gtk_im_context_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 Gtk::Entry. See gtk_text_view_reset_im_context() for an example of use.

Parameters:

  • event (Gdk::EventKey)

    the key event

Returns:

  • (TrueClass)

    true if the input method handled the key event.

#im_moduleString

Which IM (input method) module should be used for this entry. See Gtk::IMContext.

Setting this to a non-nil value overrides the system-wide IM module setting. See the GtkSettings Gtk::Settings:gtk-im-module property.

Returns:

  • (String)

    im-module

#im_module=(im_module) ⇒ String

Which IM (input method) module should be used for this entry. See Gtk::IMContext.

Setting this to a non-nil value overrides the system-wide IM module setting. See the GtkSettings Gtk::Settings:gtk-im-module property.

Parameters:

  • im_module (String)

Returns:

  • (String)

    im-module

  • (String)

    im-module

#inner_borderGtk::Border

Sets the text area’s border between the text and the frame.

Returns:

  • (Gtk::Border)

    inner-border

#inner_border=(inner_border) ⇒ Gtk::Border

Sets the text area’s border between the text and the frame.

Parameters:

  • inner_border (Gtk::Border)

Returns:

  • (Gtk::Border)

    inner-border

  • (Gtk::Border)

    inner-border

#input_hintsGtk::InputHints

Additional hints (beyond Gtk::Entry:input-purpose) that allow input methods to fine-tune their behaviour.

Returns:

#input_hints=(input_hints) ⇒ Gtk::InputHints

Additional hints (beyond Gtk::Entry:input-purpose) that allow input methods to fine-tune their behaviour.

Parameters:

Returns:

#input_purposeGtk::InputPurpose

The purpose of this text field.

This property can be used by on-screen keyboards and other input methods to adjust their behaviour.

Note that setting the purpose to %GTK_INPUT_PURPOSE_PASSWORD or %GTK_INPUT_PURPOSE_PIN is independent from setting Gtk::Entry:visibility.

Returns:

#input_purpose=(input_purpose) ⇒ Gtk::InputPurpose

The purpose of this text field.

This property can be used by on-screen keyboards and other input methods to adjust their behaviour.

Note that setting the purpose to %GTK_INPUT_PURPOSE_PASSWORD or %GTK_INPUT_PURPOSE_PIN is independent from setting Gtk::Entry:visibility.

Parameters:

Returns:

#invisible_charInteger

The invisible character is used when masking entry contents (in "password mode")“). When it is not explicitly set with the Gtk::Entry:invisible-char property, GTK+ determines the character to use from a list of possible candidates, depending on availability in the current font.

This style property allows the theme to prepend a character to the list of candidates.

Returns:

  • (Integer)

    invisible-char

#invisible_char=(invisible_char) ⇒ Integer

The invisible character is used when masking entry contents (in "password mode")“). When it is not explicitly set with the Gtk::Entry:invisible-char property, GTK+ determines the character to use from a list of possible candidates, depending on availability in the current font.

This style property allows the theme to prepend a character to the list of candidates.

Parameters:

  • invisible_char (Integer)

Returns:

  • (Integer)

    invisible-char

  • (Integer)

    invisible-char

#invisible_char_set=(invisible_char_set) ⇒ TrueClass

Whether the invisible char has been set for the Gtk::Entry.

Parameters:

  • invisible_char_set (TrueClass)

Returns:

  • (TrueClass)

    invisible-char-set

  • (TrueClass)

    invisible-char-set

#invisible_char_set?TrueClass

Whether the invisible char has been set for the Gtk::Entry.

Returns:

  • (TrueClass)

    invisible-char-set

#layoutPango::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 gtk_entry_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 gtk_entry_layout_index_to_text_index() and gtk_entry_text_index_to_layout_index() are needed to convert byte indices in the layout to byte indices in the entry contents.

Returns:

#layout_index_to_text_index(layout_index) ⇒ Integer

Converts from a position in the entry’s Pango::Layout (returned by gtk_entry_get_layout()) to a position in the entry contents (returned by gtk_entry_get_text()).

Parameters:

  • layout_index (Integer)

    byte index into the entry layout text

Returns:

  • (Integer)

    byte index into the entry contents

#max_lengthInteger

Returns max-length.

Returns:

  • (Integer)

    max-length

#max_length=(max_length) ⇒ Integer

Parameters:

  • max_length (Integer)

Returns:

  • (Integer)

    max-length

  • (Integer)

    max-length

#max_width_charsInteger

The desired maximum width of the entry, in characters. If this property is set to -1, the width will be calculated automatically.

Returns:

  • (Integer)

    max-width-chars

#max_width_chars=(max_width_chars) ⇒ Integer

The desired maximum width of the entry, in characters. If this property is set to -1, the width will be calculated automatically.

Parameters:

  • max_width_chars (Integer)

Returns:

  • (Integer)

    max-width-chars

  • (Integer)

    max-width-chars

#newGtk::Widget

Creates a new entry.

Returns:

#new_with_buffer(buffer) ⇒ Gtk::Widget

Creates a new entry with the specified text buffer.

Parameters:

Returns:

#overwrite_modeTrueClass

Gets the value set by gtk_entry_set_overwrite_mode().

Returns:

  • (TrueClass)

    whether the text is overwritten when typing.

#overwrite_mode=(overwrite_mode) ⇒ TrueClass

If text is overwritten when typing in the Gtk::Entry.

Parameters:

  • overwrite_mode (TrueClass)

Returns:

  • (TrueClass)

    overwrite-mode

  • (TrueClass)

    overwrite-mode

#overwrite_mode?TrueClass

If text is overwritten when typing in the Gtk::Entry.

Returns:

  • (TrueClass)

    overwrite-mode

#placeholder_textString

The text that will be displayed in the Gtk::Entry when it is empty and unfocused.

Returns:

  • (String)

    placeholder-text

#placeholder_text=(placeholder_text) ⇒ String

The text that will be displayed in the Gtk::Entry when it is empty and unfocused.

Parameters:

  • placeholder_text (String)

Returns:

  • (String)

    placeholder-text

  • (String)

    placeholder-text

#populate_all=(populate_all) ⇒ TrueClass

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

Parameters:

  • populate_all (TrueClass)

Returns:

  • (TrueClass)

    populate-all

  • (TrueClass)

    populate-all

#populate_all?TrueClass

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

Returns:

  • (TrueClass)

    populate-all

#primary_icon_activatable=(primary_icon_activatable) ⇒ TrueClass

Whether the primary icon is activatable.

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

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

Parameters:

  • primary_icon_activatable (TrueClass)

Returns:

  • (TrueClass)

    primary-icon-activatable

  • (TrueClass)

    primary-icon-activatable

#primary_icon_activatable?TrueClass

Whether the primary icon is activatable.

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

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

Returns:

  • (TrueClass)

    primary-icon-activatable

#primary_icon_giconGio::Icon

The #GIcon to use for the primary icon for the entry.

Returns:

#primary_icon_gicon=(primary_icon_gicon) ⇒ Gio::Icon

The #GIcon to use for the primary icon for the entry.

Parameters:

Returns:

#primary_icon_nameString

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

Returns:

  • (String)

    primary-icon-name

#primary_icon_name=(primary_icon_name) ⇒ String

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

Parameters:

  • primary_icon_name (String)

Returns:

  • (String)

    primary-icon-name

  • (String)

    primary-icon-name

#primary_icon_pixbufGdkPixbuf::Pixbuf

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

Returns:

#primary_icon_pixbuf=(primary_icon_pixbuf) ⇒ GdkPixbuf::Pixbuf

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

Parameters:

Returns:

#primary_icon_sensitive=(primary_icon_sensitive) ⇒ TrueClass

Whether the primary icon is sensitive.

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

Parameters:

  • primary_icon_sensitive (TrueClass)

Returns:

  • (TrueClass)

    primary-icon-sensitive

  • (TrueClass)

    primary-icon-sensitive

#primary_icon_sensitive?TrueClass

Whether the primary icon is sensitive.

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

Returns:

  • (TrueClass)

    primary-icon-sensitive

#primary_icon_stockString

The stock id to use for the primary icon for the entry.

Returns:

  • (String)

    primary-icon-stock

#primary_icon_stock=(primary_icon_stock) ⇒ String

The stock id to use for the primary icon for the entry.

Parameters:

  • primary_icon_stock (String)

Returns:

  • (String)

    primary-icon-stock

  • (String)

    primary-icon-stock

#primary_icon_storage_typeGtk::ImageType

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

Returns:

#primary_icon_storage_type=(primary_icon_storage_type) ⇒ Gtk::ImageType

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

Parameters:

Returns:

#primary_icon_tooltip_markupString

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

Also see gtk_entry_set_icon_tooltip_markup().

Returns:

  • (String)

    primary-icon-tooltip-markup

#primary_icon_tooltip_markup=(primary_icon_tooltip_markup) ⇒ String

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

Also see gtk_entry_set_icon_tooltip_markup().

Parameters:

  • primary_icon_tooltip_markup (String)

Returns:

  • (String)

    primary-icon-tooltip-markup

  • (String)

    primary-icon-tooltip-markup

#primary_icon_tooltip_textString

The contents of the tooltip on the primary icon.

Also see gtk_entry_set_icon_tooltip_text().

Returns:

  • (String)

    primary-icon-tooltip-text

#primary_icon_tooltip_text=(primary_icon_tooltip_text) ⇒ String

The contents of the tooltip on the primary icon.

Also see gtk_entry_set_icon_tooltip_text().

Parameters:

  • primary_icon_tooltip_text (String)

Returns:

  • (String)

    primary-icon-tooltip-text

  • (String)

    primary-icon-tooltip-text

#progress_fractionFloat

The current fraction of the task that’s been completed.

Returns:

  • (Float)

    progress-fraction

#progress_fraction=(progress_fraction) ⇒ Float

The current fraction of the task that’s been completed.

Parameters:

  • progress_fraction (Float)

Returns:

  • (Float)

    progress-fraction

  • (Float)

    progress-fraction

#progress_pulsenil

Indicates that some progress is made, but you don’t know how much. Causes the entry’s progress indicator to enter “activity mode,” where a block bounces back and forth. Each call to gtk_entry_progress_pulse() causes the block to move by a little bit (the amount of movement per pulse is determined by gtk_entry_set_progress_pulse_step()).

Returns:

  • (nil)

#progress_pulse_stepFloat

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

Returns:

  • (Float)

    progress-pulse-step

#progress_pulse_step=(progress_pulse_step) ⇒ Float

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

Parameters:

  • progress_pulse_step (Float)

Returns:

  • (Float)

    progress-pulse-step

  • (Float)

    progress-pulse-step

#reset_im_contextnil

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.

Returns:

  • (nil)

#scroll_offsetInteger

Returns scroll-offset.

Returns:

  • (Integer)

    scroll-offset

#scroll_offset=(scroll_offset) ⇒ Integer

Parameters:

  • scroll_offset (Integer)

Returns:

  • (Integer)

    scroll-offset

  • (Integer)

    scroll-offset

#secondary_icon_activatable=(secondary_icon_activatable) ⇒ TrueClass

Whether the secondary icon is activatable.

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

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

Parameters:

  • secondary_icon_activatable (TrueClass)

Returns:

  • (TrueClass)

    secondary-icon-activatable

  • (TrueClass)

    secondary-icon-activatable

#secondary_icon_activatable?TrueClass

Whether the secondary icon is activatable.

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

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

Returns:

  • (TrueClass)

    secondary-icon-activatable

#secondary_icon_giconGio::Icon

The #GIcon to use for the secondary icon for the entry.

Returns:

#secondary_icon_gicon=(secondary_icon_gicon) ⇒ Gio::Icon

The #GIcon to use for the secondary icon for the entry.

Parameters:

Returns:

#secondary_icon_nameString

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

Returns:

  • (String)

    secondary-icon-name

#secondary_icon_name=(secondary_icon_name) ⇒ String

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

Parameters:

  • secondary_icon_name (String)

Returns:

  • (String)

    secondary-icon-name

  • (String)

    secondary-icon-name

#secondary_icon_pixbufGdkPixbuf::Pixbuf

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

Returns:

#secondary_icon_pixbuf=(secondary_icon_pixbuf) ⇒ GdkPixbuf::Pixbuf

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

Parameters:

Returns:

#secondary_icon_sensitive=(secondary_icon_sensitive) ⇒ TrueClass

Whether the secondary icon is sensitive.

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

Parameters:

  • secondary_icon_sensitive (TrueClass)

Returns:

  • (TrueClass)

    secondary-icon-sensitive

  • (TrueClass)

    secondary-icon-sensitive

#secondary_icon_sensitive?TrueClass

Whether the secondary icon is sensitive.

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

Returns:

  • (TrueClass)

    secondary-icon-sensitive

#secondary_icon_stockString

The stock id to use for the secondary icon for the entry.

Returns:

  • (String)

    secondary-icon-stock

#secondary_icon_stock=(secondary_icon_stock) ⇒ String

The stock id to use for the secondary icon for the entry.

Parameters:

  • secondary_icon_stock (String)

Returns:

  • (String)

    secondary-icon-stock

  • (String)

    secondary-icon-stock

#secondary_icon_storage_typeGtk::ImageType

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

Returns:

#secondary_icon_storage_type=(secondary_icon_storage_type) ⇒ Gtk::ImageType

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

Parameters:

Returns:

#secondary_icon_tooltip_markupString

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

Also see gtk_entry_set_icon_tooltip_markup().

Returns:

  • (String)

    secondary-icon-tooltip-markup

#secondary_icon_tooltip_markup=(secondary_icon_tooltip_markup) ⇒ String

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

Also see gtk_entry_set_icon_tooltip_markup().

Parameters:

  • secondary_icon_tooltip_markup (String)

Returns:

  • (String)

    secondary-icon-tooltip-markup

  • (String)

    secondary-icon-tooltip-markup

#secondary_icon_tooltip_textString

The contents of the tooltip on the secondary icon.

Also see gtk_entry_set_icon_tooltip_text().

Returns:

  • (String)

    secondary-icon-tooltip-text

#secondary_icon_tooltip_text=(secondary_icon_tooltip_text) ⇒ String

The contents of the tooltip on the secondary icon.

Also see gtk_entry_set_icon_tooltip_text().

Parameters:

  • secondary_icon_tooltip_text (String)

Returns:

  • (String)

    secondary-icon-tooltip-text

  • (String)

    secondary-icon-tooltip-text

#selection_boundInteger

Returns selection-bound.

Returns:

  • (Integer)

    selection-bound

#selection_bound=(selection_bound) ⇒ Integer

Parameters:

  • selection_bound (Integer)

Returns:

  • (Integer)

    selection-bound

  • (Integer)

    selection-bound

#set_icon_activatable(icon_pos, activatable) ⇒ nil

Sets whether the icon is activatable.

Parameters:

  • icon_pos (Gtk::EntryIconPosition)

    Icon position

  • activatable (TrueClass)

    true if the icon should be activatable

Returns:

  • (nil)

#set_icon_drag_source(icon_pos, target_list, actions) ⇒ nil

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 Gtk::Widget::drag-data-get (or possibly #GtkWidget::drag-data-delete) signal, and use gtk_entry_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 Gtk::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.

Parameters:

  • icon_pos (Gtk::EntryIconPosition)

    icon position

  • target_list (Gtk::TargetList)

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

  • actions (Gdk::DragAction)

    a bitmask of the allowed drag actions

Returns:

  • (nil)

#set_icon_from_gicon(icon_pos, icon) ⇒ nil

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 nil, no icon will be shown in the specified position.

Parameters:

Returns:

  • (nil)

#set_icon_from_icon_name(icon_pos, icon_name) ⇒ nil

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 nil, no icon will be shown in the specified position.

Parameters:

  • icon_pos (Gtk::EntryIconPosition)

    The position at which to set the icon

  • icon_name (String)

    An icon name, or nil

Returns:

  • (nil)

#set_icon_from_pixbuf(icon_pos, pixbuf) ⇒ nil

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

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

Parameters:

Returns:

  • (nil)

#set_icon_from_stock(icon_pos, stock_id) ⇒ nil

Sets the icon shown in the entry at the specified position from a stock image.

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

Parameters:

  • icon_pos (Gtk::EntryIconPosition)

    Icon position

  • stock_id (String)

    The name of the stock item, or nil

Returns:

  • (nil)

#set_icon_sensitive(icon_pos, sensitive) ⇒ nil

Sets the sensitivity for the specified icon.

Parameters:

  • icon_pos (Gtk::EntryIconPosition)

    Icon position

  • sensitive (TrueClass)

    Specifies whether the icon should appear sensitive or insensitive

Returns:

  • (nil)

#set_icon_tooltip_markup(icon_pos, tooltip) ⇒ nil

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].

Use nil for tooltip to remove an existing tooltip.

See also gtk_widget_set_tooltip_markup() and gtk_entry_set_icon_tooltip_text().

Parameters:

  • icon_pos (Gtk::EntryIconPosition)

    the icon position

  • tooltip (String)

    the contents of the tooltip for the icon, or nil

Returns:

  • (nil)

#set_icon_tooltip_text(icon_pos, tooltip) ⇒ nil

Sets tooltip as the contents of the tooltip for the icon at the specified position.

Use nil for tooltip to remove an existing tooltip.

See also gtk_widget_set_tooltip_text() and gtk_entry_set_icon_tooltip_markup().

If you unset the widget tooltip via gtk_widget_set_tooltip_text() or gtk_widget_set_tooltip_markup(), this sets GtkWidget:has-tooltip to false, which suppresses icon tooltips too. You can resolve this by then calling gtk_widget_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.

Parameters:

  • icon_pos (Gtk::EntryIconPosition)

    the icon position

  • tooltip (String)

    the contents of the tooltip for the icon, or nil

Returns:

  • (nil)

#shadow_typeGtk::ShadowType

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

Returns:

#shadow_type=(shadow_type) ⇒ Gtk::ShadowType

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

Parameters:

Returns:

#show_emoji_icon=(show_emoji_icon) ⇒ TrueClass

Parameters:

  • show_emoji_icon (TrueClass)

Returns:

  • (TrueClass)

    show-emoji-icon

  • (TrueClass)

    show-emoji-icon

#show_emoji_icon?TrueClass

Returns show-emoji-icon.

Returns:

  • (TrueClass)

    show-emoji-icon

#tabsPango::TabArray

Returns tabs.

Returns:

  • (Pango::TabArray)

    tabs

#tabs=(tabs) ⇒ Pango::TabArray

Parameters:

  • tabs (Pango::TabArray)

Returns:

  • (Pango::TabArray)

    tabs

  • (Pango::TabArray)

    tabs

#textString

Returns text.

Returns:

  • (String)

    text

#text=(text) ⇒ String

Parameters:

  • text (String)

Returns:

  • (String)

    text

  • (String)

    text

#text_index_to_layout_index(text_index) ⇒ Integer

Converts from a position in the entry contents (returned by gtk_entry_get_text()) to a position in the entry’s Pango::Layout (returned by gtk_entry_get_layout(), with text retrieved via pango_layout_get_text()).

Parameters:

  • text_index (Integer)

    byte index into the entry contents

Returns:

  • (Integer)

    byte index into the entry layout text

#text_lengthInteger

The length of the text in the Gtk::Entry.

Returns:

  • (Integer)

    text-length

#text_length=(text_length) ⇒ Integer

The length of the text in the Gtk::Entry.

Parameters:

  • text_length (Integer)

Returns:

  • (Integer)

    text-length

  • (Integer)

    text-length

#truncate_multiline=(truncate_multiline) ⇒ TrueClass

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

Parameters:

  • truncate_multiline (TrueClass)

Returns:

  • (TrueClass)

    truncate-multiline

  • (TrueClass)

    truncate-multiline

#truncate_multiline?TrueClass

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

Returns:

  • (TrueClass)

    truncate-multiline

#unset_invisible_charnil

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

Returns:

  • (nil)

#visibilityTrueClass

Retrieves whether the text in entry is visible. See gtk_entry_set_visibility().

Returns:

  • (TrueClass)

    true if the text is currently visible

#visibility=(visibility) ⇒ TrueClass

Parameters:

  • visibility (TrueClass)

Returns:

  • (TrueClass)

    visibility

  • (TrueClass)

    visibility

#visibility?TrueClass

Returns visibility.

Returns:

  • (TrueClass)

    visibility

#width_charsInteger

Returns width-chars.

Returns:

  • (Integer)

    width-chars

#width_chars=(width_chars) ⇒ Integer

Parameters:

  • width_chars (Integer)

Returns:

  • (Integer)

    width-chars

  • (Integer)

    width-chars

#xalignGtk::gfloat

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

Returns:

  • (Gtk::gfloat)

    xalign

#xalign=(xalign) ⇒ Gtk::gfloat

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

Parameters:

  • xalign (Gtk::gfloat)

Returns:

  • (Gtk::gfloat)

    xalign

  • (Gtk::gfloat)

    xalign