Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
The GtkCenterBox widget arranges three children in a horizontal or vertical arrangement, keeping the middle child centered as well as possible.
To add children to GtkCenterBox, use centerBoxSetStartWidget
,
centerBoxSetCenterWidget
and centerBoxSetEndWidget
.
The sizing and positioning of children can be influenced with the align and expand properties of the children.
GtkCenterBox as GtkBuildable
The GtkCenterBox implementation of the Buildable
interface supports
placing children in the 3 positions by specifying “start”, “center” or
“end” as the “type” attribute of a <child> element.
CSS nodes
GtkCenterBox uses a single CSS node with the name “box”,
The first child of the CenterBox
will be allocated depending on the
text direction, i.e. in left-to-right layouts it will be allocated on the
left and in right-to-left layouts on the right.
In vertical orientation, the nodes of the children are arranged from top to bottom.
Synopsis
- newtype CenterBox = CenterBox (ManagedPtr CenterBox)
- class (GObject o, IsDescendantOf CenterBox o) => IsCenterBox o
- toCenterBox :: (MonadIO m, IsCenterBox o) => o -> m CenterBox
- noCenterBox :: Maybe CenterBox
- centerBoxGetBaselinePosition :: (HasCallStack, MonadIO m, IsCenterBox a) => a -> m BaselinePosition
- centerBoxGetCenterWidget :: (HasCallStack, MonadIO m, IsCenterBox a) => a -> m (Maybe Widget)
- centerBoxGetEndWidget :: (HasCallStack, MonadIO m, IsCenterBox a) => a -> m (Maybe Widget)
- centerBoxGetStartWidget :: (HasCallStack, MonadIO m, IsCenterBox a) => a -> m (Maybe Widget)
- centerBoxNew :: (HasCallStack, MonadIO m) => m CenterBox
- centerBoxSetBaselinePosition :: (HasCallStack, MonadIO m, IsCenterBox a) => a -> BaselinePosition -> m ()
- centerBoxSetCenterWidget :: (HasCallStack, MonadIO m, IsCenterBox a, IsWidget b) => a -> Maybe b -> m ()
- centerBoxSetEndWidget :: (HasCallStack, MonadIO m, IsCenterBox a, IsWidget b) => a -> Maybe b -> m ()
- centerBoxSetStartWidget :: (HasCallStack, MonadIO m, IsCenterBox a, IsWidget b) => a -> Maybe b -> m ()
- constructCenterBoxBaselinePosition :: IsCenterBox o => BaselinePosition -> IO (GValueConstruct o)
- getCenterBoxBaselinePosition :: (MonadIO m, IsCenterBox o) => o -> m BaselinePosition
- setCenterBoxBaselinePosition :: (MonadIO m, IsCenterBox o) => o -> BaselinePosition -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq CenterBox Source # | |
IsGValue CenterBox Source # | Convert |
GObject CenterBox Source # | |
Defined in GI.Gtk.Objects.CenterBox gobjectType :: IO GType # | |
HasParentTypes CenterBox Source # | |
Defined in GI.Gtk.Objects.CenterBox | |
type ParentTypes CenterBox Source # | |
Defined in GI.Gtk.Objects.CenterBox |
class (GObject o, IsDescendantOf CenterBox o) => IsCenterBox o Source #
Type class for types which can be safely cast to CenterBox
, for instance with toCenterBox
.
Instances
(GObject o, IsDescendantOf CenterBox o) => IsCenterBox o Source # | |
Defined in GI.Gtk.Objects.CenterBox |
toCenterBox :: (MonadIO m, IsCenterBox o) => o -> m CenterBox Source #
Methods
Overloaded methods
getBaselinePosition
centerBoxGetBaselinePosition Source #
:: (HasCallStack, MonadIO m, IsCenterBox a) | |
=> a |
|
-> m BaselinePosition | Returns: the baseline position |
Gets the value set by centerBoxSetBaselinePosition
.
getCenterWidget
centerBoxGetCenterWidget Source #
:: (HasCallStack, MonadIO m, IsCenterBox a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the center widget. |
Gets the center widget, or Nothing
if there is none.
getEndWidget
centerBoxGetEndWidget Source #
:: (HasCallStack, MonadIO m, IsCenterBox a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the end widget. |
Gets the end widget, or Nothing
if there is none.
getStartWidget
centerBoxGetStartWidget Source #
:: (HasCallStack, MonadIO m, IsCenterBox a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the start widget. |
Gets the start widget, or Nothing
if there is none.
new
:: (HasCallStack, MonadIO m) | |
=> m CenterBox | Returns: the new |
Creates a new CenterBox
.
setBaselinePosition
centerBoxSetBaselinePosition Source #
:: (HasCallStack, MonadIO m, IsCenterBox a) | |
=> a |
|
-> BaselinePosition |
|
-> m () |
Sets the baseline position of a center 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.
setCenterWidget
centerBoxSetCenterWidget Source #
:: (HasCallStack, MonadIO m, IsCenterBox a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the center widget. To remove the existing center widget, pas Nothing
.
setEndWidget
centerBoxSetEndWidget Source #
:: (HasCallStack, MonadIO m, IsCenterBox a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the end widget. To remove the existing end widget, pass Nothing
.
setStartWidget
centerBoxSetStartWidget Source #
:: (HasCallStack, MonadIO m, IsCenterBox a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the start widget. To remove the existing start widget, pass Nothing
.
Properties
baselinePosition
No description available in the introspection data.
constructCenterBoxBaselinePosition :: IsCenterBox o => BaselinePosition -> IO (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
.
getCenterBoxBaselinePosition :: (MonadIO m, IsCenterBox o) => o -> m BaselinePosition Source #
Get the value of the “baseline-position
” property.
When overloading is enabled, this is equivalent to
get
centerBox #baselinePosition
setCenterBoxBaselinePosition :: (MonadIO m, IsCenterBox o) => o -> BaselinePosition -> m () Source #
Set the value of the “baseline-position
” property.
When overloading is enabled, this is equivalent to
set
centerBox [ #baselinePosition:=
value ]