Skip to main content

libadwaita/auto/
tab_overview.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files.git)
4// DO NOT EDIT
5
6use crate::{TabPage, TabView, ffi};
7use glib::{
8    object::ObjectType as _,
9    prelude::*,
10    signal::{SignalHandlerId, connect_raw},
11    translate::*,
12};
13use std::boxed::Box as Box_;
14
15glib::wrapper! {
16    /// A tab overview for [`TabView`][crate::TabView].
17    ///
18    /// <picture>
19    ///   <source srcset="tab-overview-dark.png" media="(prefers-color-scheme: dark)">
20    ///   <img src="tab-overview.png" alt="tab-overview">
21    /// </picture>
22    ///
23    /// [`TabOverview`][crate::TabOverview] is a widget that can display tabs from an [`TabView`][crate::TabView] in a
24    /// grid.
25    ///
26    /// [`TabOverview`][crate::TabOverview] shows a thumbnail for each tab. By default thumbnails are
27    /// static for all pages except the selected one. They can be made always live
28    /// by setting [`live-thumbnail`][struct@crate::TabPage#live-thumbnail] to `TRUE`, or refreshed with
29    /// [`TabPage::invalidate_thumbnail()`][crate::TabPage::invalidate_thumbnail()] or
30    /// [`TabView::invalidate_thumbnails()`][crate::TabView::invalidate_thumbnails()] otherwise.
31    ///
32    /// If the pages are too tall or too wide, the thumbnails will be cropped; use
33    /// [`thumbnail-xalign`][struct@crate::TabPage#thumbnail-xalign] and [`thumbnail-yalign`][struct@crate::TabPage#thumbnail-yalign] to
34    /// control which part of the page should be visible in this case.
35    ///
36    /// Pinned tabs are shown as smaller cards without thumbnails above the other
37    /// tabs. Unlike in [`TabBar`][crate::TabBar], they still have titles, as well as an unpin
38    /// button.
39    ///
40    /// [`TabOverview`][crate::TabOverview] provides search in open tabs. It searches in tab titles and
41    /// tooltips, as well as [`keyword`][struct@crate::TabPage#keyword].
42    ///
43    /// If [`enable-new-tab`][struct@crate::TabOverview#enable-new-tab] is set to `TRUE`, a new tab button
44    /// will be shown. Connect to the [`create-tab`][struct@crate::TabOverview#create-tab] signal to use
45    /// it.
46    ///
47    /// [`secondary-menu`][struct@crate::TabOverview#secondary-menu] can be used to provide a secondary menu
48    /// for the overview. Use it to add extra actions, e.g. to open a new window or
49    /// undo closed tab.
50    ///
51    /// [`TabOverview`][crate::TabOverview] is intended to be used as the direct child of the window,
52    /// with the rest of the window contents set as the [`child`][struct@crate::TabOverview#child].
53    /// The child is expected to contain an [`TabView`][crate::TabView].
54    ///
55    /// [`TabOverview`][crate::TabOverview] shows window buttons by default. They can be disabled by
56    /// setting [`show-start-title-buttons`][struct@crate::TabOverview#show-start-title-buttons] and/or
57    /// [`show-start-title-buttons`][struct@crate::TabOverview#show-start-title-buttons] and/or
58    /// [`show-end-title-buttons`][struct@crate::TabOverview#show-end-title-buttons] to `FALSE`.
59    ///
60    /// If search and window buttons are disabled, and secondary menu is not set, the
61    /// header bar will be hidden.
62    ///
63    /// ## Drag-and-Drop
64    ///
65    /// [`TabOverview`][crate::TabOverview] thumbnails can have an additional drop target for arbitrary
66    /// content.
67    ///
68    /// Use [`setup_extra_drop_target()`][Self::setup_extra_drop_target()] to set it up, specifying the
69    /// supported content types and drag actions, then connect to
70    /// [`extra-drag-drop`][struct@crate::TabOverview#extra-drag-drop] to handle a drop.
71    ///
72    /// In some cases, it may be necessary to determine the used action based on the
73    /// content. In that case, set [`extra-drag-preload`][struct@crate::TabOverview#extra-drag-preload] to
74    /// `TRUE` and connect to [`extra-drag-value`][struct@crate::TabOverview#extra-drag-value] signal, then
75    /// return the action from its handler. To access this action from the
76    /// [`extra-drag-drop`][struct@crate::TabOverview#extra-drag-drop] handler, use the
77    /// [`extra-drag-preferred-action`][struct@crate::TabOverview#extra-drag-preferred-action] property.
78    ///
79    /// [`extra-drag-value`][struct@crate::TabOverview#extra-drag-value] is also always emitted when starting to
80    /// hover an item, with a `NULL` value. This happens even when
81    /// [`extra-drag-preload`][struct@crate::TabOverview#extra-drag-preload] is `FALSE`.
82    ///
83    /// ## Actions
84    ///
85    /// [`TabOverview`][crate::TabOverview] defines the `overview.open` and `overview.close` actions for
86    /// opening and closing itself. They can be convenient when used together with
87    /// [`TabButton`][crate::TabButton].
88    ///
89    /// ## CSS nodes
90    ///
91    /// [`TabOverview`][crate::TabOverview] has a single CSS node with name `taboverview`.
92    ///
93    /// ## Properties
94    ///
95    ///
96    /// #### `child`
97    ///  The child widget.
98    ///
99    /// Readable | Writeable
100    ///
101    ///
102    /// #### `enable-new-tab`
103    ///  Whether to enable new tab button.
104    ///
105    /// Connect to the [`create-tab`][struct@crate::TabOverview#create-tab] signal to use it.
106    ///
107    /// Readable | Writeable
108    ///
109    ///
110    /// #### `enable-search`
111    ///  Whether to enable search in tabs.
112    ///
113    /// Search matches tab titles and tooltips, as well as keywords, set via
114    /// [`keyword`][struct@crate::TabPage#keyword]. Use keywords to search in e.g. page URLs in a
115    /// web browser.
116    ///
117    /// During search, tab reordering and drag-n-drop are disabled.
118    ///
119    /// Use [`search-active`][struct@crate::TabOverview#search-active] to check out if search is
120    /// currently active.
121    ///
122    /// Readable | Writeable
123    ///
124    ///
125    /// #### `extra-drag-preferred-action`
126    ///  The current drag action during a drop.
127    ///
128    /// This property should only be used from inside a
129    /// [`extra-drag-drop`][struct@crate::TabOverview#extra-drag-drop] handler.
130    ///
131    /// The action will be a subset of what was originally passed to
132    /// [`TabOverview::setup_extra_drop_target()`][crate::TabOverview::setup_extra_drop_target()].
133    ///
134    /// Readable
135    ///
136    ///
137    /// #### `extra-drag-preload`
138    ///  Whether the drop data should be preloaded on hover.
139    ///
140    /// See [`preload`][struct@crate::Gtk::DropTarget#preload].
141    ///
142    /// Readable | Writeable
143    ///
144    ///
145    /// #### `inverted`
146    ///  Whether thumbnails use inverted layout.
147    ///
148    /// If set to `TRUE`, thumbnails will have the close or unpin buttons at the
149    /// beginning and the indicator at the end rather than the other way around.
150    ///
151    /// Readable | Writeable
152    ///
153    ///
154    /// #### `open`
155    ///  Whether the overview is open.
156    ///
157    /// Readable | Writeable
158    ///
159    ///
160    /// #### `search-active`
161    ///  Whether search is currently active.
162    ///
163    /// See [`enable-search`][struct@crate::TabOverview#enable-search].
164    ///
165    /// Readable
166    ///
167    ///
168    /// #### `secondary-menu`
169    ///  The secondary menu model.
170    ///
171    /// Use it to add extra actions, e.g. to open a new window or undo closed tab.
172    ///
173    /// Readable | Writeable
174    ///
175    ///
176    /// #### `show-end-title-buttons`
177    ///  Whether to show end title buttons in the overview's header bar.
178    ///
179    /// See [`show-start-title-buttons`][struct@crate::HeaderBar#show-start-title-buttons] for the other side.
180    ///
181    /// Readable | Writeable
182    ///
183    ///
184    /// #### `show-start-title-buttons`
185    ///  Whether to show start title buttons in the overview's header bar.
186    ///
187    /// See [`show-end-title-buttons`][struct@crate::HeaderBar#show-end-title-buttons] for the other side.
188    ///
189    /// Readable | Writeable
190    ///
191    ///
192    /// #### `view`
193    ///  The tab view the overview controls.
194    ///
195    /// The view must be inside the tab overview, see [`child`][struct@crate::TabOverview#child].
196    ///
197    /// Readable | Writeable
198    /// <details><summary><h4>Widget</h4></summary>
199    ///
200    ///
201    /// #### `can-focus`
202    ///  Whether the widget or any of its descendents can accept
203    /// the input focus.
204    ///
205    /// This property is meant to be set by widget implementations,
206    /// typically in their instance init function.
207    ///
208    /// Readable | Writeable
209    ///
210    ///
211    /// #### `can-target`
212    ///  Whether the widget can receive pointer events.
213    ///
214    /// Readable | Writeable
215    ///
216    ///
217    /// #### `css-classes`
218    ///  A list of css classes applied to this widget.
219    ///
220    /// Readable | Writeable
221    ///
222    ///
223    /// #### `css-name`
224    ///  The name of this widget in the CSS tree.
225    ///
226    /// This property is meant to be set by widget implementations,
227    /// typically in their instance init function.
228    ///
229    /// Readable | Writeable | Construct Only
230    ///
231    ///
232    /// #### `cursor`
233    ///  The cursor used by @widget.
234    ///
235    /// Readable | Writeable
236    ///
237    ///
238    /// #### `focus-on-click`
239    ///  Whether the widget should grab focus when it is clicked with the mouse.
240    ///
241    /// This property is only relevant for widgets that can take focus.
242    ///
243    /// Readable | Writeable
244    ///
245    ///
246    /// #### `focusable`
247    ///  Whether this widget itself will accept the input focus.
248    ///
249    /// Readable | Writeable
250    ///
251    ///
252    /// #### `halign`
253    ///  How to distribute horizontal space if widget gets extra space.
254    ///
255    /// Readable | Writeable
256    ///
257    ///
258    /// #### `has-default`
259    ///  Whether the widget is the default widget.
260    ///
261    /// Readable
262    ///
263    ///
264    /// #### `has-focus`
265    ///  Whether the widget has the input focus.
266    ///
267    /// Readable
268    ///
269    ///
270    /// #### `has-tooltip`
271    ///  Enables or disables the emission of the [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip]
272    /// signal on @widget.
273    ///
274    /// A true value indicates that @widget can have a tooltip, in this case
275    /// the widget will be queried using [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] to
276    /// determine whether it will provide a tooltip or not.
277    ///
278    /// Readable | Writeable
279    ///
280    ///
281    /// #### `height-request`
282    ///  Overrides for height request of the widget.
283    ///
284    /// If this is -1, the natural request will be used.
285    ///
286    /// Readable | Writeable
287    ///
288    ///
289    /// #### `hexpand`
290    ///  Whether to expand horizontally.
291    ///
292    /// Readable | Writeable
293    ///
294    ///
295    /// #### `hexpand-set`
296    ///  Whether to use the `hexpand` property.
297    ///
298    /// Readable | Writeable
299    ///
300    ///
301    /// #### `layout-manager`
302    ///  The [`gtk::LayoutManager`][crate::gtk::LayoutManager] instance to use to compute
303    /// the preferred size of the widget, and allocate its children.
304    ///
305    /// This property is meant to be set by widget implementations,
306    /// typically in their instance init function.
307    ///
308    /// Readable | Writeable
309    ///
310    ///
311    /// #### `limit-events`
312    ///  Makes this widget act like a modal dialog, with respect to
313    /// event delivery.
314    ///
315    /// Global event controllers will not handle events with targets
316    /// inside the widget, unless they are set up to ignore propagation
317    /// limits. See `Gtk::EventController::set_propagation_limit()`.
318    ///
319    /// Readable | Writeable
320    ///
321    ///
322    /// #### `margin-bottom`
323    ///  Margin on bottom side of widget.
324    ///
325    /// This property adds margin outside of the widget's normal size
326    /// request, the margin will be added in addition to the size from
327    /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
328    ///
329    /// Readable | Writeable
330    ///
331    ///
332    /// #### `margin-end`
333    ///  Margin on end of widget, horizontally.
334    ///
335    /// This property supports left-to-right and right-to-left text
336    /// directions.
337    ///
338    /// This property adds margin outside of the widget's normal size
339    /// request, the margin will be added in addition to the size from
340    /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
341    ///
342    /// Readable | Writeable
343    ///
344    ///
345    /// #### `margin-start`
346    ///  Margin on start of widget, horizontally.
347    ///
348    /// This property supports left-to-right and right-to-left text
349    /// directions.
350    ///
351    /// This property adds margin outside of the widget's normal size
352    /// request, the margin will be added in addition to the size from
353    /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
354    ///
355    /// Readable | Writeable
356    ///
357    ///
358    /// #### `margin-top`
359    ///  Margin on top side of widget.
360    ///
361    /// This property adds margin outside of the widget's normal size
362    /// request, the margin will be added in addition to the size from
363    /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
364    ///
365    /// Readable | Writeable
366    ///
367    ///
368    /// #### `name`
369    ///  The name of the widget.
370    ///
371    /// Readable | Writeable
372    ///
373    ///
374    /// #### `opacity`
375    ///  The requested opacity of the widget.
376    ///
377    /// Readable | Writeable
378    ///
379    ///
380    /// #### `overflow`
381    ///  How content outside the widget's content area is treated.
382    ///
383    /// This property is meant to be set by widget implementations,
384    /// typically in their instance init function.
385    ///
386    /// Readable | Writeable
387    ///
388    ///
389    /// #### `parent`
390    ///  The parent widget of this widget.
391    ///
392    /// Readable
393    ///
394    ///
395    /// #### `receives-default`
396    ///  Whether the widget will receive the default action when it is focused.
397    ///
398    /// Readable | Writeable
399    ///
400    ///
401    /// #### `root`
402    ///  The [`gtk::Root`][crate::gtk::Root] widget of the widget tree containing this widget.
403    ///
404    /// This will be `NULL` if the widget is not contained in a root widget.
405    ///
406    /// Readable
407    ///
408    ///
409    /// #### `scale-factor`
410    ///  The scale factor of the widget.
411    ///
412    /// Readable
413    ///
414    ///
415    /// #### `sensitive`
416    ///  Whether the widget responds to input.
417    ///
418    /// Readable | Writeable
419    ///
420    ///
421    /// #### `tooltip-markup`
422    ///  Sets the text of tooltip to be the given string, which is marked up
423    /// with Pango markup.
424    ///
425    /// Also see `Gtk::Tooltip::set_markup()`.
426    ///
427    /// This is a convenience property which will take care of getting the
428    /// tooltip shown if the given string is not `NULL`:
429    /// [`has-tooltip`][struct@crate::gtk::Widget#has-tooltip] will automatically be set to true
430    /// and there will be taken care of [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] in
431    /// the default signal handler.
432    ///
433    /// Note that if both [`tooltip-text`][struct@crate::gtk::Widget#tooltip-text] and
434    /// [`tooltip-markup`][struct@crate::gtk::Widget#tooltip-markup] are set, the last one wins.
435    ///
436    /// Readable | Writeable
437    ///
438    ///
439    /// #### `tooltip-text`
440    ///  Sets the text of tooltip to be the given string.
441    ///
442    /// Also see `Gtk::Tooltip::set_text()`.
443    ///
444    /// This is a convenience property which will take care of getting the
445    /// tooltip shown if the given string is not `NULL`:
446    /// [`has-tooltip`][struct@crate::gtk::Widget#has-tooltip] will automatically be set to true
447    /// and there will be taken care of [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] in
448    /// the default signal handler.
449    ///
450    /// Note that if both [`tooltip-text`][struct@crate::gtk::Widget#tooltip-text] and
451    /// [`tooltip-markup`][struct@crate::gtk::Widget#tooltip-markup] are set, the last one wins.
452    ///
453    /// Readable | Writeable
454    ///
455    ///
456    /// #### `valign`
457    ///  How to distribute vertical space if widget gets extra space.
458    ///
459    /// Readable | Writeable
460    ///
461    ///
462    /// #### `vexpand`
463    ///  Whether to expand vertically.
464    ///
465    /// Readable | Writeable
466    ///
467    ///
468    /// #### `vexpand-set`
469    ///  Whether to use the `vexpand` property.
470    ///
471    /// Readable | Writeable
472    ///
473    ///
474    /// #### `visible`
475    ///  Whether the widget is visible.
476    ///
477    /// Readable | Writeable
478    ///
479    ///
480    /// #### `width-request`
481    ///  Overrides for width request of the widget.
482    ///
483    /// If this is -1, the natural request will be used.
484    ///
485    /// Readable | Writeable
486    /// </details>
487    /// <details><summary><h4>Accessible</h4></summary>
488    ///
489    ///
490    /// #### `accessible-role`
491    ///  The accessible role of the given [`gtk::Accessible`][crate::gtk::Accessible] implementation.
492    ///
493    /// The accessible role cannot be changed once set.
494    ///
495    /// Readable | Writeable
496    /// </details>
497    ///
498    /// ## Signals
499    ///
500    ///
501    /// #### `create-tab`
502    ///  Emitted when a tab needs to be created.
503    ///
504    /// This can happen after the new tab button has been pressed, see
505    /// [`enable-new-tab`][struct@crate::TabOverview#enable-new-tab].
506    ///
507    /// The signal handler is expected to create a new page in the corresponding
508    /// [`TabView`][crate::TabView] and return it.
509    ///
510    ///
511    ///
512    ///
513    /// #### `extra-drag-drop`
514    ///  Emitted when content is dropped onto a tab.
515    ///
516    /// The content must be of one of the types set up via
517    /// [`TabOverview::setup_extra_drop_target()`][crate::TabOverview::setup_extra_drop_target()].
518    ///
519    /// See [`drop`][struct@crate::Gtk::DropTarget#drop].
520    ///
521    ///
522    ///
523    ///
524    /// #### `extra-drag-value`
525    ///  Emitted when the dropped content is preloaded.
526    ///
527    /// In order for data to be preloaded, [`extra-drag-preload`][struct@crate::TabOverview#extra-drag-preload]
528    /// must be set to `TRUE`.
529    ///
530    /// The content must be of one of the types set up via
531    /// [`TabOverview::setup_extra_drop_target()`][crate::TabOverview::setup_extra_drop_target()].
532    ///
533    /// See [`value`][struct@crate::Gtk::DropTarget#value].
534    ///
535    ///
536    /// <details><summary><h4>Widget</h4></summary>
537    ///
538    ///
539    /// #### `destroy`
540    ///  Signals that all holders of a reference to the widget should release
541    /// the reference that they hold.
542    ///
543    /// May result in finalization of the widget if all references are released.
544    ///
545    /// This signal is not suitable for saving widget state.
546    ///
547    ///
548    ///
549    ///
550    /// #### `direction-changed`
551    ///  Emitted when the text direction of a widget changes.
552    ///
553    ///
554    ///
555    ///
556    /// #### `hide`
557    ///  Emitted when @widget is hidden.
558    ///
559    ///
560    ///
561    ///
562    /// #### `keynav-failed`
563    ///  Emitted if keyboard navigation fails.
564    ///
565    /// See [`WidgetExtManual::keynav_failed()`][crate::gtk::prelude::WidgetExtManual::keynav_failed()] for details.
566    ///
567    ///
568    ///
569    ///
570    /// #### `map`
571    ///  Emitted when @widget is going to be mapped.
572    ///
573    /// A widget is mapped when the widget is visible (which is controlled with
574    /// [`visible`][struct@crate::gtk::Widget#visible]) and all its parents up to the toplevel widget
575    /// are also visible.
576    ///
577    /// The `::map` signal can be used to determine whether a widget will be drawn,
578    /// for instance it can resume an animation that was stopped during the
579    /// emission of [`unmap`][struct@crate::gtk::Widget#unmap].
580    ///
581    ///
582    ///
583    ///
584    /// #### `mnemonic-activate`
585    ///  Emitted when a widget is activated via a mnemonic.
586    ///
587    /// The default handler for this signal activates @widget if @group_cycling
588    /// is false, or just makes @widget grab focus if @group_cycling is true.
589    ///
590    ///
591    ///
592    ///
593    /// #### `move-focus`
594    ///  Emitted when the focus is moved.
595    ///
596    /// The `::move-focus` signal is a [keybinding signal](class.SignalAction.html).
597    ///
598    /// The default bindings for this signal are <kbd>Tab</kbd> to move forward,
599    /// and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
600    ///
601    /// Action
602    ///
603    ///
604    /// #### `query-tooltip`
605    ///  Emitted when the widget’s tooltip is about to be shown.
606    ///
607    /// This happens when the [`has-tooltip`][struct@crate::gtk::Widget#has-tooltip] property
608    /// is true and the hover timeout has expired with the cursor hovering
609    /// above @widget; or emitted when @widget got focus in keyboard mode.
610    ///
611    /// Using the given coordinates, the signal handler should determine
612    /// whether a tooltip should be shown for @widget. If this is the case
613    /// true should be returned, false otherwise. Note that if @keyboard_mode
614    /// is true, the values of @x and @y are undefined and should not be used.
615    ///
616    /// The signal handler is free to manipulate @tooltip with the therefore
617    /// destined function calls.
618    ///
619    ///
620    ///
621    ///
622    /// #### `realize`
623    ///  Emitted when @widget is associated with a `GdkSurface`.
624    ///
625    /// This means that [`WidgetExtManual::realize()`][crate::gtk::prelude::WidgetExtManual::realize()] has been called
626    /// or the widget has been mapped (that is, it is going to be drawn).
627    ///
628    ///
629    ///
630    ///
631    /// #### `show`
632    ///  Emitted when @widget is shown.
633    ///
634    ///
635    ///
636    ///
637    /// #### `state-flags-changed`
638    ///  Emitted when the widget state changes.
639    ///
640    /// See [`WidgetExtManual::state_flags()`][crate::gtk::prelude::WidgetExtManual::state_flags()].
641    ///
642    ///
643    ///
644    ///
645    /// #### `unmap`
646    ///  Emitted when @widget is going to be unmapped.
647    ///
648    /// A widget is unmapped when either it or any of its parents up to the
649    /// toplevel widget have been set as hidden.
650    ///
651    /// As `::unmap` indicates that a widget will not be shown any longer,
652    /// it can be used to, for example, stop an animation on the widget.
653    ///
654    ///
655    ///
656    ///
657    /// #### `unrealize`
658    ///  Emitted when the `GdkSurface` associated with @widget is destroyed.
659    ///
660    /// This means that [`WidgetExtManual::unrealize()`][crate::gtk::prelude::WidgetExtManual::unrealize()] has been called
661    /// or the widget has been unmapped (that is, it is going to be hidden).
662    ///
663    ///
664    /// </details>
665    ///
666    /// # Implements
667    ///
668    /// [`trait@gtk::prelude::WidgetExt`], [`trait@glib::ObjectExt`], [`trait@gtk::prelude::AccessibleExt`], [`trait@gtk::prelude::BuildableExt`], [`trait@gtk::prelude::ConstraintTargetExt`]
669    #[doc(alias = "AdwTabOverview")]
670    pub struct TabOverview(Object<ffi::AdwTabOverview, ffi::AdwTabOverviewClass>) @extends gtk::Widget, @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
671
672    match fn {
673        type_ => || ffi::adw_tab_overview_get_type(),
674    }
675}
676
677impl TabOverview {
678    /// Creates a new [`TabOverview`][crate::TabOverview].
679    ///
680    /// # Returns
681    ///
682    /// the newly created [`TabOverview`][crate::TabOverview]
683    #[doc(alias = "adw_tab_overview_new")]
684    pub fn new() -> TabOverview {
685        assert_initialized_main_thread!();
686        unsafe { gtk::Widget::from_glib_none(ffi::adw_tab_overview_new()).unsafe_cast() }
687    }
688
689    // rustdoc-stripper-ignore-next
690    /// Creates a new builder-pattern struct instance to construct [`TabOverview`] objects.
691    ///
692    /// This method returns an instance of [`TabOverviewBuilder`](crate::builders::TabOverviewBuilder) which can be used to create [`TabOverview`] objects.
693    pub fn builder() -> TabOverviewBuilder {
694        TabOverviewBuilder::new()
695    }
696
697    /// Gets the child widget of @self.
698    ///
699    /// # Returns
700    ///
701    /// the child widget of @self
702    #[doc(alias = "adw_tab_overview_get_child")]
703    #[doc(alias = "get_child")]
704    pub fn child(&self) -> Option<gtk::Widget> {
705        unsafe { from_glib_none(ffi::adw_tab_overview_get_child(self.to_glib_none().0)) }
706    }
707
708    /// Gets whether to new tab button is enabled for @self.
709    ///
710    /// # Returns
711    ///
712    /// whether new tab button is enabled
713    #[doc(alias = "adw_tab_overview_get_enable_new_tab")]
714    #[doc(alias = "get_enable_new_tab")]
715    #[doc(alias = "enable-new-tab")]
716    pub fn enables_new_tab(&self) -> bool {
717        unsafe {
718            from_glib(ffi::adw_tab_overview_get_enable_new_tab(
719                self.to_glib_none().0,
720            ))
721        }
722    }
723
724    /// Gets whether search in tabs is enabled for @self.
725    ///
726    /// # Returns
727    ///
728    /// whether search is enabled
729    #[doc(alias = "adw_tab_overview_get_enable_search")]
730    #[doc(alias = "get_enable_search")]
731    #[doc(alias = "enable-search")]
732    pub fn enables_search(&self) -> bool {
733        unsafe {
734            from_glib(ffi::adw_tab_overview_get_enable_search(
735                self.to_glib_none().0,
736            ))
737        }
738    }
739
740    /// Gets the current action during a drop on the extra_drop_target.
741    ///
742    /// # Returns
743    ///
744    /// the drag action of the current drop.
745    #[cfg(feature = "v1_4")]
746    #[cfg_attr(docsrs, doc(cfg(feature = "v1_4")))]
747    #[doc(alias = "adw_tab_overview_get_extra_drag_preferred_action")]
748    #[doc(alias = "get_extra_drag_preferred_action")]
749    #[doc(alias = "extra-drag-preferred-action")]
750    pub fn extra_drag_preferred_action(&self) -> gdk::DragAction {
751        unsafe {
752            from_glib(ffi::adw_tab_overview_get_extra_drag_preferred_action(
753                self.to_glib_none().0,
754            ))
755        }
756    }
757
758    /// Gets the current drag action during a drop.
759    ///
760    /// This method should only be used from inside a
761    /// [`extra-drag-drop`][struct@crate::TabOverview#extra-drag-drop] handler.
762    ///
763    /// The action will be a subset of what was originally passed to
764    /// [`setup_extra_drop_target()`][Self::setup_extra_drop_target()].
765    ///
766    /// # Returns
767    ///
768    /// the drag action of the current drop
769    #[doc(alias = "adw_tab_overview_get_extra_drag_preload")]
770    #[doc(alias = "get_extra_drag_preload")]
771    #[doc(alias = "extra-drag-preload")]
772    pub fn is_extra_drag_preload(&self) -> bool {
773        unsafe {
774            from_glib(ffi::adw_tab_overview_get_extra_drag_preload(
775                self.to_glib_none().0,
776            ))
777        }
778    }
779
780    /// Gets whether thumbnails use inverted layout.
781    ///
782    /// # Returns
783    ///
784    /// whether thumbnails use inverted layout
785    #[doc(alias = "adw_tab_overview_get_inverted")]
786    #[doc(alias = "get_inverted")]
787    #[doc(alias = "inverted")]
788    pub fn is_inverted(&self) -> bool {
789        unsafe { from_glib(ffi::adw_tab_overview_get_inverted(self.to_glib_none().0)) }
790    }
791
792    /// Gets whether @self is open.
793    ///
794    /// # Returns
795    ///
796    /// whether the overview is open
797    #[doc(alias = "adw_tab_overview_get_open")]
798    #[doc(alias = "get_open")]
799    #[doc(alias = "open")]
800    pub fn is_open(&self) -> bool {
801        unsafe { from_glib(ffi::adw_tab_overview_get_open(self.to_glib_none().0)) }
802    }
803
804    /// Gets whether search is currently active for @self.
805    ///
806    /// See [`enable-search`][struct@crate::TabOverview#enable-search].
807    ///
808    /// # Returns
809    ///
810    /// whether search is active
811    #[doc(alias = "adw_tab_overview_get_search_active")]
812    #[doc(alias = "get_search_active")]
813    #[doc(alias = "search-active")]
814    pub fn is_search_active(&self) -> bool {
815        unsafe {
816            from_glib(ffi::adw_tab_overview_get_search_active(
817                self.to_glib_none().0,
818            ))
819        }
820    }
821
822    /// Gets the secondary menu model for @self.
823    ///
824    /// # Returns
825    ///
826    /// the secondary menu model
827    #[doc(alias = "adw_tab_overview_get_secondary_menu")]
828    #[doc(alias = "get_secondary_menu")]
829    #[doc(alias = "secondary-menu")]
830    pub fn secondary_menu(&self) -> Option<gio::MenuModel> {
831        unsafe {
832            from_glib_none(ffi::adw_tab_overview_get_secondary_menu(
833                self.to_glib_none().0,
834            ))
835        }
836    }
837
838    /// Gets whether end title buttons are shown in @self's header bar.
839    ///
840    /// # Returns
841    ///
842    /// whether end title buttons are shown
843    #[doc(alias = "adw_tab_overview_get_show_end_title_buttons")]
844    #[doc(alias = "get_show_end_title_buttons")]
845    #[doc(alias = "show-end-title-buttons")]
846    pub fn shows_end_title_buttons(&self) -> bool {
847        unsafe {
848            from_glib(ffi::adw_tab_overview_get_show_end_title_buttons(
849                self.to_glib_none().0,
850            ))
851        }
852    }
853
854    /// Gets whether start title buttons are shown in @self's header bar.
855    ///
856    /// # Returns
857    ///
858    /// whether start title buttons are shown
859    #[doc(alias = "adw_tab_overview_get_show_start_title_buttons")]
860    #[doc(alias = "get_show_start_title_buttons")]
861    #[doc(alias = "show-start-title-buttons")]
862    pub fn shows_start_title_buttons(&self) -> bool {
863        unsafe {
864            from_glib(ffi::adw_tab_overview_get_show_start_title_buttons(
865                self.to_glib_none().0,
866            ))
867        }
868    }
869
870    /// Gets the tab view @self controls.
871    ///
872    /// # Returns
873    ///
874    /// the tab view
875    #[doc(alias = "adw_tab_overview_get_view")]
876    #[doc(alias = "get_view")]
877    pub fn view(&self) -> Option<TabView> {
878        unsafe { from_glib_none(ffi::adw_tab_overview_get_view(self.to_glib_none().0)) }
879    }
880
881    /// Sets the child widget of @self.
882    /// ## `child`
883    /// the child widget
884    #[doc(alias = "adw_tab_overview_set_child")]
885    #[doc(alias = "child")]
886    pub fn set_child(&self, child: Option<&impl IsA<gtk::Widget>>) {
887        unsafe {
888            ffi::adw_tab_overview_set_child(
889                self.to_glib_none().0,
890                child.map(|p| p.as_ref()).to_glib_none().0,
891            );
892        }
893    }
894
895    /// Sets whether to enable new tab button for @self.
896    ///
897    /// Connect to the [`create-tab`][struct@crate::TabOverview#create-tab] signal to use it.
898    /// ## `enable_new_tab`
899    /// whether to enable new tab button
900    #[doc(alias = "adw_tab_overview_set_enable_new_tab")]
901    #[doc(alias = "enable-new-tab")]
902    pub fn set_enable_new_tab(&self, enable_new_tab: bool) {
903        unsafe {
904            ffi::adw_tab_overview_set_enable_new_tab(
905                self.to_glib_none().0,
906                enable_new_tab.into_glib(),
907            );
908        }
909    }
910
911    /// Sets whether to enable search in tabs for @self.
912    ///
913    /// Search matches tab titles and tooltips, as well as keywords, set via
914    /// [`keyword`][struct@crate::TabPage#keyword]. Use keywords to search in e.g. page URLs in a web
915    /// browser.
916    ///
917    /// During search, tab reordering and drag-n-drop are disabled.
918    ///
919    /// Use [`search-active`][struct@crate::TabOverview#search-active] to check out if search is currently
920    /// active.
921    /// ## `enable_search`
922    /// whether to enable search
923    #[doc(alias = "adw_tab_overview_set_enable_search")]
924    #[doc(alias = "enable-search")]
925    pub fn set_enable_search(&self, enable_search: bool) {
926        unsafe {
927            ffi::adw_tab_overview_set_enable_search(
928                self.to_glib_none().0,
929                enable_search.into_glib(),
930            );
931        }
932    }
933
934    /// Sets whether drop data should be preloaded on hover.
935    ///
936    /// See [`preload`][struct@crate::Gtk::DropTarget#preload].
937    /// ## `preload`
938    /// whether to preload drop data
939    #[doc(alias = "adw_tab_overview_set_extra_drag_preload")]
940    #[doc(alias = "extra-drag-preload")]
941    pub fn set_extra_drag_preload(&self, preload: bool) {
942        unsafe {
943            ffi::adw_tab_overview_set_extra_drag_preload(
944                self.to_glib_none().0,
945                preload.into_glib(),
946            );
947        }
948    }
949
950    /// Sets whether thumbnails use inverted layout.
951    ///
952    /// If set to `TRUE`, thumbnails will have the close or unpin button at the
953    /// beginning and the indicator at the end rather than the other way around.
954    /// ## `inverted`
955    /// whether thumbnails use inverted layout
956    #[doc(alias = "adw_tab_overview_set_inverted")]
957    #[doc(alias = "inverted")]
958    pub fn set_inverted(&self, inverted: bool) {
959        unsafe {
960            ffi::adw_tab_overview_set_inverted(self.to_glib_none().0, inverted.into_glib());
961        }
962    }
963
964    /// Sets whether the to open @self.
965    /// ## `open`
966    /// whether the overview is open
967    #[doc(alias = "adw_tab_overview_set_open")]
968    #[doc(alias = "open")]
969    pub fn set_open(&self, open: bool) {
970        unsafe {
971            ffi::adw_tab_overview_set_open(self.to_glib_none().0, open.into_glib());
972        }
973    }
974
975    /// Sets the secondary menu model for @self.
976    ///
977    /// Use it to add extra actions, e.g. to open a new window or undo closed tab.
978    /// ## `secondary_menu`
979    /// a menu model
980    #[doc(alias = "adw_tab_overview_set_secondary_menu")]
981    #[doc(alias = "secondary-menu")]
982    pub fn set_secondary_menu(&self, secondary_menu: Option<&impl IsA<gio::MenuModel>>) {
983        unsafe {
984            ffi::adw_tab_overview_set_secondary_menu(
985                self.to_glib_none().0,
986                secondary_menu.map(|p| p.as_ref()).to_glib_none().0,
987            );
988        }
989    }
990
991    /// Sets whether to show end title buttons in @self's header bar.
992    ///
993    /// See [`show-start-title-buttons`][struct@crate::HeaderBar#show-start-title-buttons] for the other side.
994    /// ## `show_end_title_buttons`
995    /// whether to show end title buttons
996    #[doc(alias = "adw_tab_overview_set_show_end_title_buttons")]
997    #[doc(alias = "show-end-title-buttons")]
998    pub fn set_show_end_title_buttons(&self, show_end_title_buttons: bool) {
999        unsafe {
1000            ffi::adw_tab_overview_set_show_end_title_buttons(
1001                self.to_glib_none().0,
1002                show_end_title_buttons.into_glib(),
1003            );
1004        }
1005    }
1006
1007    /// Sets whether to show start title buttons in @self's header bar.
1008    ///
1009    /// See [`show-end-title-buttons`][struct@crate::HeaderBar#show-end-title-buttons] for the other side.
1010    /// ## `show_start_title_buttons`
1011    /// whether to show start title buttons
1012    #[doc(alias = "adw_tab_overview_set_show_start_title_buttons")]
1013    #[doc(alias = "show-start-title-buttons")]
1014    pub fn set_show_start_title_buttons(&self, show_start_title_buttons: bool) {
1015        unsafe {
1016            ffi::adw_tab_overview_set_show_start_title_buttons(
1017                self.to_glib_none().0,
1018                show_start_title_buttons.into_glib(),
1019            );
1020        }
1021    }
1022
1023    /// Sets the tab view to control.
1024    ///
1025    /// The view must be inside @self, see [`child`][struct@crate::TabOverview#child].
1026    /// ## `view`
1027    /// a tab view
1028    #[doc(alias = "adw_tab_overview_set_view")]
1029    #[doc(alias = "view")]
1030    pub fn set_view(&self, view: Option<&TabView>) {
1031        unsafe {
1032            ffi::adw_tab_overview_set_view(self.to_glib_none().0, view.to_glib_none().0);
1033        }
1034    }
1035
1036    /// Emitted when a tab needs to be created.
1037    ///
1038    /// This can happen after the new tab button has been pressed, see
1039    /// [`enable-new-tab`][struct@crate::TabOverview#enable-new-tab].
1040    ///
1041    /// The signal handler is expected to create a new page in the corresponding
1042    /// [`TabView`][crate::TabView] and return it.
1043    ///
1044    /// # Returns
1045    ///
1046    /// the newly created page
1047    #[cfg(feature = "v1_3")]
1048    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1049    #[doc(alias = "create-tab")]
1050    pub fn connect_create_tab<F: Fn(&Self) -> TabPage + 'static>(&self, f: F) -> SignalHandlerId {
1051        unsafe extern "C" fn create_tab_trampoline<F: Fn(&TabOverview) -> TabPage + 'static>(
1052            this: *mut ffi::AdwTabOverview,
1053            f: glib::ffi::gpointer,
1054        ) -> *mut ffi::AdwTabPage {
1055            unsafe {
1056                let f: &F = &*(f as *const F);
1057                f(&from_glib_borrow(this)) /*Not checked*/
1058                    .to_glib_none()
1059                    .0
1060            }
1061        }
1062        unsafe {
1063            let f: Box_<F> = Box_::new(f);
1064            connect_raw(
1065                self.as_ptr() as *mut _,
1066                c"create-tab".as_ptr(),
1067                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1068                    create_tab_trampoline::<F> as *const (),
1069                )),
1070                Box_::into_raw(f),
1071            )
1072        }
1073    }
1074
1075    /// Emitted when content is dropped onto a tab.
1076    ///
1077    /// The content must be of one of the types set up via
1078    /// [`setup_extra_drop_target()`][Self::setup_extra_drop_target()].
1079    ///
1080    /// See [`drop`][struct@crate::Gtk::DropTarget#drop].
1081    /// ## `page`
1082    /// the page matching the tab the content was dropped onto
1083    /// ## `value`
1084    /// the `GValue` being dropped
1085    ///
1086    /// # Returns
1087    ///
1088    /// whether the drop was accepted
1089    #[cfg(feature = "v1_3")]
1090    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1091    #[doc(alias = "extra-drag-drop")]
1092    pub fn connect_extra_drag_drop<F: Fn(&Self, &TabPage, &glib::Value) -> bool + 'static>(
1093        &self,
1094        f: F,
1095    ) -> SignalHandlerId {
1096        unsafe extern "C" fn extra_drag_drop_trampoline<
1097            F: Fn(&TabOverview, &TabPage, &glib::Value) -> bool + 'static,
1098        >(
1099            this: *mut ffi::AdwTabOverview,
1100            page: *mut ffi::AdwTabPage,
1101            value: *mut glib::gobject_ffi::GValue,
1102            f: glib::ffi::gpointer,
1103        ) -> glib::ffi::gboolean {
1104            unsafe {
1105                let f: &F = &*(f as *const F);
1106                f(
1107                    &from_glib_borrow(this),
1108                    &from_glib_borrow(page),
1109                    &from_glib_borrow(value),
1110                )
1111                .into_glib()
1112            }
1113        }
1114        unsafe {
1115            let f: Box_<F> = Box_::new(f);
1116            connect_raw(
1117                self.as_ptr() as *mut _,
1118                c"extra-drag-drop".as_ptr(),
1119                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1120                    extra_drag_drop_trampoline::<F> as *const (),
1121                )),
1122                Box_::into_raw(f),
1123            )
1124        }
1125    }
1126
1127    /// Emitted when the dropped content is preloaded.
1128    ///
1129    /// In order for data to be preloaded, [`extra-drag-preload`][struct@crate::TabOverview#extra-drag-preload]
1130    /// must be set to `TRUE`.
1131    ///
1132    /// The content must be of one of the types set up via
1133    /// [`setup_extra_drop_target()`][Self::setup_extra_drop_target()].
1134    ///
1135    /// See [`value`][struct@crate::Gtk::DropTarget#value].
1136    /// ## `page`
1137    /// the page matching the tab the content was dropped onto
1138    /// ## `value`
1139    /// the `GValue` being dropped
1140    ///
1141    /// # Returns
1142    ///
1143    /// the preferred action for the drop
1144    #[cfg(feature = "v1_3")]
1145    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1146    #[doc(alias = "extra-drag-value")]
1147    pub fn connect_extra_drag_value<
1148        F: Fn(&Self, &TabPage, Option<&glib::Value>) -> gdk::DragAction + 'static,
1149    >(
1150        &self,
1151        f: F,
1152    ) -> SignalHandlerId {
1153        unsafe extern "C" fn extra_drag_value_trampoline<
1154            F: Fn(&TabOverview, &TabPage, Option<&glib::Value>) -> gdk::DragAction + 'static,
1155        >(
1156            this: *mut ffi::AdwTabOverview,
1157            page: *mut ffi::AdwTabPage,
1158            value: *mut glib::gobject_ffi::GValue,
1159            f: glib::ffi::gpointer,
1160        ) -> gdk::ffi::GdkDragAction {
1161            unsafe {
1162                let f: &F = &*(f as *const F);
1163                f(
1164                    &from_glib_borrow(this),
1165                    &from_glib_borrow(page),
1166                    Option::<glib::Value>::from_glib_borrow(value)
1167                        .as_ref()
1168                        .as_ref(),
1169                )
1170                .into_glib()
1171            }
1172        }
1173        unsafe {
1174            let f: Box_<F> = Box_::new(f);
1175            connect_raw(
1176                self.as_ptr() as *mut _,
1177                c"extra-drag-value".as_ptr(),
1178                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1179                    extra_drag_value_trampoline::<F> as *const (),
1180                )),
1181                Box_::into_raw(f),
1182            )
1183        }
1184    }
1185
1186    #[cfg(feature = "v1_3")]
1187    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1188    #[doc(alias = "child")]
1189    pub fn connect_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1190        unsafe extern "C" fn notify_child_trampoline<F: Fn(&TabOverview) + 'static>(
1191            this: *mut ffi::AdwTabOverview,
1192            _param_spec: glib::ffi::gpointer,
1193            f: glib::ffi::gpointer,
1194        ) {
1195            unsafe {
1196                let f: &F = &*(f as *const F);
1197                f(&from_glib_borrow(this))
1198            }
1199        }
1200        unsafe {
1201            let f: Box_<F> = Box_::new(f);
1202            connect_raw(
1203                self.as_ptr() as *mut _,
1204                c"notify::child".as_ptr(),
1205                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1206                    notify_child_trampoline::<F> as *const (),
1207                )),
1208                Box_::into_raw(f),
1209            )
1210        }
1211    }
1212
1213    #[cfg(feature = "v1_3")]
1214    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1215    #[doc(alias = "enable-new-tab")]
1216    pub fn connect_enable_new_tab_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1217        unsafe extern "C" fn notify_enable_new_tab_trampoline<F: Fn(&TabOverview) + 'static>(
1218            this: *mut ffi::AdwTabOverview,
1219            _param_spec: glib::ffi::gpointer,
1220            f: glib::ffi::gpointer,
1221        ) {
1222            unsafe {
1223                let f: &F = &*(f as *const F);
1224                f(&from_glib_borrow(this))
1225            }
1226        }
1227        unsafe {
1228            let f: Box_<F> = Box_::new(f);
1229            connect_raw(
1230                self.as_ptr() as *mut _,
1231                c"notify::enable-new-tab".as_ptr(),
1232                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1233                    notify_enable_new_tab_trampoline::<F> as *const (),
1234                )),
1235                Box_::into_raw(f),
1236            )
1237        }
1238    }
1239
1240    #[cfg(feature = "v1_3")]
1241    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1242    #[doc(alias = "enable-search")]
1243    pub fn connect_enable_search_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1244        unsafe extern "C" fn notify_enable_search_trampoline<F: Fn(&TabOverview) + 'static>(
1245            this: *mut ffi::AdwTabOverview,
1246            _param_spec: glib::ffi::gpointer,
1247            f: glib::ffi::gpointer,
1248        ) {
1249            unsafe {
1250                let f: &F = &*(f as *const F);
1251                f(&from_glib_borrow(this))
1252            }
1253        }
1254        unsafe {
1255            let f: Box_<F> = Box_::new(f);
1256            connect_raw(
1257                self.as_ptr() as *mut _,
1258                c"notify::enable-search".as_ptr(),
1259                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1260                    notify_enable_search_trampoline::<F> as *const (),
1261                )),
1262                Box_::into_raw(f),
1263            )
1264        }
1265    }
1266
1267    #[cfg(feature = "v1_4")]
1268    #[cfg_attr(docsrs, doc(cfg(feature = "v1_4")))]
1269    #[doc(alias = "extra-drag-preferred-action")]
1270    pub fn connect_extra_drag_preferred_action_notify<F: Fn(&Self) + 'static>(
1271        &self,
1272        f: F,
1273    ) -> SignalHandlerId {
1274        unsafe extern "C" fn notify_extra_drag_preferred_action_trampoline<
1275            F: Fn(&TabOverview) + 'static,
1276        >(
1277            this: *mut ffi::AdwTabOverview,
1278            _param_spec: glib::ffi::gpointer,
1279            f: glib::ffi::gpointer,
1280        ) {
1281            unsafe {
1282                let f: &F = &*(f as *const F);
1283                f(&from_glib_borrow(this))
1284            }
1285        }
1286        unsafe {
1287            let f: Box_<F> = Box_::new(f);
1288            connect_raw(
1289                self.as_ptr() as *mut _,
1290                c"notify::extra-drag-preferred-action".as_ptr(),
1291                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1292                    notify_extra_drag_preferred_action_trampoline::<F> as *const (),
1293                )),
1294                Box_::into_raw(f),
1295            )
1296        }
1297    }
1298
1299    #[cfg(feature = "v1_3")]
1300    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1301    #[doc(alias = "extra-drag-preload")]
1302    pub fn connect_extra_drag_preload_notify<F: Fn(&Self) + 'static>(
1303        &self,
1304        f: F,
1305    ) -> SignalHandlerId {
1306        unsafe extern "C" fn notify_extra_drag_preload_trampoline<F: Fn(&TabOverview) + 'static>(
1307            this: *mut ffi::AdwTabOverview,
1308            _param_spec: glib::ffi::gpointer,
1309            f: glib::ffi::gpointer,
1310        ) {
1311            unsafe {
1312                let f: &F = &*(f as *const F);
1313                f(&from_glib_borrow(this))
1314            }
1315        }
1316        unsafe {
1317            let f: Box_<F> = Box_::new(f);
1318            connect_raw(
1319                self.as_ptr() as *mut _,
1320                c"notify::extra-drag-preload".as_ptr(),
1321                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1322                    notify_extra_drag_preload_trampoline::<F> as *const (),
1323                )),
1324                Box_::into_raw(f),
1325            )
1326        }
1327    }
1328
1329    #[cfg(feature = "v1_3")]
1330    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1331    #[doc(alias = "inverted")]
1332    pub fn connect_inverted_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1333        unsafe extern "C" fn notify_inverted_trampoline<F: Fn(&TabOverview) + 'static>(
1334            this: *mut ffi::AdwTabOverview,
1335            _param_spec: glib::ffi::gpointer,
1336            f: glib::ffi::gpointer,
1337        ) {
1338            unsafe {
1339                let f: &F = &*(f as *const F);
1340                f(&from_glib_borrow(this))
1341            }
1342        }
1343        unsafe {
1344            let f: Box_<F> = Box_::new(f);
1345            connect_raw(
1346                self.as_ptr() as *mut _,
1347                c"notify::inverted".as_ptr(),
1348                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1349                    notify_inverted_trampoline::<F> as *const (),
1350                )),
1351                Box_::into_raw(f),
1352            )
1353        }
1354    }
1355
1356    #[cfg(feature = "v1_3")]
1357    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1358    #[doc(alias = "open")]
1359    pub fn connect_open_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1360        unsafe extern "C" fn notify_open_trampoline<F: Fn(&TabOverview) + 'static>(
1361            this: *mut ffi::AdwTabOverview,
1362            _param_spec: glib::ffi::gpointer,
1363            f: glib::ffi::gpointer,
1364        ) {
1365            unsafe {
1366                let f: &F = &*(f as *const F);
1367                f(&from_glib_borrow(this))
1368            }
1369        }
1370        unsafe {
1371            let f: Box_<F> = Box_::new(f);
1372            connect_raw(
1373                self.as_ptr() as *mut _,
1374                c"notify::open".as_ptr(),
1375                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1376                    notify_open_trampoline::<F> as *const (),
1377                )),
1378                Box_::into_raw(f),
1379            )
1380        }
1381    }
1382
1383    #[cfg(feature = "v1_3")]
1384    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1385    #[doc(alias = "search-active")]
1386    pub fn connect_search_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1387        unsafe extern "C" fn notify_search_active_trampoline<F: Fn(&TabOverview) + 'static>(
1388            this: *mut ffi::AdwTabOverview,
1389            _param_spec: glib::ffi::gpointer,
1390            f: glib::ffi::gpointer,
1391        ) {
1392            unsafe {
1393                let f: &F = &*(f as *const F);
1394                f(&from_glib_borrow(this))
1395            }
1396        }
1397        unsafe {
1398            let f: Box_<F> = Box_::new(f);
1399            connect_raw(
1400                self.as_ptr() as *mut _,
1401                c"notify::search-active".as_ptr(),
1402                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1403                    notify_search_active_trampoline::<F> as *const (),
1404                )),
1405                Box_::into_raw(f),
1406            )
1407        }
1408    }
1409
1410    #[cfg(feature = "v1_3")]
1411    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1412    #[doc(alias = "secondary-menu")]
1413    pub fn connect_secondary_menu_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1414        unsafe extern "C" fn notify_secondary_menu_trampoline<F: Fn(&TabOverview) + 'static>(
1415            this: *mut ffi::AdwTabOverview,
1416            _param_spec: glib::ffi::gpointer,
1417            f: glib::ffi::gpointer,
1418        ) {
1419            unsafe {
1420                let f: &F = &*(f as *const F);
1421                f(&from_glib_borrow(this))
1422            }
1423        }
1424        unsafe {
1425            let f: Box_<F> = Box_::new(f);
1426            connect_raw(
1427                self.as_ptr() as *mut _,
1428                c"notify::secondary-menu".as_ptr(),
1429                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1430                    notify_secondary_menu_trampoline::<F> as *const (),
1431                )),
1432                Box_::into_raw(f),
1433            )
1434        }
1435    }
1436
1437    #[cfg(feature = "v1_3")]
1438    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1439    #[doc(alias = "show-end-title-buttons")]
1440    pub fn connect_show_end_title_buttons_notify<F: Fn(&Self) + 'static>(
1441        &self,
1442        f: F,
1443    ) -> SignalHandlerId {
1444        unsafe extern "C" fn notify_show_end_title_buttons_trampoline<
1445            F: Fn(&TabOverview) + 'static,
1446        >(
1447            this: *mut ffi::AdwTabOverview,
1448            _param_spec: glib::ffi::gpointer,
1449            f: glib::ffi::gpointer,
1450        ) {
1451            unsafe {
1452                let f: &F = &*(f as *const F);
1453                f(&from_glib_borrow(this))
1454            }
1455        }
1456        unsafe {
1457            let f: Box_<F> = Box_::new(f);
1458            connect_raw(
1459                self.as_ptr() as *mut _,
1460                c"notify::show-end-title-buttons".as_ptr(),
1461                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1462                    notify_show_end_title_buttons_trampoline::<F> as *const (),
1463                )),
1464                Box_::into_raw(f),
1465            )
1466        }
1467    }
1468
1469    #[cfg(feature = "v1_3")]
1470    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1471    #[doc(alias = "show-start-title-buttons")]
1472    pub fn connect_show_start_title_buttons_notify<F: Fn(&Self) + 'static>(
1473        &self,
1474        f: F,
1475    ) -> SignalHandlerId {
1476        unsafe extern "C" fn notify_show_start_title_buttons_trampoline<
1477            F: Fn(&TabOverview) + 'static,
1478        >(
1479            this: *mut ffi::AdwTabOverview,
1480            _param_spec: glib::ffi::gpointer,
1481            f: glib::ffi::gpointer,
1482        ) {
1483            unsafe {
1484                let f: &F = &*(f as *const F);
1485                f(&from_glib_borrow(this))
1486            }
1487        }
1488        unsafe {
1489            let f: Box_<F> = Box_::new(f);
1490            connect_raw(
1491                self.as_ptr() as *mut _,
1492                c"notify::show-start-title-buttons".as_ptr(),
1493                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1494                    notify_show_start_title_buttons_trampoline::<F> as *const (),
1495                )),
1496                Box_::into_raw(f),
1497            )
1498        }
1499    }
1500
1501    #[cfg(feature = "v1_3")]
1502    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1503    #[doc(alias = "view")]
1504    pub fn connect_view_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1505        unsafe extern "C" fn notify_view_trampoline<F: Fn(&TabOverview) + 'static>(
1506            this: *mut ffi::AdwTabOverview,
1507            _param_spec: glib::ffi::gpointer,
1508            f: glib::ffi::gpointer,
1509        ) {
1510            unsafe {
1511                let f: &F = &*(f as *const F);
1512                f(&from_glib_borrow(this))
1513            }
1514        }
1515        unsafe {
1516            let f: Box_<F> = Box_::new(f);
1517            connect_raw(
1518                self.as_ptr() as *mut _,
1519                c"notify::view".as_ptr(),
1520                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1521                    notify_view_trampoline::<F> as *const (),
1522                )),
1523                Box_::into_raw(f),
1524            )
1525        }
1526    }
1527}
1528
1529#[cfg(feature = "v1_3")]
1530#[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1531impl Default for TabOverview {
1532    fn default() -> Self {
1533        Self::new()
1534    }
1535}
1536
1537// rustdoc-stripper-ignore-next
1538/// A [builder-pattern] type to construct [`TabOverview`] objects.
1539///
1540/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
1541#[must_use = "The builder must be built to be used"]
1542pub struct TabOverviewBuilder {
1543    builder: glib::object::ObjectBuilder<'static, TabOverview>,
1544}
1545
1546impl TabOverviewBuilder {
1547    fn new() -> Self {
1548        Self {
1549            builder: glib::object::Object::builder(),
1550        }
1551    }
1552
1553    /// The child widget.
1554    #[cfg(feature = "v1_3")]
1555    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1556    pub fn child(self, child: &impl IsA<gtk::Widget>) -> Self {
1557        Self {
1558            builder: self.builder.property("child", child.clone().upcast()),
1559        }
1560    }
1561
1562    /// Whether to enable new tab button.
1563    ///
1564    /// Connect to the [`create-tab`][struct@crate::TabOverview#create-tab] signal to use it.
1565    #[cfg(feature = "v1_3")]
1566    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1567    pub fn enable_new_tab(self, enable_new_tab: bool) -> Self {
1568        Self {
1569            builder: self.builder.property("enable-new-tab", enable_new_tab),
1570        }
1571    }
1572
1573    /// Whether to enable search in tabs.
1574    ///
1575    /// Search matches tab titles and tooltips, as well as keywords, set via
1576    /// [`keyword`][struct@crate::TabPage#keyword]. Use keywords to search in e.g. page URLs in a
1577    /// web browser.
1578    ///
1579    /// During search, tab reordering and drag-n-drop are disabled.
1580    ///
1581    /// Use [`search-active`][struct@crate::TabOverview#search-active] to check out if search is
1582    /// currently active.
1583    #[cfg(feature = "v1_3")]
1584    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1585    pub fn enable_search(self, enable_search: bool) -> Self {
1586        Self {
1587            builder: self.builder.property("enable-search", enable_search),
1588        }
1589    }
1590
1591    /// Whether the drop data should be preloaded on hover.
1592    ///
1593    /// See [`preload`][struct@crate::Gtk::DropTarget#preload].
1594    #[cfg(feature = "v1_3")]
1595    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1596    pub fn extra_drag_preload(self, extra_drag_preload: bool) -> Self {
1597        Self {
1598            builder: self
1599                .builder
1600                .property("extra-drag-preload", extra_drag_preload),
1601        }
1602    }
1603
1604    /// Whether thumbnails use inverted layout.
1605    ///
1606    /// If set to `TRUE`, thumbnails will have the close or unpin buttons at the
1607    /// beginning and the indicator at the end rather than the other way around.
1608    #[cfg(feature = "v1_3")]
1609    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1610    pub fn inverted(self, inverted: bool) -> Self {
1611        Self {
1612            builder: self.builder.property("inverted", inverted),
1613        }
1614    }
1615
1616    /// Whether the overview is open.
1617    #[cfg(feature = "v1_3")]
1618    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1619    pub fn open(self, open: bool) -> Self {
1620        Self {
1621            builder: self.builder.property("open", open),
1622        }
1623    }
1624
1625    /// The secondary menu model.
1626    ///
1627    /// Use it to add extra actions, e.g. to open a new window or undo closed tab.
1628    #[cfg(feature = "v1_3")]
1629    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1630    pub fn secondary_menu(self, secondary_menu: &impl IsA<gio::MenuModel>) -> Self {
1631        Self {
1632            builder: self
1633                .builder
1634                .property("secondary-menu", secondary_menu.clone().upcast()),
1635        }
1636    }
1637
1638    /// Whether to show end title buttons in the overview's header bar.
1639    ///
1640    /// See [`show-start-title-buttons`][struct@crate::HeaderBar#show-start-title-buttons] for the other side.
1641    #[cfg(feature = "v1_3")]
1642    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1643    pub fn show_end_title_buttons(self, show_end_title_buttons: bool) -> Self {
1644        Self {
1645            builder: self
1646                .builder
1647                .property("show-end-title-buttons", show_end_title_buttons),
1648        }
1649    }
1650
1651    /// Whether to show start title buttons in the overview's header bar.
1652    ///
1653    /// See [`show-end-title-buttons`][struct@crate::HeaderBar#show-end-title-buttons] for the other side.
1654    #[cfg(feature = "v1_3")]
1655    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1656    pub fn show_start_title_buttons(self, show_start_title_buttons: bool) -> Self {
1657        Self {
1658            builder: self
1659                .builder
1660                .property("show-start-title-buttons", show_start_title_buttons),
1661        }
1662    }
1663
1664    /// The tab view the overview controls.
1665    ///
1666    /// The view must be inside the tab overview, see [`child`][struct@crate::TabOverview#child].
1667    #[cfg(feature = "v1_3")]
1668    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
1669    pub fn view(self, view: &TabView) -> Self {
1670        Self {
1671            builder: self.builder.property("view", view.clone()),
1672        }
1673    }
1674
1675    /// Whether the widget or any of its descendents can accept
1676    /// the input focus.
1677    ///
1678    /// This property is meant to be set by widget implementations,
1679    /// typically in their instance init function.
1680    pub fn can_focus(self, can_focus: bool) -> Self {
1681        Self {
1682            builder: self.builder.property("can-focus", can_focus),
1683        }
1684    }
1685
1686    /// Whether the widget can receive pointer events.
1687    pub fn can_target(self, can_target: bool) -> Self {
1688        Self {
1689            builder: self.builder.property("can-target", can_target),
1690        }
1691    }
1692
1693    /// A list of css classes applied to this widget.
1694    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
1695        Self {
1696            builder: self.builder.property("css-classes", css_classes.into()),
1697        }
1698    }
1699
1700    /// The name of this widget in the CSS tree.
1701    ///
1702    /// This property is meant to be set by widget implementations,
1703    /// typically in their instance init function.
1704    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
1705        Self {
1706            builder: self.builder.property("css-name", css_name.into()),
1707        }
1708    }
1709
1710    /// The cursor used by @widget.
1711    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
1712        Self {
1713            builder: self.builder.property("cursor", cursor.clone()),
1714        }
1715    }
1716
1717    /// Whether the widget should grab focus when it is clicked with the mouse.
1718    ///
1719    /// This property is only relevant for widgets that can take focus.
1720    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
1721        Self {
1722            builder: self.builder.property("focus-on-click", focus_on_click),
1723        }
1724    }
1725
1726    /// Whether this widget itself will accept the input focus.
1727    pub fn focusable(self, focusable: bool) -> Self {
1728        Self {
1729            builder: self.builder.property("focusable", focusable),
1730        }
1731    }
1732
1733    /// How to distribute horizontal space if widget gets extra space.
1734    pub fn halign(self, halign: gtk::Align) -> Self {
1735        Self {
1736            builder: self.builder.property("halign", halign),
1737        }
1738    }
1739
1740    /// Enables or disables the emission of the [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip]
1741    /// signal on @widget.
1742    ///
1743    /// A true value indicates that @widget can have a tooltip, in this case
1744    /// the widget will be queried using [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] to
1745    /// determine whether it will provide a tooltip or not.
1746    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
1747        Self {
1748            builder: self.builder.property("has-tooltip", has_tooltip),
1749        }
1750    }
1751
1752    /// Overrides for height request of the widget.
1753    ///
1754    /// If this is -1, the natural request will be used.
1755    pub fn height_request(self, height_request: i32) -> Self {
1756        Self {
1757            builder: self.builder.property("height-request", height_request),
1758        }
1759    }
1760
1761    /// Whether to expand horizontally.
1762    pub fn hexpand(self, hexpand: bool) -> Self {
1763        Self {
1764            builder: self.builder.property("hexpand", hexpand),
1765        }
1766    }
1767
1768    /// Whether to use the `hexpand` property.
1769    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
1770        Self {
1771            builder: self.builder.property("hexpand-set", hexpand_set),
1772        }
1773    }
1774
1775    /// The [`gtk::LayoutManager`][crate::gtk::LayoutManager] instance to use to compute
1776    /// the preferred size of the widget, and allocate its children.
1777    ///
1778    /// This property is meant to be set by widget implementations,
1779    /// typically in their instance init function.
1780    pub fn layout_manager(self, layout_manager: &impl IsA<gtk::LayoutManager>) -> Self {
1781        Self {
1782            builder: self
1783                .builder
1784                .property("layout-manager", layout_manager.clone().upcast()),
1785        }
1786    }
1787
1788    /// Makes this widget act like a modal dialog, with respect to
1789    /// event delivery.
1790    ///
1791    /// Global event controllers will not handle events with targets
1792    /// inside the widget, unless they are set up to ignore propagation
1793    /// limits. See `Gtk::EventController::set_propagation_limit()`.
1794    #[cfg(feature = "gtk_v4_18")]
1795    #[cfg_attr(docsrs, doc(cfg(feature = "gtk_v4_18")))]
1796    pub fn limit_events(self, limit_events: bool) -> Self {
1797        Self {
1798            builder: self.builder.property("limit-events", limit_events),
1799        }
1800    }
1801
1802    /// Margin on bottom side of widget.
1803    ///
1804    /// This property adds margin outside of the widget's normal size
1805    /// request, the margin will be added in addition to the size from
1806    /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
1807    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
1808        Self {
1809            builder: self.builder.property("margin-bottom", margin_bottom),
1810        }
1811    }
1812
1813    /// Margin on end of widget, horizontally.
1814    ///
1815    /// This property supports left-to-right and right-to-left text
1816    /// directions.
1817    ///
1818    /// This property adds margin outside of the widget's normal size
1819    /// request, the margin will be added in addition to the size from
1820    /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
1821    pub fn margin_end(self, margin_end: i32) -> Self {
1822        Self {
1823            builder: self.builder.property("margin-end", margin_end),
1824        }
1825    }
1826
1827    /// Margin on start of widget, horizontally.
1828    ///
1829    /// This property supports left-to-right and right-to-left text
1830    /// directions.
1831    ///
1832    /// This property adds margin outside of the widget's normal size
1833    /// request, the margin will be added in addition to the size from
1834    /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
1835    pub fn margin_start(self, margin_start: i32) -> Self {
1836        Self {
1837            builder: self.builder.property("margin-start", margin_start),
1838        }
1839    }
1840
1841    /// Margin on top side of widget.
1842    ///
1843    /// This property adds margin outside of the widget's normal size
1844    /// request, the margin will be added in addition to the size from
1845    /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
1846    pub fn margin_top(self, margin_top: i32) -> Self {
1847        Self {
1848            builder: self.builder.property("margin-top", margin_top),
1849        }
1850    }
1851
1852    /// The name of the widget.
1853    pub fn name(self, name: impl Into<glib::GString>) -> Self {
1854        Self {
1855            builder: self.builder.property("name", name.into()),
1856        }
1857    }
1858
1859    /// The requested opacity of the widget.
1860    pub fn opacity(self, opacity: f64) -> Self {
1861        Self {
1862            builder: self.builder.property("opacity", opacity),
1863        }
1864    }
1865
1866    /// How content outside the widget's content area is treated.
1867    ///
1868    /// This property is meant to be set by widget implementations,
1869    /// typically in their instance init function.
1870    pub fn overflow(self, overflow: gtk::Overflow) -> Self {
1871        Self {
1872            builder: self.builder.property("overflow", overflow),
1873        }
1874    }
1875
1876    /// Whether the widget will receive the default action when it is focused.
1877    pub fn receives_default(self, receives_default: bool) -> Self {
1878        Self {
1879            builder: self.builder.property("receives-default", receives_default),
1880        }
1881    }
1882
1883    /// Whether the widget responds to input.
1884    pub fn sensitive(self, sensitive: bool) -> Self {
1885        Self {
1886            builder: self.builder.property("sensitive", sensitive),
1887        }
1888    }
1889
1890    /// Sets the text of tooltip to be the given string, which is marked up
1891    /// with Pango markup.
1892    ///
1893    /// Also see `Gtk::Tooltip::set_markup()`.
1894    ///
1895    /// This is a convenience property which will take care of getting the
1896    /// tooltip shown if the given string is not `NULL`:
1897    /// [`has-tooltip`][struct@crate::gtk::Widget#has-tooltip] will automatically be set to true
1898    /// and there will be taken care of [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] in
1899    /// the default signal handler.
1900    ///
1901    /// Note that if both [`tooltip-text`][struct@crate::gtk::Widget#tooltip-text] and
1902    /// [`tooltip-markup`][struct@crate::gtk::Widget#tooltip-markup] are set, the last one wins.
1903    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
1904        Self {
1905            builder: self
1906                .builder
1907                .property("tooltip-markup", tooltip_markup.into()),
1908        }
1909    }
1910
1911    /// Sets the text of tooltip to be the given string.
1912    ///
1913    /// Also see `Gtk::Tooltip::set_text()`.
1914    ///
1915    /// This is a convenience property which will take care of getting the
1916    /// tooltip shown if the given string is not `NULL`:
1917    /// [`has-tooltip`][struct@crate::gtk::Widget#has-tooltip] will automatically be set to true
1918    /// and there will be taken care of [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] in
1919    /// the default signal handler.
1920    ///
1921    /// Note that if both [`tooltip-text`][struct@crate::gtk::Widget#tooltip-text] and
1922    /// [`tooltip-markup`][struct@crate::gtk::Widget#tooltip-markup] are set, the last one wins.
1923    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
1924        Self {
1925            builder: self.builder.property("tooltip-text", tooltip_text.into()),
1926        }
1927    }
1928
1929    /// How to distribute vertical space if widget gets extra space.
1930    pub fn valign(self, valign: gtk::Align) -> Self {
1931        Self {
1932            builder: self.builder.property("valign", valign),
1933        }
1934    }
1935
1936    /// Whether to expand vertically.
1937    pub fn vexpand(self, vexpand: bool) -> Self {
1938        Self {
1939            builder: self.builder.property("vexpand", vexpand),
1940        }
1941    }
1942
1943    /// Whether to use the `vexpand` property.
1944    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
1945        Self {
1946            builder: self.builder.property("vexpand-set", vexpand_set),
1947        }
1948    }
1949
1950    /// Whether the widget is visible.
1951    pub fn visible(self, visible: bool) -> Self {
1952        Self {
1953            builder: self.builder.property("visible", visible),
1954        }
1955    }
1956
1957    /// Overrides for width request of the widget.
1958    ///
1959    /// If this is -1, the natural request will be used.
1960    pub fn width_request(self, width_request: i32) -> Self {
1961        Self {
1962            builder: self.builder.property("width-request", width_request),
1963        }
1964    }
1965
1966    /// The accessible role of the given [`gtk::Accessible`][crate::gtk::Accessible] implementation.
1967    ///
1968    /// The accessible role cannot be changed once set.
1969    pub fn accessible_role(self, accessible_role: gtk::AccessibleRole) -> Self {
1970        Self {
1971            builder: self.builder.property("accessible-role", accessible_role),
1972        }
1973    }
1974
1975    // rustdoc-stripper-ignore-next
1976    /// Build the [`TabOverview`].
1977    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1978    pub fn build(self) -> TabOverview {
1979        assert_initialized_main_thread!();
1980        self.builder.build()
1981    }
1982}