gi-adwaita-1.0.3: Adwaita bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Adw.Objects.TabView

Description

A dynamic tabbed container.

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 bar and relies on external widgets for that, such as [classtabBar].

AdwTabView maintains a [classtabPage] object for each page, which holds additional per-page properties. You can obtain the AdwTabPage for a page with [methodtabView.get_page], and as the return value for [methodtabView.append] 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 [propertytabView:shortcuts] property can be used to manage them.

See [flagstabViewShortcuts] for the list of the available shortcuts. All of the shortcuts are enabled by default.

methodtabView.add_shortcuts
and [methodtabView.remove_shortcuts] can be used to manage shortcuts in a convenient way, for example:

c code

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.

Since: 1.0

Synopsis

Exported types

newtype TabView Source #

Memory-managed wrapper type.

Constructors

TabView (ManagedPtr TabView) 

Instances

Instances details
Eq TabView Source # 
Instance details

Defined in GI.Adw.Objects.TabView

Methods

(==) :: TabView -> TabView -> Bool #

(/=) :: TabView -> TabView -> Bool #

GObject TabView Source # 
Instance details

Defined in GI.Adw.Objects.TabView

ManagedPtrNewtype TabView Source # 
Instance details

Defined in GI.Adw.Objects.TabView

Methods

toManagedPtr :: TabView -> ManagedPtr TabView

TypedObject TabView Source # 
Instance details

Defined in GI.Adw.Objects.TabView

Methods

glibType :: IO GType

HasParentTypes TabView Source # 
Instance details

Defined in GI.Adw.Objects.TabView

IsGValue (Maybe TabView) Source #

Convert TabView to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Adw.Objects.TabView

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe TabView -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe TabView)

type ParentTypes TabView Source # 
Instance details

Defined in GI.Adw.Objects.TabView

type ParentTypes TabView = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf TabView o) => IsTabView o Source #

Type class for types which can be safely cast to TabView, for instance with toTabView.

Instances

Instances details
(GObject o, IsDescendantOf TabView o) => IsTabView o Source # 
Instance details

Defined in GI.Adw.Objects.TabView

toTabView :: (MonadIO m, IsTabView o) => o -> m TabView Source #

Cast to TabView, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addPage, addShortcuts, addTickCallback, allocate, append, appendPinned, bindProperty, bindPropertyFull, childFocus, closeOtherPages, closePage, closePageFinish, closePagesAfter, closePagesBefore, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insert, insertActionGroup, insertAfter, insertBefore, insertPinned, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, prepend, prependPinned, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeShortcuts, removeTickCallback, reorderBackward, reorderFirst, reorderForward, reorderLast, reorderPage, resetProperty, resetRelation, resetState, runDispose, selectNextPage, selectPreviousPage, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, transferPage, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDefaultIcon, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getIsTransferringPage, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMenuModel, getNPages, getNPinnedPages, getName, getNative, getNextSibling, getNthPage, getOpacity, getOverflow, getPage, getPagePosition, getPages, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSelectedPage, getSensitive, getSettings, getShortcuts, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDefaultIcon, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMenuModel, setName, setOpacity, setOverflow, setPagePinned, setParent, setProperty, setReceivesDefault, setSelectedPage, setSensitive, setShortcuts, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

addPage

tabViewAddPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b, IsTabPage c) 
=> a

self: a tab view

-> b

child: a widget to add

-> Maybe c

parent: a parent page for child

-> m TabPage

Returns: the page object representing child

Adds child to self with parent 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 [methodtabView.close_page]).

If parent is NULL, this function is equivalent to [methodtabView.append].

Since: 1.0

addShortcuts

tabViewAddShortcuts Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> [TabViewShortcuts]

shortcuts: the shortcuts to add

-> m () 

Adds shortcuts for self.

See [propertytabView:shortcuts] for details.

Since: 1.2

append

tabViewAppend Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) 
=> a

self: a tab view

-> b

child: a widget to add

-> m TabPage

Returns: the page object representing child

Inserts child as the last non-pinned page.

Since: 1.0

appendPinned

tabViewAppendPinned Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) 
=> a

self: a tab view

-> b

child: a widget to add

-> m TabPage

Returns: the page object representing child

Inserts child as the last pinned page.

Since: 1.0

closeOtherPages

