Skip to main content

gtk/auto/
cell_editable.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{Buildable, Widget, ffi};
6use glib::{
7    object::ObjectType as _,
8    prelude::*,
9    signal::{SignalHandlerId, connect_raw},
10    translate::*,
11};
12use std::boxed::Box as Box_;
13
14glib::wrapper! {
15    /// The [`CellEditable`][crate::CellEditable] interface must be implemented for widgets to be usable
16    /// to edit the contents of a [`TreeView`][crate::TreeView] cell. It provides a way to specify how
17    /// temporary widgets should be configured for editing, get the new value, etc.
18    ///
19    /// ## Properties
20    ///
21    ///
22    /// #### `editing-canceled`
23    ///  Indicates whether editing on the cell has been canceled.
24    ///
25    /// Readable | Writable
26    /// <details><summary><h4>Widget</h4></summary>
27    ///
28    ///
29    /// #### `app-paintable`
30    ///  Readable | Writable
31    ///
32    ///
33    /// #### `can-default`
34    ///  Readable | Writable
35    ///
36    ///
37    /// #### `can-focus`
38    ///  Readable | Writable
39    ///
40    ///
41    /// #### `composite-child`
42    ///  Readable
43    ///
44    ///
45    /// #### `double-buffered`
46    ///  Whether the widget is double buffered.
47    ///
48    /// Readable | Writable
49    ///
50    ///
51    /// #### `events`
52    ///  Readable | Writable
53    ///
54    ///
55    /// #### `expand`
56    ///  Whether to expand in both directions. Setting this sets both [`hexpand`][struct@crate::Widget#hexpand] and [`vexpand`][struct@crate::Widget#vexpand]
57    ///
58    /// Readable | Writable
59    ///
60    ///
61    /// #### `focus-on-click`
62    ///  Whether the widget should grab focus when it is clicked with the mouse.
63    ///
64    /// This property is only relevant for widgets that can take focus.
65    ///
66    /// Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
67    /// GtkComboBox) implemented this property individually.
68    ///
69    /// Readable | Writable
70    ///
71    ///
72    /// #### `halign`
73    ///  How to distribute horizontal space if widget gets extra space, see [`Align`][crate::Align]
74    ///
75    /// Readable | Writable
76    ///
77    ///
78    /// #### `has-default`
79    ///  Readable | Writable
80    ///
81    ///
82    /// #### `has-focus`
83    ///  Readable | Writable
84    ///
85    ///
86    /// #### `has-tooltip`
87    ///  Enables or disables the emission of [`query-tooltip`][struct@crate::Widget#query-tooltip] on `widget`.
88    /// A value of [`true`] indicates that `widget` can have a tooltip, in this case
89    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to determine
90    /// whether it will provide a tooltip or not.
91    ///
92    /// Note that setting this property to [`true`] for the first time will change
93    /// the event masks of the GdkWindows of this widget to include leave-notify
94    /// and motion-notify events. This cannot and will not be undone when the
95    /// property is set to [`false`] again.
96    ///
97    /// Readable | Writable
98    ///
99    ///
100    /// #### `height-request`
101    ///  Readable | Writable
102    ///
103    ///
104    /// #### `hexpand`
105    ///  Whether to expand horizontally. See [`WidgetExt::set_hexpand()`][crate::prelude::WidgetExt::set_hexpand()].
106    ///
107    /// Readable | Writable
108    ///
109    ///
110    /// #### `hexpand-set`
111    ///  Whether to use the [`hexpand`][struct@crate::Widget#hexpand] property. See [`WidgetExt::is_hexpand_set()`][crate::prelude::WidgetExt::is_hexpand_set()].
112    ///
113    /// Readable | Writable
114    ///
115    ///
116    /// #### `is-focus`
117    ///  Readable | Writable
118    ///
119    ///
120    /// #### `margin`
121    ///  Sets all four sides' margin at once. If read, returns max
122    /// margin on any side.
123    ///
124    /// Readable | Writable
125    ///
126    ///
127    /// #### `margin-bottom`
128    ///  Margin on bottom side of widget.
129    ///
130    /// This property adds margin outside of the widget's normal size
131    /// request, the margin will be added in addition to the size from
132    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
133    ///
134    /// Readable | Writable
135    ///
136    ///
137    /// #### `margin-end`
138    ///  Margin on end of widget, horizontally. This property supports
139    /// left-to-right and right-to-left text directions.
140    ///
141    /// This property adds margin outside of the widget's normal size
142    /// request, the margin will be added in addition to the size from
143    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
144    ///
145    /// Readable | Writable
146    ///
147    ///
148    /// #### `margin-left`
149    ///  Margin on left side of widget.
150    ///
151    /// This property adds margin outside of the widget's normal size
152    /// request, the margin will be added in addition to the size from
153    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
154    ///
155    /// Readable | Writable
156    ///
157    ///
158    /// #### `margin-right`
159    ///  Margin on right side of widget.
160    ///
161    /// This property adds margin outside of the widget's normal size
162    /// request, the margin will be added in addition to the size from
163    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
164    ///
165    /// Readable | Writable
166    ///
167    ///
168    /// #### `margin-start`
169    ///  Margin on start of widget, horizontally. This property supports
170    /// left-to-right and right-to-left text directions.
171    ///
172    /// This property adds margin outside of the widget's normal size
173    /// request, the margin will be added in addition to the size from
174    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
175    ///
176    /// Readable | Writable
177    ///
178    ///
179    /// #### `margin-top`
180    ///  Margin on top side of widget.
181    ///
182    /// This property adds margin outside of the widget's normal size
183    /// request, the margin will be added in addition to the size from
184    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
185    ///
186    /// Readable | Writable
187    ///
188    ///
189    /// #### `name`
190    ///  Readable | Writable
191    ///
192    ///
193    /// #### `no-show-all`
194    ///  Readable | Writable
195    ///
196    ///
197    /// #### `opacity`
198    ///  The requested opacity of the widget. See [`WidgetExt::set_opacity()`][crate::prelude::WidgetExt::set_opacity()] for
199    /// more details about window opacity.
200    ///
201    /// Before 3.8 this was only available in GtkWindow
202    ///
203    /// Readable | Writable
204    ///
205    ///
206    /// #### `parent`
207    ///  Readable | Writable
208    ///
209    ///
210    /// #### `receives-default`
211    ///  Readable | Writable
212    ///
213    ///
214    /// #### `scale-factor`
215    ///  The scale factor of the widget. See [`WidgetExt::scale_factor()`][crate::prelude::WidgetExt::scale_factor()] for
216    /// more details about widget scaling.
217    ///
218    /// Readable
219    ///
220    ///
221    /// #### `sensitive`
222    ///  Readable | Writable
223    ///
224    ///
225    /// #### `style`
226    ///  The style of the widget, which contains information about how it will look (colors, etc).
227    ///
228    /// Readable | Writable
229    ///
230    ///
231    /// #### `tooltip-markup`
232    ///  Sets the text of tooltip to be the given string, which is marked up
233    /// with the [Pango text markup language][PangoMarkupFormat].
234    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
235    ///
236    /// This is a convenience property which will take care of getting the
237    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
238    /// will automatically be set to [`true`] and there will be taken care of
239    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
240    ///
241    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
242    /// are set, the last one wins.
243    ///
244    /// Readable | Writable
245    ///
246    ///
247    /// #### `tooltip-text`
248    ///  Sets the text of tooltip to be the given string.
249    ///
250    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
251    ///
252    /// This is a convenience property which will take care of getting the
253    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
254    /// will automatically be set to [`true`] and there will be taken care of
255    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
256    ///
257    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
258    /// are set, the last one wins.
259    ///
260    /// Readable | Writable
261    ///
262    ///
263    /// #### `valign`
264    ///  How to distribute vertical space if widget gets extra space, see [`Align`][crate::Align]
265    ///
266    /// Readable | Writable
267    ///
268    ///
269    /// #### `vexpand`
270    ///  Whether to expand vertically. See [`WidgetExt::set_vexpand()`][crate::prelude::WidgetExt::set_vexpand()].
271    ///
272    /// Readable | Writable
273    ///
274    ///
275    /// #### `vexpand-set`
276    ///  Whether to use the [`vexpand`][struct@crate::Widget#vexpand] property. See [`WidgetExt::is_vexpand_set()`][crate::prelude::WidgetExt::is_vexpand_set()].
277    ///
278    /// Readable | Writable
279    ///
280    ///
281    /// #### `visible`
282    ///  Readable | Writable
283    ///
284    ///
285    /// #### `width-request`
286    ///  Readable | Writable
287    ///
288    ///
289    /// #### `window`
290    ///  The widget's window if it is realized, [`None`] otherwise.
291    ///
292    /// Readable
293    /// </details>
294    ///
295    /// ## Signals
296    ///
297    ///
298    /// #### `editing-done`
299    ///  This signal is a sign for the cell renderer to update its
300    /// value from the `cell_editable`.
301    ///
302    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
303    /// emitting this signal when they are done editing, e.g.
304    /// [`Entry`][crate::Entry] emits this signal when the user presses Enter. Typical things to
305    /// do in a handler for ::editing-done are to capture the edited value,
306    /// disconnect the `cell_editable` from signals on the [`CellRenderer`][crate::CellRenderer], etc.
307    ///
308    /// [`CellEditableExt::editing_done()`][crate::prelude::CellEditableExt::editing_done()] is a convenience method
309    /// for emitting [`editing-done`][struct@crate::CellEditable#editing-done].
310    ///
311    ///
312    ///
313    ///
314    /// #### `remove-widget`
315    ///  This signal is meant to indicate that the cell is finished
316    /// editing, and the `cell_editable` widget is being removed and may
317    /// subsequently be destroyed.
318    ///
319    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
320    /// emitting this signal when they are done editing. It must
321    /// be emitted after the [`editing-done`][struct@crate::CellEditable#editing-done] signal,
322    /// to give the cell renderer a chance to update the cell's value
323    /// before the widget is removed.
324    ///
325    /// [`CellEditableExt::remove_widget()`][crate::prelude::CellEditableExt::remove_widget()] is a convenience method
326    /// for emitting [`remove-widget`][struct@crate::CellEditable#remove-widget].
327    ///
328    ///
329    /// <details><summary><h4>Widget</h4></summary>
330    ///
331    ///
332    /// #### `accel-closures-changed`
333    ///
334    ///
335    ///
336    /// #### `button-press-event`
337    ///  The ::button-press-event signal will be emitted when a button
338    /// (typically from a mouse) is pressed.
339    ///
340    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the
341    /// widget needs to enable the [`gdk::EventMask::BUTTON_PRESS_MASK`][crate::gdk::EventMask::BUTTON_PRESS_MASK] mask.
342    ///
343    /// This signal will be sent to the grab widget if there is one.
344    ///
345    ///
346    ///
347    ///
348    /// #### `button-release-event`
349    ///  The ::button-release-event signal will be emitted when a button
350    /// (typically from a mouse) is released.
351    ///
352    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the
353    /// widget needs to enable the [`gdk::EventMask::BUTTON_RELEASE_MASK`][crate::gdk::EventMask::BUTTON_RELEASE_MASK] mask.
354    ///
355    /// This signal will be sent to the grab widget if there is one.
356    ///
357    ///
358    ///
359    ///
360    /// #### `can-activate-accel`
361    ///  Determines whether an accelerator that activates the signal
362    /// identified by `signal_id` can currently be activated.
363    /// This signal is present to allow applications and derived
364    /// widgets to override the default [`Widget`][crate::Widget] handling
365    /// for determining whether an accelerator can be activated.
366    ///
367    ///
368    ///
369    ///
370    /// #### `child-notify`
371    ///  The ::child-notify signal is emitted for each
372    /// [child property][child-properties] that has
373    /// changed on an object. The signal's detail holds the property name.
374    ///
375    /// Detailed
376    ///
377    ///
378    /// #### `composited-changed`
379    ///  The ::composited-changed signal is emitted when the composited
380    /// status of `widgets` screen changes.
381    /// See [`Screen::is_composited()`][crate::gdk::Screen::is_composited()].
382    ///
383    /// Action
384    ///
385    ///
386    /// #### `configure-event`
387    ///  The ::configure-event signal will be emitted when the size, position or
388    /// stacking of the `widget`'s window has changed.
389    ///
390    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
391    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
392    /// automatically for all new windows.
393    ///
394    ///
395    ///
396    ///
397    /// #### `damage-event`
398    ///  Emitted when a redirected window belonging to `widget` gets drawn into.
399    /// The region/area members of the event shows what area of the redirected
400    /// drawable was drawn into.
401    ///
402    ///
403    ///
404    ///
405    /// #### `delete-event`
406    ///  The ::delete-event signal is emitted if a user requests that
407    /// a toplevel window is closed. The default handler for this signal
408    /// destroys the window. Connecting [`WidgetExtManual::hide_on_delete()`][crate::prelude::WidgetExtManual::hide_on_delete()] to
409    /// this signal will cause the window to be hidden instead, so that
410    /// it can later be shown again without reconstructing it.
411    ///
412    ///
413    ///
414    ///
415    /// #### `destroy`
416    ///  Signals that all holders of a reference to the widget should release
417    /// the reference that they hold. May result in finalization of the widget
418    /// if all references are released.
419    ///
420    /// This signal is not suitable for saving widget state.
421    ///
422    ///
423    ///
424    ///
425    /// #### `destroy-event`
426    ///  The ::destroy-event signal is emitted when a [`gdk::Window`][crate::gdk::Window] is destroyed.
427    /// You rarely get this signal, because most widgets disconnect themselves
428    /// from their window before they destroy it, so no widget owns the
429    /// window at destroy time.
430    ///
431    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
432    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
433    /// automatically for all new windows.
434    ///
435    ///
436    ///
437    ///
438    /// #### `direction-changed`
439    ///  The ::direction-changed signal is emitted when the text direction
440    /// of a widget changes.
441    ///
442    ///
443    ///
444    ///
445    /// #### `drag-begin`
446    ///  The ::drag-begin signal is emitted on the drag source when a drag is
447    /// started. A typical reason to connect to this signal is to set up a
448    /// custom drag icon with e.g. [`WidgetExt::drag_source_set_icon_pixbuf()`][crate::prelude::WidgetExt::drag_source_set_icon_pixbuf()].
449    ///
450    /// Note that some widgets set up a drag icon in the default handler of
451    /// this signal, so you may have to use `g_signal_connect_after()` to
452    /// override what the default handler did.
453    ///
454    ///
455    ///
456    ///
457    /// #### `drag-data-delete`
458    ///  The ::drag-data-delete signal is emitted on the drag source when a drag
459    /// with the action [`gdk::DragAction::MOVE`][crate::gdk::DragAction::MOVE] is successfully completed. The signal
460    /// handler is responsible for deleting the data that has been dropped. What
461    /// "delete" means depends on the context of the drag operation.
462    ///
463    ///
464    ///
465    ///
466    /// #### `drag-data-get`
467    ///  The ::drag-data-get signal is emitted on the drag source when the drop
468    /// site requests the data which is dragged. It is the responsibility of
469    /// the signal handler to fill `data` with the data in the format which
470    /// is indicated by `info`. See [`SelectionData::set()`][crate::SelectionData::set()] and
471    /// [`SelectionData::set_text()`][crate::SelectionData::set_text()].
472    ///
473    ///
474    ///
475    ///
476    /// #### `drag-data-received`
477    ///  format == 8))
478    ///  {
479    ///  GdkDragAction action;
480    ///
481    ///  // handle data here
482    ///
483    ///  action = gdk_drag_context_get_selected_action (context);
484    ///  if (action == GDK_ACTION_ASK)
485    ///  {
486    ///  GtkWidget *dialog;
487    ///  gint response;
488    ///
489    ///  dialog = gtk_message_dialog_new (NULL,
490    ///  GTK_DIALOG_MODAL |
491    ///  GTK_DIALOG_DESTROY_WITH_PARENT,
492    ///  GTK_MESSAGE_INFO,
493    ///  GTK_BUTTONS_YES_NO,
494    ///  "Move the data ?\n");
495    ///  response = gtk_dialog_run (GTK_DIALOG (dialog));
496    ///  gtk_widget_destroy (dialog);
497    ///
498    ///  if (response == GTK_RESPONSE_YES)
499    ///  action = GDK_ACTION_MOVE;
500    ///  else
501    ///  action = GDK_ACTION_COPY;
502    ///  }
503    ///
504    ///  gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
505    ///  }
506    ///  else
507    ///  gtk_drag_finish (context, FALSE, FALSE, time);
508    ///  }
509    /// ]|
510    ///
511    ///
512    ///
513    ///
514    /// #### `drag-drop`
515    ///  The ::drag-drop signal is emitted on the drop site when the user drops
516    /// the data onto the widget. The signal handler must determine whether
517    /// the cursor position is in a drop zone or not. If it is not in a drop
518    /// zone, it returns [`false`] and no further processing is necessary.
519    /// Otherwise, the handler returns [`true`]. In this case, the handler must
520    /// ensure that `gtk_drag_finish()` is called to let the source know that
521    /// the drop is done. The call to `gtk_drag_finish()` can be done either
522    /// directly or in a [`drag-data-received`][struct@crate::Widget#drag-data-received] handler which gets
523    /// triggered by calling [`WidgetExt::drag_get_data()`][crate::prelude::WidgetExt::drag_get_data()] to receive the data for one
524    /// or more of the supported targets.
525    ///
526    ///
527    ///
528    ///
529    /// #### `drag-end`
530    ///  The ::drag-end signal is emitted on the drag source when a drag is
531    /// finished. A typical reason to connect to this signal is to undo
532    /// things done in [`drag-begin`][struct@crate::Widget#drag-begin].
533    ///
534    ///
535    ///
536    ///
537    /// #### `drag-failed`
538    ///  The ::drag-failed signal is emitted on the drag source when a drag has
539    /// failed. The signal handler may hook custom code to handle a failed DnD
540    /// operation based on the type of error, it returns [`true`] is the failure has
541    /// been already handled (not showing the default "drag operation failed"
542    /// animation), otherwise it returns [`false`].
543    ///
544    ///
545    ///
546    ///
547    /// #### `drag-leave`
548    ///  The ::drag-leave signal is emitted on the drop site when the cursor
549    /// leaves the widget. A typical reason to connect to this signal is to
550    /// undo things done in [`drag-motion`][struct@crate::Widget#drag-motion], e.g. undo highlighting
551    /// with [`WidgetExt::drag_unhighlight()`][crate::prelude::WidgetExt::drag_unhighlight()].
552    ///
553    ///
554    /// Likewise, the [`drag-leave`][struct@crate::Widget#drag-leave] signal is also emitted before the
555    /// ::drag-drop signal, for instance to allow cleaning up of a preview item
556    /// created in the [`drag-motion`][struct@crate::Widget#drag-motion] signal handler.
557    ///
558    ///
559    ///
560    ///
561    /// #### `drag-motion`
562    ///  suggested_action,
563    ///  time);
564    ///  }
565    ///  else
566    ///  {
567    ///  // accept the drop
568    ///  }
569    /// }
570    /// ]|
571    ///
572    ///
573    ///
574    ///
575    /// #### `draw`
576    ///  This signal is emitted when a widget is supposed to render itself.
577    /// The `widget`'s top left corner must be painted at the origin of
578    /// the passed in context and be sized to the values returned by
579    /// [`WidgetExt::allocated_width()`][crate::prelude::WidgetExt::allocated_width()] and
580    /// [`WidgetExt::allocated_height()`][crate::prelude::WidgetExt::allocated_height()].
581    ///
582    /// Signal handlers connected to this signal can modify the cairo
583    /// context passed as `cr` in any way they like and don't need to
584    /// restore it. The signal emission takes care of calling `cairo_save()`
585    /// before and `cairo_restore()` after invoking the handler.
586    ///
587    /// The signal handler will get a `cr` with a clip region already set to the
588    /// widget's dirty region, i.e. to the area that needs repainting. Complicated
589    /// widgets that want to avoid redrawing themselves completely can get the full
590    /// extents of the clip region with `gdk_cairo_get_clip_rectangle()`, or they can
591    /// get a finer-grained representation of the dirty region with
592    /// `cairo_copy_clip_rectangle_list()`.
593    ///
594    ///
595    ///
596    ///
597    /// #### `enter-notify-event`
598    ///  The ::enter-notify-event will be emitted when the pointer enters
599    /// the `widget`'s window.
600    ///
601    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
602    /// to enable the [`gdk::EventMask::ENTER_NOTIFY_MASK`][crate::gdk::EventMask::ENTER_NOTIFY_MASK] mask.
603    ///
604    /// This signal will be sent to the grab widget if there is one.
605    ///
606    ///
607    ///
608    ///
609    /// #### `event`
610    ///  The GTK+ main loop will emit three signals for each GDK event delivered
611    /// to a widget: one generic ::event signal, another, more specific,
612    /// signal that matches the type of event delivered (e.g.
613    /// [`key-press-event`][struct@crate::Widget#key-press-event]) and finally a generic
614    /// [`event-after`][struct@crate::Widget#event-after] signal.
615    ///
616    ///
617    ///
618    ///
619    /// #### `event-after`
620    ///  After the emission of the [`event`][struct@crate::Widget#event] signal and (optionally)
621    /// the second more specific signal, ::event-after will be emitted
622    /// regardless of the previous two signals handlers return values.
623    ///
624    ///
625    ///
626    ///
627    /// #### `focus`
628    ///
629    ///
630    ///
631    /// #### `focus-in-event`
632    ///  The ::focus-in-event signal will be emitted when the keyboard focus
633    /// enters the `widget`'s window.
634    ///
635    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
636    /// to enable the [`gdk::EventMask::FOCUS_CHANGE_MASK`][crate::gdk::EventMask::FOCUS_CHANGE_MASK] mask.
637    ///
638    ///
639    ///
640    ///
641    /// #### `focus-out-event`
642    ///  The ::focus-out-event signal will be emitted when the keyboard focus
643    /// leaves the `widget`'s window.
644    ///
645    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
646    /// to enable the [`gdk::EventMask::FOCUS_CHANGE_MASK`][crate::gdk::EventMask::FOCUS_CHANGE_MASK] mask.
647    ///
648    ///
649    ///
650    ///
651    /// #### `grab-broken-event`
652    ///  Emitted when a pointer or keyboard grab on a window belonging
653    /// to `widget` gets broken.
654    ///
655    /// On X11, this happens when the grab window becomes unviewable
656    /// (i.e. it or one of its ancestors is unmapped), or if the same
657    /// application grabs the pointer or keyboard again.
658    ///
659    ///
660    ///
661    ///
662    /// #### `grab-focus`
663    ///  Action
664    ///
665    ///
666    /// #### `grab-notify`
667    ///  The ::grab-notify signal is emitted when a widget becomes
668    /// shadowed by a GTK+ grab (not a pointer or keyboard grab) on
669    /// another widget, or when it becomes unshadowed due to a grab
670    /// being removed.
671    ///
672    /// A widget is shadowed by a [`WidgetExt::grab_add()`][crate::prelude::WidgetExt::grab_add()] when the topmost
673    /// grab widget in the grab stack of its window group is not
674    /// its ancestor.
675    ///
676    ///
677    ///
678    ///
679    /// #### `hide`
680    ///  The ::hide signal is emitted when `widget` is hidden, for example with
681    /// [`WidgetExt::hide()`][crate::prelude::WidgetExt::hide()].
682    ///
683    ///
684    ///
685    ///
686    /// #### `hierarchy-changed`
687    ///  The ::hierarchy-changed signal is emitted when the
688    /// anchored state of a widget changes. A widget is
689    /// “anchored” when its toplevel
690    /// ancestor is a [`Window`][crate::Window]. This signal is emitted when
691    /// a widget changes from un-anchored to anchored or vice-versa.
692    ///
693    ///
694    ///
695    ///
696    /// #### `key-press-event`
697    ///  The ::key-press-event signal is emitted when a key is pressed. The signal
698    /// emission will reoccur at the key-repeat rate when the key is kept pressed.
699    ///
700    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
701    /// to enable the [`gdk::EventMask::KEY_PRESS_MASK`][crate::gdk::EventMask::KEY_PRESS_MASK] mask.
702    ///
703    /// This signal will be sent to the grab widget if there is one.
704    ///
705    ///
706    ///
707    ///
708    /// #### `key-release-event`
709    ///  The ::key-release-event signal is emitted when a key is released.
710    ///
711    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
712    /// to enable the [`gdk::EventMask::KEY_RELEASE_MASK`][crate::gdk::EventMask::KEY_RELEASE_MASK] mask.
713    ///
714    /// This signal will be sent to the grab widget if there is one.
715    ///
716    ///
717    ///
718    ///
719    /// #### `keynav-failed`
720    ///  Gets emitted if keyboard navigation fails.
721    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
722    ///
723    ///
724    ///
725    ///
726    /// #### `leave-notify-event`
727    ///  The ::leave-notify-event will be emitted when the pointer leaves
728    /// the `widget`'s window.
729    ///
730    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
731    /// to enable the [`gdk::EventMask::LEAVE_NOTIFY_MASK`][crate::gdk::EventMask::LEAVE_NOTIFY_MASK] mask.
732    ///
733    /// This signal will be sent to the grab widget if there is one.
734    ///
735    ///
736    ///
737    ///
738    /// #### `map`
739    ///  The ::map signal is emitted when `widget` is going to be mapped, that is
740    /// when the widget is visible (which is controlled with
741    /// [`WidgetExt::set_visible()`][crate::prelude::WidgetExt::set_visible()]) and all its parents up to the toplevel widget
742    /// are also visible. Once the map has occurred, [`map-event`][struct@crate::Widget#map-event] will
743    /// be emitted.
744    ///
745    /// The ::map signal can be used to determine whether a widget will be drawn,
746    /// for instance it can resume an animation that was stopped during the
747    /// emission of [`unmap`][struct@crate::Widget#unmap].
748    ///
749    ///
750    ///
751    ///
752    /// #### `map-event`
753    ///  The ::map-event signal will be emitted when the `widget`'s window is
754    /// mapped. A window is mapped when it becomes visible on the screen.
755    ///
756    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
757    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
758    /// automatically for all new windows.
759    ///
760    ///
761    ///
762    ///
763    /// #### `mnemonic-activate`
764    ///  The default handler for this signal activates `widget` if `group_cycling`
765    /// is [`false`], or just makes `widget` grab focus if `group_cycling` is [`true`].
766    ///
767    ///
768    ///
769    ///
770    /// #### `motion-notify-event`
771    ///  The ::motion-notify-event signal is emitted when the pointer moves
772    /// over the widget's [`gdk::Window`][crate::gdk::Window].
773    ///
774    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget
775    /// needs to enable the [`gdk::EventMask::POINTER_MOTION_MASK`][crate::gdk::EventMask::POINTER_MOTION_MASK] mask.
776    ///
777    /// This signal will be sent to the grab widget if there is one.
778    ///
779    ///
780    ///
781    ///
782    /// #### `move-focus`
783    ///  Action
784    ///
785    ///
786    /// #### `parent-set`
787    ///  The ::parent-set signal is emitted when a new parent
788    /// has been set on a widget.
789    ///
790    ///
791    ///
792    ///
793    /// #### `popup-menu`
794    ///  This signal gets emitted whenever a widget should pop up a context
795    /// menu. This usually happens through the standard key binding mechanism;
796    /// by pressing a certain key while a widget is focused, the user can cause
797    /// the widget to pop up a menu. For example, the [`Entry`][crate::Entry] widget creates
798    /// a menu with clipboard commands. See the
799    /// [Popup Menu Migration Checklist][checklist-popup-menu]
800    /// for an example of how to use this signal.
801    ///
802    /// Action
803    ///
804    ///
805    /// #### `property-notify-event`
806    ///  The ::property-notify-event signal will be emitted when a property on
807    /// the `widget`'s window has been changed or deleted.
808    ///
809    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
810    /// to enable the [`gdk::EventMask::PROPERTY_CHANGE_MASK`][crate::gdk::EventMask::PROPERTY_CHANGE_MASK] mask.
811    ///
812    ///
813    ///
814    ///
815    /// #### `proximity-in-event`
816    ///  To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
817    /// to enable the [`gdk::EventMask::PROXIMITY_IN_MASK`][crate::gdk::EventMask::PROXIMITY_IN_MASK] mask.
818    ///
819    /// This signal will be sent to the grab widget if there is one.
820    ///
821    ///
822    ///
823    ///
824    /// #### `proximity-out-event`
825    ///  To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
826    /// to enable the [`gdk::EventMask::PROXIMITY_OUT_MASK`][crate::gdk::EventMask::PROXIMITY_OUT_MASK] mask.
827    ///
828    /// This signal will be sent to the grab widget if there is one.
829    ///
830    ///
831    ///
832    ///
833    /// #### `query-tooltip`
834    ///  Emitted when [`has-tooltip`][struct@crate::Widget#has-tooltip] is [`true`] and the hover timeout
835    /// has expired with the cursor hovering "above" `widget`; or emitted when `widget` got
836    /// focus in keyboard mode.
837    ///
838    /// Using the given coordinates, the signal handler should determine
839    /// whether a tooltip should be shown for `widget`. If this is the case
840    /// [`true`] should be returned, [`false`] otherwise. Note that if
841    /// `keyboard_mode` is [`true`], the values of `x` and `y` are undefined and
842    /// should not be used.
843    ///
844    /// The signal handler is free to manipulate `tooltip` with the therefore
845    /// destined function calls.
846    ///
847    ///
848    ///
849    ///
850    /// #### `realize`
851    ///  The ::realize signal is emitted when `widget` is associated with a
852    /// [`gdk::Window`][crate::gdk::Window], which means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called or the
853    /// widget has been mapped (that is, it is going to be drawn).
854    ///
855    ///
856    ///
857    ///
858    /// #### `screen-changed`
859    ///  The ::screen-changed signal gets emitted when the
860    /// screen of a widget has changed.
861    ///
862    ///
863    ///
864    ///
865    /// #### `scroll-event`
866    ///  The ::scroll-event signal is emitted when a button in the 4 to 7
867    /// range is pressed. Wheel mice are usually configured to generate
868    /// button press events for buttons 4 and 5 when the wheel is turned.
869    ///
870    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
871    /// to enable the [`gdk::EventMask::SCROLL_MASK`][crate::gdk::EventMask::SCROLL_MASK] mask.
872    ///
873    /// This signal will be sent to the grab widget if there is one.
874    ///
875    ///
876    ///
877    ///
878    /// #### `selection-clear-event`
879    ///  The ::selection-clear-event signal will be emitted when the
880    /// the `widget`'s window has lost ownership of a selection.
881    ///
882    ///
883    ///
884    ///
885    /// #### `selection-get`
886    ///
887    ///
888    ///
889    /// #### `selection-notify-event`
890    ///
891    ///
892    ///
893    /// #### `selection-received`
894    ///
895    ///
896    ///
897    /// #### `selection-request-event`
898    ///  The ::selection-request-event signal will be emitted when
899    /// another client requests ownership of the selection owned by
900    /// the `widget`'s window.
901    ///
902    ///
903    ///
904    ///
905    /// #### `show`
906    ///  The ::show signal is emitted when `widget` is shown, for example with
907    /// [`WidgetExt::show()`][crate::prelude::WidgetExt::show()].
908    ///
909    ///
910    ///
911    ///
912    /// #### `show-help`
913    ///  Action
914    ///
915    ///
916    /// #### `size-allocate`
917    ///
918    ///
919    ///
920    /// #### `state-changed`
921    ///  The ::state-changed signal is emitted when the widget state changes.
922    /// See `gtk_widget_get_state()`.
923    ///
924    ///
925    ///
926    ///
927    /// #### `state-flags-changed`
928    ///  The ::state-flags-changed signal is emitted when the widget state
929    /// changes, see [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
930    ///
931    ///
932    ///
933    ///
934    /// #### `style-set`
935    ///  The ::style-set signal is emitted when a new style has been set
936    /// on a widget. Note that style-modifying functions like
937    /// `gtk_widget_modify_base()` also cause this signal to be emitted.
938    ///
939    /// Note that this signal is emitted for changes to the deprecated
940    /// `GtkStyle`. To track changes to the [`StyleContext`][crate::StyleContext] associated
941    /// with a widget, use the [`style-updated`][struct@crate::Widget#style-updated] signal.
942    ///
943    ///
944    ///
945    ///
946    /// #### `style-updated`
947    ///  The ::style-updated signal is a convenience signal that is emitted when the
948    /// [`changed`][struct@crate::StyleContext#changed] signal is emitted on the `widget`'s associated
949    /// [`StyleContext`][crate::StyleContext] as returned by [`WidgetExt::style_context()`][crate::prelude::WidgetExt::style_context()].
950    ///
951    /// Note that style-modifying functions like `gtk_widget_override_color()` also
952    /// cause this signal to be emitted.
953    ///
954    ///
955    ///
956    ///
957    /// #### `touch-event`
958    ///
959    ///
960    ///
961    /// #### `unmap`
962    ///  The ::unmap signal is emitted when `widget` is going to be unmapped, which
963    /// means that either it or any of its parents up to the toplevel widget have
964    /// been set as hidden.
965    ///
966    /// As ::unmap indicates that a widget will not be shown any longer, it can be
967    /// used to, for example, stop an animation on the widget.
968    ///
969    ///
970    ///
971    ///
972    /// #### `unmap-event`
973    ///  The ::unmap-event signal will be emitted when the `widget`'s window is
974    /// unmapped. A window is unmapped when it becomes invisible on the screen.
975    ///
976    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
977    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
978    /// automatically for all new windows.
979    ///
980    ///
981    ///
982    ///
983    /// #### `unrealize`
984    ///  The ::unrealize signal is emitted when the [`gdk::Window`][crate::gdk::Window] associated with
985    /// `widget` is destroyed, which means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been
986    /// called or the widget has been unmapped (that is, it is going to be
987    /// hidden).
988    ///
989    ///
990    ///
991    ///
992    /// #### `visibility-notify-event`
993    ///  The ::visibility-notify-event will be emitted when the `widget`'s
994    /// window is obscured or unobscured.
995    ///
996    /// To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
997    /// to enable the [`gdk::EventMask::VISIBILITY_NOTIFY_MASK`][crate::gdk::EventMask::VISIBILITY_NOTIFY_MASK] mask.
998    ///
999    ///
1000    ///
1001    ///
1002    /// #### `window-state-event`
1003    ///  The ::window-state-event will be emitted when the state of the
1004    /// toplevel window associated to the `widget` changes.
1005    ///
1006    /// To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget
1007    /// needs to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable
1008    /// this mask automatically for all new windows.
1009    ///
1010    ///
1011    /// </details>
1012    ///
1013    /// # Implements
1014    ///
1015    /// [`CellEditableExt`][trait@crate::prelude::CellEditableExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`BuildableExtManual`][trait@crate::prelude::BuildableExtManual]
1016    #[doc(alias = "GtkCellEditable")]
1017    pub struct CellEditable(Interface<ffi::GtkCellEditable, ffi::GtkCellEditableIface>) @requires Widget, Buildable;
1018
1019    match fn {
1020        type_ => || ffi::gtk_cell_editable_get_type(),
1021    }
1022}
1023
1024impl CellEditable {
1025    pub const NONE: Option<&'static CellEditable> = None;
1026}
1027
1028/// Trait containing all [`struct@CellEditable`] methods.
1029///
1030/// # Implementors
1031///
1032/// [`AppChooserButton`][struct@crate::AppChooserButton], [`CellEditable`][struct@crate::CellEditable], [`ComboBoxText`][struct@crate::ComboBoxText], [`ComboBox`][struct@crate::ComboBox], [`Entry`][struct@crate::Entry], [`SearchEntry`][struct@crate::SearchEntry], [`SpinButton`][struct@crate::SpinButton]
1033pub trait CellEditableExt: IsA<CellEditable> + 'static {
1034    /// Emits the [`editing-done`][struct@crate::CellEditable#editing-done] signal.
1035    #[doc(alias = "gtk_cell_editable_editing_done")]
1036    fn editing_done(&self) {
1037        unsafe {
1038            ffi::gtk_cell_editable_editing_done(self.as_ref().to_glib_none().0);
1039        }
1040    }
1041
1042    /// Emits the [`remove-widget`][struct@crate::CellEditable#remove-widget] signal.
1043    #[doc(alias = "gtk_cell_editable_remove_widget")]
1044    fn remove_widget(&self) {
1045        unsafe {
1046            ffi::gtk_cell_editable_remove_widget(self.as_ref().to_glib_none().0);
1047        }
1048    }
1049
1050    /// Begins editing on a `self`.
1051    ///
1052    /// The [`CellRenderer`][crate::CellRenderer] for the cell creates and returns a [`CellEditable`][crate::CellEditable] from
1053    /// [`CellRendererExt::start_editing()`][crate::prelude::CellRendererExt::start_editing()], configured for the [`CellRenderer`][crate::CellRenderer] type.
1054    ///
1055    /// [`start_editing()`][Self::start_editing()] can then set up `self` suitably for
1056    /// editing a cell, e.g. making the Esc key emit [`editing-done`][struct@crate::CellEditable#editing-done].
1057    ///
1058    /// Note that the `self` is created on-demand for the current edit; its
1059    /// lifetime is temporary and does not persist across other edits and/or cells.
1060    /// ## `event`
1061    /// The `GdkEvent` that began the editing process, or
1062    ///  [`None`] if editing was initiated programmatically
1063    #[doc(alias = "gtk_cell_editable_start_editing")]
1064    fn start_editing(&self, event: Option<&gdk::Event>) {
1065        unsafe {
1066            ffi::gtk_cell_editable_start_editing(
1067                self.as_ref().to_glib_none().0,
1068                mut_override(event.to_glib_none().0),
1069            );
1070        }
1071    }
1072
1073    /// Indicates whether editing on the cell has been canceled.
1074    #[doc(alias = "editing-canceled")]
1075    fn is_editing_canceled(&self) -> bool {
1076        ObjectExt::property(self.as_ref(), "editing-canceled")
1077    }
1078
1079    /// Indicates whether editing on the cell has been canceled.
1080    #[doc(alias = "editing-canceled")]
1081    fn set_editing_canceled(&self, editing_canceled: bool) {
1082        ObjectExt::set_property(self.as_ref(), "editing-canceled", editing_canceled)
1083    }
1084
1085    /// This signal is a sign for the cell renderer to update its
1086    /// value from the `cell_editable`.
1087    ///
1088    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
1089    /// emitting this signal when they are done editing, e.g.
1090    /// [`Entry`][crate::Entry] emits this signal when the user presses Enter. Typical things to
1091    /// do in a handler for ::editing-done are to capture the edited value,
1092    /// disconnect the `cell_editable` from signals on the [`CellRenderer`][crate::CellRenderer], etc.
1093    ///
1094    /// [`editing_done()`][Self::editing_done()] is a convenience method
1095    /// for emitting [`editing-done`][struct@crate::CellEditable#editing-done].
1096    #[doc(alias = "editing-done")]
1097    fn connect_editing_done<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1098        unsafe extern "C" fn editing_done_trampoline<P: IsA<CellEditable>, F: Fn(&P) + 'static>(
1099            this: *mut ffi::GtkCellEditable,
1100            f: glib::ffi::gpointer,
1101        ) {
1102            unsafe {
1103                let f: &F = &*(f as *const F);
1104                f(CellEditable::from_glib_borrow(this).unsafe_cast_ref())
1105            }
1106        }
1107        unsafe {
1108            let f: Box_<F> = Box_::new(f);
1109            connect_raw(
1110                self.as_ptr() as *mut _,
1111                c"editing-done".as_ptr(),
1112                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1113                    editing_done_trampoline::<Self, F> as *const (),
1114                )),
1115                Box_::into_raw(f),
1116            )
1117        }
1118    }
1119
1120    /// This signal is meant to indicate that the cell is finished
1121    /// editing, and the `cell_editable` widget is being removed and may
1122    /// subsequently be destroyed.
1123    ///
1124    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
1125    /// emitting this signal when they are done editing. It must
1126    /// be emitted after the [`editing-done`][struct@crate::CellEditable#editing-done] signal,
1127    /// to give the cell renderer a chance to update the cell's value
1128    /// before the widget is removed.
1129    ///
1130    /// [`remove_widget()`][Self::remove_widget()] is a convenience method
1131    /// for emitting [`remove-widget`][struct@crate::CellEditable#remove-widget].
1132    #[doc(alias = "remove-widget")]
1133    fn connect_remove_widget<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1134        unsafe extern "C" fn remove_widget_trampoline<P: IsA<CellEditable>, F: Fn(&P) + 'static>(
1135            this: *mut ffi::GtkCellEditable,
1136            f: glib::ffi::gpointer,
1137        ) {
1138            unsafe {
1139                let f: &F = &*(f as *const F);
1140                f(CellEditable::from_glib_borrow(this).unsafe_cast_ref())
1141            }
1142        }
1143        unsafe {
1144            let f: Box_<F> = Box_::new(f);
1145            connect_raw(
1146                self.as_ptr() as *mut _,
1147                c"remove-widget".as_ptr(),
1148                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1149                    remove_widget_trampoline::<Self, F> as *const (),
1150                )),
1151                Box_::into_raw(f),
1152            )
1153        }
1154    }
1155
1156    #[doc(alias = "editing-canceled")]
1157    fn connect_editing_canceled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1158        unsafe extern "C" fn notify_editing_canceled_trampoline<
1159            P: IsA<CellEditable>,
1160            F: Fn(&P) + 'static,
1161        >(
1162            this: *mut ffi::GtkCellEditable,
1163            _param_spec: glib::ffi::gpointer,
1164            f: glib::ffi::gpointer,
1165        ) {
1166            unsafe {
1167                let f: &F = &*(f as *const F);
1168                f(CellEditable::from_glib_borrow(this).unsafe_cast_ref())
1169            }
1170        }
1171        unsafe {
1172            let f: Box_<F> = Box_::new(f);
1173            connect_raw(
1174                self.as_ptr() as *mut _,
1175                c"notify::editing-canceled".as_ptr(),
1176                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1177                    notify_editing_canceled_trampoline::<Self, F> as *const (),
1178                )),
1179                Box_::into_raw(f),
1180            )
1181        }
1182    }
1183}
1184
1185impl<O: IsA<CellEditable>> CellEditableExt for O {}