gi-gtksource-5.0.1: 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.SnippetChunk

Description

A chunk of text within the source snippet.

The GtkSourceSnippetChunk represents a single chunk of text that may or may not be an edit point within the snippet. Chunks that are an edit point (also called a tab stop) have the [propertysnippetChunk:focus-position] property set.

Synopsis

Exported types

newtype SnippetChunk Source #

Memory-managed wrapper type.

Constructors

SnippetChunk (ManagedPtr SnippetChunk) 

Instances

Instances details
Eq SnippetChunk Source # 
Instance details

Defined in GI.GtkSource.Objects.SnippetChunk

GObject SnippetChunk Source # 
Instance details

Defined in GI.GtkSource.Objects.SnippetChunk

ManagedPtrNewtype SnippetChunk Source # 
Instance details

Defined in GI.GtkSource.Objects.SnippetChunk

Methods

toManagedPtr :: SnippetChunk -> ManagedPtr SnippetChunk

TypedObject SnippetChunk Source # 
Instance details

Defined in GI.GtkSource.Objects.SnippetChunk

Methods

glibType :: IO GType

HasParentTypes SnippetChunk Source # 
Instance details

Defined in GI.GtkSource.Objects.SnippetChunk

IsGValue (Maybe SnippetChunk) Source #

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

Instance details

Defined in GI.GtkSource.Objects.SnippetChunk

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes SnippetChunk Source # 
Instance details

Defined in GI.GtkSource.Objects.SnippetChunk

type ParentTypes SnippetChunk = '[Object]

class (GObject o, IsDescendantOf SnippetChunk o) => IsSnippetChunk o Source #

Type class for types which can be safely cast to SnippetChunk, for instance with toSnippetChunk.

Instances

Instances details
(GObject o, IsDescendantOf SnippetChunk o) => IsSnippetChunk o Source # 
Instance details

Defined in GI.GtkSource.Objects.SnippetChunk

toSnippetChunk :: (MonadIO m, IsSnippetChunk o) => o -> m SnippetChunk Source #

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

Methods

copy

snippetChunkCopy Source #

Arguments

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

chunk: a SnippetChunk

-> m SnippetChunk

Returns: A SnippetChunk

Copies the source snippet.

getContext

snippetChunkGetContext Source #

Arguments

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

chunk: a SnippetChunk

-> m SnippetContext

Returns: A SnippetContext

Gets the context for the snippet insertion.

getFocusPosition

snippetChunkGetFocusPosition Source #

Arguments

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

chunk: a SnippetChunk

-> m Int32

Returns: the focus-position

Gets the [propertysnippetChunk:focus-position].

The focus-position is used to determine how many tabs it takes for the snippet to advanced to this chunk.

A focus-position of zero will be the last focus position of the snippet and snippet editing ends when it has been reached.

A focus-position of -1 means the chunk cannot be focused by the user.

getSpec

snippetChunkGetSpec Source #

Arguments

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

chunk: a SnippetChunk

-> m (Maybe Text)

Returns: the specification, if any

Gets the specification for the chunk.

The specification is evaluated for variables when other chunks are edited within the snippet context. If the user has changed the text, the [propertysnippetChunk:text] and [propertysnippetChunk:text-set] properties are updated.

getText

snippetChunkGetText Source #

Arguments

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

chunk: a SnippetChunk

-> m Text

Returns: the text of the chunk

Gets the [propertysnippetChunk:text] property.

The text property is updated when the user edits the text of the chunk. If it has not been edited, the [propertysnippetChunk:spec] property is returned.

getTextSet

snippetChunkGetTextSet Source #

Arguments

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

chunk: a SnippetChunk

-> m Bool 

Gets the [propertysnippetChunk:text-set] property.

This is typically set when the user has edited a snippet chunk.

getTooltipText

snippetChunkGetTooltipText :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> m Text Source #

No description available in the introspection data.

new

snippetChunkNew :: (HasCallStack, MonadIO m) => m SnippetChunk Source #

Create a new GtkSourceSnippetChunk that can be added to a [classsnippet].

setContext

snippetChunkSetContext :: (HasCallStack, MonadIO m, IsSnippetChunk a, IsSnippetContext b) => a -> b -> m () Source #

