Klasse TabOverview

Alle implementierten Schnittstellen:
PointerInterface

public class TabOverview extends Widget
A tab overview for [class@TabView].

<picture>
<source srcset="tab-overview-dark.png" media="(prefers-color-scheme: dark)">
<img src="tab-overview.png" alt="tab-overview">
</picture>

`AdwTabOverview` is a widget that can display tabs from an `AdwTabView` in a
grid.

`AdwTabOverview` shows a thumbnail for each tab. By default thumbnails are
static for all pages except the selected one. They can be made always live
by setting [property@TabPage:live-thumbnail] to `TRUE`, or refreshed with
[method@TabPage.invalidate_thumbnail] or
[method@TabView.invalidate_thumbnails] otherwise.

If the pages are too tall or too wide, the thumbnails will be cropped; use
[property@TabPage:thumbnail-xalign] and [property@TabPage:thumbnail-yalign] to
control which part of the page should be visible in this case.

Pinned tabs are shown as smaller cards without thumbnails above the other
tabs. Unlike in [class@TabBar], they still have titles, as well as an unpin
button.

`AdwTabOverview` provides search in open tabs. It searches in tab titles and
tooltips, as well as [property@TabPage:keyword].

If [property@TabOverview:enable-new-tab] is set to `TRUE`, a new tab button
will be shown. Connect to the [signal@TabOverview::create-tab] signal to use
it.

[property@TabOverview:secondary-menu] can be used to provide a secondary menu
for the overview. Use it to add extra actions, e.g. to open a new window or
undo closed tab.

`AdwTabOverview` is intended to be used as the direct child of the window,
with the rest of the window contents set as the [property@TabOverview:child].
The child is expected to contain an [class@TabView].

`AdwTabOverview` shows window buttons by default. They can be disabled by
setting [property@TabOverview:show-start-title-buttons] and/or
[property@TabOverview:show-start-title-buttons] and/or
[property@TabOverview:show-end-title-buttons] to `FALSE`.

If search and window buttons are disabled, and secondary menu is not set, the
header bar will be hidden.

## Actions

`AdwTabOverview` defines the `overview.open` and `overview.close` actions for
opening and closing itself. They can be convenient when used together with
[class@TabButton].

## CSS nodes

`AdwTabOverview` has a single CSS node with name `taboverview`.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.TabOverview.html

  • Felddetails

  • Konstruktordetails

    • TabOverview

      public TabOverview(PointerContainer pointer)
    • TabOverview

      public TabOverview()
      Creates a new `AdwTabOverview`.
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getChild

      public Widget getChild()
      Gets the child widget of @self.
      Gibt zurück:
      the child widget of @self
    • getEnableNewTab

      public boolean getEnableNewTab()
      Gets whether to new tab button is enabled for @self.
      Gibt zurück:
      whether new tab button is enabled
    • getEnableSearch

      public boolean getEnableSearch()
      Gets whether search in tabs is enabled for @self.
      Gibt zurück:
      whether search is enabled
    • getExtraDragPreferredAction

      public int getExtraDragPreferredAction()
      Gets the current action during a drop on the extra_drop_target.
      Gibt zurück:
      the drag action of the current drop.
    • getExtraDragPreload

      public boolean getExtraDragPreload()
      Gets whether drop data should be preloaded on hover.
      Gibt zurück:
      whether drop data should be preloaded on hover
    • getInverted

      public boolean getInverted()
      Gets whether thumbnails use inverted layout.
      Gibt zurück:
      whether thumbnails use inverted layout
    • getOpen

      public boolean getOpen()
      Gets whether @self is open.
      Gibt zurück:
      whether the overview is open
    • getSearchActive

      public boolean getSearchActive()
      Gets whether search is currently active for @self.

      See [property@TabOverview:enable-search].
      Gibt zurück:
      whether search is active
    • getSecondaryMenu

      public MenuModel getSecondaryMenu()
      Gets the secondary menu model for @self.
      Gibt zurück:
      the secondary menu model
    • getShowEndTitleButtons

      public boolean getShowEndTitleButtons()
      Gets whether end title buttons are shown in @self's header bar.
      Gibt zurück:
      whether end title buttons are shown
    • getShowStartTitleButtons

      public boolean getShowStartTitleButtons()
      Gets whether start title buttons are shown in @self's header bar.
      Gibt zurück:
      whether start title buttons are shown
    • getView

      public TabView getView()
      Gets the tab view @self controls.
      Gibt zurück:
      the tab view
    • setChild

      public void setChild(@Nullable Widget child)
      Sets the child widget of @self.
      Parameter:
      child - the child widget
    • setEnableNewTab

      public void setEnableNewTab(boolean enable_new_tab)
      Sets whether to enable new tab button for @self.

      Connect to the [signal@TabOverview::create-tab] signal to use it.
      Parameter:
      enable_new_tab - whether to enable new tab button
    • setEnableSearch

      public void setEnableSearch(boolean enable_search)
      Sets whether to enable search in tabs for @self.

      Search matches tab titles and tooltips, as well as keywords, set via
      [property@TabPage:keyword]. Use keywords to search in e.g. page URLs in a web
      browser.

      During search, tab reordering and drag-n-drop are disabled.

      Use [property@TabOverview:search-active] to check out if search is currently
      active.
      Parameter:
      enable_search - whether to enable search
    • setExtraDragPreload

      public void setExtraDragPreload(boolean preload)
      Sets whether drop data should be preloaded on hover.

      See [property@Gtk.DropTarget:preload].
      Parameter:
      preload - whether to preload drop data
    • setInverted

      public void setInverted(boolean inverted)
      Sets whether thumbnails use inverted layout.

      If set to `TRUE`, thumbnails will have the close or unpin button at the
      beginning and the indicator at the end rather than the other way around.
      Parameter:
      inverted - whether thumbnails use inverted layout
    • setOpen

      public void setOpen(boolean open)
      Sets whether the to open @self.
      Parameter:
      open - whether the overview is open
    • setSecondaryMenu

      public void setSecondaryMenu(@Nullable MenuModel secondary_menu)
      Sets the secondary menu model for @self.

      Use it to add extra actions, e.g. to open a new window or undo closed tab.
      Parameter:
      secondary_menu - a menu model
    • setShowEndTitleButtons

      public void setShowEndTitleButtons(boolean show_end_title_buttons)
      Sets whether to show end title buttons in @self's header bar.

      See [property@HeaderBar:show-start-title-buttons] for the other side.
      Parameter:
      show_end_title_buttons - whether to show end title buttons
    • setShowStartTitleButtons

      public void setShowStartTitleButtons(boolean show_start_title_buttons)
      Sets whether to show start title buttons in @self's header bar.

      See [property@HeaderBar:show-end-title-buttons] for the other side.
      Parameter:
      show_start_title_buttons - whether to show start title buttons
    • setView

      public void setView(@Nullable TabView view)
      Sets the tab view to control.

      The view must be inside @self, see [property@TabOverview:child].
      Parameter:
      view - a tab view
    • setupExtraDropTarget

      public void setupExtraDropTarget(int actions, @Nullable Int64 types, long n_types)
      Sets the supported types for this drop target.

      Sets up an extra drop target on tabs.

      This allows to drag arbitrary content onto tabs, for example URLs in a web
      browser.

      If a tab is hovered for a certain period of time while dragging the content,
      it will be automatically selected.

      The [signal@TabOverview::extra-drag-drop] signal can be used to handle the
      drop.
      Parameter:
      actions - the supported actions
      types - all supported `GType`s that can be dropped
      n_types - number of @types
    • onCreateTab

      public SignalHandler onCreateTab(TabOverview.OnCreateTab signal)
      Connect to signal "create-tab".
      See TabOverview.OnCreateTab.onCreateTab() for signal description.
      Field SIGNAL_ON_CREATE_TAB contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • onExtraDragDrop

      public SignalHandler onExtraDragDrop(TabOverview.OnExtraDragDrop signal)
      Connect to signal "extra-drag-drop".
      See TabOverview.OnExtraDragDrop.onExtraDragDrop(ch.bailu.gtk.adw.TabPage, ch.bailu.gtk.gobject.Value) for signal description.
      Field SIGNAL_ON_EXTRA_DRAG_DROP contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • onExtraDragValue

      public SignalHandler onExtraDragValue(TabOverview.OnExtraDragValue signal)
      Connect to signal "extra-drag-value".
      See TabOverview.OnExtraDragValue.onExtraDragValue(ch.bailu.gtk.adw.TabPage, ch.bailu.gtk.gobject.Value) for signal description.
      Field SIGNAL_ON_EXTRA_DRAG_VALUE contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Setzt außer Kraft:
      asAccessible in Klasse Widget
      Gibt zurück:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Setzt außer Kraft:
      asBuildable in Klasse Widget
      Gibt zurück:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Setzt außer Kraft:
      asConstraintTarget in Klasse Widget
      Gibt zurück:
      ConstraintTarget
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()