Class TabOverview.Builder<B extends TabOverview.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
TabOverview

public static class TabOverview.Builder<B extends TabOverview.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
1.3
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public TabOverview build()
      Finish building the TabOverview object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to TabOverview.
      Overrides:
      build in class Widget.Builder<B extends TabOverview.Builder<B>>
      Returns:
      a new instance of TabOverview with the properties that were set in the Builder object.
    • setChild

      public B setChild(Widget child)
      The child widget.
      Parameters:
      child - the value for the child property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setEnableNewTab

      public B setEnableNewTab(boolean enableNewTab)

      Whether to enable new tab button.

      Connect to the TabOverview::create-tab signal to use it.

      Parameters:
      enableNewTab - the value for the enable-new-tab property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setEnableSearch

      public B setEnableSearch(boolean enableSearch)

      Whether to enable search in tabs.

      Search matches tab titles and tooltips, as well as keywords, set via 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 TabOverview:search-active to check out if search is currently active.

      Parameters:
      enableSearch - the value for the enable-search property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setExtraDragPreload

      public B setExtraDragPreload(boolean extraDragPreload)

      Whether the drop data should be preloaded on hover.

      See Gtk.DropTarget:preload.

      Parameters:
      extraDragPreload - the value for the extra-drag-preload property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setInverted

      public B setInverted(boolean inverted)

      Whether thumbnails use inverted layout.

      If set to TRUE, thumbnails will have the close or unpin buttons at the beginning and the indicator at the end rather than the other way around.

      Parameters:
      inverted - the value for the inverted property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setOpen

      public B setOpen(boolean open)
      Whether the overview is open.
      Parameters:
      open - the value for the open property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setSecondaryMenu

      public B setSecondaryMenu(MenuModel secondaryMenu)

      The secondary menu model.

      Use it to add extra actions, e.g. to open a new window or undo closed tab.

      Parameters:
      secondaryMenu - the value for the secondary-menu property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setShowEndTitleButtons

      public B setShowEndTitleButtons(boolean showEndTitleButtons)

      Whether to show end title buttons in the overview's header bar.

      See HeaderBar:show-start-title-buttons for the other side.

      Parameters:
      showEndTitleButtons - the value for the show-end-title-buttons property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setShowStartTitleButtons

      public B setShowStartTitleButtons(boolean showStartTitleButtons)

      Whether to show start title buttons in the overview's header bar.

      See HeaderBar:show-end-title-buttons for the other side.

      Parameters:
      showStartTitleButtons - the value for the show-start-title-buttons property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setView

      public B setView(TabView view)

      The tab view the overview controls.

      The view must be inside the tab overview, see TabOverview:child.

      Parameters:
      view - the value for the view property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • onCreateTab

      public B onCreateTab(TabOverview.CreateTabCallback handler)

      Emitted when a tab needs to be created.

      This can happen after the new tab button has been pressed, see TabOverview:enable-new-tab.

      The signal handler is expected to create a new page in the corresponding TabView and return it.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
      See Also:
    • onExtraDragDrop

      public B onExtraDragDrop(TabOverview.ExtraDragDropCallback handler)

      Emitted when content is dropped onto a tab.

      The content must be of one of the types set up via TabOverview.setupExtraDropTarget(Set, Type[]).

      See Gtk.DropTarget::drop.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
      See Also:
    • onExtraDragValue

      public B onExtraDragValue(TabOverview.ExtraDragValueCallback handler)

      Emitted when the dropped content is preloaded.

      In order for data to be preloaded, TabOverview:extra-drag-preload must be set to TRUE.

      The content must be of one of the types set up via TabOverview.setupExtraDropTarget(Set, Type[]).

      See Gtk.DropTarget:value.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
      See Also: