gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Frame

Contents

Description

The frame widget is a bin that surrounds its child with a decorative frame and an optional label. If present, the label is drawn in a gap in the top side of the frame. The position of the label can be controlled with frameSetLabelAlign.

GtkFrame as GtkBuildable

The GtkFrame implementation of the GtkBuildable interface supports placing a child in the label position by specifying “label” as the “type” attribute of a <child> element. A normal content child can be specified without specifying a <child> type attribute.

An example of a UI definition fragment with GtkFrame: > >class="GtkFrame" > type="label" > class="GtkLabel" id="frame-label"/ > /child > child > class="GtkEntry" id="frame-content"/ > /child >/object

CSS nodes

plain code

frame
├── border
├── <label widget>
╰── <child>

GtkFrame has a main CSS node with name frame and a subnode with name border. The border node is used to render the visible border. The style class .flat can appear with the main node.

Synopsis

Exported types

newtype Frame Source #

Constructors

Frame (ManagedPtr Frame) 

Methods

getLabel

data FrameGetLabelMethodInfo Source #

Instances

((~) * signature (m (Maybe Text)), MonadIO m, IsFrame a) => MethodInfo * FrameGetLabelMethodInfo a signature Source # 

frameGetLabel Source #

Arguments

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

frame: a Frame

-> m (Maybe Text)

Returns: the text in the label, or Nothing if there was no label widget or the lable widget was not a Label. This string is owned by GTK+ and must not be modified or freed.

If the frame’s label widget is a Label, returns the text in the label widget. (The frame will have a Label for the label widget if a non-Nothing argument was passed to frameNew.)

getLabelAlign

frameGetLabelAlign Source #

Arguments

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

frame: a Frame

-> m (Float, Float) 

Retrieves the X and Y alignment of the frame’s label. See frameSetLabelAlign.

getLabelWidget

frameGetLabelWidget Source #

Arguments

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

frame: a Frame

-> m (Maybe Widget)

Returns: the label widget, or Nothing if there is none.

Retrieves the label widget for the frame. See frameSetLabelWidget.

getShadowType

frameGetShadowType Source #

Arguments

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

frame: a Frame

-> m ShadowType

Returns: the current shadow type of the frame.

Retrieves the shadow type of the frame. See frameSetShadowType.

new

frameNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

label: the text to use as the label of the frame

-> m Frame

Returns: a new Frame widget

Creates a new Frame, with optional label label. If label is Nothing, the label is omitted.

setLabel

data FrameSetLabelMethodInfo Source #

Instances

((~) * signature (Maybe Text -> m ()), MonadIO m, IsFrame a) => MethodInfo * FrameSetLabelMethodInfo a signature Source # 

frameSetLabel Source #

Arguments

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

frame: a Frame

-> Maybe Text

label: the text to use as the label of the frame

-> m () 

Sets the text of the label. If label is Nothing, the current label is removed.

setLabelAlign

data FrameSetLabelAlignMethodInfo Source #

Instances

((~) * signature (Float -> Float -> m ()), MonadIO m, IsFrame a) => MethodInfo * FrameSetLabelAlignMethodInfo a signature Source # 

frameSetLabelAlign Source #

Arguments

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

frame: a Frame

-> Float

xalign: The position of the label along the top edge of the widget. A value of 0.0 represents left alignment; 1.0 represents right alignment.

-> Float

yalign: The y alignment of the label. A value of 0.0 aligns under the frame; 1.0 aligns above the frame. If the values are exactly 0.0 or 1.0 the gap in the frame won’t be painted because the label will be completely above or below the frame.

-> m () 

Sets the alignment of the frame widget’s label. The default values for a newly created frame are 0.0 and 0.5.

setLabelWidget

data FrameSetLabelWidgetMethodInfo Source #

Instances

((~) * signature (Maybe b -> m ()), MonadIO m, IsFrame a, IsWidget b) => MethodInfo * FrameSetLabelWidgetMethodInfo a signature Source # 

frameSetLabelWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsFrame a, IsWidget b) 
=> a

frame: a Frame

-> Maybe b

labelWidget: the new label widget

-> m () 

Sets the label widget for the frame. This is the widget that will appear embedded in the top edge of the frame as a title.

setShadowType

frameSetShadowType Source #

Arguments

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

frame: a Frame

-> ShadowType

type: the new ShadowType

-> m () 

Sets the shadow type for frame.

Properties

label

data FrameLabelPropertyInfo Source #

Instances

AttrInfo FrameLabelPropertyInfo Source # 
type AttrOrigin FrameLabelPropertyInfo Source # 
type AttrLabel FrameLabelPropertyInfo Source # 
type AttrGetType FrameLabelPropertyInfo Source # 
type AttrBaseTypeConstraint FrameLabelPropertyInfo Source # 
type AttrSetTypeConstraint FrameLabelPropertyInfo Source # 
type AttrAllowedOps FrameLabelPropertyInfo Source # 

clearFrameLabel :: (MonadIO m, IsFrame o) => o -> m () Source #

setFrameLabel :: (MonadIO m, IsFrame o) => o -> Text -> m () Source #

labelWidget

data FrameLabelWidgetPropertyInfo Source #

Instances

AttrInfo FrameLabelWidgetPropertyInfo Source # 
type AttrOrigin FrameLabelWidgetPropertyInfo Source # 
type AttrLabel FrameLabelWidgetPropertyInfo Source # 
type AttrGetType FrameLabelWidgetPropertyInfo Source # 
type AttrBaseTypeConstraint FrameLabelWidgetPropertyInfo Source # 
type AttrSetTypeConstraint FrameLabelWidgetPropertyInfo Source # 
type AttrAllowedOps FrameLabelWidgetPropertyInfo Source # 

setFrameLabelWidget :: (MonadIO m, IsFrame o, IsWidget a) => o -> a -> m () Source #

labelXalign

data FrameLabelXalignPropertyInfo Source #

Instances

AttrInfo FrameLabelXalignPropertyInfo Source # 
type AttrOrigin FrameLabelXalignPropertyInfo Source # 
type AttrLabel FrameLabelXalignPropertyInfo Source # 
type AttrGetType FrameLabelXalignPropertyInfo Source # 
type AttrBaseTypeConstraint FrameLabelXalignPropertyInfo Source # 
type AttrSetTypeConstraint FrameLabelXalignPropertyInfo Source # 
type AttrAllowedOps FrameLabelXalignPropertyInfo Source # 

setFrameLabelXalign :: (MonadIO m, IsFrame o) => o -> Float -> m () Source #

labelYalign

data FrameLabelYalignPropertyInfo Source #

Instances

AttrInfo FrameLabelYalignPropertyInfo Source # 
type AttrOrigin FrameLabelYalignPropertyInfo Source # 
type AttrLabel FrameLabelYalignPropertyInfo Source # 
type AttrGetType FrameLabelYalignPropertyInfo Source # 
type AttrBaseTypeConstraint FrameLabelYalignPropertyInfo Source # 
type AttrSetTypeConstraint FrameLabelYalignPropertyInfo Source # 
type AttrAllowedOps FrameLabelYalignPropertyInfo Source # 

setFrameLabelYalign :: (MonadIO m, IsFrame o) => o -> Float -> m () Source #

shadowType

data FrameShadowTypePropertyInfo Source #

Instances

AttrInfo FrameShadowTypePropertyInfo Source # 
type AttrOrigin FrameShadowTypePropertyInfo Source # 
type AttrLabel FrameShadowTypePropertyInfo Source # 
type AttrGetType FrameShadowTypePropertyInfo Source # 
type AttrBaseTypeConstraint FrameShadowTypePropertyInfo Source # 
type AttrSetTypeConstraint FrameShadowTypePropertyInfo Source # 
type AttrAllowedOps FrameShadowTypePropertyInfo Source #