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 |
GtkActionBar
is designed to present contextual actions.
It is expected to be displayed below the content and expand horizontally to fill the area.
It allows placing children at the start or the end. In addition, it contains an internal centered box which is centered with respect to the full width of the box, even if the children at either side take up different amounts of space.
GtkActionBar as GtkBuildable
The GtkActionBar
implementation of the GtkBuildable
interface supports
adding children at the start or end sides by specifying “start” or “end” as
the “type” attribute of a <child>
element, or setting the center widget
by specifying “center” value.
CSS nodes
actionbar ╰── revealer ╰── box ├── box.start │ ╰── [start children] ├── [center widget] ╰── box.end ╰── [end children]
A GtkActionBar
's CSS node is called actionbar
. It contains a revealer
subnode, which contains a box
subnode, which contains two box
subnodes at
the start and end of the action bar, with start
and `end style classes
respectively, as well as a center node that represents the center child.
Each of the boxes contains children packed for that side.
Synopsis
- newtype ActionBar = ActionBar (ManagedPtr ActionBar)
- class (GObject o, IsDescendantOf ActionBar o) => IsActionBar o
- toActionBar :: (MonadIO m, IsActionBar o) => o -> m ActionBar
- actionBarGetCenterWidget :: (HasCallStack, MonadIO m, IsActionBar a) => a -> m (Maybe Widget)
- actionBarGetRevealed :: (HasCallStack, MonadIO m, IsActionBar a) => a -> m Bool
- actionBarNew :: (HasCallStack, MonadIO m) => m ActionBar
- actionBarPackEnd :: (HasCallStack, MonadIO m, IsActionBar a, IsWidget b) => a -> b -> m ()
- actionBarPackStart :: (HasCallStack, MonadIO m, IsActionBar a, IsWidget b) => a -> b -> m ()
- actionBarRemove :: (HasCallStack, MonadIO m, IsActionBar a, IsWidget b) => a -> b -> m ()
- actionBarSetCenterWidget :: (HasCallStack, MonadIO m, IsActionBar a, IsWidget b) => a -> Maybe b -> m ()
- actionBarSetRevealed :: (HasCallStack, MonadIO m, IsActionBar a) => a -> Bool -> m ()
- constructActionBarRevealed :: (IsActionBar o, MonadIO m) => Bool -> m (GValueConstruct o)
- getActionBarRevealed :: (MonadIO m, IsActionBar o) => o -> m Bool
- setActionBarRevealed :: (MonadIO m, IsActionBar o) => o -> Bool -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq ActionBar Source # | |
GObject ActionBar Source # | |
Defined in GI.Gtk.Objects.ActionBar | |
ManagedPtrNewtype ActionBar Source # | |
Defined in GI.Gtk.Objects.ActionBar toManagedPtr :: ActionBar -> ManagedPtr ActionBar | |
TypedObject ActionBar Source # | |
Defined in GI.Gtk.Objects.ActionBar | |
HasParentTypes ActionBar Source # | |
Defined in GI.Gtk.Objects.ActionBar | |
IsGValue (Maybe ActionBar) Source # | Convert |
Defined in GI.Gtk.Objects.ActionBar gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ActionBar -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ActionBar) | |
type ParentTypes ActionBar Source # | |
Defined in GI.Gtk.Objects.ActionBar |
class (GObject o, IsDescendantOf ActionBar o) => IsActionBar o Source #
Type class for types which can be safely cast to ActionBar
, for instance with toActionBar
.
Instances
(GObject o, IsDescendantOf ActionBar o) => IsActionBar o Source # | |
Defined in GI.Gtk.Objects.ActionBar |
toActionBar :: (MonadIO m, IsActionBar o) => o -> m ActionBar Source #
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, 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, packEnd, packStart, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, 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, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getCenterWidget, 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, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAccessibleParent, setCanFocus, setCanTarget, setCenterWidget, 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, setRevealed, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
getCenterWidget
actionBarGetCenterWidget Source #
:: (HasCallStack, MonadIO m, IsActionBar a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the center |
Retrieves the center bar widget of the bar.
getRevealed
:: (HasCallStack, MonadIO m, IsActionBar a) | |
=> a |
|
-> m Bool | Returns: the current value of the ActionBar:revealed property |
Gets whether the contents of the action bar are revealed.
new
:: (HasCallStack, MonadIO m) | |
=> m ActionBar | Returns: a new |
Creates a new GtkActionBar
widget.
packEnd
:: (HasCallStack, MonadIO m, IsActionBar a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds child
to actionBar
, packed with reference to the
end of the actionBar
.
packStart
:: (HasCallStack, MonadIO m, IsActionBar a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds child
to actionBar
, packed with reference to the
start of the actionBar
.
remove
:: (HasCallStack, MonadIO m, IsActionBar a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Removes a child from actionBar
.
setCenterWidget
actionBarSetCenterWidget Source #
:: (HasCallStack, MonadIO m, IsActionBar a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the center widget for the GtkActionBar
.
setRevealed
:: (HasCallStack, MonadIO m, IsActionBar a) | |
=> a |
|
-> Bool |
|
-> m () |
Reveals or conceals the content of the action bar.
Note: this does not show or hide actionBar
in the
Widget:visible sense, so revealing has
no effect if the action bar is hidden.
Properties
revealed
Controls whether the action bar shows its contents.
constructActionBarRevealed :: (IsActionBar 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
.
getActionBarRevealed :: (MonadIO m, IsActionBar o) => o -> m Bool Source #
Get the value of the “revealed
” property.
When overloading is enabled, this is equivalent to
get
actionBar #revealed
setActionBarRevealed :: (MonadIO m, IsActionBar o) => o -> Bool -> m () Source #
Set the value of the “revealed
” property.
When overloading is enabled, this is equivalent to
set
actionBar [ #revealed:=
value ]