tabViewCloseOtherPages Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> m () 

Requests to close all pages other than page.

Since: 1.0

closePage

tabViewClosePage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> m () 

Requests to close page.

Calling this function will result in the signaltabView[closePage] signal being emitted for page. Closing the page can then be confirmed or denied via [methodtabView.close_page_finish].

If the page is waiting for a [methodtabView.close_page_finish] call, this function will do nothing.

The default handler for signaltabView[closePage] 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 [propertytabPage:parent] value is NULL, 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.

Since: 1.0

closePageFinish

tabViewClosePageFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> Bool

confirm: whether to confirm or deny closing page

-> m () 

Completes a [methodtabView.close_page] call for page.

If confirm is TRUE, page will be closed. If it's FALSE, it will be reverted to its previous state and [methodtabView.close_page] can be called for it again.

This function should not be called unless a custom handler for signaltabView[closePage] is used.

Since: 1.0

closePagesAfter

tabViewClosePagesAfter Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> m () 

Requests to close all pages after page.

Since: 1.0

closePagesBefore

tabViewClosePagesBefore Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> m () 

Requests to close all pages before page.

Since: 1.0

getDefaultIcon

tabViewGetDefaultIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m Icon

Returns: the default icon of self.

Gets the default icon of self.

Since: 1.0

getIsTransferringPage

tabViewGetIsTransferringPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m Bool

Returns: whether a page is being transferred

Whether a page is being transferred.

The corresponding property will be set to TRUE when a drag-n-drop tab transfer starts on any AdwTabView, and to FALSE after it ends.

During the transfer, children cannot receive pointer input and a tab can be safely dropped on the tab view.

Since: 1.0

getMenuModel

tabViewGetMenuModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m (Maybe MenuModel)

Returns: the tab context menu model for self

Gets the tab context menu model for self.

Since: 1.0

getNPages

tabViewGetNPages Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m Int32

Returns: the number of pages in self

Gets the number of pages in self.

Since: 1.0

getNPinnedPages

tabViewGetNPinnedPages Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m Int32

Returns: the number of pinned pages in self

Gets the number of pinned pages in self.

See [methodtabView.set_page_pinned].

Since: 1.0

getNthPage

tabViewGetNthPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> Int32

position: the index of the page in self, starting from 0

-> m TabPage

Returns: the page object at position

Gets the [classtabPage] representing the child at position.

Since: 1.0

getPage

tabViewGetPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) 
=> a

self: a tab view

-> b

child: a child in self

-> m TabPage

Returns: the page object for child

Gets the [classtabPage] object representing child.

Since: 1.0

getPagePosition

tabViewGetPagePosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> m Int32

Returns: the position of page in self

Finds the position of page in self, starting from 0.

Since: 1.0

getPages

tabViewGetPages Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m SelectionModel

Returns: a GtkSelectionModel for the pages of self

Returns a ListModel that contains the pages of self.

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.

Since: 1.0

getSelectedPage

tabViewGetSelectedPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m (Maybe TabPage)

Returns: the selected page

Gets the currently selected page in self.

Since: 1.0

getShortcuts

tabViewGetShortcuts Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m [TabViewShortcuts]

Returns: the shortcut mask

Gets the enabled shortcuts for self.

Since: 1.2

insert

tabViewInsert Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) 
=> a

self: a tab view

-> b

child: a widget to add

-> Int32

position: the position to add child at, starting from 0

-> m TabPage

Returns: the page object representing child

Inserts a non-pinned page at position.

It's an error to try to insert a page before a pinned page, in that case [methodtabView.insert_pinned] should be used instead.

Since: 1.0

insertPinned

tabViewInsertPinned Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) 
=> a

self: a tab view

-> b

child: a widget to add

-> Int32

position: the position to add child at, starting from 0

-> m TabPage

Returns: the page object representing child

Inserts a pinned page at position.

It's an error to try to insert a pinned page after a non-pinned page, in that case [methodtabView.insert] should be used instead.

Since: 1.0

new

tabViewNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m TabView

Returns: the newly created AdwTabView

Creates a new AdwTabView.

Since: 1.0

prepend

tabViewPrepend Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) 
=> a

self: a tab view

-> b

child: a widget to add

-> m TabPage

Returns: the page object representing child

Inserts child as the first non-pinned page.

