Skip to main content

SearchEntry

Struct SearchEntry 

Source
pub struct SearchEntry { /* private fields */ }
Expand description

SearchEntry is a subclass of Entry that has been tailored for use as a search entry.

It will show an inactive symbolic “find” icon when the search entry is empty, and a symbolic “clear” icon when there is text. Clicking on the “clear” icon will empty the search entry.

Note that the search/clear icon is shown using a secondary icon, and thus does not work if you are using the secondary icon position for some other purpose.

To make filtering appear more reactive, it is a good idea to not react to every change in the entry text immediately, but only after a short delay. To support this, SearchEntry emits the search-changed signal which can be used instead of the changed signal.

The previous-match, next-match and stop-search signals can be used to implement moving between search results and ending the search.

Often, GtkSearchEntry will be fed events by means of being placed inside a SearchBar. If that is not the case, you can use SearchEntryExt::handle_event() to pass events.

§Signals

§next-match

The ::next-match signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a move to the next match for the current search string.

Applications should connect to it, to implement moving between matches.

The default bindings for this signal is Ctrl-g.

Action

§previous-match

The ::previous-match signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a move to the previous match for the current search string.

Applications should connect to it, to implement moving between matches.

The default bindings for this signal is Ctrl-Shift-g.

Action

§search-changed

The search-changed signal is emitted with a short delay of 150 milliseconds after the last change to the entry text.

The ::stop-search signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user stops a search via keyboard input.

Applications should connect to it, to implement hiding the search entry in this case.

The default bindings for this signal is Escape.

Action

Entry

§activate

The ::activate signal is emitted when the user hits the Enter key.

While this signal is used as a [keybinding signal][GtkBindingSignal], it is also commonly used by applications to intercept activation of entries.

The default bindings for this signal are all forms of the Enter key.

Action

§backspace

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

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

Action

§copy-clipboard

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

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

Action

§cut-clipboard

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

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

Action

§delete-from-cursor

The ::delete-from-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a text deletion.

If the type_ is DeleteType::Chars, GTK+ deletes the selection if there is one, otherwise it deletes the requested number of characters.

The default bindings for this signal are Delete for deleting a character and Ctrl-Delete for deleting a word.

Action

§icon-press

The ::icon-press signal is emitted when an activatable icon is clicked.

§icon-release

The ::icon-release signal is emitted on the button release from a mouse click over an activatable icon.

§insert-at-cursor

The ::insert-at-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates the insertion of a fixed string at the cursor.

This signal has no default bindings.

Action

§insert-emoji

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

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

Action

§move-cursor

The ::move-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a cursor movement. If the cursor is not visible in entry, this signal causes the viewport to be moved instead.

Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically.

The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here.

  • Arrow keys move by individual characters/lines
  • Ctrl-arrow key combinations move by words/paragraphs
  • Home/End keys move to the ends of the buffer

Action

§paste-clipboard

The ::paste-clipboard signal is a [keybinding signal][GtkBindingSignal] which gets emitted to paste the contents of the clipboard into the text view.

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

Action

§populate-popup

The ::populate-popup signal gets emitted before showing the context menu of the entry.

If you need to add items to the context menu, connect to this signal and append your items to the widget, which will be a Menu in this case.

If populate-all is true, this signal will also be emitted to populate touch popups. In this case, widget will be a different container, e.g. a Toolbar. The signal handler should not make assumptions about the type of widget.

§preedit-changed

If an input method is used, the typed text will not immediately be committed to the buffer. So if you are interested in the text, connect to this signal.

Action

§toggle-overwrite

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

The default bindings for this signal is Insert.

Action

Widget

§accel-closures-changed
§button-press-event

The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::BUTTON_PRESS_MASK mask.

This signal will be sent to the grab widget if there is one.

§button-release-event

The ::button-release-event signal will be emitted when a button (typically from a mouse) is released.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::BUTTON_RELEASE_MASK mask.

This signal will be sent to the grab widget if there is one.

§can-activate-accel

Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This signal is present to allow applications and derived widgets to override the default Widget handling for determining whether an accelerator can be activated.

§child-notify

The ::child-notify signal is emitted for each [child property][child-properties] that has changed on an object. The signal’s detail holds the property name.

Detailed

§composited-changed

The ::composited-changed signal is emitted when the composited status of widgets screen changes. See Screen::is_composited().

Action

§configure-event

The ::configure-event signal will be emitted when the size, position or stacking of the widget’s window has changed.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

§damage-event

Emitted when a redirected window belonging to widget gets drawn into. The region/area members of the event shows what area of the redirected drawable was drawn into.

§delete-event

The ::delete-event signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. Connecting WidgetExtManual::hide_on_delete() to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it.

§destroy

Signals that all holders of a reference to the widget should release the reference that they hold. May result in finalization of the widget if all references are released.

This signal is not suitable for saving widget state.

§destroy-event

The ::destroy-event signal is emitted when a gdk::Window is destroyed. You rarely get this signal, because most widgets disconnect themselves from their window before they destroy it, so no widget owns the window at destroy time.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

§direction-changed

The ::direction-changed signal is emitted when the text direction of a widget changes.

§drag-begin

The ::drag-begin signal is emitted on the drag source when a drag is started. A typical reason to connect to this signal is to set up a custom drag icon with e.g. WidgetExt::drag_source_set_icon_pixbuf().

Note that some widgets set up a drag icon in the default handler of this signal, so you may have to use g_signal_connect_after() to override what the default handler did.

§drag-data-delete

The ::drag-data-delete signal is emitted on the drag source when a drag with the action gdk::DragAction::MOVE is successfully completed. The signal handler is responsible for deleting the data that has been dropped. What “delete” means depends on the context of the drag operation.

§drag-data-get

The ::drag-data-get signal is emitted on the drag source when the drop site requests the data which is dragged. It is the responsibility of the signal handler to fill data with the data in the format which is indicated by info. See SelectionData::set() and SelectionData::set_text().

§drag-data-received

The ::drag-data-received signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call gdk_drag_status() and not finish the drag. If the data was received in response to a drag-drop signal (and this is the last target to be received), the handler for this signal is expected to process the received data and then call gtk_drag_finish(), setting the success parameter depending on whether the data was processed successfully.

Applications must create some means to determine why the signal was emitted and therefore whether to call gdk_drag_status() or gtk_drag_finish().

The handler may inspect the selected action with DragContext::selected_action() before calling gtk_drag_finish(), e.g. to implement gdk::DragAction::ASK as shown in the following example:

⚠️ The following code is in C ⚠️

void
drag_data_received (GtkWidget          *widget,
                    GdkDragContext     *context,
                    gint                x,
                    gint                y,
                    GtkSelectionData   *data,
                    guint               info,
                    guint               time)
{
  if ((data->length >= 0) && (data->format == 8))
    {
      GdkDragAction action;

      // handle data here

      action = gdk_drag_context_get_selected_action (context);
      if (action == GDK_ACTION_ASK)
        {
          GtkWidget *dialog;
          gint response;

          dialog = gtk_message_dialog_new (NULL,
                                           GTK_DIALOG_MODAL |
                                           GTK_DIALOG_DESTROY_WITH_PARENT,
                                           GTK_MESSAGE_INFO,
                                           GTK_BUTTONS_YES_NO,
                                           "Move the data ?\n");
          response = gtk_dialog_run (GTK_DIALOG (dialog));
          gtk_widget_destroy (dialog);

          if (response == GTK_RESPONSE_YES)
            action = GDK_ACTION_MOVE;
          else
            action = GDK_ACTION_COPY;
         }

      gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
    }
  else
    gtk_drag_finish (context, FALSE, FALSE, time);
 }
§drag-drop

The ::drag-drop signal is emitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns false and no further processing is necessary. Otherwise, the handler returns true. In this case, the handler must ensure that gtk_drag_finish() is called to let the source know that the drop is done. The call to gtk_drag_finish() can be done either directly or in a drag-data-received handler which gets triggered by calling WidgetExt::drag_get_data() to receive the data for one or more of the supported targets.

§drag-end

The ::drag-end signal is emitted on the drag source when a drag is finished. A typical reason to connect to this signal is to undo things done in drag-begin.

§drag-failed

The ::drag-failed signal is emitted on the drag source when a drag has failed. The signal handler may hook custom code to handle a failed DnD operation based on the type of error, it returns true is the failure has been already handled (not showing the default “drag operation failed” animation), otherwise it returns false.

§drag-leave

The ::drag-leave signal is emitted on the drop site when the cursor leaves the widget. A typical reason to connect to this signal is to undo things done in drag-motion, e.g. undo highlighting with WidgetExt::drag_unhighlight().

Likewise, the drag-leave signal is also emitted before the ::drag-drop signal, for instance to allow cleaning up of a preview item created in the drag-motion signal handler.

§drag-motion

The ::drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns false and no further processing is necessary. Otherwise, the handler returns true. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling gdk_drag_status().

If the decision whether the drop will be accepted or rejected can’t be made based solely on the cursor position and the type of the data, the handler may inspect the dragged data by calling WidgetExt::drag_get_data() and defer the gdk_drag_status() call to the drag-data-received handler. Note that you must pass DestDefaults::DROP, DestDefaults::MOTION or DestDefaults::ALL to WidgetExtManual::drag_dest_set() when using the drag-motion signal that way.

Also note that there is no drag-enter signal. The drag receiver has to keep track of whether he has received any drag-motion signals since the last drag-leave and if not, treat the drag-motion signal as an “enter” signal. Upon an “enter”, the handler will typically highlight the drop site with WidgetExt::drag_highlight().

⚠️ The following code is in C ⚠️

static void
drag_motion (GtkWidget      *widget,
             GdkDragContext *context,
             gint            x,
             gint            y,
             guint           time)
{
  GdkAtom target;

  PrivateData *private_data = GET_PRIVATE_DATA (widget);

  if (!private_data->drag_highlight)
   {
     private_data->drag_highlight = 1;
     gtk_drag_highlight (widget);
   }

  target = gtk_drag_dest_find_target (widget, context, NULL);
  if (target == GDK_NONE)
    gdk_drag_status (context, 0, time);
  else
   {
     private_data->pending_status
        = gdk_drag_context_get_suggested_action (context);
     gtk_drag_get_data (widget, context, target, time);
   }

  return TRUE;
}

static void
drag_data_received (GtkWidget        *widget,
                    GdkDragContext   *context,
                    gint              x,
                    gint              y,
                    GtkSelectionData *selection_data,
                    guint             info,
                    guint             time)
{
  PrivateData *private_data = GET_PRIVATE_DATA (widget);

  if (private_data->suggested_action)
   {
     private_data->suggested_action = 0;

     // We are getting this data due to a request in drag_motion,
     // rather than due to a request in drag_drop, so we are just
     // supposed to call gdk_drag_status(), not actually paste in
     // the data.

     str = gtk_selection_data_get_text (selection_data);
     if (!data_is_acceptable (str))
       gdk_drag_status (context, 0, time);
     else
       gdk_drag_status (context,
                        private_data->suggested_action,
                        time);
   }
  else
   {
     // accept the drop
   }
}
§draw

This signal is emitted when a widget is supposed to render itself. The widget’s top left corner must be painted at the origin of the passed in context and be sized to the values returned by WidgetExt::allocated_width() and WidgetExt::allocated_height().

Signal handlers connected to this signal can modify the cairo context passed as cr in any way they like and don’t need to restore it. The signal emission takes care of calling cairo_save() before and cairo_restore() after invoking the handler.

The signal handler will get a cr with a clip region already set to the widget’s dirty region, i.e. to the area that needs repainting. Complicated widgets that want to avoid redrawing themselves completely can get the full extents of the clip region with gdk_cairo_get_clip_rectangle(), or they can get a finer-grained representation of the dirty region with cairo_copy_clip_rectangle_list().

§enter-notify-event

The ::enter-notify-event will be emitted when the pointer enters the widget’s window.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::ENTER_NOTIFY_MASK mask.

This signal will be sent to the grab widget if there is one.

§event

The GTK+ main loop will emit three signals for each GDK event delivered to a widget: one generic ::event signal, another, more specific, signal that matches the type of event delivered (e.g. key-press-event) and finally a generic event-after signal.

§event-after

After the emission of the event signal and (optionally) the second more specific signal, ::event-after will be emitted regardless of the previous two signals handlers return values.

§focus
§focus-in-event

