gi-gtk-3.0.32: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Misc

Description

The Misc widget is an abstract widget which is not useful itself, but is used to derive subclasses which have alignment and padding attributes.

The horizontal and vertical padding attributes allows extra space to be added around the widget.

The horizontal and vertical alignment attributes enable the widget to be positioned within its allocated area. Note that if the widget is added to a container in such a way that it expands automatically to fill its allocated area, the alignment settings will not alter the widget's position.

Note that the desired effect can in most cases be achieved by using the Widget:halign, Widget:valign and Widget:margin properties on the child widget, so GtkMisc should not be used in new code. To reflect this fact, all Misc API has been deprecated.

Synopsis

Exported types

newtype Misc Source #

Memory-managed wrapper type.

Constructors

Misc (ManagedPtr Misc) 

Instances

Instances details
Eq Misc Source # 
Instance details

Defined in GI.Gtk.Objects.Misc

Methods

(==) :: Misc -> Misc -> Bool #

(/=) :: Misc -> Misc -> Bool #

IsGValue Misc Source #

Convert Misc to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Misc

GObject Misc Source # 
Instance details

Defined in GI.Gtk.Objects.Misc

Methods

gobjectType :: IO GType #

HasParentTypes Misc Source # 
Instance details

Defined in GI.Gtk.Objects.Misc

type ParentTypes Misc Source # 
Instance details

Defined in GI.Gtk.Objects.Misc

class (GObject o, IsDescendantOf Misc o) => IsMisc o Source #

Type class for types which can be safely cast to Misc, for instance with toMisc.

Instances

Instances details
(GObject o, IsDescendantOf Misc o) => IsMisc o Source # 
Instance details

Defined in GI.Gtk.Objects.Misc

toMisc :: (MonadIO m, IsMisc o) => o -> m Misc Source #

Cast to Misc, for types for which this is known to be safe. For general casts, use castTo.

noMisc :: Maybe Misc Source #

A convenience alias for Nothing :: Maybe Misc.

Methods

Overloaded methods

getAlignment

miscGetAlignment Source #

Arguments

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

misc: a Misc

-> m (Float, Float) 

Deprecated: (Since version 3.14)Use Widget alignment and margin properties.

Gets the X and Y alignment of the widget within its allocation. See miscSetAlignment.

getPadding

miscGetPadding Source #

Arguments

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

misc: a Misc

-> m (Int32, Int32) 

Deprecated: (Since version 3.14)Use Widget alignment and margin properties.

Gets the padding in the X and Y directions of the widget. See miscSetPadding.

setAlignment

miscSetAlignment Source #

Arguments

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

misc: a Misc.

-> Float

xalign: the horizontal alignment, from 0 (left) to 1 (right).

-> Float

yalign: the vertical alignment, from 0 (top) to 1 (bottom).

-> m () 

Deprecated: (Since version 3.14)Use Widget's alignment (tWidget:halign and Widget:valign) and margin properties or Label's Label:xalign and Label:yalign properties.

Sets the alignment of the widget.

setPadding

miscSetPadding Source #

Arguments

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

misc: a Misc.

-> Int32

xpad: the amount of space to add on the left and right of the widget, in pixels.

-> Int32

ypad: the amount of space to add on the top and bottom of the widget, in pixels.

-> m () 

Deprecated: (Since version 3.14)Use Widget alignment and margin properties.

Sets the amount of space to add around the widget.

Properties

xalign

The horizontal alignment. A value of 0.0 means left alignment (or right on RTL locales); a value of 1.0 means right alignment (or left on RTL locales).

constructMiscXalign :: IsMisc o => Float -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “xalign” property. This is rarely needed directly, but it is used by new.

getMiscXalign :: (MonadIO m, IsMisc o) => o -> m Float Source #

Get the value of the “xalign” property. When overloading is enabled, this is equivalent to

get misc #xalign

setMiscXalign :: (MonadIO m, IsMisc o) => o -> Float -> m () Source #

Set the value of the “xalign” property. When overloading is enabled, this is equivalent to

set misc [ #xalign := value ]

xpad

The amount of space to add on the left and right of the widget, in pixels.

constructMiscXpad :: IsMisc o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “xpad” property. This is rarely needed directly, but it is used by new.

getMiscXpad :: (MonadIO m, IsMisc o) => o -> m Int32 Source #

Get the value of the “xpad” property. When overloading is enabled, this is equivalent to

get misc #xpad

setMiscXpad :: (MonadIO m, IsMisc o) => o -> Int32 -> m () Source #

Set the value of the “xpad” property. When overloading is enabled, this is equivalent to

set misc [ #xpad := value ]

yalign

The vertical alignment. A value of 0.0 means top alignment; a value of 1.0 means bottom alignment.

constructMiscYalign :: IsMisc o => Float -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “yalign” property. This is rarely needed directly, but it is used by new.

getMiscYalign :: (MonadIO m, IsMisc o) => o -> m Float Source #

Get the value of the “yalign” property. When overloading is enabled, this is equivalent to

get misc #yalign

setMiscYalign :: (MonadIO m, IsMisc o) => o -> Float -> m () Source #

Set the value of the “yalign” property. When overloading is enabled, this is equivalent to

set misc [ #yalign := value ]

ypad

The amount of space to add on the top and bottom of the widget, in pixels.

constructMiscYpad :: IsMisc o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “ypad” property. This is rarely needed directly, but it is used by new.

getMiscYpad :: (MonadIO m, IsMisc o) => o -> m Int32 Source #

Get the value of the “ypad” property. When overloading is enabled, this is equivalent to

get misc #ypad

setMiscYpad :: (MonadIO m, IsMisc o) => o -> Int32 -> m () Source #

Set the value of the “ypad” property. When overloading is enabled, this is equivalent to

set misc [ #ypad := value ]