Since: 1.0

prependPinned

tabViewPrependPinned Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) 
=> a

self: a tab view

-> b

child: a widget to add

-> m TabPage

Returns: the page object representing child

Inserts child as the first pinned page.

Since: 1.0

removeShortcuts

tabViewRemoveShortcuts Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> [TabViewShortcuts]

shortcuts: the shortcuts to reomve

-> m () 

Removes shortcuts from self.

See [propertytabView:shortcuts] for details.

Since: 1.2

reorderBackward

tabViewReorderBackward Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> m Bool

Returns: whether page was moved

Reorders page to before its previous page if possible.

Since: 1.0

reorderFirst

tabViewReorderFirst Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> m Bool

Returns: whether page was moved

Reorders page to the first possible position.

Since: 1.0

reorderForward

tabViewReorderForward Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> m Bool

Returns: whether page was moved

Reorders page to after its next page if possible.

Since: 1.0

reorderLast

tabViewReorderLast Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> m Bool

Returns: whether page was moved

Reorders page to the last possible position.

Since: 1.0

reorderPage

tabViewReorderPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> Int32

position: the position to insert the page at, starting at 0

-> m Bool

Returns: whether page was moved

Reorders page to position.

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.

Since: 1.0

selectNextPage

tabViewSelectNextPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m Bool

Returns: whether the selected page was changed

Selects the page after the currently selected page.

If the last page was already selected, this function does nothing.

Since: 1.0

selectPreviousPage

tabViewSelectPreviousPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> m Bool

Returns: whether the selected page was changed

Selects the page before the currently selected page.

If the first page was already selected, this function does nothing.

Since: 1.0

setDefaultIcon

tabViewSetDefaultIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsIcon b) 
=> a

self: a tab view

-> b

defaultIcon: the default icon

-> m () 

Sets the default page icon for self.

If a page doesn't provide its own icon via [propertytabPage:icon], a default icon may be used instead for contexts where having an icon is necessary.

classtabBar
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.

By default, the adw-tab-icon-missing-symbolic icon is used.

Since: 1.0

setMenuModel

tabViewSetMenuModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsMenuModel b) 
=> a

self: a tab view

-> Maybe b

menuModel: a menu model

-> m () 

Sets the tab context menu model for self.

When a context menu is shown for a tab, it will be constructed from the provided menu model. Use the signaltabView[setupMenu] signal to set up the menu actions for the particular tab.

Since: 1.0

setPagePinned

tabViewSetPagePinned Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

page: a page of self

-> Bool

pinned: whether page should be pinned

-> m () 

Pins or unpins page.

Pinned pages are guaranteed to be placed before all non-pinned pages; at any given moment the first [propertytabView:n-pinned-pages] pages in self 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.

classtabBar
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. [propertytabPage:indicator-icon]
  2. A spinner if [propertytabPage:loading] is TRUE
  3. [propertytabPage:icon]
  4. [propertytabView:default-icon]

Pinned pages cannot be closed by default, see signaltabView[closePage] for how to override that behavior.

Changes the value of the [propertytabPage:pinned] property.

Since: 1.0

setSelectedPage

tabViewSetSelectedPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) 
=> a

self: a tab view

-> b

selectedPage: a page in self

-> m () 

Sets the currently selected page in self.

Since: 1.0

setShortcuts

tabViewSetShortcuts Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a) 
=> a

self: a tab view

-> [TabViewShortcuts]

shortcuts: the new shortcuts

-> m () 

Sets the enabled shortcuts for self.

See [flagstabViewShortcuts] for the list of the available shortcuts. All of the shortcuts are enabled by default.

methodtabView.add_shortcuts
and [methodtabView.remove_shortcuts] provide a convenient way to manage individual shortcuts.

Since: 1.2

transferPage

tabViewTransferPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b, IsTabView c) 
=> a

self: a tab view

-> b

page: a page of self

-> c

otherView: the tab view to transfer the page to

-> Int32

position: the position to insert the page at, starting at 0

-> m () 

Transfers page from self to otherView.

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.

Since: 1.0

Properties

defaultIcon

Default page icon.

If a page doesn't provide its own icon via [propertytabPage:icon], a default icon may be used instead for contexts where having an icon is necessary.

classtabBar
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.

