Class TabView
- All Implemented Interfaces:
Accessible,Buildable,ConstraintTarget,Proxy
AdwTabView is a container which shows one child at a time. While it
provides keyboard shortcuts for switching between pages, it does not provide
a visible tab switcher and relies on external widgets for that, such as
TabBar, TabOverview and TabButton.
AdwTabView maintains a TabPage object for each page, which holds
additional per-page properties. You can obtain the AdwTabPage for a page
with getPage(org.gnome.gtk.Widget), and as the return value for
append(org.gnome.gtk.Widget) and other functions for adding children.
AdwTabView only aims to be useful for dynamic tabs in multi-window
document-based applications, such as web browsers, file managers, text
editors or terminals. It does not aim to replace Notebook for use
cases such as tabbed dialogs.
As such, it does not support disabling page reordering or detaching.
AdwTabView adds a number of global page switching and reordering shortcuts.
The TabView:shortcuts property can be used to manage them.
See TabViewShortcuts for the list of the available shortcuts. All of
the shortcuts are enabled by default.
addShortcuts(java.util.Set<org.gnome.adw.TabViewShortcuts>) and removeShortcuts(java.util.Set<org.gnome.adw.TabViewShortcuts>) can be
used to manage shortcuts in a convenient way, for example:
adw_tab_view_remove_shortcuts (view, ADW_TAB_VIEW_SHORTCUT_CONTROL_HOME |
ADW_TAB_VIEW_SHORTCUT_CONTROL_END);
CSS nodes
AdwTabView has a main CSS node with the name tabview.
Accessibility
AdwTabView uses the GTK_ACCESSIBLE_ROLE_TAB_PANEL for the tab pages which
are the accessible parent objects of the child widgets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTabView.Builder<B extends TabView.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static interfaceFunctional interface declaration of theClosePageCallbackcallback.static interfaceFunctional interface declaration of theCreateWindowCallbackcallback.static interfaceFunctional interface declaration of theIndicatorActivatedCallbackcallback.static interfaceFunctional interface declaration of thePageAttachedCallbackcallback.static interfaceFunctional interface declaration of thePageDetachedCallbackcallback.static interfaceFunctional interface declaration of thePageReorderedCallbackcallback.static interfaceFunctional interface declaration of theSetupMenuCallbackcallback.static classNested classes/interfaces inherited from class org.gnome.gtk.Widget
Widget.DestroyCallback, Widget.DirectionChangedCallback, Widget.HideCallback, Widget.KeynavFailedCallback, Widget.MapCallback, Widget.MnemonicActivateCallback, Widget.MoveFocusCallback, Widget.QueryTooltipCallback, Widget.RealizeCallback, Widget.ShowCallback, Widget.StateFlagsChangedCallback, Widget.UnmapCallback, Widget.UnrealizeCallback, Widget.Widget$Impl, Widget.WidgetClassNested classes/interfaces inherited from class org.gnome.gobject.InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClassNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClassNested classes/interfaces inherited from interface org.gnome.gtk.Accessible
Accessible.Accessible$Impl, Accessible.AccessibleInterfaceNested classes/interfaces inherited from interface org.gnome.gtk.Buildable
Buildable.Buildable$Impl, Buildable.BuildableIfaceNested classes/interfaces inherited from interface org.gnome.gtk.ConstraintTarget
ConstraintTarget.ConstraintTarget$Impl, ConstraintTarget.ConstraintTargetInterface -
Constructor Summary
ConstructorsConstructorDescriptionTabView()Creates a new TabView.TabView(MemorySegment address) Create a TabView proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionAddschildto this TabView withparentas the parent.voidaddShortcuts(Set<TabViewShortcuts> shortcuts) Addsshortcutsforself.voidaddShortcuts(TabViewShortcuts... shortcuts) Addsshortcutsforself.Insertschildas the last non-pinned page.appendPinned(Widget child) Insertschildas the last pinned page.protected TabViewasParent()Returns this instance as if it were its parent type.static TabView.Builder<? extends TabView.Builder> builder()ATabView.Builderobject constructs aTabViewwith the specified properties.voidcloseOtherPages(TabPage page) Requests to close all pages other thanpage.voidRequests to closepage.voidclosePageFinish(TabPage page, boolean confirm) Completes aclosePage(org.gnome.adw.TabPage)call forpage.voidclosePagesAfter(TabPage page) Requests to close all pages afterpage.voidclosePagesBefore(TabPage page) Requests to close all pages beforepage.booleanemitClosePage(@Nullable TabPage page) Emits the "close-page" signal.Emits the "create-window" signal.voidemitIndicatorActivated(@Nullable TabPage page) Emits the "indicator-activated" signal.voidemitPageAttached(@Nullable TabPage page, int position) Emits the "page-attached" signal.voidemitPageDetached(@Nullable TabPage page, int position) Emits the "page-detached" signal.voidemitPageReordered(@Nullable TabPage page, int position) Emits the "page-reordered" signal.voidemitSetupMenu(@Nullable TabPage page) Emits the "setup-menu" signal.Gets the default icon ofself.booleanWhether a page is being transferred.@Nullable MenuModelGets the tab context menu model forself.intGets the number of pages inself.intGets the number of pinned pages inself.getNthPage(int position) Gets theTabPagerepresenting the child atposition.Gets theTabPageobject representingchild.intgetPagePosition(TabPage page) Finds the position ofpageinself,starting from 0.getPages()Returns aListModelthat contains the pages ofself.@Nullable TabPageGets the currently selected page inself.Gets the enabled shortcuts forself.static @Nullable TypegetType()Get the GType of the TabView classInserts a non-pinned page atposition.insertPinned(Widget child, int position) Inserts a pinned page atposition.voidInvalidates thumbnails for all pages inself.onClosePage(TabView.ClosePageCallback handler) Emitted afterclosePage(org.gnome.adw.TabPage)has been called forpage.Emitted when a tab should be transferred into a new window.Emitted after the indicator icon onpagehas been activated.Emitted when a page has been created or transferred toself.Emitted when a page has been removed or transferred to another view.Emitted afterpagehas been reordered toposition.onSetupMenu(TabView.SetupMenuCallback handler) Emitted when a context menu is opened or closed forpage.Insertschildas the first non-pinned page.prependPinned(Widget child) Insertschildas the first pinned page.voidremoveShortcuts(Set<TabViewShortcuts> shortcuts) Removesshortcutsfromself.voidremoveShortcuts(TabViewShortcuts... shortcuts) Removesshortcutsfromself.booleanreorderBackward(TabPage page) Reorderspageto before its previous page if possible.booleanreorderFirst(TabPage page) Reorderspageto the first possible position.booleanreorderForward(TabPage page) Reorderspageto after its next page if possible.booleanreorderLast(TabPage page) Reorderspageto the last possible position.booleanreorderPage(TabPage page, int position) Reorderspagetoposition.booleanSelects the page after the currently selected page.booleanSelects the page before the currently selected page.voidsetDefaultIcon(Icon defaultIcon) Sets the default page icon forself.voidsetMenuModel(@Nullable MenuModel menuModel) Sets the tab context menu model forself.voidsetPagePinned(TabPage page, boolean pinned) Pins or unpinspage.voidsetSelectedPage(TabPage selectedPage) Sets the currently selected page inself.voidsetShortcuts(Set<TabViewShortcuts> shortcuts) Sets the enabled shortcuts forself.voidsetShortcuts(TabViewShortcuts... shortcuts) Sets the enabled shortcuts forself.voidtransferPage(TabPage page, TabView otherView, int position) Transferspagefrom this TabView tootherView.Methods inherited from class org.gnome.gtk.Widget
actionSetEnabled, activateActionIfExists, activateDefault, activateWidget, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, childFocus, computeBounds, computeExpand, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, cssChanged, directionChanged, disposeTemplate, dragCheckThreshold, emitDestroy, emitDirectionChanged, emitHide, emitKeynavFailed, emitMap, emitMnemonicActivate, emitMoveFocus, emitQueryTooltip, emitRealize, emitShow, emitStateFlagsChanged, emitUnmap, emitUnrealize, errorBell, focus, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBaseline, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getDefaultDirection, getDirection, getDisplay, getFirstChild, getFocusable, getFocusChild, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMemoryLayout, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, moveFocus, observeChildren, observeControllers, onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, pick, pick, queryTooltip, queueAllocate, queueDraw, queueResize, realize, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, root, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setDefaultDirection, setDirection, setFocusable, setFocusChild, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, shouldLayout, show, sizeAllocate, sizeAllocate, snapshot, snapshotChild, stateFlagsChanged, systemSettingChanged, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unroot, unsetStateFlags, unsetStateFlagsMethods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible
announce, getAccessibleParent, getAccessibleRole, getAtContext, getBounds, getFirstAccessibleChild, getNextAccessibleSibling, getPlatformState, resetProperty, resetRelation, resetState, setAccessibleParent, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateStateMethods inherited from interface org.gnome.gtk.Buildable
getBuildableId
-
Constructor Details
-
TabView
Create a TabView proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
TabView
public TabView()Creates a new TabView.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
addPage
Addschildto this TabView withparentas the parent.This function can be used to automatically position new pages, and to select the correct page when this page is closed while being selected (see
closePage(org.gnome.adw.TabPage)).If
parentisNULL, this function is equivalent toappend(org.gnome.gtk.Widget).- Parameters:
child- a widget to addparent- a parent page forchild- Returns:
- the page object representing
child
-
addShortcuts
Addsshortcutsforself.See
TabView:shortcutsfor details.- Parameters:
shortcuts- the shortcuts to add- Since:
- 1.2
-
addShortcuts
Addsshortcutsforself.See
TabView:shortcutsfor details.- Parameters:
shortcuts- the shortcuts to add- Since:
- 1.2
-
append
-
appendPinned
-
closeOtherPages
Requests to close all pages other thanpage.- Parameters:
page- a page of this TabView
-
closePage
Requests to closepage.Calling this function will result in the
TabView::close-pagesignal being emitted forpage.Closing the page can then be confirmed or denied viaclosePageFinish(org.gnome.adw.TabPage, boolean).If the page is waiting for a
closePageFinish(org.gnome.adw.TabPage, boolean)call, this function will do nothing.The default handler for
TabView::close-pagewill immediately confirm closing the page if it's non-pinned, or reject it if it's pinned. This behavior can be changed by registering your own handler for that signal.If
pagewas selected, another page will be selected instead:If the
TabPage:parentvalue isNULL, the next page will be selected when possible, or if the page was already last, the previous page will be selected instead.If it's not
NULL, the previous page will be selected if it's a descendant (possibly indirect) of the parent. If both the previous page and the parent are pinned, the parent will be selected instead.- Parameters:
page- a page of this TabView
-
closePageFinish
Completes aclosePage(org.gnome.adw.TabPage)call forpage.If
confirmisTRUE,pagewill be closed. If it'sFALSE, it will be reverted to its previous state andclosePage(org.gnome.adw.TabPage)can be called for it again.This function should not be called unless a custom handler for
TabView::close-pageis used.- Parameters:
page- a page of this TabViewconfirm- whether to confirm or deny closingpage
-
closePagesAfter
Requests to close all pages afterpage.- Parameters:
page- a page of this TabView
-
closePagesBefore
Requests to close all pages beforepage.- Parameters:
page- a page of this TabView
-
getDefaultIcon
-
getIsTransferringPage
public boolean getIsTransferringPage()Whether a page is being transferred.The corresponding property will be set to
TRUEwhen a drag-n-drop tab transfer starts on anyAdwTabView, and toFALSEafter it ends.During the transfer, children cannot receive pointer input and a tab can be safely dropped on the tab view.
- Returns:
- whether a page is being transferred
-
getMenuModel
Gets the tab context menu model forself.- Returns:
- the tab context menu model for this TabView
-
getNPages
public int getNPages()Gets the number of pages inself.- Returns:
- the number of pages in this TabView
-
getNPinnedPages
public int getNPinnedPages()Gets the number of pinned pages inself.- Returns:
- the number of pinned pages in this TabView
-
getNthPage
-
getPage
-
getPagePosition
Finds the position ofpageinself,starting from 0.- Parameters:
page- a page of this TabView- Returns:
- the position of
pagein this TabView
-
getPages
Returns aListModelthat contains the pages ofself.This can be used to keep an up-to-date view. The model also implements
SelectionModeland can be used to track and change the selected page.- Returns:
- a
GtkSelectionModelfor the pages of this TabView
-
getSelectedPage
Gets the currently selected page inself.- Returns:
- the selected page
-
getShortcuts
Gets the enabled shortcuts forself.- Returns:
- the shortcut mask
- Since:
- 1.2
-
insert
Inserts a non-pinned page atposition.It's an error to try to insert a page before a pinned page, in that case
insertPinned(org.gnome.gtk.Widget, int)should be used instead.- Parameters:
child- a widget to addposition- the position to addchildat, starting from 0- Returns:
- the page object representing
child
-
insertPinned
Inserts a pinned page atposition.It's an error to try to insert a pinned page after a non-pinned page, in that case
insert(org.gnome.gtk.Widget, int)should be used instead.- Parameters:
child- a widget to addposition- the position to addchildat, starting from 0- Returns:
- the page object representing
child
-
invalidateThumbnails
public void invalidateThumbnails()Invalidates thumbnails for all pages inself.This is a convenience method, equivalent to calling
TabPage.invalidateThumbnail()on each page.- Since:
- 1.3
-
prepend
-
prependPinned
-
removeShortcuts
Removesshortcutsfromself.See
TabView:shortcutsfor details.- Parameters:
shortcuts- the shortcuts to remove- Since:
- 1.2
-
removeShortcuts
Removesshortcutsfromself.See
TabView:shortcutsfor details.- Parameters:
shortcuts- the shortcuts to remove- Since:
- 1.2
-
reorderBackward
Reorderspageto before its previous page if possible.- Parameters:
page- a page of this TabView- Returns:
- whether
pagewas moved
-
reorderFirst
Reorderspageto the first possible position.- Parameters:
page- a page of this TabView- Returns:
- whether
pagewas moved
-
reorderForward
Reorderspageto after its next page if possible.- Parameters:
page- a page of this TabView- Returns:
- whether
pagewas moved
-
reorderLast
Reorderspageto the last possible position.- Parameters:
page- a page of this TabView- Returns:
- whether
pagewas moved
-
reorderPage
Reorderspagetoposition.It's a programmer error to try to reorder a pinned page after a non-pinned one, or a non-pinned page before a pinned one.
- Parameters:
page- a page of this TabViewposition- the position to insert the page at, starting at 0- Returns:
- whether
pagewas moved
-
selectNextPage
public boolean selectNextPage()Selects the page after the currently selected page.If the last page was already selected, this function does nothing.
- Returns:
- whether the selected page was changed
-
selectPreviousPage
public boolean selectPreviousPage()Selects the page before the currently selected page.If the first page was already selected, this function does nothing.
- Returns:
- whether the selected page was changed
-
setDefaultIcon
Sets the default page icon forself.If a page doesn't provide its own icon via
TabPage:icon, a default icon may be used instead for contexts where having an icon is necessary.TabBarwill use default icon for pinned tabs in case the page is not loading, doesn't have an icon and an indicator. Default icon is never used for tabs that aren't pinned.TabOverviewwill use default icon for pages with missing thumbnails.By default, the
adw-tab-icon-missing-symbolicicon is used.- Parameters:
defaultIcon- the default icon
-
setMenuModel
Sets the tab context menu model forself.When a context menu is shown for a tab, it will be constructed from the provided menu model. Use the
TabView::setup-menusignal to set up the menu actions for the particular tab.- Parameters:
menuModel- a menu model
-
setPagePinned
Pins or unpinspage.Pinned pages are guaranteed to be placed before all non-pinned pages; at any given moment the first
TabView:n-pinned-pagespages in this TabView are guaranteed to be pinned.When a page is pinned or unpinned, it's automatically reordered: pinning a page moves it after other pinned pages; unpinning a page moves it before other non-pinned pages.
Pinned pages can still be reordered between each other.
TabBarwill display pinned pages in a compact form, never showing the title or close button, and only showing a single icon, selected in the following order:1.
TabPage:indicator-icon2. A spinner ifTabPage:loadingisTRUE3.TabPage:icon4.TabView:default-iconTabOverviewwill not show a thumbnail for pinned pages, and replace the close button with an unpin button. UnlikeAdwTabBar, it will still display the page's title, icon and indicator separately.Pinned pages cannot be closed by default, see
TabView::close-pagefor how to override that behavior.Changes the value of the
TabPage:pinnedproperty.- Parameters:
page- a page of this TabViewpinned- whetherpageshould be pinned
-
setSelectedPage
Sets the currently selected page inself.- Parameters:
selectedPage- a page in this TabView
-
setShortcuts
Sets the enabled shortcuts forself.See
TabViewShortcutsfor the list of the available shortcuts. All of the shortcuts are enabled by default.addShortcuts(java.util.Set<org.gnome.adw.TabViewShortcuts>)andremoveShortcuts(java.util.Set<org.gnome.adw.TabViewShortcuts>)provide a convenient way to manage individual shortcuts.- Parameters:
shortcuts- the new shortcuts- Since:
- 1.2
-
setShortcuts
Sets the enabled shortcuts forself.See
TabViewShortcutsfor the list of the available shortcuts. All of the shortcuts are enabled by default.addShortcuts(java.util.Set<org.gnome.adw.TabViewShortcuts>)andremoveShortcuts(java.util.Set<org.gnome.adw.TabViewShortcuts>)provide a convenient way to manage individual shortcuts.- Parameters:
shortcuts- the new shortcuts- Since:
- 1.2
-
transferPage
Transferspagefrom this TabView tootherView.The
pageobject will be reused.It's a programmer error to try to insert a pinned page after a non-pinned one, or a non-pinned page before a pinned one.
- Parameters:
page- a page of this TabViewotherView- the tab view to transfer the page toposition- the position to insert the page at, starting at 0
-
onClosePage
Emitted afterclosePage(org.gnome.adw.TabPage)has been called forpage.The handler is expected to call
closePageFinish(org.gnome.adw.TabPage, boolean)to confirm or reject the closing.The default handler will immediately confirm closing for non-pinned pages, or reject it for pinned pages, equivalent to the following example:
static gboolean close_page_cb (AdwTabView *view, AdwTabPage *page, gpointer user_data) { adw_tab_view_close_page_finish (view, page, !adw_tab_page_get_pinned (page)); return GDK_EVENT_STOP; }The
closePageFinish(org.gnome.adw.TabPage, boolean)call doesn't have to happen inside the handler, so can be used to do asynchronous checks before confirming the closing.A typical reason to connect to this signal is to show a confirmation dialog for closing a tab.
The signal handler should return
GDK_EVENT_STOPto stop propagation orGDK_EVENT_CONTINUEto invoke the default handler.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitClosePage
Emits the "close-page" signal. SeeonClosePage(org.gnome.adw.TabView.ClosePageCallback). -
onCreateWindow
public SignalConnection<TabView.CreateWindowCallback> onCreateWindow(TabView.CreateWindowCallback handler) Emitted when a tab should be transferred into a new window.This can happen after a tab has been dropped on desktop.
The signal handler is expected to create a new window, position it as needed and return its
AdwTabViewthat the page will be transferred into.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitCreateWindow
Emits the "create-window" signal. SeeonCreateWindow(org.gnome.adw.TabView.CreateWindowCallback). -
onIndicatorActivated
public SignalConnection<TabView.IndicatorActivatedCallback> onIndicatorActivated(TabView.IndicatorActivatedCallback handler) Emitted after the indicator icon onpagehas been activated.See
TabPage:indicator-iconandTabPage:indicator-activatable.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitIndicatorActivated
Emits the "indicator-activated" signal. SeeonIndicatorActivated(org.gnome.adw.TabView.IndicatorActivatedCallback). -
onPageAttached
public SignalConnection<TabView.PageAttachedCallback> onPageAttached(TabView.PageAttachedCallback handler) Emitted when a page has been created or transferred toself.A typical reason to connect to this signal would be to connect to page signals for things such as updating window title.
- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitPageAttached
Emits the "page-attached" signal. SeeonPageAttached(org.gnome.adw.TabView.PageAttachedCallback). -
onPageDetached
public SignalConnection<TabView.PageDetachedCallback> onPageDetached(TabView.PageDetachedCallback handler) Emitted when a page has been removed or transferred to another view.A typical reason to connect to this signal would be to disconnect signal handlers connected in the
TabView::page-attachedhandler.It is important not to try and destroy the page child in the handler of this function as the child might merely be moved to another window; use child dispose handler for that or do it in sync with your
closePageFinish(org.gnome.adw.TabPage, boolean)calls.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitPageDetached
Emits the "page-detached" signal. SeeonPageDetached(org.gnome.adw.TabView.PageDetachedCallback). -
onPageReordered
public SignalConnection<TabView.PageReorderedCallback> onPageReordered(TabView.PageReorderedCallback handler) Emitted afterpagehas been reordered toposition.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitPageReordered
Emits the "page-reordered" signal. SeeonPageReordered(org.gnome.adw.TabView.PageReorderedCallback). -
onSetupMenu
Emitted when a context menu is opened or closed forpage.If the menu has been closed,
pagewill be set toNULL.It can be used to set up menu actions before showing the menu, for example disable actions not applicable to
page.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitSetupMenu
Emits the "setup-menu" signal. SeeonSetupMenu(org.gnome.adw.TabView.SetupMenuCallback). -
builder
ATabView.Builderobject constructs aTabViewwith the specified properties. Use the variousset...()methods to set properties, and finish construction withTabView.Builder.build().- Returns:
- the builder object
-