Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The GtkBox widget arranges child widgets into a single row or column,
depending upon the value of its Orientable
:orientation
property. Within
the other dimension, all children are allocated the same size. Of course,
the Widget
:halign
and Widget
:valign
properties can be used on
the children to influence their allocation.
Use repeated calls to boxAppend
to pack widgets into a GtkBox
from start to end. Use boxRemove
to remove widgets from the GtkBox.
boxInsertChildAfter
can be used to add a child at a particular position.
Use boxSetHomogeneous
to specify whether or not all children
of the GtkBox are forced to get the same amount of space.
Use boxSetSpacing
to determine how much space will be
minimally placed between all children in the GtkBox. Note that
spacing is added between the children.
Use boxReorderChildAfter
to move a child to a different
place in the box.
CSS nodes
GtkBox uses a single CSS node with name box.
Accessibility
GtkBox uses the AccessibleRoleGroup
role.
Synopsis
- newtype Box = Box (ManagedPtr Box)
- class (GObject o, IsDescendantOf Box o) => IsBox o
- toBox :: (MonadIO m, IsBox o) => o -> m Box
- boxAppend :: (HasCallStack, MonadIO m, IsBox a, IsWidget b) => a -> b -> m ()
- boxGetBaselinePosition :: (HasCallStack, MonadIO m, IsBox a) => a -> m BaselinePosition
- boxGetHomogeneous :: (HasCallStack, MonadIO m, IsBox a) => a -> m Bool
- boxGetSpacing :: (HasCallStack, MonadIO m, IsBox a) => a -> m Int32
- boxInsertChildAfter :: (HasCallStack, MonadIO m, IsBox a, IsWidget b, IsWidget c) => a -> b -> Maybe c -> m ()
- boxNew :: (HasCallStack, MonadIO m) => Orientation -> Int32 -> m Box
- boxPrepend :: (HasCallStack, MonadIO m, IsBox a, IsWidget b) => a -> b -> m ()
- boxRemove :: (HasCallStack, MonadIO m, IsBox a, IsWidget b) => a -> b -> m ()
- boxReorderChildAfter :: (HasCallStack, MonadIO m, IsBox a, IsWidget b, IsWidget c) => a -> b -> Maybe c -> m ()
- boxSetBaselinePosition :: (HasCallStack, MonadIO m, IsBox a) => a -> BaselinePosition -> m ()
- boxSetHomogeneous :: (HasCallStack, MonadIO m, IsBox a) => a -> Bool -> m ()
- boxSetSpacing :: (HasCallStack, MonadIO m, IsBox a) => a -> Int32 -> m ()
- constructBoxBaselinePosition :: (IsBox o, MonadIO m) => BaselinePosition -> m (GValueConstruct o)
- getBoxBaselinePosition :: (MonadIO m, IsBox o) => o -> m BaselinePosition
- setBoxBaselinePosition :: (MonadIO m, IsBox o) => o -> BaselinePosition -> m ()
- constructBoxHomogeneous :: (IsBox o, MonadIO m) => Bool -> m (GValueConstruct o)
- getBoxHomogeneous :: (MonadIO m, IsBox o) => o -> m Bool
- setBoxHomogeneous :: (MonadIO m, IsBox o) => o -> Bool -> m ()
- constructBoxSpacing :: (IsBox o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getBoxSpacing :: (MonadIO m, IsBox o) => o -> m Int32
- setBoxSpacing :: (MonadIO m, IsBox o) => o -> Int32 -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Box Source # | |
GObject Box Source # | |
Defined in GI.Gtk.Objects.Box | |
ManagedPtrNewtype Box Source # | |
Defined in GI.Gtk.Objects.Box toManagedPtr :: Box -> ManagedPtr Box | |
TypedObject Box Source # | |
Defined in GI.Gtk.Objects.Box | |
HasParentTypes Box Source # | |
Defined in GI.Gtk.Objects.Box | |
IsGValue (Maybe Box) Source # | Convert |
Defined in GI.Gtk.Objects.Box gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Box -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Box) | |
type ParentTypes Box Source # | |
Defined in GI.Gtk.Objects.Box |
class (GObject o, IsDescendantOf Box o) => IsBox o Source #
Instances
(GObject o, IsDescendantOf Box o) => IsBox o Source # | |
Defined in GI.Gtk.Objects.Box |
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, append, 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, insertChildAfter, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, prepend, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, reorderChildAfter, 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, getBaselinePosition, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHomogeneous, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOrientation, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getSpacing, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setBaselinePosition, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setHomogeneous, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOrientation, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setSpacing, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
append
:: (HasCallStack, MonadIO m, IsBox a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds child
as the last child to box
.
getBaselinePosition
boxGetBaselinePosition Source #
:: (HasCallStack, MonadIO m, IsBox a) | |
=> a |
|
-> m BaselinePosition | Returns: the baseline position |
Gets the value set by boxSetBaselinePosition
.
getHomogeneous
:: (HasCallStack, MonadIO m, IsBox a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the box is homogeneous (all children are the
same size). See boxSetHomogeneous
.
getSpacing
:: (HasCallStack, MonadIO m, IsBox a) | |
=> a |
|
-> m Int32 | Returns: spacing between children |
Gets the value set by boxSetSpacing
.
insertChildAfter
:: (HasCallStack, MonadIO m, IsBox a, IsWidget b, IsWidget c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m () |
Inserts child
in the position after sibling
in the list
of box
children. If sibling
is Nothing
, insert child
at
the first position.
new
:: (HasCallStack, MonadIO m) | |
=> Orientation |
|
-> Int32 |
|
-> m Box | Returns: a new |
Creates a new Box
.
prepend
:: (HasCallStack, MonadIO m, IsBox a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds child
as the first child to box
.
remove
:: (HasCallStack, MonadIO m, IsBox a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Removes a child widget from box
, after it has been
added with boxAppend
, boxPrepend
, or
boxInsertChildAfter
.
reorderChildAfter
:: (HasCallStack, MonadIO m, IsBox a, IsWidget b, IsWidget c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m () |
Moves child
to the position after sibling
in the list
of box
children. If sibling
is Nothing
, move child
to
the first position.
setBaselinePosition
boxSetBaselinePosition Source #
:: (HasCallStack, MonadIO m, IsBox a) | |
=> a |
|
-> BaselinePosition |
|
-> m () |
Sets the baseline position of a box. This affects
only horizontal boxes with at least one baseline aligned
child. If there is more vertical space available than requested,
and the baseline is not allocated by the parent then
position
is used to allocate the baseline wrt the
extra space available.
setHomogeneous
:: (HasCallStack, MonadIO m, IsBox a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the Box
:homogeneous
property of box
, controlling
whether or not all children of box
are given equal space
in the box.
setSpacing
:: (HasCallStack, MonadIO m, IsBox a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the Box
:spacing
property of box
, which is the
number of pixels to place between children of box
.
Properties
baselinePosition
No description available in the introspection data.
constructBoxBaselinePosition :: (IsBox o, MonadIO m) => BaselinePosition -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “baseline-position
” property. This is rarely needed directly, but it is used by new
.
getBoxBaselinePosition :: (MonadIO m, IsBox o) => o -> m BaselinePosition Source #
Get the value of the “baseline-position
” property.
When overloading is enabled, this is equivalent to
get
box #baselinePosition
setBoxBaselinePosition :: (MonadIO m, IsBox o) => o -> BaselinePosition -> m () Source #
Set the value of the “baseline-position
” property.
When overloading is enabled, this is equivalent to
set
box [ #baselinePosition:=
value ]
homogeneous
No description available in the introspection data.
constructBoxHomogeneous :: (IsBox o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “homogeneous
” property. This is rarely needed directly, but it is used by new
.
getBoxHomogeneous :: (MonadIO m, IsBox o) => o -> m Bool Source #
Get the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
get
box #homogeneous
setBoxHomogeneous :: (MonadIO m, IsBox o) => o -> Bool -> m () Source #
Set the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
set
box [ #homogeneous:=
value ]
spacing
No description available in the introspection data.
constructBoxSpacing :: (IsBox o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “spacing
” property. This is rarely needed directly, but it is used by new
.
getBoxSpacing :: (MonadIO m, IsBox o) => o -> m Int32 Source #
Get the value of the “spacing
” property.
When overloading is enabled, this is equivalent to
get
box #spacing
setBoxSpacing :: (MonadIO m, IsBox o) => o -> Int32 -> m () Source #
Set the value of the “spacing
” property.
When overloading is enabled, this is equivalent to
set
box [ #spacing:=
value ]