gi-gtk-4.0.5: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.Statusbar

Description

A GtkStatusbar widget is usually placed along the bottom of an application's main Window.

A GtkStatusBar may provide a regular commentary of the application's status (as is usually the case in a web browser, for example), or may be used to simply output a message when the status changes, (when an upload is complete in an FTP client, for example).

Status bars in GTK maintain a stack of messages. The message at the top of the each bar’s stack is the one that will currently be displayed.

Any messages added to a statusbar’s stack must specify a context id that is used to uniquely identify the source of a message. This context id can be generated by statusbarGetContextId, given a message and the statusbar that it will be added to. Note that messages are stored in a stack, and when choosing which message to display, the stack structure is adhered to, regardless of the context identifier of a message.

One could say that a statusbar maintains one stack of messages for display purposes, but allows multiple message producers to maintain sub-stacks of the messages they produced (via context ids).

Status bars are created using statusbarNew.

Messages are added to the bar’s stack with statusbarPush.

The message at the top of the stack can be removed using statusbarPop. A message can be removed from anywhere in the stack if its message id was recorded at the time it was added. This is done using statusbarRemove.

CSS node

GtkStatusbar has a single CSS node with name statusbar.

Synopsis

Exported types

newtype Statusbar Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf Statusbar o) => IsStatusbar o Source #

Type class for types which can be safely cast to Statusbar, for instance with toStatusbar.

Instances

Instances details
(GObject o, IsDescendantOf Statusbar o) => IsStatusbar o Source # 
Instance details

Defined in GI.Gtk.Objects.Statusbar

toStatusbar :: (MonadIO m, IsStatusbar o) => o -> m Statusbar Source #

Cast to Statusbar, 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, 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, pop, push, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, removeAll, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.

Getters

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

Setters

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

getContextId

statusbarGetContextId Source #

Arguments

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

statusbar: a GtkStatusbar

-> Text

contextDescription: textual description of what context the new message is being used in

-> m Word32

Returns: an integer id

Returns a new context identifier, given a description of the actual context.

Note that the description is not shown in the UI.

new

statusbarNew Source #

Arguments

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

Returns: the new GtkStatusbar

Creates a new GtkStatusbar ready for messages.

pop

statusbarPop Source #

Arguments

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

statusbar: a GtkStatusbar

-> Word32

contextId: a context identifier

-> m () 

Removes the first message in the GtkStatusbar’s stack with the given context id.

Note that this may not change the displayed message, if the message at the top of the stack has a different context id.

push

statusbarPush Source #

Arguments

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

statusbar: a GtkStatusbar

-> Word32

contextId: the message’s context id, as returned by statusbarGetContextId

-> Text

text: the message to add to the statusbar

-> m Word32

Returns: a message id that can be used with statusbarRemove.

Pushes a new message onto a statusbar’s stack.

remove

statusbarRemove Source #

Arguments

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

statusbar: a GtkStatusbar

-> Word32

contextId: a context identifier

-> Word32

messageId: a message identifier, as returned by statusbarPush

-> m () 

Forces the removal of a message from a statusbar’s stack. The exact contextId and messageId must be specified.

removeAll

statusbarRemoveAll Source #

Arguments

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

statusbar: a GtkStatusbar

-> Word32

contextId: a context identifier

-> m () 

Forces the removal of all messages from a statusbar's stack with the exact contextId.

Signals

textPopped

type StatusbarTextPoppedCallback Source #

Arguments

 = Word32

contextId: the context id of the relevant message/statusbar

-> Text

text: the message that was just popped

-> IO () 

Emitted whenever a new message is popped off a statusbar's stack.

afterStatusbarTextPopped :: (IsStatusbar a, MonadIO m) => a -> ((?self :: a) => StatusbarTextPoppedCallback) -> m SignalHandlerId Source #

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

after statusbar #textPopped 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.

onStatusbarTextPopped :: (IsStatusbar a, MonadIO m) => a -> ((?self :: a) => StatusbarTextPoppedCallback) -> m SignalHandlerId Source #

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

on statusbar #textPopped callback

textPushed

type StatusbarTextPushedCallback Source #

Arguments

 = Word32

contextId: the context id of the relevant message/statusbar

-> Text

text: the message that was pushed

-> IO () 

Emitted whenever a new message gets pushed onto a statusbar's stack.

afterStatusbarTextPushed :: (IsStatusbar a, MonadIO m) => a -> ((?self :: a) => StatusbarTextPushedCallback) -> m SignalHandlerId Source #

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

after statusbar #textPushed 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.

onStatusbarTextPushed :: (IsStatusbar a, MonadIO m) => a -> ((?self :: a) => StatusbarTextPushedCallback) -> m SignalHandlerId Source #

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

on statusbar #textPushed callback