The ::focus-in-event signal will be emitted when the keyboard focus enters the widget’s window.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::FOCUS_CHANGE_MASK mask.

§focus-out-event

The ::focus-out-event signal will be emitted when the keyboard focus leaves the widget’s window.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::FOCUS_CHANGE_MASK mask.

§grab-broken-event

Emitted when a pointer or keyboard grab on a window belonging to widget gets broken.

On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again.

§grab-focus

Action

§grab-notify

The ::grab-notify signal is emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed.

A widget is shadowed by a WidgetExt::grab_add() when the topmost grab widget in the grab stack of its window group is not its ancestor.

§hide

The ::hide signal is emitted when widget is hidden, for example with WidgetExt::hide().

§hierarchy-changed

The ::hierarchy-changed signal is emitted when the anchored state of a widget changes. A widget is “anchored” when its toplevel ancestor is a Window. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.

§key-press-event

The ::key-press-event signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::KEY_PRESS_MASK mask.

This signal will be sent to the grab widget if there is one.

§key-release-event

The ::key-release-event signal is emitted when a key is released.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::KEY_RELEASE_MASK mask.

This signal will be sent to the grab widget if there is one.

§keynav-failed

Gets emitted if keyboard navigation fails. See WidgetExt::keynav_failed() for details.

§leave-notify-event

The ::leave-notify-event will be emitted when the pointer leaves the widget’s window.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::LEAVE_NOTIFY_MASK mask.

This signal will be sent to the grab widget if there is one.

§map

The ::map signal is emitted when widget is going to be mapped, that is when the widget is visible (which is controlled with WidgetExt::set_visible()) and all its parents up to the toplevel widget are also visible. Once the map has occurred, map-event will be emitted.

The ::map signal can be used to determine whether a widget will be drawn, for instance it can resume an animation that was stopped during the emission of unmap.

§map-event

The ::map-event signal will be emitted when the widget’s window is mapped. A window is mapped when it becomes visible on the screen.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

§mnemonic-activate

The default handler for this signal activates widget if group_cycling is false, or just makes widget grab focus if group_cycling is true.

§motion-notify-event

The ::motion-notify-event signal is emitted when the pointer moves over the widget’s gdk::Window.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::POINTER_MOTION_MASK mask.

This signal will be sent to the grab widget if there is one.

§move-focus

Action

§parent-set

The ::parent-set signal is emitted when a new parent has been set on a widget.

This signal gets emitted whenever a widget should pop up a context menu. This usually happens through the standard key binding mechanism; by pressing a certain key while a widget is focused, the user can cause the widget to pop up a menu. For example, the Entry widget creates a menu with clipboard commands. See the [Popup Menu Migration Checklist][checklist-popup-menu] for an example of how to use this signal.

Action

§property-notify-event

The ::property-notify-event signal will be emitted when a property on the widget’s window has been changed or deleted.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::PROPERTY_CHANGE_MASK mask.

§proximity-in-event

To receive this signal the gdk::Window associated to the widget needs to enable the gdk::EventMask::PROXIMITY_IN_MASK mask.

This signal will be sent to the grab widget if there is one.

§proximity-out-event

To receive this signal the gdk::Window associated to the widget needs to enable the gdk::EventMask::PROXIMITY_OUT_MASK mask.

This signal will be sent to the grab widget if there is one.

§query-tooltip

Emitted when has-tooltip is true and the hover timeout has expired with the cursor hovering “above” widget; or emitted when widget got focus in keyboard mode.

Using the given coordinates, the signal handler should determine whether a tooltip should be shown for widget. If this is the case true should be returned, false otherwise. Note that if keyboard_mode is true, the values of x and y are undefined and should not be used.

The signal handler is free to manipulate tooltip with the therefore destined function calls.

§realize

The ::realize signal is emitted when widget is associated with a gdk::Window, which means that WidgetExt::realize() has been called or the widget has been mapped (that is, it is going to be drawn).

§screen-changed

The ::screen-changed signal gets emitted when the screen of a widget has changed.

§scroll-event

The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::SCROLL_MASK mask.

This signal will be sent to the grab widget if there is one.

§selection-clear-event

The ::selection-clear-event signal will be emitted when the the widget’s window has lost ownership of a selection.

§selection-get
§selection-notify-event
§selection-received
§selection-request-event

The ::selection-request-event signal will be emitted when another client requests ownership of the selection owned by the widget’s window.

§show

The ::show signal is emitted when widget is shown, for example with WidgetExt::show().

§show-help

Action

§size-allocate
§state-changed

The ::state-changed signal is emitted when the widget state changes. See gtk_widget_get_state().

§state-flags-changed

The ::state-flags-changed signal is emitted when the widget state changes, see WidgetExt::state_flags().

§style-set

The ::style-set signal is emitted when a new style has been set on a widget. Note that style-modifying functions like gtk_widget_modify_base() also cause this signal to be emitted.

Note that this signal is emitted for changes to the deprecated GtkStyle. To track changes to the StyleContext associated with a widget, use the style-updated signal.

§style-updated

The ::style-updated signal is a convenience signal that is emitted when the changed signal is emitted on the widget’s associated StyleContext as returned by WidgetExt::style_context().

Note that style-modifying functions like gtk_widget_override_color() also cause this signal to be emitted.

§touch-event
§unmap

The ::unmap signal is emitted when widget is going to be unmapped, which means that either it or any of its parents up to the toplevel widget have been set as hidden.

As ::unmap indicates that a widget will not be shown any longer, it can be used to, for example, stop an animation on the widget.

§unmap-event

The ::unmap-event signal will be emitted when the widget’s window is unmapped. A window is unmapped when it becomes invisible on the screen.

To receive this signal, the gdk::Window associated to the widget needs to enable the gdk::EventMask::STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

§unrealize

The ::unrealize signal is emitted when the gdk::Window associated with widget is destroyed, which means that WidgetExt::unrealize() has been called or the widget has been unmapped (that is, it is going to be hidden).

§visibility-notify-event

The ::visibility-notify-event will be emitted when the widget’s window is obscured or unobscured.

To receive this signal the gdk::Window associated to the widget needs to enable the gdk::EventMask::VISIBILITY_NOTIFY_MASK mask.

§window-state-event

The ::window-state-event will be emitted when the state of the toplevel window associated to the widget changes.

To receive this signal the gdk::Window associated to the widget needs to enable the gdk::EventMask::STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

CellEditable

§editing-done

This signal is a sign for the cell renderer to update its value from the cell_editable.

Implementations of CellEditable are responsible for emitting this signal when they are done editing, e.g. Entry emits this signal when the user presses Enter. Typical things to do in a handler for ::editing-done are to capture the edited value, disconnect the cell_editable from signals on the CellRenderer, etc.

CellEditableExt::editing_done() is a convenience method for emitting editing-done.

§remove-widget

This signal is meant to indicate that the cell is finished editing, and the cell_editable widget is being removed and may subsequently be destroyed.

Implementations of CellEditable are responsible for emitting this signal when they are done editing. It must be emitted after the editing-done signal, to give the cell renderer a chance to update the cell’s value before the widget is removed.

CellEditableExt::remove_widget() is a convenience method for emitting remove-widget.

Editable

§changed

The ::changed signal is emitted at the end of a single user-visible operation on the contents of the Editable.

E.g., a paste operation that replaces the contents of the selection will cause only one signal emission (even though it is implemented by first deleting the selection, then inserting the new content, and may cause multiple ::notify::text signals to be emitted).

§delete-text

This signal is emitted when text is deleted from the widget by the user. The default handler for this signal will normally be responsible for deleting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the range of deleted text, or prevent it from being deleted entirely. The start_pos and end_pos parameters are interpreted as for EditableExt::delete_text().

§insert-text

This signal is emitted when text is inserted into the widget by the user. The default handler for this signal will normally be responsible for inserting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the inserted text, or prevent it from being inserted entirely.

§Implements

SearchEntryExt, EntryExt, WidgetExt, glib::ObjectExt, BuildableExt, CellEditableExt, EditableExt, EntryExtManual, WidgetExtManual, BuildableExtManual, EditableSignals

Implementations§

Source§

impl SearchEntry

Source

pub const NONE: Option<&'static SearchEntry> = None

Source

pub fn new() -> SearchEntry

Creates a SearchEntry, with a find icon when the search field is empty, and a clear icon when it isn’t.

§Returns

a new SearchEntry

Source

pub fn builder() -> SearchEntryBuilder

Creates a new builder-pattern struct instance to construct SearchEntry objects.

This method returns an instance of SearchEntryBuilder which can be used to create SearchEntry objects.

Trait Implementations§

Source§

impl Clone for SearchEntry

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SearchEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SearchEntry

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for SearchEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SearchEntry

Source§

impl HasParamSpec for SearchEntry

Source§

type ParamSpec = ParamSpecObject

Source§

type SetValue = SearchEntry

Preferred value to be used as setter for the associated ParamSpec.
Source§

type BuilderFn = fn(&str) -> ParamSpecObjectBuilder<'_, SearchEntry>

Source§

fn param_spec_builder() -> Self::BuilderFn

Source§

impl Hash for SearchEntry

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IsA<Buildable> for SearchEntry

Source§

impl IsA<CellEditable> for SearchEntry

Source§

impl IsA<Editable> for SearchEntry

Source§

impl IsA<Entry> for SearchEntry

Source§

impl IsA<Widget> for SearchEntry

Source§

impl Ord for SearchEntry

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl ParentClassIs for SearchEntry

Source§

impl<OT: ObjectType> PartialEq<OT> for SearchEntry

Source§

fn eq(&self, other: &OT) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<OT: ObjectType> PartialOrd<OT> for SearchEntry

Source§

fn partial_cmp(&self, other: &OT) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StaticType for SearchEntry

Source§

fn static_type() -> Type

Returns the type identifier of Self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<O> BuildableExt for O
where O: IsA<Buildable>,

Source§

fn add_child( &self, builder: &impl IsA<Builder>, child: &impl IsA<Object>, type_: Option<&str>, )

Adds a child to self. type_ is an optional string describing how the child should be added. Read more
Source§

fn construct_child( &self, builder: &impl IsA<Builder>, name: &str, ) -> Option<Object>

Constructs a child of self with the name name. Read more
Source§

fn internal_child( &self, builder: &impl IsA<Builder>, childname: &str, ) -> Option<Object>

Get the internal child called childname of the self object. Read more
Source§

fn parser_finished(&self, builder: &impl IsA<Builder>)

Called when the builder finishes the parsing of a [GtkBuilder UI definition][BUILDER-UI]. Note that this will be called once for each time gtk_builder_add_from_file() or BuilderExtManual::add_from_string() is called on a builder. Read more
Source§

fn set_buildable_property( &self, builder: &impl IsA<Builder>, name: &str, value: &Value, )

Sets the property name name to value on the self object. Read more
Source§

impl<O> BuildableExtManual for O
where O: IsA<Buildable>,

Source§

impl<T> Cast for T
where T: ObjectType,

Source§

fn upcast<T>(self) -> T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
Source§

fn upcast_ref<T>(&self) -> &T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
Source§

fn downcast<T>(self) -> Result<T, Self>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a subclass or interface implementor T. Read more
Source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
Source§

fn dynamic_cast<T>(self) -> Result<T, Self>
where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while upcast will do many checks at compile-time already. downcast will perform the same checks at runtime as dynamic_cast, but will also ensure some amount of compile-time safety. Read more
Source§

fn dynamic_cast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
Source§

unsafe fn unsafe_cast<T>(self) -> T
where T: ObjectType,

Casts to T unconditionally. Read more
Source§

unsafe fn unsafe_cast_ref<T>(&self) -> &T
where T: ObjectType,

Casts to &T unconditionally. Read more
Source§

impl<O> CellEditableExt for O
where O: IsA<CellEditable>,

Source§

fn editing_done(&self)

Emits the editing-done signal.
Source§

fn remove_widget(&self)

Emits the remove-widget signal.
Source§

fn start_editing(&self, event: Option<&Event>)

Begins editing on a self. Read more
Source§

fn is_editing_canceled(&self) -> bool

Indicates whether editing on the cell has been canceled.
Source§

fn set_editing_canceled(&self, editing_canceled: bool)

Indicates whether editing on the cell has been canceled.
Source§

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

This signal is a sign for the cell renderer to update its value from the cell_editable. Read more
Source§

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

