package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Entry/index.html
Module Wrappers.Entry
type t = [ `entry | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new Entry
val new_with_buffer : [ `entry_buffer | `object_ ] Gobject.obj -> tCreate a new Entry
val unset_invisible_char : t -> unitUnsets the invisible char, so that the default invisible char is used again. See method@Gtk.Entry.set_invisible_char.
val set_visibility : t -> bool -> unitSets whether the contents of the entry are visible or not.
When visibility is set to %FALSE, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere.
By default, GTK picks the best invisible character available in the current font, but it can be changed with method@Gtk.Entry.set_invisible_char.
Note that you probably want to set property@Gtk.Entry:input-purpose to %GTK_INPUT_PURPOSE_PASSWORD or %GTK_INPUT_PURPOSE_PIN to inform input methods about the purpose of this entry, in addition to setting visibility to %FALSE.
val set_tabs : t -> Ocgtk_pango.Pango.Wrappers.Tab_array.t option -> unitSets a `PangoTabArray`.
The tabstops in the array are applied to the entry text.
val set_progress_pulse_step : t -> float -> unitSets the fraction of total entry width to move the progress bouncing block for each pulse.
Use method@Gtk.Entry.progress_pulse to pulse the progress.
val set_progress_fraction : t -> float -> unitCauses the entry’s progress indicator to “fill in” the given fraction of the bar.
The fraction should be between 0.0 and 1.0, inclusive.
val set_placeholder_text : t -> string option -> unitSets text to be displayed in @entry when it is empty.
This can be used to give a visual hint of the expected contents of the `GtkEntry`.
val set_overwrite_mode : t -> bool -> unitSets whether the text is overwritten when typing in the `GtkEntry`.
val set_max_length : t -> int -> unitSets the maximum allowed length of the contents of the widget.
If the current contents are longer than the given length, then they will be truncated to fit. The length is in characters.
This is equivalent to getting @entry's `GtkEntryBuffer` and calling method@Gtk.EntryBuffer.set_max_length on it.
val set_invisible_char : t -> int -> unitSets the character to use in place of the actual text in “password mode”.
See method@Gtk.Entry.set_visibility for how to enable “password mode”.
By default, GTK picks the best invisible char available in the current font. If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type.
val set_input_purpose : t -> Gtk_enums.inputpurpose -> unitSets the input purpose which can be used by input methods to adjust their behavior.
val set_input_hints : t -> Gtk_enums.inputhints -> unitSet additional hints which allow input methods to fine-tune their behavior.
val set_icon_tooltip_text :
t ->
Gtk_enums.entryiconposition ->
string option ->
unitSets @tooltip as the contents of the tooltip for the icon at the specified position.
Use %NULL for @tooltip to remove an existing tooltip.
See also method@Gtk.Widget.set_tooltip_text and method@Gtk.Entry.set_icon_tooltip_markup.
If you unset the widget tooltip via method@Gtk.Widget.set_tooltip_text or method@Gtk.Widget.set_tooltip_markup, this sets property@Gtk.Widget:has-tooltip to %FALSE, which suppresses icon tooltips too. You can resolve this by then calling method@Gtk.Widget.set_has_tooltip to set property@Gtk.Widget:has-tooltip back to %TRUE, or setting at least one non-empty tooltip on any icon achieves the same result.
val set_icon_tooltip_markup :
t ->
Gtk_enums.entryiconposition ->
string option ->
unitSets @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 %NULL for @tooltip to remove an existing tooltip.
See also method@Gtk.Widget.set_tooltip_markup and method@Gtk.Entry.set_icon_tooltip_text.
val set_icon_sensitive : t -> Gtk_enums.entryiconposition -> bool -> unitSets the sensitivity for the specified icon.
val set_icon_from_paintable :
t ->
Gtk_enums.entryiconposition ->
Ocgtk_gdk.Gdk.Wrappers.Paintable.t option ->
unitSets the icon shown in the specified position using a `GdkPaintable`.
If @paintable is %NULL, no icon will be shown in the specified position.
val set_icon_from_icon_name :
t ->
Gtk_enums.entryiconposition ->
string option ->
unitSets 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 %NULL, no icon will be shown in the specified position.
val set_icon_from_gicon :
t ->
Gtk_enums.entryiconposition ->
Ocgtk_gio.Gio.Wrappers.Icon.t option ->
unitSets 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 %NULL, no icon will be shown in the specified position.
val set_icon_drag_source :
t ->
Gtk_enums.entryiconposition ->
Ocgtk_gdk.Gdk.Wrappers.Content_provider.t ->
Ocgtk_gdk.Gdk.dragaction ->
unitSets 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.
val set_icon_activatable : t -> Gtk_enums.entryiconposition -> bool -> unitSets whether the icon is activatable.
val set_has_frame : t -> bool -> unitSets whether the entry has a beveled frame around it.
Sets a menu model to add when constructing the context menu for @entry.
val set_completion :
t ->
[ `entry_completion | `object_ ] Gobject.obj option ->
unitSets @completion to be the auxiliary completion object to use with @entry.
All further configuration of the completion mechanism is done on @completion using the `GtkEntryCompletion` API. Completion is disabled if @completion is set to %NULL.
val set_buffer : t -> [ `entry_buffer | `object_ ] Gobject.obj -> unitSet the `GtkEntryBuffer` object which holds the text for this widget.
val set_attributes : t -> Ocgtk_pango.Pango.Wrappers.Attr_list.t -> unitSets a `PangoAttrList`.
The attributes in the list are applied to the entry text.
Since the attributes will be applied to text that changes as the user types, it makes most sense to use attributes with unlimited extent.
val set_alignment : t -> float -> unitSets 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: property@Gtk.Editable:xalign
val set_activates_default : t -> bool -> unitSets whether pressing Enter in the @entry will activate the default widget for the window containing the entry.
This usually means that the dialog containing the entry will be closed, since the default widget is usually one of the dialog buttons.
val reset_im_context : t -> unitReset 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.
val progress_pulse : t -> unitIndicates 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 method@Gtk.Entry.set_progress_pulse_step).
val grab_focus_without_selecting : t -> boolCauses @entry to have keyboard focus.
It behaves like method@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.
val get_visibility : t -> boolRetrieves whether the text in @entry is visible.
See method@Gtk.Entry.set_visibility.
Retrieves the current length of the text in @entry.
This is equivalent to getting @entry's `GtkEntryBuffer` and calling method@Gtk.EntryBuffer.get_length on it.
val get_tabs : t -> Ocgtk_pango.Pango.Wrappers.Tab_array.t optionGets the tabstops of the `GtkEntry`.
See method@Gtk.Entry.set_tabs.
val get_progress_pulse_step : t -> floatRetrieves the pulse step set with gtk_entry_set_progress_pulse_step().
val get_progress_fraction : t -> floatReturns the current fraction of the task that’s been completed.
See method@Gtk.Entry.set_progress_fraction.
val get_placeholder_text : t -> string optionRetrieves the text that will be displayed when @entry is empty and unfocused
val get_overwrite_mode : t -> boolGets whether the `GtkEntry` is in overwrite mode.
val get_max_length : t -> intRetrieves the maximum allowed length of the text in @entry.
See method@Gtk.Entry.set_max_length.
val get_invisible_char : t -> intRetrieves the character displayed in place of the actual text in “password mode”.
val get_input_purpose : t -> Gtk_enums.inputpurposeGets the input purpose of the `GtkEntry`.
val get_input_hints : t -> Gtk_enums.inputhintsGets the input hints of this `GtkEntry`.
val get_icon_tooltip_text : t -> Gtk_enums.entryiconposition -> string optionGets the contents of the tooltip on the icon at the specified position in @entry.
val get_icon_tooltip_markup : t -> Gtk_enums.entryiconposition -> string optionGets the contents of the tooltip on the icon at the specified position in @entry.
val get_icon_storage_type :
t ->
Gtk_enums.entryiconposition ->
Gtk_enums.imagetypeGets 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.
val get_icon_sensitive : t -> Gtk_enums.entryiconposition -> boolReturns whether the icon appears sensitive or insensitive.
val get_icon_paintable :
t ->
Gtk_enums.entryiconposition ->
Ocgtk_gdk.Gdk.Wrappers.Paintable.t optionRetrieves the `GdkPaintable` used for the icon.
If no `GdkPaintable` was used for the icon, %NULL is returned.
val get_icon_name : t -> Gtk_enums.entryiconposition -> string optionRetrieves the icon name used for the icon.
%NULL is returned if there is no icon or if the icon was set by some other method (e.g., by `GdkPaintable` or gicon).
val get_icon_gicon :
t ->
Gtk_enums.entryiconposition ->
Ocgtk_gio.Gio.Wrappers.Icon.t optionRetrieves the `GIcon` used for the icon.
%NULL 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).
val get_icon_at_pos : t -> int -> int -> intFinds 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 signal@Gtk.Widget::query-tooltip signal handler.
val get_icon_area :
t ->
Gtk_enums.entryiconposition ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.tGets 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.
val get_icon_activatable : t -> Gtk_enums.entryiconposition -> boolReturns whether the icon is activatable.
val get_has_frame : t -> boolGets the value set by gtk_entry_set_has_frame().
Gets the menu model set with gtk_entry_set_extra_menu().
val get_current_icon_drag_source : t -> intReturns the index of the icon which is the source of the current DND operation, or -1.
val get_completion : t -> [ `entry_completion | `object_ ] Gobject.obj optionReturns the auxiliary completion object currently in use by @entry.
val get_buffer : t -> [ `entry_buffer | `object_ ] Gobject.objGet the `GtkEntryBuffer` object which holds the text for this widget.
val get_attributes : t -> Ocgtk_pango.Pango.Wrappers.Attr_list.t optionGets the attribute list of the `GtkEntry`.
See method@Gtk.Entry.set_attributes.
val get_alignment : t -> floatGets the value set by gtk_entry_set_alignment().
See also: property@Gtk.Editable:xalign
val get_activates_default : t -> boolRetrieves the value set by gtk_entry_set_activates_default().
val get_enable_emoji_completion : t -> boolGet property: enable-emoji-completion
val set_enable_emoji_completion : t -> bool -> unitSet property: enable-emoji-completion
val get_im_module : t -> stringGet property: im-module
val set_im_module : t -> string -> unitSet property: im-module
val get_invisible_char_set : t -> boolGet property: invisible-char-set
val set_invisible_char_set : t -> bool -> unitSet property: invisible-char-set
val get_primary_icon_activatable : t -> boolGet property: primary-icon-activatable
val set_primary_icon_activatable : t -> bool -> unitSet property: primary-icon-activatable
val get_primary_icon_gicon : t -> Ocgtk_gio.Gio.Wrappers.Icon.tGet property: primary-icon-gicon
val set_primary_icon_gicon : t -> Ocgtk_gio.Gio.Wrappers.Icon.t -> unitSet property: primary-icon-gicon
val get_primary_icon_name : t -> stringGet property: primary-icon-name
val set_primary_icon_name : t -> string -> unitSet property: primary-icon-name
val get_primary_icon_paintable : t -> Ocgtk_gdk.Gdk.Wrappers.Paintable.tGet property: primary-icon-paintable
val set_primary_icon_paintable :
t ->
Ocgtk_gdk.Gdk.Wrappers.Paintable.t ->
unitSet property: primary-icon-paintable
val get_primary_icon_sensitive : t -> boolGet property: primary-icon-sensitive
val set_primary_icon_sensitive : t -> bool -> unitSet property: primary-icon-sensitive
val get_primary_icon_storage_type : t -> Gtk_enums.imagetypeGet property: primary-icon-storage-type
val get_primary_icon_tooltip_markup : t -> stringGet property: primary-icon-tooltip-markup
val set_primary_icon_tooltip_markup : t -> string -> unitSet property: primary-icon-tooltip-markup
val get_primary_icon_tooltip_text : t -> stringGet property: primary-icon-tooltip-text
val set_primary_icon_tooltip_text : t -> string -> unitSet property: primary-icon-tooltip-text
val get_scroll_offset : t -> intGet property: scroll-offset
val get_secondary_icon_activatable : t -> boolGet property: secondary-icon-activatable
val set_secondary_icon_activatable : t -> bool -> unitSet property: secondary-icon-activatable
val get_secondary_icon_gicon : t -> Ocgtk_gio.Gio.Wrappers.Icon.tGet property: secondary-icon-gicon
val set_secondary_icon_gicon : t -> Ocgtk_gio.Gio.Wrappers.Icon.t -> unitSet property: secondary-icon-gicon
val get_secondary_icon_name : t -> stringGet property: secondary-icon-name
val set_secondary_icon_name : t -> string -> unitSet property: secondary-icon-name
val get_secondary_icon_paintable : t -> Ocgtk_gdk.Gdk.Wrappers.Paintable.tGet property: secondary-icon-paintable
val set_secondary_icon_paintable :
t ->
Ocgtk_gdk.Gdk.Wrappers.Paintable.t ->
unitSet property: secondary-icon-paintable
val get_secondary_icon_sensitive : t -> boolGet property: secondary-icon-sensitive
val set_secondary_icon_sensitive : t -> bool -> unitSet property: secondary-icon-sensitive
val get_secondary_icon_storage_type : t -> Gtk_enums.imagetypeGet property: secondary-icon-storage-type
val get_secondary_icon_tooltip_markup : t -> stringGet property: secondary-icon-tooltip-markup
val set_secondary_icon_tooltip_markup : t -> string -> unitSet property: secondary-icon-tooltip-markup
val get_secondary_icon_tooltip_text : t -> stringGet property: secondary-icon-tooltip-text
val set_secondary_icon_tooltip_text : t -> string -> unitSet property: secondary-icon-tooltip-text
val get_show_emoji_icon : t -> boolGet property: show-emoji-icon
val set_show_emoji_icon : t -> bool -> unitSet property: show-emoji-icon
val get_truncate_multiline : t -> boolGet property: truncate-multiline
val set_truncate_multiline : t -> bool -> unitSet property: truncate-multiline
val on_activate :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_icon_press :
?after:bool ->
t ->
callback:(icon_pos:Gtk_enums.entryiconposition -> unit) ->
Gobject.Signal.handler_idval on_icon_release :
?after:bool ->
t ->
callback:(icon_pos:Gtk_enums.entryiconposition -> unit) ->
Gobject.Signal.handler_id