gi-adwaita-1.0.6: 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.Banner

Description

A bar with contextual information.

<picture> <source srcset="banner-dark.png" media="(prefers-color-scheme: dark)"> <img src="banner.png" alt="banner"> </picture>

Banners are hidden by default, use [propertybanner:revealed] to show them.

Banners have a title, set with [propertybanner:title]. Titles can be marked up with Pango markup, use [propertybanner:use-markup] to enable it.

The title will be shown centered or left-aligned depending on available space.

Banners can optionally have a button with text on it, set through [propertybanner:button-label]. The button can be used with a GAction, or with the signalbanner[buttonClicked] signal.

CSS nodes

AdwBanner has a main CSS node with the name banner.

Since: 1.3

Synopsis

Exported types

newtype Banner Source #

Memory-managed wrapper type.

Constructors

Banner (ManagedPtr Banner) 

Instances

Instances details
Eq Banner Source # 
Instance details

Defined in GI.Adw.Objects.Banner

Methods

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

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

GObject Banner Source # 
Instance details

Defined in GI.Adw.Objects.Banner

ManagedPtrNewtype Banner Source # 
Instance details

Defined in GI.Adw.Objects.Banner

Methods

toManagedPtr :: Banner -> ManagedPtr Banner

TypedObject Banner Source # 
Instance details

Defined in GI.Adw.Objects.Banner

Methods

glibType :: IO GType

HasParentTypes Banner Source # 
Instance details

Defined in GI.Adw.Objects.Banner

IsGValue (Maybe Banner) Source #

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

Instance details

Defined in GI.Adw.Objects.Banner

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Banner Source # 
Instance details

Defined in GI.Adw.Objects.Banner

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

class (GObject o, IsDescendantOf Banner o) => IsBanner o Source #

Type class for types which can be safely cast to Banner, for instance with toBanner.

Instances

Instances details
(GObject o, IsDescendantOf Banner o) => IsBanner o Source # 
Instance details

Defined in GI.Adw.Objects.Banner

toBanner :: (MonadIO m, IsBanner o) => o -> m Banner Source #

Cast to Banner, 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, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleParent, getAccessibleRole, getActionName, getActionTargetValue, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBounds, getBuildableId, getButtonLabel, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRevealed, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTitle, getTooltipMarkup, getTooltipText, getUseMarkup, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setAccessibleParent, setActionName, setActionTargetValue, setButtonLabel, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDetailedActionName, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setRevealed, setSensitive, setSizeRequest, setStateFlags, setTitle, setTooltipMarkup, setTooltipText, setUseMarkup, setValign, setVexpand, setVexpandSet, setVisible.

getButtonLabel

bannerGetButtonLabel Source #

Arguments

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

self: a banner

-> m (Maybe Text)

Returns: the button label for self

Gets the button label for self.

Since: 1.3

getRevealed

bannerGetRevealed Source #

Arguments

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

self: a banner

-> m Bool

Returns: Whether a banner is revealed

Gets if a banner is revealed

Since: 1.3

getTitle

bannerGetTitle Source #

Arguments

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

self: a banner

-> m Text

Returns: the title for self

Gets the title for self.

Since: 1.3

getUseMarkup

bannerGetUseMarkup Source #

Arguments

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

self: a banner

-> m Bool

Returns: whether to use markup

Gets whether to use Pango markup for the banner title.

Since: 1.3

new

bannerNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

title: the banner title

-> m Banner

Returns: the newly created AdwBanner

Creates a new AdwBanner.

Since: 1.3

setButtonLabel

bannerSetButtonLabel Source #

Arguments

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

self: a banner

-> Maybe Text

label: the label

-> m () 

Sets the button label for self.

If set to "" or NULL, the button won't be shown.

The button can be used with a GAction, or with the signalbanner[buttonClicked] signal.

Since: 1.3

setRevealed

bannerSetRevealed Source #

Arguments

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

self: a banner

-> Bool

revealed: whether a banner should be revealed

-> m () 

Sets whether a banner should be revealed

Since: 1.3

setTitle

bannerSetTitle Source #

Arguments

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

self: a banner

-> Text

title: the title

-> m () 

Sets the title for this banner.

See also: [propertybanner:use-markup].

Since: 1.3

setUseMarkup

bannerSetUseMarkup Source #

Arguments

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

self: a banner

-> Bool

useMarkup: whether to use markup

-> m () 

Sets whether to use Pango markup for the banner title.

See also parseMarkup.

Since: 1.3

Properties

buttonLabel

The label to show on the button.

If set to "" or NULL, the button won't be shown.

The button can be used with a GAction, or with the signalbanner[buttonClicked] signal.

Since: 1.3

clearBannerButtonLabel :: (MonadIO m, IsBanner o) => o -> m () Source #

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

clear #buttonLabel

constructBannerButtonLabel :: (IsBanner o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getBannerButtonLabel :: (MonadIO m, IsBanner o) => o -> m (Maybe Text) Source #

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

get banner #buttonLabel

setBannerButtonLabel :: (MonadIO m, IsBanner o) => o -> Text -> m () Source #

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

set banner [ #buttonLabel := value ]

revealed

Whether the banner is currently revealed.

Since: 1.3

constructBannerRevealed :: (IsBanner o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getBannerRevealed :: (MonadIO m, IsBanner o) => o -> m Bool Source #

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

get banner #revealed

setBannerRevealed :: (MonadIO m, IsBanner o) => o -> Bool -> m () Source #

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

set banner [ #revealed := value ]

title

The title for this banner.

See also: [propertybanner:use-markup].

Since: 1.3

constructBannerTitle :: (IsBanner o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getBannerTitle :: (MonadIO m, IsBanner o) => o -> m Text Source #

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

get banner #title

setBannerTitle :: (MonadIO m, IsBanner o) => o -> Text -> m () Source #

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

set banner [ #title := value ]

useMarkup

Whether to use Pango markup for the banner title.

See also parseMarkup.

Since: 1.3

constructBannerUseMarkup :: (IsBanner o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getBannerUseMarkup :: (MonadIO m, IsBanner o) => o -> m Bool Source #

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

get banner #useMarkup

setBannerUseMarkup :: (MonadIO m, IsBanner o) => o -> Bool -> m () Source #

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

set banner [ #useMarkup := value ]

Signals

buttonClicked

type BannerButtonClickedCallback = IO () Source #

This signal is emitted after the action button has been clicked.

It can be used as an alternative to setting an action.

Since: 1.3

afterBannerButtonClicked :: (IsBanner a, MonadIO m) => a -> ((?self :: a) => BannerButtonClickedCallback) -> m SignalHandlerId Source #

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

after banner #buttonClicked 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.

onBannerButtonClicked :: (IsBanner a, MonadIO m) => a -> ((?self :: a) => BannerButtonClickedCallback) -> m SignalHandlerId Source #

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

on banner #buttonClicked callback