gi-gtksource-5.0.0: 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.Tag

Description

A tag that can be applied to text in a [classbuffer].

GtkSourceTag is a subclass of TextTag that adds properties useful for the GtkSourceView library.

If, for a certain tag, TextTag is sufficient, it's better that you create a TextTag, not a [classtag].

Synopsis

Exported types

newtype Tag Source #

Memory-managed wrapper type.

Constructors

Tag (ManagedPtr Tag) 

Instances

Instances details
Eq Tag Source # 
Instance details

Defined in GI.GtkSource.Objects.Tag

Methods

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

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

GObject Tag Source # 
Instance details

Defined in GI.GtkSource.Objects.Tag

ManagedPtrNewtype Tag Source # 
Instance details

Defined in GI.GtkSource.Objects.Tag

Methods

toManagedPtr :: Tag -> ManagedPtr Tag

TypedObject Tag Source # 
Instance details

Defined in GI.GtkSource.Objects.Tag

Methods

glibType :: IO GType

HasParentTypes Tag Source # 
Instance details

Defined in GI.GtkSource.Objects.Tag

IsGValue (Maybe Tag) Source #

Convert Tag to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.GtkSource.Objects.Tag

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Tag -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Tag)

type ParentTypes Tag Source # 
Instance details

Defined in GI.GtkSource.Objects.Tag

type ParentTypes Tag = '[TextTag, Object]

class (GObject o, IsDescendantOf Tag o) => IsTag o Source #

Type class for types which can be safely cast to Tag, for instance with toTag.

Instances

Instances details
(GObject o, IsDescendantOf Tag o) => IsTag o Source # 
Instance details

Defined in GI.GtkSource.Objects.Tag

toTag :: (MonadIO m, IsTag o) => o -> m Tag Source #

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

Methods

new

tagNew Source #

Arguments

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

name: tag name, or Nothing.

-> m Tag

Returns: a new GtkSourceTag.

Creates a GtkSourceTag.

Configure the tag using object arguments, i.e. using Object.set().

For usual cases, [methodbuffer.create_source_tag] is more convenient to use.

Properties

drawSpaces

Whether to draw white spaces.

This property takes precedence over the value defined by the [classspaceDrawer]'s [propertyspaceDrawer:matrix] property (only where the tag is applied).

Setting this property also changes [propertytag:draw-spaces-set] to True.

constructTagDrawSpaces :: (IsTag o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getTagDrawSpaces :: (MonadIO m, IsTag o) => o -> m Bool Source #

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

get tag #drawSpaces

setTagDrawSpaces :: (MonadIO m, IsTag o) => o -> Bool -> m () Source #

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

set tag [ #drawSpaces := value ]

drawSpacesSet

Whether the [propertytag:draw-spaces] property is set and must be taken into account.

constructTagDrawSpacesSet :: (IsTag o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getTagDrawSpacesSet :: (MonadIO m, IsTag o) => o -> m Bool Source #

Get the value of the “draw-spaces-set” property. When overloading is enabled, this is equivalent to

get tag #drawSpacesSet

setTagDrawSpacesSet :: (MonadIO m, IsTag o) => o -> Bool -> m () Source #

Set the value of the “draw-spaces-set” property. When overloading is enabled, this is equivalent to

set tag [ #drawSpacesSet := value ]