This signal is meant to indicate that the cell is finished editing, and the cell_editable widget is being removed and may subsequently be destroyed. Read more
Source§

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

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<O> EditableExt for O
where O: IsA<Editable>,

Source§

fn copy_clipboard(&self)

Copies the contents of the currently selected content in the editable and puts it on the clipboard.
Source§

fn cut_clipboard(&self)

Removes the contents of the currently selected content in the editable and puts it on the clipboard.
Source§

fn delete_selection(&self)

Deletes the currently selected text of the editable. This call doesn’t do anything if there is no selected text.
Source§

fn delete_text(&self, start_pos: i32, end_pos: i32)

Deletes a sequence of characters. The characters that are deleted are those characters at positions from start_pos up to, but not including end_pos. If end_pos is negative, then the characters deleted are those from start_pos to the end of the text. Read more
Source§

fn chars(&self, start_pos: i32, end_pos: i32) -> Option<GString>

Retrieves a sequence of characters. The characters that are retrieved are those characters at positions from start_pos up to, but not including end_pos. If end_pos is negative, then the characters retrieved are those characters from start_pos to the end of the text. Read more
Source§

fn is_editable(&self) -> bool

Retrieves whether self is editable. See set_editable(). Read more
Source§

fn position(&self) -> i32

Retrieves the current position of the cursor relative to the start of the content of the editable. Read more
Source§

fn selection_bounds(&self) -> Option<(i32, i32)>

Retrieves the selection bound of the editable. start_pos will be filled with the start of the selection and end_pos with end. If no text was selected both will be identical and false will be returned. Read more
Source§

fn insert_text(&self, new_text: &str, position: &mut i32)

Inserts new_text_length bytes of new_text into the contents of the widget, at position position. Read more
Source§

fn paste_clipboard(&self)

Pastes the content of the clipboard to the current position of the cursor in the editable.
Source§

fn select_region(&self, start_pos: i32, end_pos: i32)

Selects a region of text. The characters that are selected are those characters at positions from start_pos up to, but not including end_pos. If end_pos is negative, then the characters selected are those characters from start_pos to the end of the text. Read more
Source§

fn set_editable(&self, is_editable: bool)

Determines if the user can edit the text in the editable widget or not. Read more
Source§

fn set_position(&self, position: i32)

Sets the cursor position in the editable to the given value. Read more
Source§

impl<T> EditableSignals for T
where T: IsA<Editable>,

Source§

fn connect_changed<F>(&self, changed_func: F) -> SignalHandlerId
where F: Fn(&T) + 'static,

The ::changed signal is emitted at the end of a single user-visible operation on the contents of the Editable. Read more
Source§

fn connect_delete_text<F>(&self, delete_text_func: F) -> SignalHandlerId
where F: Fn(&T, i32, i32) + 'static,

This signal is emitted when text is deleted from the widget by the user. The default handler for this signal will normally be responsible for deleting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the range of deleted text, or prevent it from being deleted entirely. The start_pos and end_pos parameters are interpreted as for EditableExt::delete_text(). Read more
Source§

fn connect_insert_text<F>(&self, insert_text_func: F) -> SignalHandlerId
where F: Fn(&T, &str, &mut i32) + 'static,

This signal is emitted when text is inserted into the widget by the user. The default handler for this signal will normally be responsible for inserting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the inserted text, or prevent it from being inserted entirely. Read more
Source§

impl<O> EntryExt for O
where O: IsA<Entry>,

Source§

fn activates_default(&self) -> bool

Retrieves the value set by set_activates_default(). Read more
Source§

fn alignment(&self) -> f32

Gets the value set by set_alignment(). Read more
Source§

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

Gets the attribute list that was set on the entry using set_attributes(), if any. Read more
Source§

fn buffer(&self) -> EntryBuffer

Get the EntryBuffer object which holds the text for this widget. Read more
Source§

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

Returns the auxiliary completion object currently in use by self. Read more
Source§

fn current_icon_drag_source(&self) -> i32

Returns the index of the icon which is the source of the current DND operation, or -1. Read more
Source§

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

Retrieves the horizontal cursor adjustment for the entry. See set_cursor_hadjustment(). Read more
Source§

fn has_frame(&self) -> bool

Gets the value set by set_has_frame(). Read more
Source§

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

Returns whether the icon is activatable. Read more
Source§

fn icon_area(&self, icon_pos: EntryIconPosition) -> Rectangle

Gets the area where entry’s icon at icon_pos is drawn. This function is useful when drawing something to the entry in a draw callback. Read more
Source§

fn icon_at_pos(&self, x: i32, y: i32) -> i32

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

fn icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<Icon>

Retrieves the gio::Icon used for the icon, or None if there is no icon or if the icon was set by some other method (e.g., by stock, pixbuf, or icon name). Read more
Source§

fn icon_name(&self, icon_pos: EntryIconPosition) -> Option<GString>

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

fn icon_pixbuf(&self, icon_pos: EntryIconPosition) -> Option<Pixbuf>

Retrieves the image used for the icon. Read more
Source§

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

Returns whether the icon appears sensitive or insensitive. Read more
Source§

fn icon_storage_type(&self, icon_pos: EntryIconPosition) -> ImageType

Gets the type of representation being used by the icon to store image data. If the icon has no image data, the return value will be ImageType::Empty. Read more
Source§

fn icon_tooltip_markup(&self, icon_pos: EntryIconPosition) -> Option<GString>

Gets the contents of the tooltip on the icon at the specified position in self. Read more
Source§

fn icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option<GString>

Gets the contents of the tooltip on the icon at the specified position in self. Read more
Source§

fn input_hints(&self) -> InputHints

Gets the value of the input-hints property.
Source§

fn input_purpose(&self) -> InputPurpose

Gets the value of the input-purpose property.
Source§

fn layout(&self) -> Option<Layout>

Gets the pango::Layout used to display the entry. The layout is useful to e.g. convert text positions to pixel positions, in combination with layout_offsets(). The returned layout is owned by the entry and must not be modified or freed by the caller. Read more
Source§

fn layout_offsets(&self) -> (i32, i32)

Obtains the position of the pango::Layout used to render text in the entry, in widget coordinates. Useful if you want to line up the text in an entry with some other text, e.g. when using the entry to implement editable cells in a sheet widget. Read more
Source§

fn max_length(&self) -> i32

Retrieves the maximum allowed length of the text in self. See set_max_length(). Read more
Source§

fn max_width_chars(&self) -> i32

Retrieves the desired maximum width of self, in characters. See set_max_width_chars(). Read more
Source§

fn is_overwrite_mode(&self) -> bool

Gets the value set by set_overwrite_mode(). Read more
Source§

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

Retrieves the text that will be displayed when self is empty and unfocused Read more
Source§

fn progress_fraction(&self) -> f64

Returns the current fraction of the task that’s been completed. See set_progress_fraction(). Read more
Source§

fn progress_pulse_step(&self) -> f64

Retrieves the pulse step set with set_progress_pulse_step(). Read more
Source§

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

Gets the tabstops that were set on the entry using set_tabs(), if any. Read more
Source§

fn text(&self) -> GString

Retrieves the contents of the entry widget. See also EditableExt::chars(). Read more
Source§

fn text_area(&self) -> Rectangle

Gets the area where the entry’s text is drawn. This function is useful when drawing something to the entry in a draw callback. Read more
Source§

fn text_length(&self) -> u16

Retrieves the current length of the text in self. Read more
Source§

fn is_visible(&self) -> bool

Retrieves whether the text in self is visible. See set_visibility(). Read more
Source§

fn width_chars(&self) -> i32

Gets the value set by set_width_chars(). Read more
Source§

fn grab_focus_without_selecting(&self)

Causes self to have keyboard focus. Read more
Source§

fn im_context_filter_keypress(&self, event: &EventKey) -> bool

Allow the Entry input method to internally handle key press and release events. If this function returns true, then no further processing should be done for this key event. See IMContextExt::filter_keypress(). Read more
Source§

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

Converts from a position in the entry’s pango::Layout (returned by layout()) to a position in the entry contents (returned by text()). Read more
Source§

fn progress_pulse(&self)

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

fn reset_im_context(&self)

Reset the input method context of the entry if needed. Read more
Source§

fn set_activates_default(&self, setting: bool)

If setting is true, pressing Enter in the self will activate the default widget for the window containing the entry. This usually means that the dialog box containing the entry will be closed, since the default widget is usually one of the dialog buttons. Read more
Source§

fn set_alignment(&self, xalign: f32)

Sets the alignment for the contents of the entry. This controls the horizontal positioning of the contents when the displayed text is shorter than the width of the entry. Read more
Source§

fn set_attributes(&self, attrs: &AttrList)

Sets a pango::AttrList; the attributes in the list are applied to the entry text. Read more
Source§

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

Set the EntryBuffer object which holds the text for this widget. Read more
Source§

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

Sets completion to be the auxiliary completion object to use with self. All further configuration of the completion mechanism is done on completion using the EntryCompletion API. Completion is disabled if completion is set to None. Read more
Source§

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

Hooks up an adjustment to the cursor position in an entry, so that when the cursor is moved, the adjustment is scrolled to show that position. See ScrolledWindowExt::hadjustment() for a typical way of obtaining the adjustment. Read more
Source§

fn set_has_frame(&self, setting: bool)

Sets whether the entry has a beveled frame around it. Read more
Source§

fn set_icon_activatable(&self, icon_pos: EntryIconPosition, activatable: bool)

Sets whether the icon is activatable. Read more
Source§

fn set_icon_drag_source( &self, icon_pos: EntryIconPosition, target_list: &TargetList, actions: DragAction, )

Sets up the icon at the given position so that GTK+ will start a drag operation when the user clicks and drags the icon. Read more
Source§

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

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. Read more
Source§

fn set_icon_from_icon_name( &self, icon_pos: EntryIconPosition, icon_name: Option<&str>, )

Sets the icon shown in the entry at the specified position from the current icon theme. Read more
Source§

fn set_icon_from_pixbuf( &self, icon_pos: EntryIconPosition, pixbuf: Option<&Pixbuf>, )

Sets the icon shown in the specified position using a pixbuf. Read more
Source§

fn set_icon_sensitive(&self, icon_pos: EntryIconPosition, sensitive: bool)

Sets the sensitivity for the specified icon. Read more
Source§

fn set_icon_tooltip_markup( &self, icon_pos: EntryIconPosition, tooltip: Option<&str>, )

Sets tooltip as the contents of the tooltip for the icon at the specified position. tooltip is assumed to be marked up with the [Pango text markup language][PangoMarkupFormat]. Read more
Source§

fn set_icon_tooltip_text( &self, icon_pos: EntryIconPosition, tooltip: Option<&str>, )

Sets tooltip as the contents of the tooltip for the icon at the specified position. Read more
Source§

fn set_input_hints(&self, hints: InputHints)

Sets the input-hints property, which allows input methods to fine-tune their behaviour. Read more
Source§

fn set_input_purpose(&self, purpose: InputPurpose)

Sets the input-purpose property which can be used by on-screen keyboards and other input methods to adjust their behaviour. Read more
Source§

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

Sets the character to use in place of the actual text when set_visibility() has been called to set text visibility to false. i.e. this is the character used in “password mode” to show the user how many characters have been typed. By default, GTK+ picks the best invisible char available in the current font. If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type. Read more
Source§

fn set_max_length(&self, max: i32)

Sets the maximum allowed length of the contents of the widget. If the current contents are longer than the given length, then they will be truncated to fit. Read more
Source§

fn set_max_width_chars(&self, n_chars: i32)

Sets the desired maximum width in characters of self. Read more
Source§

fn set_overwrite_mode(&self, overwrite: bool)

Sets whether the text is overwritten when typing in the Entry. Read more
Source§

fn set_placeholder_text(&self, text: Option<&str>)

Sets text to be displayed in self when it is empty and unfocused. This can be used to give a visual hint of the expected contents of the Entry. Read more
Source§

fn set_progress_fraction(&self, fraction: f64)

Causes the entry’s progress indicator to “fill in” the given fraction of the bar. The fraction should be between 0.0 and 1.0, inclusive. Read more
Source§

fn set_progress_pulse_step(&self, fraction: f64)

Sets the fraction of total entry width to move the progress bouncing block for each call to progress_pulse(). Read more
Source§

fn set_tabs(&self, tabs: &TabArray)

Sets a pango::TabArray; the tabstops in the array are applied to the entry text. Read more
Source§

fn set_text(&self, text: &str)

