Class: Gtk::Entry
- Defined in:
- lib/gtk4/entry.rb
Overview
Class structure for GtkEntry. 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 ⇒ Boolean
Retrieves the value set by gtk_entry_set_activates_default().
-
#activates_default=(activates_default) ⇒ Boolean
Whether to activate the default widget when Enter is pressed.
-
#activates_default? ⇒ Boolean
Whether to activate the default widget when Enter is pressed.
-
#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.
-
#buffer ⇒ Gtk::EntryBuffer
The buffer object which actually stores the text.
-
#buffer=(buffer) ⇒ Gtk::EntryBuffer
The buffer object which actually stores the text.
-
#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.
-
#enable_emoji_completion=(enable_emoji_completion) ⇒ Boolean
Whether to suggest Emoji replacements for :-delimited names like
:heart:. -
#enable_emoji_completion? ⇒ Boolean
Whether to suggest Emoji replacements for :-delimited names like
:heart:. -
#extra_menu ⇒ Gio::MenuModel
A menu model whose contents will be appended to the context menu.
-
#extra_menu=(extra_menu) ⇒ Gio::MenuModel
A menu model whose contents will be appended to the context menu.
-
#get_icon_activatable(icon_pos) ⇒ Boolean
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
GIconused for the icon. -
#get_icon_name(icon_pos) ⇒ String
Retrieves the icon name used for the icon.
-
#get_icon_paintable(icon_pos) ⇒ Gdk::Paintable
Retrieves the
GdkPaintableused for the icon. -
#get_icon_sensitive(icon_pos) ⇒ Boolean
Returns whether the icon appears sensitive or insensitive.
-
#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.
-
#grab_focus_without_selecting ⇒ Boolean
Causes entry to have keyboard focus.
-
#has_frame ⇒ Boolean
Gets the value set by gtk_entry_set_has_frame().
-
#has_frame=(has_frame) ⇒ Boolean
Whether the entry should draw a frame.
-
#has_frame? ⇒ Boolean
Whether the entry should draw a frame.
-
#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.
-
#initialize(buffer) ⇒ Gtk::Widget
constructor
Creates a new entry with the specified text buffer.
-
#input_hints ⇒ Gtk::InputHints
Additional hints that allow input methods to fine-tune their behavior.
-
#input_hints=(input_hints) ⇒ Gtk::InputHints
Additional hints that allow input methods to fine-tune their behavior.
-
#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 character to use when masking entry contents (“password mode”).
-
#invisible_char=(invisible_char) ⇒ Integer
The character to use when masking entry contents (“password mode”).
-
#invisible_char_set=(invisible_char_set) ⇒ Boolean
Whether the invisible char has been set for the
GtkEntry. -
#invisible_char_set? ⇒ Boolean
Whether the invisible char has been set for the
GtkEntry. -
#max_length ⇒ Integer
Maximum number of characters for this entry.
-
#max_length=(max_length) ⇒ Integer
Maximum number of characters for this entry.
-
#overwrite_mode ⇒ Boolean
Gets whether the
GtkEntryis in overwrite mode. -
#overwrite_mode=(overwrite_mode) ⇒ Boolean
If text is overwritten when typing in the
GtkEntry. -
#overwrite_mode? ⇒ Boolean
If text is overwritten when typing in the
GtkEntry. -
#placeholder_text ⇒ String
The text that will be displayed in the
GtkEntrywhen it is empty and unfocused. -
#placeholder_text=(placeholder_text) ⇒ String
The text that will be displayed in the
GtkEntrywhen it is empty and unfocused. -
#primary_icon_activatable=(primary_icon_activatable) ⇒ Boolean
Whether the primary icon is activatable.
-
#primary_icon_activatable? ⇒ Boolean
Whether the primary icon is activatable.
-
#primary_icon_gicon ⇒ Gio::Icon
The
GIconto use for the primary icon for the entry. -
#primary_icon_gicon=(primary_icon_gicon) ⇒ Gio::Icon
The
GIconto 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_paintable ⇒ Gdk::Paintable
A
GdkPaintableto use as the primary icon for the entry. -
#primary_icon_paintable=(primary_icon_paintable) ⇒ Gdk::Paintable
A
GdkPaintableto use as the primary icon for the entry. -
#primary_icon_sensitive=(primary_icon_sensitive) ⇒ Boolean
Whether the primary icon is sensitive.
-
#primary_icon_sensitive? ⇒ Boolean
Whether the primary icon is sensitive.
-
#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, with markup.
-
#primary_icon_tooltip_markup=(primary_icon_tooltip_markup) ⇒ String
The contents of the tooltip on the primary icon, with markup.
-
#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 pulse.
-
#progress_pulse_step=(progress_pulse_step) ⇒ Float
The fraction of total entry width to move the progress bouncing block for each pulse.
-
#reset_im_context ⇒ nil
Reset the input method context of the entry if needed.
-
#scroll_offset ⇒ Integer
Number of pixels of the entry scrolled off the screen to the left.
-
#scroll_offset=(scroll_offset) ⇒ Integer
Number of pixels of the entry scrolled off the screen to the left.
-
#secondary_icon_activatable=(secondary_icon_activatable) ⇒ Boolean
Whether the secondary icon is activatable.
-
#secondary_icon_activatable? ⇒ Boolean
Whether the secondary icon is activatable.
-
#secondary_icon_gicon ⇒ Gio::Icon
The
GIconto use for the secondary icon for the entry. -
#secondary_icon_gicon=(secondary_icon_gicon) ⇒ Gio::Icon
The
GIconto 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_paintable ⇒ Gdk::Paintable
A
GdkPaintableto use as the secondary icon for the entry. -
#secondary_icon_paintable=(secondary_icon_paintable) ⇒ Gdk::Paintable
A
GdkPaintableto use as the secondary icon for the entry. -
#secondary_icon_sensitive=(secondary_icon_sensitive) ⇒ Boolean
Whether the secondary icon is sensitive.
-
#secondary_icon_sensitive? ⇒ Boolean
Whether the secondary icon is sensitive.
-
#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, with markup.
-
#secondary_icon_tooltip_markup=(secondary_icon_tooltip_markup) ⇒ String
The contents of the tooltip on the secondary icon, with markup.
-
#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.
- #set_attributes(attrs) ⇒ Object (also: #attributes=)
-
#set_attributes_raw ⇒ Object
TODO: It's workaround for a GTK+ problem: It should be removed when GTK+ fix the problem.
-
#set_icon_activatable(icon_pos, activatable) ⇒ nil
Sets whether the icon is activatable.
-
#set_icon_drag_source(icon_pos, provider, actions) ⇒ nil
Sets up the icon at the given position as drag source.
-
#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_paintable(icon_pos, paintable) ⇒ nil
Sets the icon shown in the specified position using a
GdkPaintable. -
#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.
- #show_emoji_icon=(show_emoji_icon) ⇒ Boolean
-
#show_emoji_icon? ⇒ Boolean
Show-emoji-icon.
-
#tabs ⇒ Pango::TabArray
Tabs.
- #tabs=(tabs) ⇒ Pango::TabArray
-
#text_length ⇒ Integer
The length of the text in the
GtkEntry. -
#text_length=(text_length) ⇒ Integer
The length of the text in the
GtkEntry. -
#truncate_multiline=(truncate_multiline) ⇒ Boolean
When true, pasted multi-line text is truncated to the first line.
-
#truncate_multiline? ⇒ Boolean
When true, pasted multi-line text is truncated to the first line.
-
#unset_invisible_char ⇒ nil
Unsets the invisible char, so that the default invisible char is used again.
-
#visibility ⇒ Boolean
Retrieves whether the text in entry is visible.
-
#visibility=(visibility) ⇒ Boolean
Whether the entry should show the “invisible char” instead of the actual text (“password mode”).
-
#visibility? ⇒ Boolean
Whether the entry should show the “invisible char” instead of the actual text (“password mode”).
Methods inherited from Widget
#accessible_role, #accessible_role=, #action_set_enabled, #activate, #activate_action, #activate_action_variant, #activate_default, #activate_signal, #activate_signal=, #activate_signal_from_name=, #add_binding, #add_binding_action, #add_binding_signal, #add_controller, #add_css_class, #add_mnemonic_label, #add_shortcut, #add_tick_callback, #allocate, #allocated_baseline, #allocated_height, #allocated_width, #baseline, #bind_template_callback_full, #bind_template_child, #bind_template_child_full, #can_focus, #can_focus=, #can_focus?, #can_target, #can_target=, #can_target?, #child_focus, #child_visible, #child_visible=, #children, #clipboard, #compute_bounds, #compute_expand, #compute_point, #compute_transform, #contains, #create_pango_context, #create_pango_layout, #css_classes, #css_classes=, #css_name, #css_name=, #cursor, #cursor=, #cursor_from_name=, default_direction, default_direction=, #direction, #direction=, #display, #dispose_template, #drag_check_threshold, #error_bell, #first_child, #focus_child, #focus_child=, #focus_on_click, #focus_on_click=, #focus_on_click?, #focusable, #focusable=, #focusable?, #font_map, #font_map=, #font_options, #font_options=, #frame_clock, #get_allocation, #get_ancestor, #get_color, #get_preferred_size, #get_size, #get_size_request, #get_template_child, #grab_focus, #halign, #halign=, #has_css_class, #has_default, #has_default=, #has_default?, #has_focus, #has_focus=, #has_focus?, #has_tooltip, #has_tooltip=, #has_tooltip?, #has_visible_focus, have_template?, #height, #height_request, #height_request=, #hexpand, #hexpand=, #hexpand?, #hexpand_set, #hexpand_set=, #hexpand_set?, #hide, #in_destruction, #init_template, #insert_action_group, #insert_action_group_raw, #insert_after, #insert_before, #install_action, #install_property_action, #is_ancestor, #is_drawable, #is_focus, #is_sensitive, #is_visible, #keynav_failed, #last_child, #layout_manager, #layout_manager=, #layout_manager_type, #layout_manager_type=, #list_mnemonic_labels, #map, #mapped, #margin_bottom, #margin_bottom=, #margin_end, #margin_end=, #margin_start, #margin_start=, #margin_top, #margin_top=, #measure, #mnemonic_activate, #name, #name=, #native, #next_sibling, #observe_children, #observe_controllers, #opacity, #opacity=, #overflow, #overflow=, #pango_context, #parent, #parent=, #pick, #prev_sibling, #primary_clipboard, #query_action, #queue_allocate, #queue_draw, #queue_resize, #realize, #realized, #receives_default, #receives_default=, #receives_default?, #remove_controller, #remove_css_class, #remove_mnemonic_label, #remove_tick_callback, #request_mode, #root, #root=, #scale_factor, #scale_factor=, #sensitive, #sensitive=, #sensitive?, #set_size_request, #set_size_request_raw, #set_state_flags, #set_template, #set_template_raw, #settings, #should_layout, #show, #size_allocate, #snapshot_child, #state_flags, #style_context, #style_context_raw, #template=, template_children, #template_from_resource=, #template_scope=, #tooltip_markup, #tooltip_markup=, #tooltip_text, #tooltip_text=, #translate_coordinates, #translate_coordinates_raw, #trigger_tooltip_query, #unmap, #unparent, #unrealize, #unset_state_flags, #valign, #valign=, #vexpand, #vexpand=, #vexpand?, #vexpand_set, #vexpand_set=, #vexpand_set?, #visible, #visible=, #visible?, #width, #width_request, #width_request=
Constructor Details
#initialize(buffer) ⇒ Gtk::Widget
Creates a new entry with the specified text buffer.
Instance Method Details
#activates_default ⇒ Boolean
Retrieves the value set by gtk_entry_set_activates_default().
#activates_default=(activates_default) ⇒ Boolean
Whether to activate the default widget when Enter is pressed.
#activates_default? ⇒ Boolean
Whether to activate the default widget when Enter is pressed.
#alignment ⇒ Gtk::gfloat
Gets the value set by gtk_entry_set_alignment().
See also: [propertyGtk.Editable:xalign]
#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.
See also: [propertyGtk.Editable:xalign]
#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 PangoAttribute's start_index and end_index must refer to the
[classGtk.EntryBuffer] text, i.e. without the preedit string.
#buffer ⇒ Gtk::EntryBuffer
The buffer object which actually stores the text.
#buffer=(buffer) ⇒ Gtk::EntryBuffer
The buffer object which actually stores the text.
#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.
#enable_emoji_completion=(enable_emoji_completion) ⇒ Boolean
Whether to suggest Emoji replacements for :-delimited names
like :heart:.
#enable_emoji_completion? ⇒ Boolean
Whether to suggest Emoji replacements for :-delimited names
like :heart:.
#extra_menu ⇒ Gio::MenuModel
A menu model whose contents will be appended to the context menu.
#extra_menu=(extra_menu) ⇒ Gio::MenuModel
A menu model whose contents will be appended to the context menu.
#get_icon_activatable(icon_pos) ⇒ Boolean
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.
#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 [signalGtk.Widget::query-tooltip] signal handler.
#get_icon_gicon(icon_pos) ⇒ Gio::Icon
Retrieves the GIcon used for the icon.
nil will be returned if there is no icon or if the icon was
set by some other method (e.g., by GdkPaintable or icon name).
#get_icon_name(icon_pos) ⇒ String
Retrieves the icon name used for the icon.
nil is returned if there is no icon or if the icon was set
by some other method (e.g., by GdkPaintable or gicon).
#get_icon_paintable(icon_pos) ⇒ Gdk::Paintable
Retrieves the GdkPaintable used for the icon.
If no GdkPaintable was used for the icon, nil is returned.
#get_icon_sensitive(icon_pos) ⇒ Boolean
Returns whether the icon appears sensitive or insensitive.
#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.
#grab_focus_without_selecting ⇒ Boolean
Causes entry to have keyboard focus.
It behaves like [methodGtk.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 ⇒ Boolean
Gets the value set by gtk_entry_set_has_frame().
#has_frame=(has_frame) ⇒ Boolean
Whether the entry should draw a frame.
#has_frame? ⇒ Boolean
Whether the entry should draw a frame.
#im_module ⇒ String
Which IM (input method) module should be used for this entry.
See [classGtk.IMContext].
Setting this to a non-nil value overrides the system-wide IM module setting. See the GtkSettings [propertyGtk.Settings:gtk-im-module] property.
#im_module=(im_module) ⇒ String
Which IM (input method) module should be used for this entry.
See [classGtk.IMContext].
Setting this to a non-nil value overrides the system-wide IM module setting. See the GtkSettings [propertyGtk.Settings:gtk-im-module] property.
#input_hints ⇒ Gtk::InputHints
Additional hints that allow input methods to fine-tune their behavior.
Also see [propertyGtk.Entry:input-purpose]
#input_hints=(input_hints) ⇒ Gtk::InputHints
Additional hints that allow input methods to fine-tune their behavior.
Also see [propertyGtk.Entry: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 [propertyGtk.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 [propertyGtk.Entry:visibility].
#invisible_char ⇒ Integer
The character to use when masking entry contents (“password mode”).
#invisible_char=(invisible_char) ⇒ Integer
The character to use when masking entry contents (“password mode”).
#invisible_char_set=(invisible_char_set) ⇒ Boolean
Whether the invisible char has been set for the GtkEntry.
#invisible_char_set? ⇒ Boolean
Whether the invisible char has been set for the GtkEntry.
#max_length ⇒ Integer
Maximum number of characters for this entry.
#max_length=(max_length) ⇒ Integer
Maximum number of characters for this entry.
#overwrite_mode ⇒ Boolean
Gets whether the GtkEntry is in overwrite mode.
#overwrite_mode=(overwrite_mode) ⇒ Boolean
If text is overwritten when typing in the GtkEntry.
#overwrite_mode? ⇒ Boolean
If text is overwritten when typing in the GtkEntry.
#placeholder_text ⇒ String
The text that will be displayed in the GtkEntry when it is empty
and unfocused.
#placeholder_text=(placeholder_text) ⇒ String
The text that will be displayed in the GtkEntry when it is empty
and unfocused.
#primary_icon_activatable=(primary_icon_activatable) ⇒ Boolean
Whether the primary icon is activatable.
GTK emits the [signalGtk.Entry::icon-press] and [signalGtk.Entry::icon-release] signals only on sensitive, activatable icons.
Sensitive, but non-activatable icons can be used for purely informational purposes.
#primary_icon_activatable? ⇒ Boolean
Whether the primary icon is activatable.
GTK emits the [signalGtk.Entry::icon-press] and [signalGtk.Entry::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_paintable ⇒ Gdk::Paintable
A GdkPaintable to use as the primary icon for the entry.
#primary_icon_paintable=(primary_icon_paintable) ⇒ Gdk::Paintable
A GdkPaintable to use as the primary icon for the entry.
#primary_icon_sensitive=(primary_icon_sensitive) ⇒ Boolean
Whether the primary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the [signalGtk.Entry::icon-press] and [signalGtk.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.
#primary_icon_sensitive? ⇒ Boolean
Whether the primary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the [signalGtk.Entry::icon-press] and [signalGtk.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.
#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, with markup.
Also see [methodGtk.Entry.set_icon_tooltip_markup].
#primary_icon_tooltip_markup=(primary_icon_tooltip_markup) ⇒ String
The contents of the tooltip on the primary icon, with markup.
Also see [methodGtk.Entry.set_icon_tooltip_markup].
#primary_icon_tooltip_text ⇒ String
The contents of the tooltip on the primary icon.
Also see [methodGtk.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 [methodGtk.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 [methodGtk.Entry.set_progress_pulse_step]).
#progress_pulse_step ⇒ Float
The fraction of total entry width to move the progress bouncing block for each pulse.
See [methodGtk.Entry.progress_pulse].
#progress_pulse_step=(progress_pulse_step) ⇒ Float
The fraction of total entry width to move the progress bouncing block for each pulse.
See [methodGtk.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
Number of pixels of the entry scrolled off the screen to the left.
#scroll_offset=(scroll_offset) ⇒ Integer
Number of pixels of the entry scrolled off the screen to the left.
#secondary_icon_activatable=(secondary_icon_activatable) ⇒ Boolean
Whether the secondary icon is activatable.
GTK emits the [signalGtk.Entry::icon-press] and [signalGtk.Entry::icon-release] signals only on sensitive, activatable icons.
Sensitive, but non-activatable icons can be used for purely informational purposes.
#secondary_icon_activatable? ⇒ Boolean
Whether the secondary icon is activatable.
GTK emits the [signalGtk.Entry::icon-press] and [signalGtk.Entry::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_paintable ⇒ Gdk::Paintable
A GdkPaintable to use as the secondary icon for the entry.
#secondary_icon_paintable=(secondary_icon_paintable) ⇒ Gdk::Paintable
A GdkPaintable to use as the secondary icon for the entry.
#secondary_icon_sensitive=(secondary_icon_sensitive) ⇒ Boolean
Whether the secondary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the [signalGtk.Entry::icon-press[ and [signalGtk.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.
#secondary_icon_sensitive? ⇒ Boolean
Whether the secondary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the [signalGtk.Entry::icon-press[ and [signalGtk.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.
#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, with markup.
Also see [methodGtk.Entry.set_icon_tooltip_markup].
#secondary_icon_tooltip_markup=(secondary_icon_tooltip_markup) ⇒ String
The contents of the tooltip on the secondary icon, with markup.
Also see [methodGtk.Entry.set_icon_tooltip_markup].
#secondary_icon_tooltip_text ⇒ String
The contents of the tooltip on the secondary icon.
Also see [methodGtk.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 [methodGtk.Entry.set_icon_tooltip_text].
#set_attributes(attrs) ⇒ Object Also known as: attributes=
23 24 25 26 |
# File 'lib/gtk4/entry.rb', line 23 def set_attributes(attrs) attrs ||= Pango::AttrList.new set_attributes_raw(attrs) end |
#set_attributes_raw ⇒ Object
TODO: It's workaround for a GTK+ problem: It should be removed when GTK+ fix the problem. https://github.com/ruby-gnome2/ruby-gnome2/issues/1176
22 |
# File 'lib/gtk4/entry.rb', line 22 alias_method :set_attributes_raw, :set_attributes |
#set_icon_activatable(icon_pos, activatable) ⇒ nil
Sets whether the icon is activatable.
#set_icon_drag_source(icon_pos, provider, actions) ⇒ nil
Sets up the icon at the given position as drag source.
This makes it 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.
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_paintable(icon_pos, paintable) ⇒ nil
Sets the icon shown in the specified position using a GdkPaintable.
If paintable 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 Pango Markup.
Use nil for tooltip to remove an existing tooltip.
See also [methodGtk.Widget.set_tooltip_markup] and [methodGtk.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 [methodGtk.Widget.set_tooltip_text] and [methodGtk.Entry.set_icon_tooltip_markup].
If you unset the widget tooltip via [methodGtk.Widget.set_tooltip_text] or [methodGtk.Widget.set_tooltip_markup], this sets [propertyGtk.Widget:has-tooltip] to false, which suppresses icon tooltips too. You can resolve this by then calling [methodGtk.Widget.set_has_tooltip] to set [propertyGtk.Widget:has-tooltip] back to true, or setting at least one non-empty tooltip on any icon achieves the same result.
#show_emoji_icon=(show_emoji_icon) ⇒ Boolean
#show_emoji_icon? ⇒ Boolean
Returns show-emoji-icon.
#tabs ⇒ Pango::TabArray
Returns tabs.
#tabs=(tabs) ⇒ Pango::TabArray
#text_length ⇒ Integer
The length of the text in the GtkEntry.
#text_length=(text_length) ⇒ Integer
The length of the text in the GtkEntry.
#truncate_multiline=(truncate_multiline) ⇒ Boolean
When true, pasted multi-line text is truncated to the first line.
#truncate_multiline? ⇒ Boolean
When true, pasted multi-line text is truncated to the first line.
#unset_invisible_char ⇒ nil
Unsets the invisible char, so that the default invisible char is used again. See [methodGtk.Entry.set_invisible_char].
#visibility ⇒ Boolean
Retrieves whether the text in entry is visible.
See [methodGtk.Entry.set_visibility].
#visibility=(visibility) ⇒ Boolean
Whether the entry should show the “invisible char” instead of the actual text (“password mode”).
#visibility? ⇒ Boolean
Whether the entry should show the “invisible char” instead of the actual text (“password mode”).