gi-gtksource-3.0.25: GtkSource bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GtkSource.Objects.SpaceDrawer

Description

No description available in the introspection data.

Synopsis

Exported types

class (GObject o, IsDescendantOf SpaceDrawer o) => IsSpaceDrawer o Source #

Type class for types which can be safely cast to SpaceDrawer, for instance with toSpaceDrawer.

Instances

Instances details
(GObject o, IsDescendantOf SpaceDrawer o) => IsSpaceDrawer o Source # 
Instance details

Defined in GI.GtkSource.Objects.SpaceDrawer

toSpaceDrawer :: (MonadIO m, IsSpaceDrawer o) => o -> m SpaceDrawer Source #

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

Methods

bindMatrixSetting

spaceDrawerBindMatrixSetting Source #

Arguments

:: (HasCallStack, MonadIO m, IsSpaceDrawer a, IsSettings b) 
=> a

drawer: a SpaceDrawer object.

-> b

settings: a Settings object.

-> Text

key: the settings key to bind.

-> [SettingsBindFlags]

flags: flags for the binding.

-> m () 

Binds the SpaceDrawer:matrix property to a Settings key.

The Settings key must be of the same type as the SpaceDrawer:matrix property, that is, "au".

The settingsBind function cannot be used, because the default GIO mapping functions don't support GVariant properties (maybe it will be supported by a future GIO version, in which case this function can be deprecated).

Since: 3.24

getEnableMatrix

spaceDrawerGetEnableMatrix Source #

Arguments

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

drawer: a SpaceDrawer.

-> m Bool

Returns: whether the SpaceDrawer:matrix property is enabled.

No description available in the introspection data.

Since: 3.24

getMatrix

spaceDrawerGetMatrix Source #

Arguments

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

drawer: a SpaceDrawer.

-> m GVariant

Returns: the SpaceDrawer:matrix value as a new floating GVariant instance.

Gets the value of the SpaceDrawer:matrix property, as a GVariant. An empty array can be returned in case the matrix is a zero matrix.

The spaceDrawerGetTypesForLocations function may be more convenient to use.

Since: 3.24

getTypesForLocations

spaceDrawerGetTypesForLocations Source #

Arguments

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

drawer: a SpaceDrawer.

-> [SpaceLocationFlags]

locations: one or several SpaceLocationFlags.

-> m [SpaceTypeFlags]

Returns: a combination of SpaceTypeFlags.

If only one location is specified, this function returns what kind of white spaces are drawn at that location. The value is retrieved from the SpaceDrawer:matrix property.

If several locations are specified, this function returns the logical AND for those locations. Which means that if a certain kind of white space is present in the return value, then that kind of white space is drawn at all the specified locations.

Since: 3.24

new

spaceDrawerNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m SpaceDrawer

Returns: a new SpaceDrawer.

Creates a new SpaceDrawer object. Useful for storing space drawing settings independently of a View.

Since: 3.24

setEnableMatrix

spaceDrawerSetEnableMatrix Source #

Arguments

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

drawer: a SpaceDrawer.

-> Bool

enableMatrix: the new value.

-> m () 

Sets whether the SpaceDrawer:matrix property is enabled.

Since: 3.24

setMatrix

spaceDrawerSetMatrix Source #

Arguments

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

drawer: a SpaceDrawer.

-> Maybe GVariant

matrix: the new matrix value, or Nothing.

-> m () 

Sets a new value to the SpaceDrawer:matrix property, as a GVariant. If matrix is Nothing, then an empty array is set.

If matrix is floating, it is consumed.

The spaceDrawerSetTypesForLocations function may be more convenient to use.

Since: 3.24

setTypesForLocations

spaceDrawerSetTypesForLocations Source #

Arguments

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

drawer: a SpaceDrawer.

-> [SpaceLocationFlags]

locations: one or several SpaceLocationFlags.

-> [SpaceTypeFlags]

types: a combination of SpaceTypeFlags.

-> m () 

Modifies the SpaceDrawer:matrix property at the specified locations.

Since: 3.24

Properties

enableMatrix

Whether the SpaceDrawer:matrix property is enabled.

Since: 3.24

constructSpaceDrawerEnableMatrix :: (IsSpaceDrawer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getSpaceDrawerEnableMatrix :: (MonadIO m, IsSpaceDrawer o) => o -> m Bool Source #

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

get spaceDrawer #enableMatrix

setSpaceDrawerEnableMatrix :: (MonadIO m, IsSpaceDrawer o) => o -> Bool -> m () Source #

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

set spaceDrawer [ #enableMatrix := value ]

matrix

The :matrix property is a GVariant property to specify where and what kind of white spaces to draw.

The GVariant is of type "au", an array of unsigned integers. Each integer is a combination of SpaceTypeFlags. There is one integer for each SpaceLocationFlags, in the same order as they are defined in the enum (SpaceLocationFlagsNone and SpaceLocationFlagsAll are not taken into account).

If the array is shorter than the number of locations, then the value for the missing locations will be SpaceTypeFlagsNone.

By default, SpaceTypeFlagsAll is set for all locations.

Since: 3.24

clearSpaceDrawerMatrix :: (MonadIO m, IsSpaceDrawer o) => o -> m () Source #

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

clear #matrix

constructSpaceDrawerMatrix :: (IsSpaceDrawer o, MonadIO m) => GVariant -> m (GValueConstruct o) Source #

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

getSpaceDrawerMatrix :: (MonadIO m, IsSpaceDrawer o) => o -> m (Maybe GVariant) Source #

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

get spaceDrawer #matrix

setSpaceDrawerMatrix :: (MonadIO m, IsSpaceDrawer o) => o -> GVariant -> m () Source #

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

set spaceDrawer [ #matrix := value ]