Sets the text in the widget to the given value, replacing the current contents. Read more
Source§

fn set_visibility(&self, visible: bool)

Sets whether the contents of the entry are visible or not. When visibility is set to false, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere. Read more
Source§

fn set_width_chars(&self, n_chars: i32)

Changes the size request of the entry to be about the right size for n_chars characters. Note that it changes the size request, the size can still be affected by how you pack the widget into containers. If n_chars is -1, the size reverts to the default entry size. Read more
Source§

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

Converts from a position in the entry contents (returned by text()) to a position in the entry’s pango::Layout (returned by layout(), with text retrieved via Layout::text()). Read more
Source§

fn unset_invisible_char(&self)

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

fn is_caps_lock_warning(&self) -> bool

Whether password entries will show a warning when Caps Lock is on. Read more
Source§

fn set_caps_lock_warning(&self, caps_lock_warning: bool)

Whether password entries will show a warning when Caps Lock is on. Read more
Source§

fn cursor_position(&self) -> i32

Source§

fn enables_emoji_completion(&self) -> bool

Source§

fn set_enable_emoji_completion(&self, enable_emoji_completion: bool)

Source§

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

Which IM (input method) module should be used for this entry. See IMContext. Read more
Source§

fn set_im_module(&self, im_module: Option<&str>)

Which IM (input method) module should be used for this entry. See IMContext. Read more
Source§

fn is_invisible_char_set(&self) -> bool

Whether the invisible char has been set for the Entry.
Source§

fn set_invisible_char_set(&self, invisible_char_set: bool)

Whether the invisible char has been set for the Entry.
Source§

fn populates_all(&self) -> bool

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

fn set_populate_all(&self, populate_all: bool)

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

fn is_primary_icon_activatable(&self) -> bool

Whether the primary icon is activatable. Read more
Source§

fn set_primary_icon_activatable(&self, primary_icon_activatable: bool)

Whether the primary icon is activatable. Read more
Source§

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

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

fn set_primary_icon_gicon<P: IsA<Icon>>(&self, primary_icon_gicon: Option<&P>)

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

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

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

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

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

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

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

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

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

fn is_primary_icon_sensitive(&self) -> bool

Whether the primary icon is sensitive. Read more
Source§

fn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool)

Whether the primary icon is sensitive. Read more
Source§

fn primary_icon_storage_type(&self) -> ImageType

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

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

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

fn set_primary_icon_tooltip_markup( &self, primary_icon_tooltip_markup: Option<&str>, )

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

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

The contents of the tooltip on the primary icon. Read more
Source§

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

The contents of the tooltip on the primary icon. Read more
Source§

fn scroll_offset(&self) -> i32

Source§

fn is_secondary_icon_activatable(&self) -> bool

Whether the secondary icon is activatable. Read more
Source§

fn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool)

Whether the secondary icon is activatable. Read more
Source§

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

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

fn set_secondary_icon_gicon<P: IsA<Icon>>( &self, secondary_icon_gicon: Option<&P>, )

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

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

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

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

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

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

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

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

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

fn is_secondary_icon_sensitive(&self) -> bool

Whether the secondary icon is sensitive. Read more
Source§

fn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool)

Whether the secondary icon is sensitive. Read more
Source§

fn secondary_icon_storage_type(&self) -> ImageType

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

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

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

fn set_secondary_icon_tooltip_markup( &self, secondary_icon_tooltip_markup: Option<&str>, )

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

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

The contents of the tooltip on the secondary icon. Read more
Source§

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

The contents of the tooltip on the secondary icon. Read more
Source§

fn selection_bound(&self) -> i32

Source§

fn shows_emoji_icon(&self) -> bool

Source§

fn set_show_emoji_icon(&self, show_emoji_icon: bool)

Source§

fn must_truncate_multiline(&self) -> bool

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

fn set_truncate_multiline(&self, truncate_multiline: bool)

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

fn xalign(&self) -> f32

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

fn set_xalign(&self, xalign: f32)

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

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

The ::activate signal is emitted when the user hits the Enter key. Read more
Source§

fn emit_activate(&self)

Source§

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

The ::backspace signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user asks for it. Read more
Source§

fn emit_backspace(&self)

Source§

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

The ::copy-clipboard signal is a [keybinding signal][GtkBindingSignal] which gets emitted to copy the selection to the clipboard. Read more
Source§

fn emit_copy_clipboard(&self)

Source§

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

The ::cut-clipboard signal is a [keybinding signal][GtkBindingSignal] which gets emitted to cut the selection to the clipboard. Read more
Source§

fn emit_cut_clipboard(&self)

Source§

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

The ::delete-from-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a text deletion. Read more
Source§

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

Source§

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

The ::icon-press signal is emitted when an activatable icon is clicked. Read more
Source§

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

The ::icon-release signal is emitted on the button release from a mouse click over an activatable icon. Read more
Source§

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

The ::insert-at-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates the insertion of a fixed string at the cursor. Read more
Source§

fn emit_insert_at_cursor(&self, string: &str)

Source§

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

The ::insert-emoji signal is a [keybinding signal][GtkBindingSignal] which gets emitted to present the Emoji chooser for the entry. Read more
Source§

fn emit_insert_emoji(&self)

Source§

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

The ::move-cursor signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a cursor movement. If the cursor is not visible in entry, this signal causes the viewport to be moved instead. Read more
Source§

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

Source§

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

The ::paste-clipboard signal is a [keybinding signal][GtkBindingSignal] which gets emitted to paste the contents of the clipboard into the text view. Read more
Source§

fn emit_paste_clipboard(&self)

Source§

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

The ::populate-popup signal gets emitted before showing the context menu of the entry. Read more
Source§

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

If an input method is used, the typed text will not immediately be committed to the buffer. So if you are interested in the text, connect to this signal. Read more
Source§

fn emit_preedit_changed(&self, preedit: &str)

Source§

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

The ::toggle-overwrite signal is a [keybinding signal][GtkBindingSignal] which gets emitted to toggle the overwrite mode of the entry. Read more
Source§

fn emit_toggle_overwrite(&self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<O> EntryExtManual for O
where O: IsA<Entry>,

Source§

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

Retrieves the character displayed in place of the real characters for entries with visibility set to false. See EntryExt::set_invisible_char(). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec(_: *const GList, _: usize) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(_: *const GList, _: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GPtrArray, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec( _: *const GPtrArray, _: usize, ) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(_: *const GPtrArray, _: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GSList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GPtrArray, num: usize, ) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>

Source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

Source§

impl<U> IsSubclassableExt for U

Source§

impl<Super, Sub> MayDowncastTo<Sub> for Super
where Super: IsA<Super>, Sub: IsA<Super>,

Source§

impl<T> ObjectExt for T
where T: ObjectType,

Source§

fn is<U>(&self) -> bool
where U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
Source§

fn type_(&self) -> Type

Returns the type of the object.
Source§

fn object_class(&self) -> &Class<Object>

Returns the ObjectClass of the object. Read more
Source§

fn class(&self) -> &Class<T>
where T: IsClass,

Returns the class of the object.
Source§

fn class_of<U>(&self) -> Option<&Class<U>>
where U: IsClass,

Returns the class of the object in the given type T. Read more
Source§

fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>
where U: IsInterface,

Returns the interface T of the object. Read more
Source§

fn set_property(&self, property_name: &str, value: impl Into<Value>)

Sets the property property_name of the object to value value. Read more
Source§

fn set_property_from_value(&self, property_name: &str, value: &Value)

Sets the property property_name of the object to value value. Read more
Source§

fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])

Sets multiple properties of the object at once. Read more
Source§

fn set_properties_from_value(&self, property_values: &[(&str, Value)])

Sets multiple properties of the object at once. Read more
Source§

fn property<V>(&self, property_name: &str) -> V
where V: for<'b> FromValue<'b> + 'static,

Gets the property property_name of the object and cast it to the type V. Read more
Source§

fn property_value(&self, property_name: &str) -> Value

Gets the property property_name of the object. Read more
Source§

fn has_property(&self, property_name: &str, type_: Option<Type>) -> bool

Check if the object has a property property_name of the given type_. Read more
Source§

fn property_type(&self, property_name: &str) -> Option<Type>

Get the type of the property property_name of this object. Read more
Source§

fn find_property(&self, property_name: &str) -> Option<ParamSpec>

Get the ParamSpec of the property property_name of this object.
Source§

fn list_properties(&self) -> PtrSlice<ParamSpec>

Return all ParamSpec of the properties of this object.
Source§

fn freeze_notify(&self) -> PropertyNotificationFreezeGuard

Freeze all property notifications until the return guard object is dropped. Read more
Source§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
Source§

unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
Source§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
Source§

unsafe fn set_data<QD>(&self, key: &str, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
Source§

unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
Source§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
Source§

fn block_signal(&self, handler_id: &SignalHandlerId)

Block a given signal handler. Read more
Source§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Unblock a given signal handler.
Source§

fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)

Stop emission of the currently emitted signal.
Source§

fn stop_signal_emission_by_name(&self, signal_name: &str)

Stop emission of the currently emitted signal by the (possibly detailed) signal name.
Source§

fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_name on this object. Read more
Source§

fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_id on this object. Read more
Source§

fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_name on this object. Read more
Source§

fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_id on this object. Read more
Source§

unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_name on this object. Read more
Source§

unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_id on this object. Read more
Source§

fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_name on this object. Read more
Source§

fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_id on this object. Read more
Source§

fn watch_closure(&self, closure: &impl AsRef<Closure>)

Limits the lifetime of closure to the lifetime of the object. When the object’s reference count drops to zero, the closure will be invalidated. An invalidated closure will ignore any calls to invoke_with_values, or invoke when using Rust closures.
Source§

fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> R

Emit signal by signal id. Read more
Source§

fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>

Same as Self::emit but takes Value for the arguments.
Source§

fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> R

Emit signal by its name. Read more
Source§

fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>

Emit signal by its name. Read more
Source§