By default, the adw-tab-icon-missing-symbolic icon is used.

Since: 1.0

constructTabViewDefaultIcon :: (IsTabView o, MonadIO m, IsIcon a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “default-icon” property. This is rarely needed directly, but it is used by new.

getTabViewDefaultIcon :: (MonadIO m, IsTabView o) => o -> m Icon Source #

Get the value of the “default-icon” property. When overloading is enabled, this is equivalent to

get tabView #defaultIcon

setTabViewDefaultIcon :: (MonadIO m, IsTabView o, IsIcon a) => o -> a -> m () Source #

Set the value of the “default-icon” property. When overloading is enabled, this is equivalent to

set tabView [ #defaultIcon := value ]

isTransferringPage

Whether a page is being transferred.

This property will be set to TRUE when a drag-n-drop tab transfer starts on any AdwTabView, and to FALSE after it ends.

During the transfer, children cannot receive pointer input and a tab can be safely dropped on the tab view.

Since: 1.0

getTabViewIsTransferringPage :: (MonadIO m, IsTabView o) => o -> m Bool Source #

Get the value of the “is-transferring-page” property. When overloading is enabled, this is equivalent to

get tabView #isTransferringPage

menuModel

Tab context menu model.

When a context menu is shown for a tab, it will be constructed from the provided menu model. Use the signaltabView[setupMenu] signal to set up the menu actions for the particular tab.

Since: 1.0

clearTabViewMenuModel :: (MonadIO m, IsTabView o) => o -> m () Source #

Set the value of the “menu-model” property to Nothing. When overloading is enabled, this is equivalent to

clear #menuModel

constructTabViewMenuModel :: (IsTabView o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “menu-model” property. This is rarely needed directly, but it is used by new.

getTabViewMenuModel :: (MonadIO m, IsTabView o) => o -> m (Maybe MenuModel) Source #

Get the value of the “menu-model” property. When overloading is enabled, this is equivalent to

get tabView #menuModel

setTabViewMenuModel :: (MonadIO m, IsTabView o, IsMenuModel a) => o -> a -> m () Source #

Set the value of the “menu-model” property. When overloading is enabled, this is equivalent to

set tabView [ #menuModel := value ]

nPages

The number of pages in the tab view.

Since: 1.0

getTabViewNPages :: (MonadIO m, IsTabView o) => o -> m Int32 Source #

Get the value of the “n-pages” property. When overloading is enabled, this is equivalent to

get tabView #nPages

nPinnedPages

The number of pinned pages in the tab view.

See [methodtabView.set_page_pinned].

Since: 1.0

getTabViewNPinnedPages :: (MonadIO m, IsTabView o) => o -> m Int32 Source #

Get the value of the “n-pinned-pages” property. When overloading is enabled, this is equivalent to

get tabView #nPinnedPages

pages

A selection model with the tab view's pages.

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.

Since: 1.0

getTabViewPages :: (MonadIO m, IsTabView o) => o -> m (Maybe SelectionModel) Source #

Get the value of the “pages” property. When overloading is enabled, this is equivalent to

get tabView #pages

selectedPage

The currently selected page.

Since: 1.0

constructTabViewSelectedPage :: (IsTabView o, MonadIO m, IsTabPage a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “selected-page” property. This is rarely needed directly, but it is used by new.

getTabViewSelectedPage :: (MonadIO m, IsTabView o) => o -> m (Maybe TabPage) Source #

Get the value of the “selected-page” property. When overloading is enabled, this is equivalent to

get tabView #selectedPage

setTabViewSelectedPage :: (MonadIO m, IsTabView o, IsTabPage a) => o -> a -> m () Source #

Set the value of the “selected-page” property. When overloading is enabled, this is equivalent to

set tabView [ #selectedPage := value ]

shortcuts

The enabled shortcuts.

See [flagstabViewShortcuts] for the list of the available shortcuts. All of the shortcuts are enabled by default.

methodtabView.add_shortcuts
and [methodtabView.remove_shortcuts] provide a convenient way to manage individual shortcuts.

Since: 1.2

constructTabViewShortcuts :: (IsTabView o, MonadIO m) => [TabViewShortcuts] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “shortcuts” property. This is rarely needed directly, but it is used by new.

getTabViewShortcuts :: (MonadIO m, IsTabView o) => o -> m [TabViewShortcuts] Source #

Get the value of the “shortcuts” property. When overloading is enabled, this is equivalent to

get tabView #shortcuts

setTabViewShortcuts :: (MonadIO m, IsTabView o) => o -> [TabViewShortcuts] -> m () Source #

Set the value of the “shortcuts” property. When overloading is enabled, this is equivalent to

set tabView [ #shortcuts := value ]

Signals

closePage

type TabViewClosePageCallback Source #

Arguments

 = TabPage

page: a page of self

-> IO Bool 

Emitted after [methodtabView.close_page] has been called for page.

The handler is expected to call [methodtabView.close_page_finish] 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:

c code

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 [methodtabView.close_page_finish] 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.

Since: 1.0

afterTabViewClosePage :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewClosePageCallback) -> m SignalHandlerId Source #

Connect a signal handler for the closePage signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after tabView #closePage callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTabViewClosePage :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewClosePageCallback) -> m SignalHandlerId Source #

Connect a signal handler for the closePage signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on tabView #closePage callback

createWindow

type TabViewCreateWindowCallback Source #

Arguments

 = IO (Maybe TabView)

Returns: the AdwTabView from the new window

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.

Since: 1.0

afterTabViewCreateWindow :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewCreateWindowCallback) -> m SignalHandlerId Source #

Connect a signal handler for the createWindow signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after tabView #createWindow callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTabViewCreateWindow :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewCreateWindowCallback) -> m SignalHandlerId Source #

Connect a signal handler for the createWindow signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on tabView #createWindow callback

indicatorActivated

type TabViewIndicatorActivatedCallback Source #

Arguments

 = TabPage

page: a page of self

-> IO () 

Emitted after the indicator icon on page has been activated.

See [propertytabPage:indicator-icon] and [propertytabPage:indicator-activatable].

Since: 1.0

afterTabViewIndicatorActivated :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewIndicatorActivatedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the indicatorActivated signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after tabView #indicatorActivated callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTabViewIndicatorActivated :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewIndicatorActivatedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the indicatorActivated signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on tabView #indicatorActivated callback

pageAttached

type TabViewPageAttachedCallback Source #

Arguments

 = TabPage

page: a page of self

-> Int32

position: the position of the page, starting from 0

-> IO () 

Emitted when a page has been created or transferred to self.

A typical reason to connect to this signal would be to connect to page signals for things such as updating window title.

Since: 1.0

afterTabViewPageAttached :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageAttachedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pageAttached signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after tabView #pageAttached callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTabViewPageAttached :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageAttachedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pageAttached signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on tabView #pageAttached callback

pageDetached

type TabViewPageDetachedCallback Source #

Arguments

 = TabPage

page: a page of self

-> Int32

position: the position of the removed page, starting from 0

-> IO () 

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 signaltabView[pageAttached] 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 [methodtabView.close_page_finish] calls.

Since: 1.0

afterTabViewPageDetached :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageDetachedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pageDetached signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after tabView #pageDetached callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTabViewPageDetached :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageDetachedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pageDetached signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on tabView #pageDetached callback

pageReordered

type TabViewPageReorderedCallback Source #

Arguments

 = TabPage

page: a page of self

-> Int32

position: the position page was moved to, starting at 0

-> IO () 

Emitted after page has been reordered to position.

Since: 1.0

afterTabViewPageReordered :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageReorderedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pageReordered signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after tabView #pageReordered callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTabViewPageReordered :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageReorderedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pageReordered signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on tabView #pageReordered callback

setupMenu

type TabViewSetupMenuCallback Source #

Arguments

 = Maybe TabPage

page: a page of self

-> IO () 

Emitted when a context menu is opened or closed for page.

If the menu has been closed, page will be set to NULL.

It can be used to set up menu actions before showing the menu, for example disable actions not applicable to page.

Since: 1.0

afterTabViewSetupMenu :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewSetupMenuCallback) -> m SignalHandlerId Source #

Connect a signal handler for the setupMenu signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after tabView #setupMenu callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTabViewSetupMenu :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewSetupMenuCallback) -> m SignalHandlerId Source #

Connect a signal handler for the setupMenu signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on tabView #setupMenu callback