No description available in the introspection data.

setFocusPosition

snippetChunkSetFocusPosition Source #

Arguments

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

chunk: a SnippetChunk

-> Int32

focusPosition: the focus-position

-> m () 

Sets the [propertysnippetChunk:focus-position] property.

The focus-position is used to determine how many tabs it takes for the snippet to advanced to this chunk.

A focus-position of zero will be the last focus position of the snippet and snippet editing ends when it has been reached.

A focus-position of -1 means the chunk cannot be focused by the user.

setSpec

snippetChunkSetSpec Source #

Arguments

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

chunk: a SnippetChunk

-> Text

spec: the new specification for the chunk

-> m () 

Sets the specification for the chunk.

The specification is evaluated for variables when other chunks are edited within the snippet context. If the user has changed the text, the [propertysnippetChunk:text and] [propertysnippetChunk:text-set] properties are updated.

setText

snippetChunkSetText Source #

Arguments

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

chunk: a SnippetChunk

-> Text

text: the text of the property

-> m () 

Sets the text for the snippet chunk.

This is usually used by the snippet engine to update the text, but may be useful when creating custom snippets to avoid expansion of any specification.

setTextSet

snippetChunkSetTextSet Source #

Arguments

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

chunk: a SnippetChunk

-> Bool

textSet: the property value

-> m () 

Sets the [propertysnippetChunk:text-set] property.

This is typically set when the user has edited a snippet chunk by the snippet engine.

setTooltipText

snippetChunkSetTooltipText :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> Text -> m () Source #

No description available in the introspection data.

Properties

context

No description available in the introspection data.

constructSnippetChunkContext :: (IsSnippetChunk o, MonadIO m, IsSnippetContext a) => a -> m (GValueConstruct o) Source #

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

getSnippetChunkContext :: (MonadIO m, IsSnippetChunk o) => o -> m SnippetContext Source #

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

get snippetChunk #context

setSnippetChunkContext :: (MonadIO m, IsSnippetChunk o, IsSnippetContext a) => o -> a -> m () Source #

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

set snippetChunk [ #context := value ]

focusPosition

No description available in the introspection data.

constructSnippetChunkFocusPosition :: (IsSnippetChunk o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getSnippetChunkFocusPosition :: (MonadIO m, IsSnippetChunk o) => o -> m Int32 Source #

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

get snippetChunk #focusPosition

setSnippetChunkFocusPosition :: (MonadIO m, IsSnippetChunk o) => o -> Int32 -> m () Source #

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

set snippetChunk [ #focusPosition := value ]

spec

No description available in the introspection data.

constructSnippetChunkSpec :: (IsSnippetChunk o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getSnippetChunkSpec :: (MonadIO m, IsSnippetChunk o) => o -> m (Maybe Text) Source #

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

get snippetChunk #spec

setSnippetChunkSpec :: (MonadIO m, IsSnippetChunk o) => o -> Text -> m () Source #

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

set snippetChunk [ #spec := value ]

text

No description available in the introspection data.

constructSnippetChunkText :: (IsSnippetChunk o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getSnippetChunkText :: (MonadIO m, IsSnippetChunk o) => o -> m Text Source #

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

get snippetChunk #text

setSnippetChunkText :: (MonadIO m, IsSnippetChunk o) => o -> Text -> m () Source #

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

set snippetChunk [ #text := value ]

textSet

No description available in the introspection data.

constructSnippetChunkTextSet :: (IsSnippetChunk o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getSnippetChunkTextSet :: (MonadIO m, IsSnippetChunk o) => o -> m Bool Source #

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

get snippetChunk #textSet

setSnippetChunkTextSet :: (MonadIO m, IsSnippetChunk o) => o -> Bool -> m () Source #

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

set snippetChunk [ #textSet := value ]

tooltipText

No description available in the introspection data.

constructSnippetChunkTooltipText :: (IsSnippetChunk o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getSnippetChunkTooltipText :: (MonadIO m, IsSnippetChunk o) => o -> m Text Source #

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

get snippetChunk #tooltipText

setSnippetChunkTooltipText :: (MonadIO m, IsSnippetChunk o) => o -> Text -> m () Source #

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

set snippetChunk [ #tooltipText := value ]