fn emit_by_name_with_details<R>( &self, signal_name: &str, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by its name with details. Read more
Source§

fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by its name with details. Read more
Source§

fn emit_with_details<R>( &self, signal_id: SignalId, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by signal id with details. Read more
Source§

fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by signal id with details. Read more
Source§

fn disconnect(&self, handler_id: SignalHandlerId)

Disconnect a previously connected signal handler.
Source§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Connect to the notify signal of the object. Read more
Source§

fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + 'static,

Connect to the notify signal of the object. Read more
Source§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
where F: Fn(&T, &ParamSpec),

Connect to the notify signal of the object. Read more
Source§

fn notify(&self, property_name: &str)

Notify that the given property has changed its value. Read more
Source§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Notify that the given property has changed its value. Read more
Source§

fn downgrade(&self) -> WeakRef<T>

Downgrade this object to a weak reference.
Source§

fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + Send + 'static,

Add a callback to be notified when the Object is disposed.
Source§

fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + 'static,

Add a callback to be notified when the Object is disposed. Read more
Source§

fn bind_property<'a, 'f, 't, O>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str, ) -> BindingBuilder<'a, 'f, 't>
where O: ObjectType,

Bind property source_property on this object to the target_property on the target object. Read more
Source§

fn ref_count(&self) -> u32

Returns the strong reference count of this object.
Source§

unsafe fn run_dispose(&self)

Runs the dispose mechanism of the object. Read more
Source§

impl<T> Property for T
where T: HasParamSpec,

Source§

type Value = T

Source§

impl<T> PropertyGet for T
where T: HasParamSpec,

Source§

type Value = T

Source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

Source§

impl<O> SearchEntryExt for O
where O: IsA<SearchEntry>,

Source§

fn handle_event(&self, event: &Event) -> bool

This function should be called when the top-level window which contains the search entry received a key event. If the entry is part of a SearchBar, it is preferable to call SearchBarExt::handle_event() instead, which will reveal the entry in addition to passing the event to this function. Read more
Source§

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

The ::next-match signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a move to the next match for the current search string. Read more
Source§

fn emit_next_match(&self)

Source§

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

The ::previous-match signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a move to the previous match for the current search string. Read more
Source§

fn emit_previous_match(&self)

Source§

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

The search-changed signal is emitted with a short delay of 150 milliseconds after the last change to the entry text.
The ::stop-search signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user stops a search via keyboard input. Read more
Source§

impl<T> StaticTypeExt for T
where T: StaticType,

Source§

fn ensure_type()

Ensures that the type has been registered with the type system.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> TransparentType for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<O> WidgetExt for O
where O: IsA<Widget>,

Source§

fn activate(&self) -> bool

For widgets that can be “activated” (buttons, menu items, etc.) this function activates them. Activation is what happens when you press Enter on a widget during key navigation. If self isn’t activatable, the function returns false. Read more
Source§

fn add_accelerator( &self, accel_signal: &str, accel_group: &impl IsA<AccelGroup>, accel_key: u32, accel_mods: ModifierType, accel_flags: AccelFlags, )

Installs an accelerator for this self in accel_group that causes accel_signal to be emitted if the accelerator is activated. The accel_group needs to be added to the widget’s toplevel via GtkWindowExt::add_accel_group(), and the signal must be of type G_SIGNAL_ACTION. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use gtk_accel_map_add_entry() and set_accel_path() or GtkMenuItemExt::set_accel_path() instead. Read more
Source§

fn add_device_events(&self, device: &Device, events: EventMask)

Adds the device events in the bitfield events to the event mask for self. See set_device_events() for details. Read more
Source§

fn add_mnemonic_label(&self, label: &impl IsA<Widget>)

Adds a widget to the list of mnemonic labels for this widget. (See list_mnemonic_labels()). Note the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well, by using a connection to the destroy signal or a weak notifier. Read more
Source§

fn can_activate_accel(&self, signal_id: u32) -> bool

Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This is done by emitting the can-activate-accel signal on self; if the signal isn’t overridden by a handler or in a derived widget, then the default check is that the widget must be sensitive, and the widget and all its ancestors mapped. Read more
Source§

fn child_focus(&self, direction: DirectionType) -> bool

This function is used by custom widget implementations; if you’re writing an app, you’d use grab_focus() to move the focus to a particular widget, and ContainerExt::set_focus_chain() to change the focus tab order. So you may want to investigate those functions instead. Read more
Source§

fn child_notify(&self, child_property: &str)

Emits a child-notify signal for the [child property][child-properties] child_property on self. Read more
Source§

fn compute_expand(&self, orientation: Orientation) -> bool

Computes whether a container should give this widget extra space when possible. Containers should check this, rather than looking at hexpands() or vexpands(). Read more
Source§

fn create_pango_context(&self) -> Context

Creates a new pango::Context with the appropriate font map, font options, font description, and base direction for drawing text for this widget. See also pango_context(). Read more
Source§

fn create_pango_layout(&self, text: Option<&str>) -> Layout

Creates a new pango::Layout with the appropriate font map, font description, and base direction for drawing text for this widget. Read more
Source§

fn device_is_shadowed(&self, device: &Device) -> bool

Returns true if device has been shadowed by a GTK+ device grab on another widget, so it would stop sending events to self. This may be used in the grab-notify signal to check for specific devices. See device_grab_add(). Read more
Source§

fn drag_begin_with_coordinates( &self, targets: &TargetList, actions: DragAction, button: i32, event: Option<&Event>, x: i32, y: i32, ) -> Option<DragContext>

Initiates a drag on the source side. The function only needs to be used when the application is starting drags itself, and is not needed when WidgetExtManual::drag_source_set() is used. Read more
Source§

fn drag_check_threshold( &self, start_x: i32, start_y: i32, current_x: i32, current_y: i32, ) -> bool

Checks to see if a mouse drag starting at (start_x, start_y) and ending at (current_x, current_y) has passed the GTK+ drag threshold, and thus should trigger the beginning of a drag-and-drop operation. Read more
Source§

fn drag_dest_add_image_targets(&self)

Add the image targets supported by SelectionData to the target list of the drag destination. The targets are added with info = 0. If you need another value, use TargetList::add_image_targets() and drag_dest_set_target_list().
Source§

fn drag_dest_add_text_targets(&self)

Add the text targets supported by SelectionData to the target list of the drag destination. The targets are added with info = 0. If you need another value, use TargetList::add_text_targets() and drag_dest_set_target_list().
Source§

fn drag_dest_add_uri_targets(&self)

Add the URI targets supported by SelectionData to the target list of the drag destination. The targets are added with info = 0. If you need another value, use TargetList::add_uri_targets() and drag_dest_set_target_list().
Source§

fn drag_dest_find_target( &self, context: &DragContext, target_list: Option<&TargetList>, ) -> Option<Atom>

Looks for a match between the supported targets of context and the dest_target_list, returning the first matching target, otherwise returning GDK_NONE. dest_target_list should usually be the return value from drag_dest_get_target_list(), but some widgets may have different valid targets for different parts of the widget; in that case, they will have to implement a drag_motion handler that passes the correct target list to this function. Read more
Source§

fn drag_dest_get_target_list(&self) -> Option<TargetList>

Returns the list of targets this widget can accept from drag-and-drop. Read more
Source§

fn drag_dest_get_track_motion(&self) -> bool

Returns whether the widget has been configured to always emit drag-motion signals. Read more
Source§

fn drag_dest_set_target_list(&self, target_list: Option<&TargetList>)

Sets the target types that this widget can accept from drag-and-drop. The widget must first be made into a drag destination with WidgetExtManual::drag_dest_set(). Read more
Source§

fn drag_dest_set_track_motion(&self, track_motion: bool)

Tells the widget to emit drag-motion and drag-leave events regardless of the targets and the DestDefaults::MOTION flag. Read more
Source§

fn drag_dest_unset(&self)

Clears information about a drop destination set with WidgetExtManual::drag_dest_set(). The widget will no longer receive notification of drags.
Source§

fn drag_get_data(&self, context: &DragContext, target: &Atom, time_: u32)

Gets the data associated with a drag. When the data is received or the retrieval fails, GTK+ will emit a drag-data-received signal. Failure of the retrieval is indicated by the length field of the selection_data signal parameter being negative. However, when drag_get_data() is called implicitely because the DestDefaults::DROP was set, then the widget will not receive notification of failed drops. Read more
Source§

fn drag_highlight(&self)

Highlights a widget as a currently hovered drop target. To end the highlight, call drag_unhighlight(). GTK+ calls this automatically if DestDefaults::HIGHLIGHT is set.
Source§

fn drag_source_add_image_targets(&self)

Add the writable image targets supported by SelectionData to the target list of the drag source. The targets are added with info = 0. If you need another value, use TargetList::add_image_targets() and drag_source_set_target_list().
Source§

fn drag_source_add_text_targets(&self)

Add the text targets supported by SelectionData to the target list of the drag source. The targets are added with info = 0. If you need another value, use TargetList::add_text_targets() and drag_source_set_target_list().
Source§

fn drag_source_add_uri_targets(&self)

Add the URI targets supported by SelectionData to the target list of the drag source. The targets are added with info = 0. If you need another value, use TargetList::add_uri_targets() and drag_source_set_target_list().
Source§

fn drag_source_get_target_list(&self) -> Option<TargetList>

Gets the list of targets this widget can provide for drag-and-drop. Read more
Source§

fn drag_source_set_icon_gicon(&self, icon: &impl IsA<Icon>)

Sets the icon that will be used for drags from a particular source to icon. See the docs for IconTheme for more details. Read more
Source§

fn drag_source_set_icon_name(&self, icon_name: &str)

Sets the icon that will be used for drags from a particular source to a themed icon. See the docs for IconTheme for more details. Read more
Source§

fn drag_source_set_icon_pixbuf(&self, pixbuf: &Pixbuf)

Sets the icon that will be used for drags from a particular widget from a gdk_pixbuf::Pixbuf. GTK+ retains a reference for pixbuf and will release it when it is no longer needed. Read more
Source§

fn drag_source_set_target_list(&self, target_list: Option<&TargetList>)

Changes the target types that this widget offers for drag-and-drop. The widget must first be made into a drag source with WidgetExtManual::drag_source_set(). Read more
Source§

fn drag_source_unset(&self)

Undoes the effects of WidgetExtManual::drag_source_set().
Source§

fn drag_unhighlight(&self)

Removes a highlight set by drag_highlight() from a widget.
Source§

fn draw(&self, cr: &Context)

Draws self to cr. The top left corner of the widget will be drawn to the currently set origin point of cr. Read more
Source§

fn error_bell(&self)

Notifies the user about an input-related error on this widget. If the gtk-error-bell setting is true, it calls Window::beep(), otherwise it does nothing. Read more
Source§

fn event(&self, event: &Event) -> bool

Rarely-used function. This function is used to emit the event signals on a widget (those signals should never be emitted without using this function to do so). If you want to synthesize an event though, don’t use this function; instead, use main_do_event() so the event will behave as if it were in the event queue. Don’t synthesize expose events; instead, use Window::invalidate_rect() to invalidate a region of the window. Read more
Source§

fn freeze_child_notify(&self)

Stops emission of child-notify signals on self. The signals are queued until thaw_child_notify() is called on self. Read more
Source§

fn accessible(&self) -> Option<Object>

Returns the accessible object that describes the widget to an assistive technology. Read more
Source§

fn action_group(&self, prefix: &str) -> Option<ActionGroup>

Retrieves the gio::ActionGroup that was registered using prefix. The resulting gio::ActionGroup may have been registered to self or any Widget in its ancestry. Read more
Source§

fn allocated_baseline(&self) -> i32

Returns the baseline that has currently been allocated to self. This function is intended to be used when implementing handlers for the draw function, and when allocating child widgets in size_allocate. Read more
Source§

fn allocated_height(&self) -> i32

Returns the height that has currently been allocated to self. This function is intended to be used when implementing handlers for the draw function. Read more
Source§

fn allocated_size(&self) -> (Allocation, i32)

Retrieves the widget’s allocated size. Read more
Source§

fn allocated_width(&self) -> i32

Returns the width that has currently been allocated to self. This function is intended to be used when implementing handlers for the draw function. Read more
Source§

fn allocation(&self) -> Allocation

Retrieves the widget’s allocation. Read more
Source§

fn ancestor(&self, widget_type: Type) -> Option<Widget>

Gets the first ancestor of self with type widget_type. For example, gtk_widget_get_ancestor (widget, GTK_TYPE_BOX) gets the first Box that’s an ancestor of self. No reference will be added to the returned widget; it should not be unreferenced. See note about checking for a toplevel Window in the docs for toplevel(). Read more
Source§

fn is_app_paintable(&self) -> bool

Determines whether the application intends to draw on the widget in an draw handler. Read more
Source§

fn can_default(&self) -> bool

Determines whether self can be a default widget. See set_can_default(). Read more
Source§

fn can_focus(&self) -> bool

Determines whether self can own the input focus. See set_can_focus(). Read more
Source§

fn is_child_visible(&self) -> bool

Gets the value set with set_child_visible(). If you feel a need to use this function, your code probably needs reorganization. Read more
Source§

fn clip(&self) -> Allocation

Retrieves the widget’s clip area. Read more
Source§

fn clipboard(&self, selection: &Atom) -> Clipboard

Returns the clipboard object for the given selection to be used with self. self must have a gdk::Display associated with it, so must be attached to a toplevel window. Read more
Source§

fn device_is_enabled(&self, device: &Device) -> bool

Returns whether device can interact with self and its children. See set_device_enabled(). Read more
Source§

fn device_events(&self, device: &Device) -> EventMask

Returns the events mask for the widget corresponding to an specific device. These are the events that the widget will receive when device operates on it. Read more
Source§

fn direction(&self) -> TextDirection

Gets the reading direction for a particular widget. See set_direction(). Read more
Source§

fn display(&self) -> Display

Get the gdk::Display for the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a Window at the top. Read more
Source§

fn is_double_buffered(&self) -> bool

Determines whether the widget is double buffered. Read more
Source§

fn gets_focus_on_click(&self) -> bool

Returns whether the widget should grab focus when it is clicked with the mouse. See set_focus_on_click(). Read more
Source§

fn font_map(&self) -> Option<FontMap>

Gets the font map that has been set with set_font_map(). Read more
Source§

fn font_options(&self) -> Option<FontOptions>

Returns the cairo::FontOptions used for Pango rendering. When not set, the defaults font options for the gdk::Screen will be used. Read more
Source§

fn frame_clock(&self) -> Option<FrameClock>

Obtains the frame clock for a widget. The frame clock is a global “ticker” that can be used to drive animations and repaints. The most common reason to get the frame clock is to call FrameClock::frame_time(), in order to get a time to use for animating. For example you might record the start of the animation with an initial value from FrameClock::frame_time(), and then update the animation by calling FrameClock::frame_time() again during each repaint. Read more
Source§

fn halign(&self) -> Align

Gets the value of the halign property. Read more
Source§

fn has_tooltip(&self) -> bool

Returns the current value of the has-tooltip property. See has-tooltip for more information. Read more
Source§

fn has_window(&self) -> bool

Determines whether self has a gdk::Window of its own. See set_has_window(). Read more
Source§

fn hexpands(&self) -> bool

Gets whether the widget would like any available extra horizontal space. When a user resizes a Window, widgets with expand=TRUE generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand. Read more
Source§

fn is_hexpand_set(&self) -> bool

Gets whether set_hexpand() has been used to explicitly set the expand flag on this widget. Read more
Source§

fn is_mapped(&self) -> bool

Whether the widget is mapped. Read more
Source§

fn margin_bottom(&self) -> i32

Gets the value of the margin-bottom property. Read more
Source§

fn margin_end(&self) -> i32

Gets the value of the margin-end property. Read more
Source§

fn margin_start(&self) -> i32

Gets the value of the margin-start property. Read more
Source§

fn margin_top(&self) -> i32

Gets the value of the margin-top property. Read more
Source§

fn modifier_mask(&self, intent: ModifierIntent) -> ModifierType

Returns the modifier mask the self’s windowing system backend uses for a particular purpose. Read more
Source§

fn widget_name(&self) -> GString

Retrieves the name of a widget. See set_widget_name() for the significance of widget names. Read more
Source§

fn is_no_show_all(&self) -> bool

Returns the current value of the no-show-all property, which determines whether calls to show_all() will affect this widget. Read more
Source§

fn opacity(&self) -> f64

Fetches the requested opacity for this widget. See set_opacity(). Read more
Source§

fn pango_context(&self) -> Context

Gets a pango::Context with the appropriate font map, font description, and base direction for this widget. Unlike the context returned by create_pango_context(), this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), and will be updated to match any changes to the widget’s attributes. This can be tracked by using the screen-changed signal on the widget. Read more
Source§

fn parent(&self) -> Option<Widget>

Returns the parent container of self. Read more
Source§

fn parent_window(&self) -> Option<Window>

Gets self’s parent window, or None if it does not have one. Read more
Source§

fn path(&self) -> WidgetPath

Returns the WidgetPath representing self, if the widget is not connected to a toplevel widget, a partial path will be created. Read more
Source§

fn preferred_height(&self) -> (i32, i32)

Retrieves a widget’s initial minimum and natural height. Read more
Source§

fn preferred_height_and_baseline_for_width( &self, width: i32, ) -> (i32, i32, i32, i32)

Retrieves a widget’s minimum and natural height and the corresponding baselines if it would be given the specified width, or the default height if width is -1. The baselines may be -1 which means that no baseline is requested for this widget. Read more
Source§

fn preferred_height_for_width(&self, width: i32) -> (i32, i32)

Retrieves a widget’s minimum and natural height if it would be given the specified width. Read more
Source§

fn preferred_size(&self) -> (Requisition, Requisition)

Retrieves the minimum and natural size of a widget, taking into account the widget’s preference for height-for-width management. Read more
Source§

fn preferred_width(&self) -> (i32, i32)

Retrieves a widget’s initial minimum and natural width. Read more
Source§

fn preferred_width_for_height(&self, height: i32) -> (i32, i32)

Retrieves a widget’s minimum and natural width if it would be given the specified height. Read more
Source§

fn is_realized(&self) -> bool

Determines whether self is realized. Read more
Source§

fn receives_default(&self) -> bool

Determines whether self is always treated as the default widget within its toplevel when it has the focus, even if another widget is the default. Read more
Source§

fn request_mode(&self) -> SizeRequestMode

Gets whether the widget prefers a height-for-width layout or a width-for-height layout. Read more
Source§

fn scale_factor(&self) -> i32

Retrieves the internal scale factor that maps from window coordinates to the actual device pixels. On traditional systems this is 1, on high density outputs, it can be a higher value (typically 2). Read more
Source§

fn screen(&self) -> Option<Screen>

Get the gdk::Screen from the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a Window at the top. Read more
Source§

fn get_sensitive(&self) -> bool

Returns the widget’s sensitivity (in the sense of returning the value that has been set using set_sensitive()). Read more
Source§

fn settings(&self) -> Option<Settings>

Gets the settings object holding the settings used for this widget. Read more
Source§

fn size_request(&self) -> (i32, i32)

Gets the size request that was explicitly set for the widget using set_size_request(). A value of -1 stored in width or height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used instead. See set_size_request(). To get the size a widget will actually request, call preferred_size() instead of this function. Read more
Source§

fn state_flags(&self) -> StateFlags

Returns the widget state as a flag set. It is worth mentioning that the effective StateFlags::INSENSITIVE state will be returned, that is, also based on parent insensitivity, even if self itself is sensitive. Read more
Source§

fn style_context(&self) -> StyleContext

Returns the style context associated to self. The returned object is guaranteed to be the same for the lifetime of self. Read more
Source§

fn supports_multidevice(&self) -> bool

Returns true if self is multiple pointer aware. See set_support_multidevice() for more information. Read more
Source§

fn template_child(&self, widget_type: Type, name: &str) -> Option<Object>

Fetch an object build from the template XML for widget_type in this self instance. Read more
Source§

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

Gets the contents of the tooltip for self. Read more
Source§

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

Gets the contents of the tooltip for self. Read more
Source§

fn tooltip_window(&self) -> Option<Window>

Returns the Window of the current tooltip. This can be the GtkWindow created by default, or the custom tooltip window set using set_tooltip_window(). Read more
Source§

fn toplevel(&self) -> Option<Widget>

This function returns the topmost widget in the container hierarchy self is a part of. If self has no parent widgets, it will be returned as the topmost widget. No reference will be added to the returned widget; it should not be unreferenced. Read more
Source§

fn valign(&self) -> Align

Gets the value of the valign property. Read more
Source§

fn valign_with_baseline(&self) -> Align

Gets the value of the valign property, including Align::Baseline. Read more
Source§

fn vexpands(&self) -> bool

Gets whether the widget would like any available extra vertical space. Read more
Source§

fn is_vexpand_set(&self) -> bool

Gets whether set_vexpand() has been used to explicitly set the expand flag on this widget. Read more
Source§

fn get_visible(&self) -> bool

Determines whether the widget is visible. If you want to take into account whether the widget’s parent is also marked as visible, use is_visible() instead. Read more
Source§

fn visual(&self) -> Option<Visual>

Gets the visual that will be used to render self. Read more
Source§

fn window(&self) -> Option<Window>

Returns the widget’s window if it is realized, None otherwise Read more
Source§

fn grab_add(&self)

Makes self the current grabbed widget. Read more
Source§

fn grab_default(&self)

Causes self to become the default widget. self must be able to be a default widget; typically you would ensure this yourself by calling set_can_default() with a true value. The default widget is activated when the user presses Enter in a window. Default widgets must be activatable, that is, activate() should affect them. Note that Entry widgets require the “activates-default” property set to true before they activate the default widget when Enter is pressed and the Entry is focused.
Source§

fn grab_focus(&self)

Causes self to have the keyboard focus for the Window it’s inside. self must be a focusable widget, such as a Entry; something like Frame won’t work. Read more
Source§

fn grab_remove(&self)

Removes the grab from the given widget. Read more
Source§

fn has_default(&self) -> bool

Determines whether self is the current default widget within its toplevel. See set_can_default(). Read more
Source§

fn has_focus(&self) -> bool

Determines if the widget has the global input focus. See is_focus() for the difference between having the global input focus, and only having the focus within a toplevel. Read more
Source§

fn has_grab(&self) -> bool

Determines whether the widget is currently grabbing events, so it is the only widget receiving input events (keyboard and mouse). Read more
Source§

fn has_screen(&self) -> bool

Checks whether there is a gdk::Screen is associated with this widget. All toplevel widgets have an associated screen, and all widgets added into a hierarchy with a toplevel window at the top. Read more
Source§

fn has_visible_focus(&self) -> bool

Determines if the widget should show a visible indication that it has the global input focus. This is a convenience function for use in ::draw handlers that takes into account whether focus indication should currently be shown in the toplevel window of self. See GtkWindowExt::gets_focus_visible() for more information about focus indication. Read more
Source§

fn hide(&self)

Reverses the effects of show(), causing the widget to be hidden (invisible to the user).
Source§

fn in_destruction(&self) -> bool

Returns whether the widget is currently being destroyed. This information can sometimes be used to avoid doing unnecessary work. Read more
Source§

fn init_template(&self)

Creates and initializes child widgets defined in templates. This function must be called in the instance initializer for any class which assigned itself a template using gtk_widget_class_set_template() Read more
Source§

fn input_shape_combine_region(&self, region: Option<&Region>)

Sets an input shape for this widget’s GDK window. This allows for windows which react to mouse click in a nonrectangular region, see Window::input_shape_combine_region() for more information. Read more
Source§

fn insert_action_group(&self, name: &str, group: Option<&impl IsA<ActionGroup>>)

Inserts group into self. Children of self that implement Actionable can then be associated with actions in group by setting their “action-name” to prefix.action-name. Read more
Source§

fn is_ancestor(&self, ancestor: &impl IsA<Widget>) -> bool

Determines whether self is somewhere inside ancestor, possibly with intermediate containers. Read more
Source§

fn is_drawable(&self) -> bool

Determines whether self can be drawn to. A widget can be drawn to if it is mapped and visible. Read more
Source§

fn is_focus(&self) -> bool

Determines if the widget is the focus widget within its toplevel. (This does not mean that the has-focus property is necessarily set; has-focus will only be set if the toplevel widget additionally has the global input focus.) Read more
Source§

fn is_sensitive(&self) -> bool

Returns the widget’s effective sensitivity, which means it is sensitive itself and also its parent widget is sensitive Read more
Source§

fn is_toplevel(&self) -> bool

Determines whether self is a toplevel widget. Read more
Source§

fn is_visible(&self) -> bool

Determines whether the widget and all its parents are marked as visible. Read more
Source§

fn keynav_failed(&self, direction: DirectionType) -> bool

This function should be called whenever keyboard navigation within a single widget hits a boundary. The function emits the keynav-failed signal on the widget and its return value should be interpreted in a way similar to the return value of child_focus(): Read more
Source§

fn list_accel_closures(&self) -> Vec<Closure>

Lists the closures used by self for accelerator group connections with AccelGroupExtManual::connect_accel_group_by_path() or AccelGroupExtManual::connect_accel_group(). The closures can be used to monitor accelerator changes on self, by connecting to the AccelGroup signal of the AccelGroup of a closure which can be found out with AccelGroup::from_accel_closure(). Read more
Source§

fn list_action_prefixes(&self) -> Vec<GString>

Retrieves a None-terminated array of strings containing the prefixes of gio::ActionGroup’s available to self. Read more
Source§

fn list_mnemonic_labels(&self) -> Vec<Widget>

Returns a newly allocated list of the widgets, normally labels, for which this widget is the target of a mnemonic (see for example, LabelExt::set_mnemonic_widget()). Read more
Source§

fn map(&self)

This function is only for use in widget implementations. Causes a widget to be mapped if it isn’t already.
Source§

fn mnemonic_activate(&self, group_cycling: bool) -> bool

Emits the mnemonic-activate signal. Read more
Source§

fn queue_allocate(&self)

This function is only for use in widget implementations. Read more
Source§

fn queue_compute_expand(&self)

Mark self as needing to recompute its expand flags. Call this function when setting legacy expand child properties on the child of a container. Read more
Source§

fn queue_draw(&self)

Equivalent to calling queue_draw_area() for the entire area of a widget.
Source§

fn queue_draw_area(&self, x: i32, y: i32, width: i32, height: i32)

Convenience function that calls queue_draw_region() on the region created from the given coordinates. Read more
Source§

fn queue_draw_region(&self, region: &Region)

Invalidates the area of self defined by region by calling Window::invalidate_region() on the widget’s window and all its child windows. Once the main loop becomes idle (after the current batch of events has been processed, roughly), the window will receive expose events for the union of all regions that have been invalidated. Read more
Source§

fn queue_resize(&self)

This function is only for use in widget implementations. Flags a widget to have its size renegotiated; should be called when a widget for some reason has a new size request. For example, when you change the text in a Label, Label queues a resize to ensure there’s enough space for the new text. Read more
Source§

fn queue_resize_no_redraw(&self)

This function works like queue_resize(), except that the widget is not invalidated.
Source§

fn realize(&self)

Creates the GDK (windowing system) resources associated with a widget. For example, self->window will be created when a widget is realized. Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically. Read more
Source§

fn register_window(&self, window: &Window)

Registers a gdk::Window with the widget and sets it up so that the widget receives events for it. Call unregister_window() when destroying the window. Read more
Source§

fn remove_accelerator( &self, accel_group: &impl IsA<AccelGroup>, accel_key: u32, accel_mods: ModifierType, ) -> bool

Removes an accelerator from self, previously installed with add_accelerator(). Read more
Source§

fn remove_mnemonic_label(&self, label: &impl IsA<Widget>)

Removes a widget from the list of mnemonic labels for this widget. (See list_mnemonic_labels()). The widget must have previously been added to the list with add_mnemonic_label(). Read more
Source§

fn reset_style(&self)

Updates the style context of self and all descendants by updating its widget path. GtkContainers may want to use this on a child when reordering it in a way that a different style might apply to it. See also ContainerExt::path_for_child().
Source§

fn send_focus_change(&self, event: &Event) -> bool

Sends the focus change event to self Read more
Source§

fn set_accel_path( &self, accel_path: Option<&str>, accel_group: Option<&impl IsA<AccelGroup>>, )

Given an accelerator group, accel_group, and an accelerator path, accel_path, sets up an accelerator in accel_group so whenever the key binding that is defined for accel_path is pressed, self will be activated. This removes any accelerators (for any accelerator group) installed by previous calls to set_accel_path(). Associating accelerators with paths allows them to be modified by the user and the modifications to be saved for future use. (See gtk_accel_map_save().) Read more
Source§

fn set_allocation(&self, allocation: &Allocation)

Sets the widget’s allocation. This should not be used directly, but from within a widget’s size_allocate method. Read more
Source§

fn set_app_paintable(&self, app_paintable: bool)

Sets whether the application intends to draw on the widget in an draw handler. Read more
Source§

fn set_can_default(&self, can_default: bool)

Specifies whether self can be a default widget. See grab_default() for details about the meaning of “default”. Read more
Source§

fn set_can_focus(&self, can_focus: bool)

Specifies whether self can own the input focus. See grab_focus() for actually setting the input focus on a widget. Read more
Source§

fn set_child_visible(&self, is_visible: bool)

Sets whether self should be mapped along with its when its parent is mapped and self has been shown with show(). Read more
Source§

fn set_clip(&self, clip: &Allocation)

Sets the widget’s clip. This must not be used directly, but from within a widget’s size_allocate method. It must be called after set_allocation() (or after chaining up to the parent class), because that function resets the clip. Read more
Source§

fn set_device_enabled(&self, device: &Device, enabled: bool)

Enables or disables a gdk::Device to interact with self and all its children. Read more
Source§

fn set_device_events(&self, device: &Device, events: EventMask)

Sets the device event mask (see gdk::EventMask) for a widget. The event mask determines which events a widget will receive from device. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget’s functionality, so be careful. This function must be called while a widget is unrealized. Consider add_device_events() for widgets that are already realized, or if you want to preserve the existing event mask. This function can’t be used with windowless widgets (which return false from has_window()); to get events on those widgets, place them inside a EventBox and receive events on the event box. Read more
Source§

fn set_direction(&self, dir: TextDirection)

Sets the reading direction on a particular widget. This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done. Generally, applications will let the default reading direction present, except for containers where the containers are arranged in an order that is explicitly visual rather than logical (such as buttons for text justification). Read more
Source§

fn set_focus_on_click(&self, focus_on_click: bool)

Sets whether the widget should grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don’t want the keyboard focus removed from the main area of the application. Read more
Source§

fn set_font_map(&self, font_map: Option<&impl IsA<FontMap>>)

Sets the font map to use for Pango rendering. When not set, the widget will inherit the font map from its parent. Read more
Source§

fn set_font_options(&self, options: Option<&FontOptions>)

Sets the cairo::FontOptions used for Pango rendering in this widget. When not set, the default font options for the gdk::Screen will be used. Read more
Source§

fn set_halign(&self, align: Align)

Sets the horizontal alignment of self. See the halign property. Read more
Source§

fn set_has_tooltip(&self, has_tooltip: bool)

Sets the has-tooltip property on self to has_tooltip. See has-tooltip for more information. Read more
Source§

fn set_has_window(&self, has_window: bool)

Specifies whether self has a gdk::Window of its own. Note that all realized widgets have a non-None “window” pointer (window() never returns a None window when a widget is realized), but for many of them it’s actually the gdk::Window of one of its parent widgets. Widgets that do not create a window for themselves in realize must announce this by calling this function with has_window = false. Read more
Source§

fn set_hexpand(&self, expand: bool)

Sets whether the widget would like any available extra horizontal space. When a user resizes a Window, widgets with expand=TRUE generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand. Read more
Source§

fn set_hexpand_set(&self, set: bool)

Sets whether the hexpand flag (see hexpands()) will be used. Read more
Source§

fn set_mapped(&self, mapped: bool)

Marks the widget as being mapped. Read more
Source§

fn set_margin_bottom(&self, margin: i32)

Sets the bottom margin of self. See the margin-bottom property. Read more
Source§

fn set_margin_end(&self, margin: i32)

Sets the end margin of self. See the margin-end property. Read more
Source§

fn set_margin_start(&self, margin: i32)

Sets the start margin of self. See the margin-start property. Read more
Source§

fn set_margin_top(&self, margin: i32)

Sets the top margin of self. See the margin-top property. Read more
Source§

fn set_widget_name(&self, name: &str)

Widgets can be named, which allows you to refer to them from a CSS file. You can apply a style to widgets with a particular name in the CSS file. See the documentation for the CSS syntax (on the same page as the docs for StyleContext). Read more
Source§

fn set_no_show_all(&self, no_show_all: bool)

Sets the no-show-all property, which determines whether calls to show_all() will affect this widget. Read more
Source§

fn set_opacity(&self, opacity: f64)

Request the self to be rendered partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Opacity values are clamped to the [0,1] range.). This works on both toplevel widget, and child widgets, although there are some limitations: Read more
Source§

fn set_parent(&self, parent: &impl IsA<Widget>)

This function is useful only when implementing subclasses of Container. Sets the container as the parent of self, and takes care of some details such as updating the state and style of the child to reflect its new location. The opposite function is unparent(). Read more
Source§

fn set_parent_window(&self, parent_window: &Window)

Sets a non default parent window for self. Read more
Source§

fn set_realized(&self, realized: bool)

Marks the widget as being realized. This function must only be called after all GdkWindows for the self have been created and registered. Read more
Source§

fn set_receives_default(&self, receives_default: bool)

Specifies whether self will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default. Read more
Source§

fn set_redraw_on_allocate(&self, redraw_on_allocate: bool)

Sets whether the entire widget is queued for drawing when its size allocation changes. By default, this setting is true and the entire widget is redrawn on every size change. If your widget leaves the upper left unchanged when made bigger, turning this setting off will improve performance. Read more
Source§

fn set_sensitive(&self, sensitive: bool)

Sets the sensitivity of a widget. A widget is sensitive if the user can interact with it. Insensitive widgets are “grayed out” and the user can’t interact with them. Insensitive widgets are known as “inactive”, “disabled”, or “ghosted” in some other toolkits. Read more
Source§

fn set_size_request(&self, width: i32, height: i32)

Sets the minimum size of a widget; that is, the widget’s size request will be at least width by height. You can use this function to force a widget to be larger than it normally would be. Read more
Source§

