Class TabView
- All Implemented Interfaces:
Proxy
,Accessible
,Buildable
,ConstraintTarget
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
Modifier and TypeClassDescriptionstatic class
TabView.Builder<B extends TabView.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static interface
Functional interface declaration of theClosePageCallback
callback.static interface
Functional interface declaration of theCreateWindowCallback
callback.static interface
Functional interface declaration of theIndicatorActivatedCallback
callback.static interface
Functional interface declaration of thePageAttachedCallback
callback.static interface
Functional interface declaration of thePageDetachedCallback
callback.static interface
Functional interface declaration of thePageReorderedCallback
callback.static interface
Functional interface declaration of theSetupMenuCallback
callback.static class
Nested 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.WidgetClass, Widget.WidgetImpl
Nested classes/interfaces inherited from class org.gnome.gobject.InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClass
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
Nested classes/interfaces inherited from interface org.gnome.gtk.Accessible
Accessible.AccessibleImpl, Accessible.AccessibleInterface
Nested classes/interfaces inherited from interface org.gnome.gtk.Buildable
Buildable.BuildableIface, Buildable.BuildableImpl
Nested classes/interfaces inherited from interface org.gnome.gtk.ConstraintTarget
ConstraintTarget.ConstraintTargetImpl, ConstraintTarget.ConstraintTargetInterface
-
Constructor Summary
ConstructorDescriptionTabView()
Creates a newAdwTabView
.TabView
(MemorySegment address) Create a TabView proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionAddschild
to this TabView withparent
as the parent.void
addShortcuts
(Set<TabViewShortcuts> shortcuts) Addsshortcuts
for this TabView.void
addShortcuts
(TabViewShortcuts... shortcuts) Addsshortcuts
for this TabView.Insertschild
as the last non-pinned page.appendPinned
(Widget child) Insertschild
as the last pinned page.protected TabView
asParent()
Returns this instance as if it were its parent type.static TabView.Builder
<? extends TabView.Builder> builder()
ATabView.Builder
object constructs aTabView
with the specified properties.void
closeOtherPages
(TabPage page) Requests to close all pages other thanpage
.void
Requests to closepage
.void
closePageFinish
(TabPage page, boolean confirm) Completes aclosePage(org.gnome.adw.TabPage)
call forpage
.void
closePagesAfter
(TabPage page) Requests to close all pages afterpage
.void
closePagesBefore
(TabPage page) Requests to close all pages beforepage
.boolean
emitClosePage
(TabPage page) Emits the "close-page" signal.Emits the "create-window" signal.void
Emits the "indicator-activated" signal.void
emitPageAttached
(TabPage page, int position) Emits the "page-attached" signal.void
emitPageDetached
(TabPage page, int position) Emits the "page-detached" signal.void
emitPageReordered
(TabPage page, int position) Emits the "page-reordered" signal.void
emitSetupMenu
(@Nullable TabPage page) Emits the "setup-menu" signal.Gets the default icon of this TabView.boolean
Whether a page is being transferred.Gets the tab context menu model for this TabView.int
Gets the number of pages in this TabView.int
Gets the number of pinned pages in this TabView.getNthPage
(int position) Gets theTabPage
representing the child atposition
.Gets theTabPage
object representingchild
.int
getPagePosition
(TabPage page) Finds the position ofpage
in this TabView, starting from 0.getPages()
Returns aListModel
that contains the pages of this TabView.Gets the currently selected page in this TabView.Gets the enabled shortcuts for this TabView.static Type
getType()
Get the GType of the TabView classInserts a non-pinned page atposition
.insertPinned
(Widget child, int position) Inserts a pinned page atposition
.void
Invalidates thumbnails for all pages in this TabView.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 onpage
has 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 afterpage
has been reordered toposition
.onSetupMenu
(TabView.SetupMenuCallback handler) Emitted when a context menu is opened or closed forpage
.Insertschild
as the first non-pinned page.prependPinned
(Widget child) Insertschild
as the first pinned page.void
removeShortcuts
(Set<TabViewShortcuts> shortcuts) Removesshortcuts
from this TabView.void
removeShortcuts
(TabViewShortcuts... shortcuts) Removesshortcuts
from this TabView.boolean
reorderBackward
(TabPage page) Reorderspage
to before its previous page if possible.boolean
reorderFirst
(TabPage page) Reorderspage
to the first possible position.boolean
reorderForward
(TabPage page) Reorderspage
to after its next page if possible.boolean
reorderLast
(TabPage page) Reorderspage
to the last possible position.boolean
reorderPage
(TabPage page, int position) Reorderspage
toposition
.boolean
Selects the page after the currently selected page.boolean
Selects the page before the currently selected page.void
setDefaultIcon
(Icon defaultIcon) Sets the default page icon for this TabView.void
setMenuModel
(@Nullable MenuModel menuModel) Sets the tab context menu model for this TabView.void
setPagePinned
(TabPage page, boolean pinned) Pins or unpinspage
.void
setSelectedPage
(TabPage selectedPage) Sets the currently selected page in this TabView.void
setShortcuts
(Set<TabViewShortcuts> shortcuts) Sets the enabled shortcuts for this TabView.void
setShortcuts
(TabViewShortcuts... shortcuts) Sets the enabled shortcuts for this TabView.void
transferPage
(TabPage page, TabView otherView, int position) Transferspage
from 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, 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, 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, unsetStateFlags
Methods 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, 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, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gnome.gtk.Accessible
announce, getAccessibleParent, getAccessibleRole, getAtContext, getBounds, getFirstAccessibleChild, getNextAccessibleSibling, getPlatformState, resetProperty, resetRelation, resetState, setAccessibleParent, updateNextAccessibleSibling, updateProperty, updateRelation, updateState
Methods 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 newAdwTabView
.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, 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
Addschild
to this TabView withparent
as 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
parent
isNULL
, 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
Addsshortcuts
for this TabView.See
TabView:shortcuts
for details.- Parameters:
shortcuts
- the shortcuts to add
-
addShortcuts
Addsshortcuts
for this TabView.See
TabView:shortcuts
for details.- Parameters:
shortcuts
- the shortcuts to add
-
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-page
signal 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-page
will 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
page
was selected, another page will be selected instead:If the
TabPage:parent
value 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
confirm
isTRUE
,page
will 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-page
is 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
Gets the default icon of this TabView.- Returns:
- the default icon of this TabView.
-
getIsTransferringPage
public boolean getIsTransferringPage()Whether a page is being transferred.The corresponding property will be set to
TRUE
when a drag-n-drop tab transfer starts on anyAdwTabView
, and toFALSE
after 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 for this TabView.- Returns:
- the tab context menu model for this TabView
-
getNPages
public int getNPages()Gets the number of pages in this TabView.- Returns:
- the number of pages in this TabView
-
getNPinnedPages
public int getNPinnedPages()Gets the number of pinned pages in this TabView.- Returns:
- the number of pinned pages in this TabView
-
getNthPage
-
getPage
-
getPagePosition
Finds the position ofpage
in this TabView, starting from 0.- Parameters:
page
- a page of this TabView- Returns:
- the position of
page
in this TabView
-
getPages
Returns aListModel
that contains the pages of this TabView.This can be used to keep an up-to-date view. The model also implements
SelectionModel
and can be used to track and change the selected page.- Returns:
- a
GtkSelectionModel
for the pages of this TabView
-
getSelectedPage
Gets the currently selected page in this TabView.- Returns:
- the selected page
-
getShortcuts
Gets the enabled shortcuts for this TabView.- Returns:
- the shortcut mask
-
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 addchild
at, 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 addchild
at, starting from 0- Returns:
- the page object representing
child
-
invalidateThumbnails
public void invalidateThumbnails()Invalidates thumbnails for all pages in this TabView.This is a convenience method, equivalent to calling
TabPage.invalidateThumbnail()
on each page. -
prepend
-
prependPinned
-
removeShortcuts
Removesshortcuts
from this TabView.See
TabView:shortcuts
for details.- Parameters:
shortcuts
- the shortcuts to remove
-
removeShortcuts
Removesshortcuts
from this TabView.See
TabView:shortcuts
for details.- Parameters:
shortcuts
- the shortcuts to remove
-
reorderBackward
Reorderspage
to before its previous page if possible.- Parameters:
page
- a page of this TabView- Returns:
- whether
page
was moved
-
reorderFirst
Reorderspage
to the first possible position.- Parameters:
page
- a page of this TabView- Returns:
- whether
page
was moved
-
reorderForward
Reorderspage
to after its next page if possible.- Parameters:
page
- a page of this TabView- Returns:
- whether
page
was moved
-
reorderLast
Reorderspage
to the last possible position.- Parameters:
page
- a page of this TabView- Returns:
- whether
page
was moved
-
reorderPage
Reorderspage
toposition
.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
page
was 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 for this TabView.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.TabBar
will 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.TabOverview
will use default icon for pages with missing thumbnails.By default, the
adw-tab-icon-missing-symbolic
icon is used.- Parameters:
defaultIcon
- the default icon
-
setMenuModel
Sets the tab context menu model for this TabView.When a context menu is shown for a tab, it will be constructed from the provided menu model. Use the
TabView::setup-menu
signal 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-pages
pages 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.
TabBar
will 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-icon
2. A spinner ifTabPage:loading
isTRUE
3.TabPage:icon
4.TabView:default-icon
TabOverview
will 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-page
for how to override that behavior.Changes the value of the
TabPage:pinned
property.- Parameters:
page
- a page of this TabViewpinned
- whetherpage
should be pinned
-
setSelectedPage
Sets the currently selected page in this TabView.- Parameters:
selectedPage
- a page in this TabView
-
setShortcuts
Sets the enabled shortcuts for this TabView.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>)
andremoveShortcuts(java.util.Set<org.gnome.adw.TabViewShortcuts>)
provide a convenient way to manage individual shortcuts.- Parameters:
shortcuts
- the new shortcuts
-
setShortcuts
Sets the enabled shortcuts for this TabView.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>)
andremoveShortcuts(java.util.Set<org.gnome.adw.TabViewShortcuts>)
provide a convenient way to manage individual shortcuts.- Parameters:
shortcuts
- the new shortcuts
-
transferPage
Transferspage
from this TabView tootherView
.The
page
object 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_STOP
to stop propagation orGDK_EVENT_CONTINUE
to 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
AdwTabView
that 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 onpage
has been activated.See
TabPage:indicator-icon
andTabPage: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-attached
handler.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 afterpage
has 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,
page
will 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.Builder
object constructs aTabView
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withTabView.Builder.build()
.
-