Class: Gtk::Entry
- Inherits:
-
Object
- Object
- Gtk::Entry
- 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
-
#activates_default ⇒ TrueClass
Retrieves the value set by gtk_entry_set_activates_default().
- #activates_default=(activates_default) ⇒ TrueClass
-
#activates_default? ⇒ TrueClass
Activates-default.
-
#alignment ⇒ Gtk::gfloat
Gets the value set by gtk_entry_set_alignment().
-
#alignment=(xalign) ⇒ nil
Sets the alignment for the contents of the entry.
-
#attributes ⇒ Pango::AttrList
A list of Pango attributes to apply to the text of the entry.
-
#attributes=(attributes) ⇒ Pango::AttrList
A list of Pango attributes to apply to the text of the entry.
-
#buffer ⇒ Gtk::EntryBuffer
Buffer.
- #buffer=(buffer) ⇒ Gtk::EntryBuffer
-
#caps_lock_warning=(caps_lock_warning) ⇒ TrueClass
Whether password entries will show a warning when Caps Lock is on.
-
#caps_lock_warning? ⇒ TrueClass
Whether password entries will show a warning when Caps Lock is on.
-
#completion ⇒ Gtk::EntryCompletion
The auxiliary completion object to use with the entry.
-
#completion=(completion) ⇒ Gtk::EntryCompletion
The auxiliary completion object to use with the entry.
-
#current_icon_drag_source ⇒ Integer
Returns the index of the icon which is the source of the current DND operation, or -1.
-
#cursor_hadjustment ⇒ Gtk::Adjustment
Retrieves the horizontal cursor adjustment for the entry.
-
#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.
-
#cursor_position ⇒ Integer
Cursor-position.
- #cursor_position=(cursor_position) ⇒ Integer
- #editable=(editable) ⇒ TrueClass
-
#editable? ⇒ TrueClass
Editable.
- #enable_emoji_completion=(enable_emoji_completion) ⇒ TrueClass
-
#enable_emoji_completion? ⇒ TrueClass
Enable-emoji-completion.
-
#get_icon_activatable(icon_pos) ⇒ TrueClass
Returns whether the icon is activatable.
-
#get_icon_area(icon_pos, icon_area) ⇒ nil
Gets the area where entry’s icon at icon_pos is drawn.
-
#get_icon_at_pos(x, y) ⇒ Integer
Finds the icon at the given position and return its index.
-
#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).
-
#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).
-
#get_icon_pixbuf(icon_pos) ⇒ GdkPixbuf::Pixbuf
Retrieves the image used for the icon.
-
#get_icon_sensitive(icon_pos) ⇒ TrueClass
Returns whether the icon appears sensitive or insensitive.
-
#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).
-
#get_icon_storage_type(icon_pos) ⇒ Gtk::ImageType
Gets the type of representation being used by the icon to store image data.
-
#get_icon_tooltip_markup(icon_pos) ⇒ String
Gets the contents of the tooltip on the icon at the specified position in entry.
-
#get_icon_tooltip_text(icon_pos) ⇒ String
Gets the contents of the tooltip on the icon at the specified position in entry.
-
#get_layout_offsets(x, y) ⇒ nil
Obtains the position of the Pango::Layout used to render text in the entry, in widget coordinates.
-
#get_text_area(text_area) ⇒ nil
Gets the area where the entry’s text is drawn.
-
#grab_focus_without_selecting ⇒ nil
Causes entry to have keyboard focus.
-
#has_frame ⇒ TrueClass
Gets the value set by gtk_entry_set_has_frame().
- #has_frame=(has_frame) ⇒ TrueClass
-
#has_frame? ⇒ TrueClass
Has-frame.
-
#im_context_filter_keypress(event) ⇒ TrueClass
Allow the Gtk::Entry input method to internally handle key press and release events.
-
#im_module ⇒ String
Which IM (input method) module should be used for this entry.
-
#im_module=(im_module) ⇒ String
Which IM (input method) module should be used for this entry.
-
#inner_border ⇒ Gtk::Border
Sets the text area’s border between the text and the frame.
-
#inner_border=(inner_border) ⇒ Gtk::Border
Sets the text area’s border between the text and the frame.
-
#input_hints ⇒ Gtk::InputHints
Additional hints (beyond Gtk::Entry:input-purpose) that allow input methods to fine-tune their behaviour.
-
#input_hints=(input_hints) ⇒ Gtk::InputHints
Additional hints (beyond Gtk::Entry:input-purpose) that allow input methods to fine-tune their behaviour.
-
#input_purpose ⇒ Gtk::InputPurpose
The purpose of this text field.
-
#input_purpose=(input_purpose) ⇒ Gtk::InputPurpose
The purpose of this text field.
-
#invisible_char ⇒ Integer
The invisible character is used when masking entry contents (in "password mode")“).
-
#invisible_char=(invisible_char) ⇒ Integer
The invisible character is used when masking entry contents (in "password mode")“).
-
#invisible_char_set=(invisible_char_set) ⇒ TrueClass
Whether the invisible char has been set for the Gtk::Entry.
-
#invisible_char_set? ⇒ TrueClass
Whether the invisible char has been set for the Gtk::Entry.
-
#layout ⇒ Pango::Layout
Gets the Pango::Layout used to display the entry.
-
#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()).
-
#max_length ⇒ Integer
Max-length.
- #max_length=(max_length) ⇒ Integer
-
#max_width_chars ⇒ Integer
The desired maximum width of the entry, in characters.
-
#max_width_chars=(max_width_chars) ⇒ Integer
The desired maximum width of the entry, in characters.
-
#new ⇒ Gtk::Widget
Creates a new entry.
-
#new_with_buffer(buffer) ⇒ Gtk::Widget
Creates a new entry with the specified text buffer.
-
#overwrite_mode ⇒ TrueClass
Gets the value set by gtk_entry_set_overwrite_mode().
-
#overwrite_mode=(overwrite_mode) ⇒ TrueClass
If text is overwritten when typing in the Gtk::Entry.
-
#overwrite_mode? ⇒ TrueClass
If text is overwritten when typing in the Gtk::Entry.
-
#placeholder_text ⇒ String
The text that will be displayed in the Gtk::Entry when it is empty and unfocused.
-
#placeholder_text=(placeholder_text) ⇒ String
The text that will be displayed in the Gtk::Entry when it is empty and unfocused.
-
#populate_all=(populate_all) ⇒ TrueClass
If :populate-all is true, the Gtk::Entry::populate-popup signal is also emitted for touch popups.
-
#populate_all? ⇒ TrueClass
If :populate-all is true, the Gtk::Entry::populate-popup signal is also emitted for touch popups.
-
#primary_icon_activatable=(primary_icon_activatable) ⇒ TrueClass
Whether the primary icon is activatable.
-
#primary_icon_activatable? ⇒ TrueClass
Whether the primary icon is activatable.
-
#primary_icon_gicon ⇒ Gio::Icon
The #GIcon to use for the primary icon for the entry.
-
#primary_icon_gicon=(primary_icon_gicon) ⇒ Gio::Icon
The #GIcon to use for the primary icon for the entry.
-
#primary_icon_name ⇒ String
The icon name to use for the primary icon for the entry.
-
#primary_icon_name=(primary_icon_name) ⇒ String
The icon name to use for the primary icon for the entry.
-
#primary_icon_pixbuf ⇒ GdkPixbuf::Pixbuf
A pixbuf to use as the primary icon for the entry.
-
#primary_icon_pixbuf=(primary_icon_pixbuf) ⇒ GdkPixbuf::Pixbuf
A pixbuf to use as the primary icon for the entry.
-
#primary_icon_sensitive=(primary_icon_sensitive) ⇒ TrueClass
Whether the primary icon is sensitive.
-
#primary_icon_sensitive? ⇒ TrueClass
Whether the primary icon is sensitive.
-
#primary_icon_stock ⇒ String
The stock id to use for the primary icon for the entry.
-
#primary_icon_stock=(primary_icon_stock) ⇒ String
The stock id to use for the primary icon for the entry.
-
#primary_icon_storage_type ⇒ Gtk::ImageType
The representation which is used for the primary icon of the entry.
-
#primary_icon_storage_type=(primary_icon_storage_type) ⇒ Gtk::ImageType
The representation which is used for the primary icon of the entry.
-
#primary_icon_tooltip_markup ⇒ String
The contents of the tooltip on the primary icon, which is marked up with the [Pango text markup language].
-
#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].
-
#primary_icon_tooltip_text ⇒ String
The contents of the tooltip on the primary icon.
-
#primary_icon_tooltip_text=(primary_icon_tooltip_text) ⇒ String
The contents of the tooltip on the primary icon.
-
#progress_fraction ⇒ Float
The current fraction of the task that’s been completed.
-
#progress_fraction=(progress_fraction) ⇒ Float
The current fraction of the task that’s been completed.
-
#progress_pulse ⇒ nil
Indicates that some progress is made, but you don’t know how much.
-
#progress_pulse_step ⇒ Float
The fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse().
-
#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().
-
#reset_im_context ⇒ nil
Reset the input method context of the entry if needed.
-
#scroll_offset ⇒ Integer
Scroll-offset.
- #scroll_offset=(scroll_offset) ⇒ Integer
-
#secondary_icon_activatable=(secondary_icon_activatable) ⇒ TrueClass
Whether the secondary icon is activatable.
-
#secondary_icon_activatable? ⇒ TrueClass
Whether the secondary icon is activatable.
-
#secondary_icon_gicon ⇒ Gio::Icon
The #GIcon to use for the secondary icon for the entry.
-
#secondary_icon_gicon=(secondary_icon_gicon) ⇒ Gio::Icon
The #GIcon to use for the secondary icon for the entry.
-
#secondary_icon_name ⇒ String
The icon name to use for the secondary icon for the entry.
-
#secondary_icon_name=(secondary_icon_name) ⇒ String
The icon name to use for the secondary icon for the entry.
-
#secondary_icon_pixbuf ⇒ GdkPixbuf::Pixbuf
An pixbuf to use as the secondary icon for the entry.
-
#secondary_icon_pixbuf=(secondary_icon_pixbuf) ⇒ GdkPixbuf::Pixbuf
An pixbuf to use as the secondary icon for the entry.
-
#secondary_icon_sensitive=(secondary_icon_sensitive) ⇒ TrueClass
Whether the secondary icon is sensitive.
-
#secondary_icon_sensitive? ⇒ TrueClass
Whether the secondary icon is sensitive.
-
#secondary_icon_stock ⇒ String
The stock id to use for the secondary icon for the entry.
-
#secondary_icon_stock=(secondary_icon_stock) ⇒ String
The stock id to use for the secondary icon for the entry.
-
#secondary_icon_storage_type ⇒ Gtk::ImageType
The representation which is used for the secondary icon of the entry.
-
#secondary_icon_storage_type=(secondary_icon_storage_type) ⇒ Gtk::ImageType
The representation which is used for the secondary icon of the entry.
-
#secondary_icon_tooltip_markup ⇒ String
The contents of the tooltip on the secondary icon, which is marked up with the [Pango text markup language].
-
#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].
-
#secondary_icon_tooltip_text ⇒ String
The contents of the tooltip on the secondary icon.
-
#secondary_icon_tooltip_text=(secondary_icon_tooltip_text) ⇒ String
The contents of the tooltip on the secondary icon.
-
#selection_bound ⇒ Integer
Selection-bound.
- #selection_bound=(selection_bound) ⇒ Integer
-
#set_icon_activatable(icon_pos, activatable) ⇒ nil
Sets whether the icon is activatable.
-
#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.
-
#set_icon_from_gicon(icon_pos, icon) ⇒ nil
Sets the icon shown in the entry at the specified position from the current icon theme.
-
#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.
-
#set_icon_from_pixbuf(icon_pos, pixbuf) ⇒ nil
Sets the icon shown in the specified position using a pixbuf.
-
#set_icon_from_stock(icon_pos, stock_id) ⇒ nil
Sets the icon shown in the entry at the specified position from a stock image.
-
#set_icon_sensitive(icon_pos, sensitive) ⇒ nil
Sets the sensitivity for the specified icon.
-
#set_icon_tooltip_markup(icon_pos, tooltip) ⇒ nil
Sets tooltip as the contents of the tooltip for the icon at the specified position.
-
#set_icon_tooltip_text(icon_pos, tooltip) ⇒ nil
Sets tooltip as the contents of the tooltip for the icon at the specified position.
-
#shadow_type ⇒ Gtk::ShadowType
Which kind of shadow to draw around the entry when Gtk::Entry:has-frame is set to true.
-
#shadow_type=(shadow_type) ⇒ Gtk::ShadowType
Which kind of shadow to draw around the entry when Gtk::Entry:has-frame is set to true.
- #show_emoji_icon=(show_emoji_icon) ⇒ TrueClass
-
#show_emoji_icon? ⇒ TrueClass
Show-emoji-icon.
-
#tabs ⇒ Pango::TabArray
Tabs.
- #tabs=(tabs) ⇒ Pango::TabArray
-
#text ⇒ String
Text.
- #text=(text) ⇒ String
-
#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()).
-
#text_length ⇒ Integer
The length of the text in the Gtk::Entry.
-
#text_length=(text_length) ⇒ Integer
The length of the text in the Gtk::Entry.
-
#truncate_multiline=(truncate_multiline) ⇒ TrueClass
When true, pasted multi-line text is truncated to the first line.
-
#truncate_multiline? ⇒ TrueClass
When true, pasted multi-line text is truncated to the first line.
-
#unset_invisible_char ⇒ nil
Unsets the invisible char previously set with gtk_entry_set_invisible_char().
-
#visibility ⇒ TrueClass
Retrieves whether the text in entry is visible.
- #visibility=(visibility) ⇒ TrueClass
-
#visibility? ⇒ TrueClass
Visibility.
-
#width_chars ⇒ Integer
Width-chars.
- #width_chars=(width_chars) ⇒ Integer
-
#xalign ⇒ Gtk::gfloat
The horizontal alignment, from 0 (left) to 1 (right).
-
#xalign=(xalign) ⇒ Gtk::gfloat
The horizontal alignment, from 0 (left) to 1 (right).
Instance Method Details
#activates_default ⇒ TrueClass
Retrieves the value set by gtk_entry_set_activates_default().
#activates_default=(activates_default) ⇒ TrueClass
#activates_default? ⇒ TrueClass
Returns activates-default.
#alignment ⇒ Gtk::gfloat
Gets the value set by gtk_entry_set_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.
#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.
#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.
#buffer ⇒ Gtk::EntryBuffer
Returns buffer.
#buffer=(buffer) ⇒ Gtk::EntryBuffer
#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.
#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.
#completion ⇒ Gtk::EntryCompletion
The auxiliary completion object to use with the entry.
#completion=(completion) ⇒ Gtk::EntryCompletion
The auxiliary completion object to use with the entry.
#current_icon_drag_source ⇒ Integer
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.
#cursor_hadjustment ⇒ Gtk::Adjustment
Retrieves the horizontal cursor adjustment for the entry. See gtk_entry_set_cursor_hadjustment().
#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.
#cursor_position ⇒ Integer
Returns cursor-position.
#cursor_position=(cursor_position) ⇒ Integer
#editable=(editable) ⇒ TrueClass
#editable? ⇒ TrueClass
Returns editable.
#enable_emoji_completion=(enable_emoji_completion) ⇒ TrueClass
#enable_emoji_completion? ⇒ TrueClass
Returns enable-emoji-completion.
#get_icon_activatable(icon_pos) ⇒ TrueClass
Returns whether 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()
#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.
#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).
#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).
#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.
#get_icon_sensitive(icon_pos) ⇒ TrueClass
Returns whether the icon appears sensitive or insensitive.
#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).
#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.
#get_icon_tooltip_markup(icon_pos) ⇒ String
Gets the contents of the tooltip on the icon at the specified position in entry.
#get_icon_tooltip_text(icon_pos) ⇒ String
Gets the contents of the tooltip on the icon at the specified position in entry.
#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.
#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().
#grab_focus_without_selecting ⇒ nil
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.
#has_frame ⇒ TrueClass
Gets the value set by gtk_entry_set_has_frame().
#has_frame=(has_frame) ⇒ TrueClass
#has_frame? ⇒ TrueClass
Returns 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.
#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.
#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.
#inner_border ⇒ Gtk::Border
Sets the text area’s border between the text and the frame.
#inner_border=(inner_border) ⇒ Gtk::Border
Sets the text area’s border between the text and the frame.
#input_hints ⇒ Gtk::InputHints
Additional hints (beyond Gtk::Entry:input-purpose) that allow input methods to fine-tune their behaviour.
#input_hints=(input_hints) ⇒ Gtk::InputHints
Additional hints (beyond Gtk::Entry:input-purpose) that allow input methods to fine-tune their behaviour.
#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.
#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.
#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.
#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.
#invisible_char_set=(invisible_char_set) ⇒ TrueClass
Whether the invisible char has been set for the Gtk::Entry.
#invisible_char_set? ⇒ TrueClass
Whether the invisible char has been set for the Gtk::Entry.
#layout ⇒ Pango::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.
#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()).
#max_length ⇒ Integer
Returns max-length.
#max_length=(max_length) ⇒ Integer
#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.
#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.
#new ⇒ Gtk::Widget
Creates a new entry.
#new_with_buffer(buffer) ⇒ Gtk::Widget
Creates a new entry with the specified text buffer.
#overwrite_mode ⇒ TrueClass
Gets the value set by gtk_entry_set_overwrite_mode().
#overwrite_mode=(overwrite_mode) ⇒ TrueClass
If text is overwritten when typing in the Gtk::Entry.
#overwrite_mode? ⇒ TrueClass
If text is overwritten when typing in the Gtk::Entry.
#placeholder_text ⇒ String
The text that will be displayed in the Gtk::Entry when it is empty and unfocused.
#placeholder_text=(placeholder_text) ⇒ String
The text that will be displayed in the Gtk::Entry when it is empty and unfocused.
#populate_all=(populate_all) ⇒ TrueClass
If :populate-all is true, the Gtk::Entry::populate-popup signal is also emitted for touch popups.
#populate_all? ⇒ TrueClass
If :populate-all is true, the Gtk::Entry::populate-popup signal is also emitted for touch popups.
#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.
#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.
#primary_icon_gicon ⇒ Gio::Icon
The #GIcon to use for the primary icon for the entry.
#primary_icon_gicon=(primary_icon_gicon) ⇒ Gio::Icon
The #GIcon to use for the primary icon for the entry.
#primary_icon_name ⇒ String
The icon name to use for the primary icon for the entry.
#primary_icon_name=(primary_icon_name) ⇒ String
The icon name to use for the primary icon for the entry.
#primary_icon_pixbuf ⇒ GdkPixbuf::Pixbuf
A pixbuf to use as the primary icon for the entry.
#primary_icon_pixbuf=(primary_icon_pixbuf) ⇒ GdkPixbuf::Pixbuf
A pixbuf to use as the primary icon for the entry.
#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.
#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.
#primary_icon_stock ⇒ String
The stock id to use for the primary icon for the entry.
#primary_icon_stock=(primary_icon_stock) ⇒ String
The stock id to use for the primary icon for the entry.
#primary_icon_storage_type ⇒ Gtk::ImageType
The representation which is used for the primary icon of the entry.
#primary_icon_storage_type=(primary_icon_storage_type) ⇒ Gtk::ImageType
The representation which is used for the primary icon of the entry.
#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().
#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().
#primary_icon_tooltip_text ⇒ String
The contents of the tooltip on the primary icon.
Also see gtk_entry_set_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().
#progress_fraction ⇒ Float
The current fraction of the task that’s been completed.
#progress_fraction=(progress_fraction) ⇒ Float
The current fraction of the task that’s been completed.
#progress_pulse ⇒ nil
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()).
#progress_pulse_step ⇒ Float
The fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse().
#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().
#reset_im_context ⇒ nil
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.
#scroll_offset ⇒ Integer
Returns scroll-offset.
#scroll_offset=(scroll_offset) ⇒ Integer
#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.
#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.
#secondary_icon_gicon ⇒ Gio::Icon
The #GIcon to use for the secondary icon for the entry.
#secondary_icon_gicon=(secondary_icon_gicon) ⇒ Gio::Icon
The #GIcon to use for the secondary icon for the entry.
#secondary_icon_name ⇒ String
The icon name to use for the secondary icon for the entry.
#secondary_icon_name=(secondary_icon_name) ⇒ String
The icon name to use for the secondary icon for the entry.
#secondary_icon_pixbuf ⇒ GdkPixbuf::Pixbuf
An pixbuf to use as the secondary icon for the entry.
#secondary_icon_pixbuf=(secondary_icon_pixbuf) ⇒ GdkPixbuf::Pixbuf
An pixbuf to use as the secondary icon for the entry.
#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.
#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.
#secondary_icon_stock ⇒ String
The stock id to use for the secondary icon for the entry.
#secondary_icon_stock=(secondary_icon_stock) ⇒ String
The stock id to use for the secondary icon for the entry.
#secondary_icon_storage_type ⇒ Gtk::ImageType
The representation which is used for the secondary icon of the entry.
#secondary_icon_storage_type=(secondary_icon_storage_type) ⇒ Gtk::ImageType
The representation which is used for the secondary icon of the entry.
#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().
#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().
#secondary_icon_tooltip_text ⇒ String
The contents of the tooltip on the secondary icon.
Also see gtk_entry_set_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().
#selection_bound ⇒ Integer
Returns selection-bound.
#selection_bound=(selection_bound) ⇒ Integer
#set_icon_activatable(icon_pos, activatable) ⇒ nil
Sets whether the icon is activatable.
#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.
#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.
#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.
#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.
#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.
#set_icon_sensitive(icon_pos, sensitive) ⇒ nil
Sets the sensitivity for the specified icon.
#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().
#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.
#shadow_type ⇒ Gtk::ShadowType
Which kind of shadow to draw around the entry when Gtk::Entry:has-frame is set to true.
#shadow_type=(shadow_type) ⇒ Gtk::ShadowType
Which kind of shadow to draw around the entry when Gtk::Entry:has-frame is set to true.
#show_emoji_icon=(show_emoji_icon) ⇒ TrueClass
#show_emoji_icon? ⇒ TrueClass
Returns show-emoji-icon.
#tabs ⇒ Pango::TabArray
Returns tabs.
#tabs=(tabs) ⇒ Pango::TabArray
#text ⇒ String
Returns text.
#text=(text) ⇒ String
#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()).
#text_length ⇒ Integer
The length of the text in the Gtk::Entry.
#text_length=(text_length) ⇒ Integer
The length of the text in the Gtk::Entry.
#truncate_multiline=(truncate_multiline) ⇒ TrueClass
When true, pasted multi-line text is truncated to the first line.
#truncate_multiline? ⇒ TrueClass
When true, pasted multi-line text is truncated to the first line.
#unset_invisible_char ⇒ nil
Unsets the invisible char previously set with gtk_entry_set_invisible_char(). So that the default invisible char is used again.
#visibility ⇒ TrueClass
Retrieves whether the text in entry is visible. See gtk_entry_set_visibility().
#visibility=(visibility) ⇒ TrueClass
#visibility? ⇒ TrueClass
Returns visibility.
#width_chars ⇒ Integer
Returns width-chars.
#width_chars=(width_chars) ⇒ Integer
#xalign ⇒ Gtk::gfloat
The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.
#xalign=(xalign) ⇒ Gtk::gfloat
The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.