fn set_state_flags(&self, flags: StateFlags, clear: bool)

This function is for use in widget implementations. Turns on flag values in the current widget state (insensitive, prelighted, etc.). Read more
Source§

fn set_support_multidevice(&self, support_multidevice: bool)

Enables or disables multiple pointer awareness. If this setting is true, self will start receiving multiple, per device enter/leave events. Note that if custom GdkWindows are created in realize, Window::set_support_multidevice() will have to be called manually on them. Read more
Source§

fn set_tooltip_markup(&self, markup: Option<&str>)

Sets markup as the contents of the tooltip, which is marked up with the [Pango text markup language][PangoMarkupFormat]. Read more
Source§

fn set_tooltip_text(&self, text: Option<&str>)

Sets text as the contents of the tooltip. This function will take care of setting has-tooltip to true and of the default handler for the query-tooltip signal. Read more
Source§

fn set_tooltip_window(&self, custom_window: Option<&impl IsA<Window>>)

Replaces the default window used for displaying tooltips with custom_window. GTK+ will take care of showing and hiding custom_window at the right moment, to behave likewise as the default tooltip window. If custom_window is None, the default tooltip window will be used. Read more
Source§

fn set_valign(&self, align: Align)

Sets the vertical alignment of self. See the valign property. Read more
Source§

fn set_vexpand(&self, expand: bool)

Sets whether the widget would like any available extra vertical space. Read more
Source§

fn set_vexpand_set(&self, set: bool)

Sets whether the vexpand flag (see vexpands()) will be used. Read more
Source§

fn set_visible(&self, visible: bool)

Sets the visibility state of self. Note that setting this to true doesn’t mean the widget is actually viewable, see get_visible(). Read more
Source§

fn set_visual(&self, visual: Option<&Visual>)

Sets the visual that should be used for by widget and its children for creating GdkWindows. The visual must be on the same gdk::Screen as returned by screen(), so handling the screen-changed signal is necessary. Read more
Source§

fn set_window(&self, window: Window)

Sets a widget’s window. This function should only be used in a widget’s realize implementation. The window passed is usually either new window created with gdk::Window::new(), or the window of its parent widget as returned by parent_window(). Read more
Source§

fn shape_combine_region(&self, region: Option<&Region>)

Sets a shape for this widget’s GDK window. This allows for transparent windows etc., see Window::shape_combine_region() for more information. Read more
Source§

fn show(&self)

Flags a widget to be displayed. Any widget that isn’t shown will not appear on the screen. If you want to show all the widgets in a container, it’s easier to call show_all() on the container, instead of individually showing the widgets. Read more
Source§

fn show_all(&self)

Recursively shows a widget, and any child widgets (if the widget is a container).
Source§

fn show_now(&self)

Shows a widget. If the widget is an unmapped toplevel widget (i.e. a Window that has not yet been shown), enter the main loop and wait for the window to actually be mapped. Be careful; because the main loop is running, anything can happen during this function.
Source§

fn size_allocate(&self, allocation: &Allocation)

This function is only used by Container subclasses, to assign a size and position to their child widgets. Read more
Source§

fn size_allocate_with_baseline( &self, allocation: &mut Allocation, baseline: i32, )

This function is only used by Container subclasses, to assign a size, position and (optionally) baseline to their child widgets. Read more
Source§

fn style_get_property(&self, property_name: &str) -> Value

Gets the value of a style property of self. Read more
Source§

fn thaw_child_notify(&self)

Reverts the effect of a previous call to freeze_child_notify(). This causes all queued child-notify signals on self to be emitted.
Source§

fn translate_coordinates( &self, dest_widget: &impl IsA<Widget>, src_x: i32, src_y: i32, ) -> Option<(i32, i32)>

Translate coordinates relative to self’s allocation to coordinates relative to dest_widget’s allocations. In order to perform this operation, both widgets must be realized, and must share a common toplevel. Read more
Source§

fn trigger_tooltip_query(&self)

Triggers a tooltip query on the display where the toplevel of self is located. See Tooltip::trigger_tooltip_query() for more information.
Source§

fn unmap(&self)

This function is only for use in widget implementations. Causes a widget to be unmapped if it’s currently mapped.
Source§

fn unparent(&self)

This function is only for use in widget implementations. Should be called by implementations of the remove method on Container, to dissociate a child from the container.
Source§

fn unrealize(&self)

This function is only useful in widget implementations. Causes a widget to be unrealized (frees all GDK resources associated with the widget, such as self->window).
Source§

fn unregister_window(&self, window: &Window)

Unregisters a gdk::Window from the widget that was previously set up with register_window(). You need to call this when the window is no longer used by the widget, such as when you destroy it. Read more
Source§

fn unset_state_flags(&self, flags: StateFlags)

This function is for use in widget implementations. Turns off flag values for the current widget state (insensitive, prelighted, etc.). See set_state_flags(). Read more
Source§

