Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Exported types
- Methods
- addPage
- append
- appendPinned
- closeOtherPages
- closePage
- closePageFinish
- closePagesAfter
- closePagesBefore
- getDefaultIcon
- getIsTransferringPage
- getMenuModel
- getNPages
- getNPinnedPages
- getNthPage
- getPage
- getPagePosition
- getPages
- getSelectedPage
- getShortcutWidget
- insert
- insertPinned
- new
- prepend
- prependPinned
- reorderBackward
- reorderFirst
- reorderForward
- reorderLast
- reorderPage
- selectNextPage
- selectPreviousPage
- setDefaultIcon
- setMenuModel
- setPagePinned
- setSelectedPage
- setShortcutWidget
- transferPage
- Properties
- Signals
No description available in the introspection data.
Synopsis
- newtype TabView = TabView (ManagedPtr TabView)
- class (GObject o, IsDescendantOf TabView o) => IsTabView o
- toTabView :: (MonadIO m, IsTabView o) => o -> m TabView
- tabViewAddPage :: (HasCallStack, MonadIO m, IsTabView a, IsWidget b, IsTabPage c) => a -> b -> Maybe c -> m TabPage
- tabViewAppend :: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) => a -> b -> m TabPage
- tabViewAppendPinned :: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) => a -> b -> m TabPage
- tabViewCloseOtherPages :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m ()
- tabViewClosePage :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m ()
- tabViewClosePageFinish :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> Bool -> m ()
- tabViewClosePagesAfter :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m ()
- tabViewClosePagesBefore :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m ()
- tabViewGetDefaultIcon :: (HasCallStack, MonadIO m, IsTabView a) => a -> m Icon
- tabViewGetIsTransferringPage :: (HasCallStack, MonadIO m, IsTabView a) => a -> m Bool
- tabViewGetMenuModel :: (HasCallStack, MonadIO m, IsTabView a) => a -> m (Maybe MenuModel)
- tabViewGetNPages :: (HasCallStack, MonadIO m, IsTabView a) => a -> m Int32
- tabViewGetNPinnedPages :: (HasCallStack, MonadIO m, IsTabView a) => a -> m Int32
- tabViewGetNthPage :: (HasCallStack, MonadIO m, IsTabView a) => a -> Int32 -> m TabPage
- tabViewGetPage :: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) => a -> b -> m TabPage
- tabViewGetPagePosition :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m Int32
- tabViewGetPages :: (HasCallStack, MonadIO m, IsTabView a) => a -> m ListModel
- tabViewGetSelectedPage :: (HasCallStack, MonadIO m, IsTabView a) => a -> m (Maybe TabPage)
- tabViewGetShortcutWidget :: (HasCallStack, MonadIO m, IsTabView a) => a -> m (Maybe Widget)
- tabViewInsert :: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) => a -> b -> Int32 -> m TabPage
- tabViewInsertPinned :: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) => a -> b -> Int32 -> m TabPage
- tabViewNew :: (HasCallStack, MonadIO m) => m TabView
- tabViewPrepend :: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) => a -> b -> m TabPage
- tabViewPrependPinned :: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) => a -> b -> m TabPage
- tabViewReorderBackward :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m Bool
- tabViewReorderFirst :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m Bool
- tabViewReorderForward :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m Bool
- tabViewReorderLast :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m Bool
- tabViewReorderPage :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> Int32 -> m Bool
- tabViewSelectNextPage :: (HasCallStack, MonadIO m, IsTabView a) => a -> m Bool
- tabViewSelectPreviousPage :: (HasCallStack, MonadIO m, IsTabView a) => a -> m Bool
- tabViewSetDefaultIcon :: (HasCallStack, MonadIO m, IsTabView a, IsIcon b) => a -> b -> m ()
- tabViewSetMenuModel :: (HasCallStack, MonadIO m, IsTabView a, IsMenuModel b) => a -> Maybe b -> m ()
- tabViewSetPagePinned :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> Bool -> m ()
- tabViewSetSelectedPage :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) => a -> b -> m ()
- tabViewSetShortcutWidget :: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) => a -> Maybe b -> m ()
- tabViewTransferPage :: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b, IsTabView c) => a -> b -> c -> Int32 -> m ()
- constructTabViewDefaultIcon :: (IsTabView o, MonadIO m, IsIcon a) => a -> m (GValueConstruct o)
- getTabViewDefaultIcon :: (MonadIO m, IsTabView o) => o -> m Icon
- setTabViewDefaultIcon :: (MonadIO m, IsTabView o, IsIcon a) => o -> a -> m ()
- getTabViewIsTransferringPage :: (MonadIO m, IsTabView o) => o -> m Bool
- clearTabViewMenuModel :: (MonadIO m, IsTabView o) => o -> m ()
- constructTabViewMenuModel :: (IsTabView o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o)
- getTabViewMenuModel :: (MonadIO m, IsTabView o) => o -> m (Maybe MenuModel)
- setTabViewMenuModel :: (MonadIO m, IsTabView o, IsMenuModel a) => o -> a -> m ()
- getTabViewNPages :: (MonadIO m, IsTabView o) => o -> m Int32
- getTabViewNPinnedPages :: (MonadIO m, IsTabView o) => o -> m Int32
- constructTabViewSelectedPage :: (IsTabView o, MonadIO m, IsTabPage a) => a -> m (GValueConstruct o)
- getTabViewSelectedPage :: (MonadIO m, IsTabView o) => o -> m (Maybe TabPage)
- setTabViewSelectedPage :: (MonadIO m, IsTabView o, IsTabPage a) => o -> a -> m ()
- clearTabViewShortcutWidget :: (MonadIO m, IsTabView o) => o -> m ()
- constructTabViewShortcutWidget :: (IsTabView o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getTabViewShortcutWidget :: (MonadIO m, IsTabView o) => o -> m (Maybe Widget)
- setTabViewShortcutWidget :: (MonadIO m, IsTabView o, IsWidget a) => o -> a -> m ()
- type TabViewClosePageCallback = TabPage -> IO Bool
- afterTabViewClosePage :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewClosePageCallback) -> m SignalHandlerId
- onTabViewClosePage :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewClosePageCallback) -> m SignalHandlerId
- type TabViewCreateWindowCallback = IO (Maybe TabView)
- afterTabViewCreateWindow :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewCreateWindowCallback) -> m SignalHandlerId
- onTabViewCreateWindow :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewCreateWindowCallback) -> m SignalHandlerId
- type TabViewIndicatorActivatedCallback = TabPage -> IO ()
- afterTabViewIndicatorActivated :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewIndicatorActivatedCallback) -> m SignalHandlerId
- onTabViewIndicatorActivated :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewIndicatorActivatedCallback) -> m SignalHandlerId
- type TabViewPageAttachedCallback = TabPage -> Int32 -> IO ()
- afterTabViewPageAttached :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageAttachedCallback) -> m SignalHandlerId
- onTabViewPageAttached :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageAttachedCallback) -> m SignalHandlerId
- type TabViewPageDetachedCallback = TabPage -> Int32 -> IO ()
- afterTabViewPageDetached :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageDetachedCallback) -> m SignalHandlerId
- onTabViewPageDetached :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageDetachedCallback) -> m SignalHandlerId
- type TabViewPageReorderedCallback = TabPage -> Int32 -> IO ()
- afterTabViewPageReordered :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageReorderedCallback) -> m SignalHandlerId
- onTabViewPageReordered :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewPageReorderedCallback) -> m SignalHandlerId
- type TabViewSetupMenuCallback = TabPage -> IO ()
- afterTabViewSetupMenu :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewSetupMenuCallback) -> m SignalHandlerId
- onTabViewSetupMenu :: (IsTabView a, MonadIO m) => a -> ((?self :: a) => TabViewSetupMenuCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq TabView Source # | |
GObject TabView Source # | |
Defined in GI.Handy.Objects.TabView | |
ManagedPtrNewtype TabView Source # | |
Defined in GI.Handy.Objects.TabView toManagedPtr :: TabView -> ManagedPtr TabView # | |
TypedObject TabView Source # | |
Defined in GI.Handy.Objects.TabView | |
HasParentTypes TabView Source # | |
Defined in GI.Handy.Objects.TabView | |
IsGValue (Maybe TabView) Source # | Convert |
Defined in GI.Handy.Objects.TabView | |
type ParentTypes TabView Source # | |
Defined in GI.Handy.Objects.TabView |
class (GObject o, IsDescendantOf TabView o) => IsTabView o Source #
Instances
(GObject o, IsDescendantOf TabView o) => IsTabView o Source # | |
Defined in GI.Handy.Objects.TabView |
Methods
Click to display all available methods, including inherited ones
Methods
activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addPage, addTickCallback, append, appendPinned, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, closeOtherPages, closePage, closePageFinish, closePagesAfter, closePagesBefore, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insert, insertActionGroup, insertPinned, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, prepend, prependPinned, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reorderBackward, reorderFirst, reorderForward, reorderLast, reorderPage, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, selectNextPage, selectPreviousPage, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, transferPage, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDefaultIcon, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getIsTransferringPage, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getMenuModel, getModifierMask, getModifierStyle, getNPages, getNPinnedPages, getName, getNoShowAll, getNthPage, getOpacity, getPage, getPagePosition, getPages, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSelectedPage, getSensitive, getSettings, getShortcutWidget, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDefaultIcon, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setMenuModel, setName, setNoShowAll, setOpacity, setPagePinned, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSelectedPage, setSensitive, setShortcutWidget, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
addPage
:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b, IsTabPage c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m TabPage | Returns: the page object representing |
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
tabViewClosePage
).
If parent
is Nothing
, this function is equivalent to tabViewAppend
.
Since: 1.2
append
:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) | |
=> a |
|
-> b |
|
-> m TabPage | Returns: the page object representing |
Inserts child
as the last non-pinned page.
Since: 1.2
appendPinned
:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) | |
=> a |
|
-> b |
|
-> m TabPage | Returns: the page object representing |
Inserts child
as the last pinned page.
Since: 1.2
closeOtherPages
tabViewCloseOtherPages Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m () |
Requests to close all pages other than page
.
Since: 1.2
closePage
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m () |
Requests to close page
.
Calling this function will result in closePage signal being
emitted for page
. Closing the page can then be confirmed or denied via
tabViewClosePageFinish
.
If the page is waiting for a tabViewClosePageFinish
call, this
function will do nothing.
The default handler for 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 TabPage
:parent
value is Nothing
, 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 Nothing
, 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.2
closePageFinish
tabViewClosePageFinish Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> m () |
Completes a tabViewClosePage
call for page
.
If confirm
is True
, page
will be closed. If it's False
, ite will be
reverted to its previous state and tabViewClosePage
can be called
for it again.
This function should not be called unless a custom handler for closePage is used.
Since: 1.2
closePagesAfter
tabViewClosePagesAfter Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m () |
Requests to close all pages after page
.
Since: 1.2
closePagesBefore
tabViewClosePagesBefore Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m () |
Requests to close all pages before page
.
Since: 1.2
getDefaultIcon
tabViewGetDefaultIcon Source #
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m Icon | Returns: the default icon of |
Gets default icon of self
, see tabViewSetDefaultIcon
.
Since: 1.2
getIsTransferringPage
tabViewGetIsTransferringPage Source #
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m Bool | Returns: whether a page is being transferred |
Whether a page is being transferred.
Gets the value of TabView
:is-transferring-page
property.
Since: 1.2
getMenuModel
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m (Maybe MenuModel) | Returns: the tab context menu model for |
Gets the tab context menu model for self
, see tabViewSetMenuModel
.
Since: 1.2
getNPages
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m Int32 | Returns: the number of pages in |
Gets the number of pages in self
.
Since: 1.2
getNPinnedPages
tabViewGetNPinnedPages Source #
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m Int32 | Returns: the number of pinned pages in |
getNthPage
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> Int32 |
|
-> m TabPage | Returns: the page object at |
Gets the TabPage
representing the child at position
.
Since: 1.2
getPage
:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) | |
=> a |
|
-> b |
|
-> m TabPage | Returns: the |
Gets the TabPage
object representing child
.
Since: 1.2
getPagePosition
tabViewGetPagePosition Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m Int32 | Returns: the position of |
Finds the position of page
in self
, starting from 0.
Since: 1.2
getPages
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m ListModel | Returns: the model containing pages of |
Returns a ListModel
containing the pages of self
. This model can be used
to keep an up to date view of the pages.
Since: 1.2
getSelectedPage
tabViewGetSelectedPage Source #
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m (Maybe TabPage) | Returns: the selected page in |
Gets the currently selected page in self
.
Since: 1.2
getShortcutWidget
tabViewGetShortcutWidget Source #
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the shortcut widget for |
Gets the shortcut widget for self
, see tabViewSetShortcutWidget
.
Since: 1.2
insert
:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m TabPage | Returns: the page object representing |
Inserts a non-pinned page at position
.
It's an error to try to insert a page before a pinned page, in that case
tabViewInsertPinned
should be used instead.
Since: 1.2
insertPinned
:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m TabPage | Returns: the page object representing |
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 tabViewInsert
should be used instead.
Since: 1.2
new
:: (HasCallStack, MonadIO m) | |
=> m TabView | Returns: a new |
Creates a new TabView
widget.
Since: 1.2
prepend
:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) | |
=> a |
|
-> b |
|
-> m TabPage | Returns: the page object representing |
Inserts child
as the first non-pinned page.
Since: 1.2
prependPinned
:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) | |
=> a |
|
-> b |
|
-> m TabPage | Returns: the page object representing |
Inserts child
as the first pinned page.
Since: 1.2
reorderBackward
tabViewReorderBackward Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m Bool |
Reorders page
to before its previous page if possible.
Since: 1.2
reorderFirst
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m Bool |
Reorders page
to the first possible position.
Since: 1.2
reorderForward
tabViewReorderForward Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m Bool |
Reorders page
to after its next page if possible.
Since: 1.2
reorderLast
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m Bool |
Reorders page
to the last possible position.
Since: 1.2
reorderPage
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m Bool |
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.2
selectNextPage
tabViewSelectNextPage Source #
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m Bool | Returns: |
Selects the page after the currently selected page.
If the last page was already selected, this function does nothing.
Since: 1.2
selectPreviousPage
tabViewSelectPreviousPage Source #
:: (HasCallStack, MonadIO m, IsTabView a) | |
=> a |
|
-> m Bool | Returns: |
Selects the page before the currently selected page.
If the first page was already selected, this function does nothing.
Since: 1.2
setDefaultIcon
tabViewSetDefaultIcon Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsIcon b) | |
=> a |
|
-> b |
|
-> m () |
Sets default page icon for self
.
If a page doesn't provide its own icon via TabPage
:icon
, 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.
By default, 'hdy-tab-icon-missing-symbolic' icon is used.
Since: 1.2
setMenuModel
:: (HasCallStack, MonadIO m, IsTabView a, IsMenuModel b) | |
=> a |
|
-> Maybe b |
|
-> 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 setupMenu signal to set up the menu actions for the particular tab.
Since: 1.2
setPagePinned
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> m () |
Pins or unpins page
.
Pinned pages are guaranteed to be placed before all non-pinned pages; at any
given moment the first TabView
: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.
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:
Pinned pages cannot be closed by default, see closePage for how to override that behavior.
Since: 1.2
setSelectedPage
tabViewSetSelectedPage Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b) | |
=> a |
|
-> b |
|
-> m () |
Sets the currently selected page in self
.
Since: 1.2
setShortcutWidget
tabViewSetShortcutWidget Source #
:: (HasCallStack, MonadIO m, IsTabView a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the shortcut widget for self
.
Registers the following shortcuts on widget
:
* Ctrl+Page Up - switch to the previous page
* Ctrl+Page Down - switch to the next page
* Ctrl+Home - switch to the first page
* Ctrl+End - switch to the last page
* Ctrl+Shift+Page Up - move the current page backward
* Ctrl+Shift+Page Down - move the current page forward
* Ctrl+Shift+Home - move the current page at the start
* Ctrl+Shift+End - move the current page at the end
* Ctrl+Tab - switch to the next page, with looping
* Ctrl+Shift+Tab - switch to the previous page, with looping
* Alt+1-9 - switch to pages 1-9
* Alt+0 - switch to page 10
These shortcuts are always available on self
, this function is useful if
they should be available globally.
Since: 1.2
transferPage
:: (HasCallStack, MonadIO m, IsTabView a, IsTabPage b, IsTabView c) | |
=> a |
|
-> b |
|
-> c |
|
-> Int32 |
|
-> 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.2
Properties
defaultIcon
Default page icon.
If a page doesn't provide its own icon via TabPage
:icon
, 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.
Since: 1.2
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 TabView
, 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.2
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 setupMenu signal to set up the menu actions for the particular tab.
Since: 1.2
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.2
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
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
selectedPage
The currently selected page.
Since: 1.2
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 ]
shortcutWidget
Tab shortcut widget, has the following shortcuts: * Ctrl+Page Up - switch to the previous page * Ctrl+Page Down - switch to the next page * Ctrl+Home - switch to the first page * Ctrl+End - switch to the last page * Ctrl+Shift+Page Up - move the current page backward * Ctrl+Shift+Page Down - move the current page forward * Ctrl+Shift+Home - move the current page at the start * Ctrl+Shift+End - move the current page at the end * Ctrl+Tab - switch to the next page, with looping * Ctrl+Shift+Tab - switch to the previous page, with looping * Alt+1-9 - switch to pages 1-9 * Alt+0 - switch to page 10
These shortcuts are always available on self
, this property is useful if
they should be available globally.
Since: 1.2
clearTabViewShortcutWidget :: (MonadIO m, IsTabView o) => o -> m () Source #
Set the value of the “shortcut-widget
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#shortcutWidget
constructTabViewShortcutWidget :: (IsTabView o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “shortcut-widget
” property. This is rarely needed directly, but it is used by new
.
getTabViewShortcutWidget :: (MonadIO m, IsTabView o) => o -> m (Maybe Widget) Source #
Get the value of the “shortcut-widget
” property.
When overloading is enabled, this is equivalent to
get
tabView #shortcutWidget
setTabViewShortcutWidget :: (MonadIO m, IsTabView o, IsWidget a) => o -> a -> m () Source #
Set the value of the “shortcut-widget
” property.
When overloading is enabled, this is equivalent to
set
tabView [ #shortcutWidget:=
value ]
Signals
closePage
type TabViewClosePageCallback Source #
This signal is emitted after tabViewClosePage
has been called for
page
.
The handler is expected to call tabViewClosePageFinish
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 (HdyTabView *view, HdyTabPage *page, gpointer user_data) { hdy_tab_view_close_page_finish (view, page, !hdy_tab_page_get_pinned (page)); return GDK_EVENT_STOP; }
The tabViewClosePageFinish
doesn't have to happen during 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.2
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 #
This signal is emitted when a tab is dropped onto desktop and should be transferred into a new window.
The signal handler is expected to create a new window, position it as
needed and return its TabView
that the page will be transferred into.
Since: 1.2
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
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 #
This signal is 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.2
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 #
= TabPage |
|
-> Int32 |
|
-> IO () |
This signal is 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 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
tabViewClosePageFinish
calls.
Since: 1.2
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 #
= TabPage |
|
-> Int32 |
|
-> IO () |
This signal is emitted after page
has been reordered to position
.
Since: 1.2
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 #
This signal is emitted before a context menu is opened for page
, and after
it's closed, in the latter case the page
will be set to Nothing
.
It can be used to set up menu actions before showing the menu, for example
disable actions not applicable to page
.
Since: 1.2
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