fn is_composite_child(&self) -> bool

Source§

fn expands(&self) -> bool

Whether to expand in both directions. Setting this sets both hexpand and vexpand
Source§

fn set_expand(&self, expand: bool)

Whether to expand in both directions. Setting this sets both hexpand and vexpand
Source§

fn set_has_default(&self, has_default: bool)

Source§

fn set_has_focus(&self, has_focus: bool)

Source§

fn height_request(&self) -> i32

Source§

fn set_height_request(&self, height_request: i32)

Source§

fn set_is_focus(&self, is_focus: bool)

Source§

fn margin(&self) -> i32

Sets all four sides’ margin at once. If read, returns max margin on any side.
Source§

fn set_margin(&self, margin: i32)

Sets all four sides’ margin at once. If read, returns max margin on any side.
Source§

fn width_request(&self) -> i32

Source§

fn set_width_request(&self, width_request: i32)

Source§

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

Source§

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

The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed. Read more
Source§

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

The ::button-release-event signal will be emitted when a button (typically from a mouse) is released. Read more
Source§

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

Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This signal is present to allow applications and derived widgets to override the default Widget handling for determining whether an accelerator can be activated. Read more
Source§

fn connect_child_notify<F: Fn(&Self, &ParamSpec) + 'static>( &self, detail: Option<&str>, f: F, ) -> SignalHandlerId

The ::child-notify signal is emitted for each [child property][child-properties] that has changed on an object. The signal’s detail holds the property name. Read more
Source§

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

The ::configure-event signal will be emitted when the size, position or stacking of the widget’s window has changed. Read more
Source§

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

Emitted when a redirected window belonging to widget gets drawn into. The region/area members of the event shows what area of the redirected drawable was drawn into. Read more
Source§

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

The ::delete-event signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. Connecting WidgetExtManual::hide_on_delete() to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it. Read more
Source§

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

Signals that all holders of a reference to the widget should release the reference that they hold. May result in finalization of the widget if all references are released. Read more
Source§

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

The ::destroy-event signal is emitted when a gdk::Window is destroyed. You rarely get this signal, because most widgets disconnect themselves from their window before they destroy it, so no widget owns the window at destroy time. Read more
Source§

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

The ::direction-changed signal is emitted when the text direction of a widget changes. Read more
Source§

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

The ::drag-begin signal is emitted on the drag source when a drag is started. A typical reason to connect to this signal is to set up a custom drag icon with e.g. drag_source_set_icon_pixbuf(). Read more
Source§

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

The ::drag-data-delete signal is emitted on the drag source when a drag with the action gdk::DragAction::MOVE is successfully completed. The signal handler is responsible for deleting the data that has been dropped. What “delete” means depends on the context of the drag operation. Read more
Source§

fn connect_drag_data_get<F: Fn(&Self, &DragContext, &SelectionData, u32, u32) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::drag-data-get signal is emitted on the drag source when the drop site requests the data which is dragged. It is the responsibility of the signal handler to fill data with the data in the format which is indicated by info. See SelectionData::set() and SelectionData::set_text(). Read more
Source§

fn connect_drag_data_received<F: Fn(&Self, &DragContext, i32, i32, &SelectionData, u32, u32) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::drag-data-received signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call gdk_drag_status() and not finish the drag. If the data was received in response to a drag-drop signal (and this is the last target to be received), the handler for this signal is expected to process the received data and then call gtk_drag_finish(), setting the success parameter depending on whether the data was processed successfully. Read more
Source§

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

The ::drag-drop signal is emitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns false and no further processing is necessary. Otherwise, the handler returns true. In this case, the handler must ensure that gtk_drag_finish() is called to let the source know that the drop is done. The call to gtk_drag_finish() can be done either directly or in a drag-data-received handler which gets triggered by calling drag_get_data() to receive the data for one or more of the supported targets. Read more
Source§

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

The ::drag-end signal is emitted on the drag source when a drag is finished. A typical reason to connect to this signal is to undo things done in drag-begin. Read more
Source§

fn connect_drag_failed<F: Fn(&Self, &DragContext, DragResult) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::drag-failed signal is emitted on the drag source when a drag has failed. The signal handler may hook custom code to handle a failed DnD operation based on the type of error, it returns true is the failure has been already handled (not showing the default “drag operation failed” animation), otherwise it returns false. Read more
Source§

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

The ::drag-leave signal is emitted on the drop site when the cursor leaves the widget. A typical reason to connect to this signal is to undo things done in drag-motion, e.g. undo highlighting with drag_unhighlight(). Read more
Source§

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

The ::drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns false and no further processing is necessary. Otherwise, the handler returns true. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling gdk_drag_status(). Read more
Source§

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

This signal is emitted when a widget is supposed to render itself. The widget’s top left corner must be painted at the origin of the passed in context and be sized to the values returned by allocated_width() and allocated_height(). Read more
Source§

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

The ::enter-notify-event will be emitted when the pointer enters the widget’s window. Read more
Source§

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

The GTK+ main loop will emit three signals for each GDK event delivered to a widget: one generic ::event signal, another, more specific, signal that matches the type of event delivered (e.g. key-press-event) and finally a generic event-after signal. Read more
Source§

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

After the emission of the event signal and (optionally) the second more specific signal, ::event-after will be emitted regardless of the previous two signals handlers return values. Read more
Source§

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

Returns Read more
Source§

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

The ::focus-in-event signal will be emitted when the keyboard focus enters the widget’s window. Read more
Source§

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

The ::focus-out-event signal will be emitted when the keyboard focus leaves the widget’s window. Read more
Source§

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

Emitted when a pointer or keyboard grab on a window belonging to widget gets broken. Read more
Source§

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

Source§

fn emit_grab_focus(&self)

Source§

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

The ::grab-notify signal is emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed. Read more
Source§

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

The ::hide signal is emitted when widget is hidden, for example with hide().
Source§

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

The ::hierarchy-changed signal is emitted when the anchored state of a widget changes. A widget is “anchored” when its toplevel ancestor is a Window. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa. Read more
Source§

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

The ::key-press-event signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed. Read more
Source§

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

The ::key-release-event signal is emitted when a key is released. Read more
Source§

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

Gets emitted if keyboard navigation fails. See keynav_failed() for details. Read more
Source§

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

The ::leave-notify-event will be emitted when the pointer leaves the widget’s window. Read more
Source§

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

The ::map signal is emitted when widget is going to be mapped, that is when the widget is visible (which is controlled with set_visible()) and all its parents up to the toplevel widget are also visible. Once the map has occurred, map-event will be emitted. Read more
Source§

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

The default handler for this signal activates widget if group_cycling is false, or just makes widget grab focus if group_cycling is true. Read more
Source§

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

The ::motion-notify-event signal is emitted when the pointer moves over the widget’s gdk::Window. Read more
Source§

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

Source§

fn emit_move_focus(&self, direction: DirectionType)

Source§

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

The ::parent-set signal is emitted when a new parent has been set on a widget. Read more
Source§

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

This signal gets emitted whenever a widget should pop up a context menu. This usually happens through the standard key binding mechanism; by pressing a certain key while a widget is focused, the user can cause the widget to pop up a menu. For example, the Entry widget creates a menu with clipboard commands. See the [Popup Menu Migration Checklist][checklist-popup-menu] for an example of how to use this signal. Read more
Source§

fn emit_popup_menu(&self) -> bool

Source§

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

The ::property-notify-event signal will be emitted when a property on the widget’s window has been changed or deleted. Read more
Source§

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

To receive this signal the gdk::Window associated to the widget needs to enable the gdk::EventMask::PROXIMITY_IN_MASK mask. Read more
Source§

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

To receive this signal the gdk::Window associated to the widget needs to enable the gdk::EventMask::PROXIMITY_OUT_MASK mask. Read more
Source§

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

Emitted when has-tooltip is true and the hover timeout has expired with the cursor hovering “above” widget; or emitted when widget got focus in keyboard mode. Read more
Source§

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

The ::realize signal is emitted when widget is associated with a gdk::Window, which means that realize() has been called or the widget has been mapped (that is, it is going to be drawn).
Source§

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

The ::screen-changed signal gets emitted when the screen of a widget has changed. Read more
Source§

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

The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned. Read more
Source§

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

The ::selection-clear-event signal will be emitted when the the widget’s window has lost ownership of a selection. Read more
Source§

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

Source§

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

Returns Read more
Source§

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

Source§

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

The ::selection-request-event signal will be emitted when another client requests ownership of the selection owned by the widget’s window. Read more
Source§

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

The ::show signal is emitted when widget is shown, for example with show().
Source§

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

Returns Read more
Source§

fn emit_show_help(&self, help_type: WidgetHelpType) -> bool

Source§

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

allocation Read more
Source§

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

The ::state-flags-changed signal is emitted when the widget state changes, see state_flags(). Read more
Source§

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

The ::style-updated signal is a convenience signal that is emitted when the changed signal is emitted on the widget’s associated StyleContext as returned by style_context(). Read more
Source§

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

Source§

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

The ::unmap signal is emitted when widget is going to be unmapped, which means that either it or any of its parents up to the toplevel widget have been set as hidden. Read more
Source§

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

The ::unrealize signal is emitted when the gdk::Window associated with widget is destroyed, which means that unrealize() has been called or the widget has been unmapped (that is, it is going to be hidden).
Source§

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

The ::window-state-event will be emitted when the state of the toplevel window associated to the widget changes. Read more
Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<O> WidgetExtManual for O
where O: IsA<Widget>,

Source§

fn drag_dest_set( &self, flags: DestDefaults, targets: &[TargetEntry], actions: DragAction, )

Sets a widget as a potential drop destination, and adds default behaviors. Read more
Source§

fn drag_source_set( &self, start_button_mask: ModifierType, targets: &[TargetEntry], actions: DragAction, )

Sets up a widget so that GTK+ will start a drag operation when the user clicks and drags on the widget. The widget must have a window. Read more
Source§

fn intersect( &self, area: &Rectangle, intersection: Option<&mut Rectangle>, ) -> bool

Computes the intersection of a self’s area and area, storing the intersection in intersection, and returns true if there was an intersection. intersection may be None if you’re only interested in whether there was an intersection. Read more
Source§

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

The ::map-event signal will be emitted when the widget’s window is mapped. A window is mapped when it becomes visible on the screen. Read more
Source§

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

The ::unmap-event signal will be emitted when the widget’s window is unmapped. A window is unmapped when it becomes invisible on the screen. Read more
Source§

fn add_tick_callback<P: Fn(&Self, &FrameClock) -> ControlFlow + 'static>( &self, callback: P, ) -> TickCallbackId

Queues an animation frame update and adds a callback to be called before each frame. Until the tick callback is removed, it will be called frequently (usually at the frame rate of the output device or as quickly as the application can be repainted, whichever is slower). For this reason, is most suitable for handling graphics that change every frame or every few frames. The tick callback does not automatically imply a relayout or repaint. If you want a repaint or relayout, and aren’t changing widget properties that would trigger that (for example, changing the text of a Label), then you will have to call WidgetExt::queue_resize() or WidgetExt::queue_draw_area() yourself. Read more
Source§

fn add_events(&self, events: EventMask)

Adds the events in the bitfield events to the event mask for self. See WidgetExtManual::set_events() and the [input handling overview][event-masks] for details. Read more
Source§

fn events(&self) -> EventMask

Returns the event mask (see gdk::EventMask) for the widget. These are the events that the widget will receive. Read more
Source§

fn set_events(&self, events: EventMask)

Sets the event mask (see gdk::EventMask) for a widget. The event mask determines which events a widget will receive. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget’s functionality, so be careful. This function must be called while a widget is unrealized. Consider WidgetExtManual::add_events() for widgets that are already realized, or if you want to preserve the existing event mask. This function can’t be used with widgets that have no window. (See WidgetExt::has_window()). To get events on those widgets, place them inside a EventBox and receive events on the event box. Read more
Source§

unsafe fn destroy(&self)

Calls gtk_widget_destroy() on this widget. Read more
Source§

fn hide_on_delete(&self) -> Propagation

Utility function; intended to be connected to the delete-event signal on a Window. The function calls WidgetExt::hide() on its argument, then returns true. If connected to ::delete-event, the result is that clicking the close button for a window (on the window frame, top right corner usually) will hide but not destroy the window. By default, GTK+ destroys windows when ::delete-event is received. Read more