Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- newtype SnippetChunk = SnippetChunk (ManagedPtr SnippetChunk)
- class (GObject o, IsDescendantOf SnippetChunk o) => IsSnippetChunk o
- toSnippetChunk :: (MonadIO m, IsSnippetChunk o) => o -> m SnippetChunk
- snippetChunkCopy :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> m SnippetChunk
- snippetChunkGetContext :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> m SnippetContext
- snippetChunkGetFocusPosition :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> m Int32
- snippetChunkGetSpec :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> m (Maybe Text)
- snippetChunkGetText :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> m Text
- snippetChunkGetTextSet :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> m Bool
- snippetChunkGetTooltipText :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> m Text
- snippetChunkNew :: (HasCallStack, MonadIO m) => m SnippetChunk
- snippetChunkSetContext :: (HasCallStack, MonadIO m, IsSnippetChunk a, IsSnippetContext b) => a -> b -> m ()
- snippetChunkSetFocusPosition :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> Int32 -> m ()
- snippetChunkSetSpec :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> Text -> m ()
- snippetChunkSetText :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> Text -> m ()
- snippetChunkSetTextSet :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> Bool -> m ()
- snippetChunkSetTooltipText :: (HasCallStack, MonadIO m, IsSnippetChunk a) => a -> Text -> m ()
- constructSnippetChunkContext :: (IsSnippetChunk o, MonadIO m, IsSnippetContext a) => a -> m (GValueConstruct o)
- getSnippetChunkContext :: (MonadIO m, IsSnippetChunk o) => o -> m SnippetContext
- setSnippetChunkContext :: (MonadIO m, IsSnippetChunk o, IsSnippetContext a) => o -> a -> m ()
- constructSnippetChunkFocusPosition :: (IsSnippetChunk o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getSnippetChunkFocusPosition :: (MonadIO m, IsSnippetChunk o) => o -> m Int32
- setSnippetChunkFocusPosition :: (MonadIO m, IsSnippetChunk o) => o -> Int32 -> m ()
- constructSnippetChunkSpec :: (IsSnippetChunk o, MonadIO m) => Text -> m (GValueConstruct o)
- getSnippetChunkSpec :: (MonadIO m, IsSnippetChunk o) => o -> m (Maybe Text)
- setSnippetChunkSpec :: (MonadIO m, IsSnippetChunk o) => o -> Text -> m ()
- constructSnippetChunkText :: (IsSnippetChunk o, MonadIO m) => Text -> m (GValueConstruct o)
- getSnippetChunkText :: (MonadIO m, IsSnippetChunk o) => o -> m Text
- setSnippetChunkText :: (MonadIO m, IsSnippetChunk o) => o -> Text -> m ()
- constructSnippetChunkTextSet :: (IsSnippetChunk o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSnippetChunkTextSet :: (MonadIO m, IsSnippetChunk o) => o -> m Bool
- setSnippetChunkTextSet :: (MonadIO m, IsSnippetChunk o) => o -> Bool -> m ()
- constructSnippetChunkTooltipText :: (IsSnippetChunk o, MonadIO m) => Text -> m (GValueConstruct o)
- getSnippetChunkTooltipText :: (MonadIO m, IsSnippetChunk o) => o -> m Text
- setSnippetChunkTooltipText :: (MonadIO m, IsSnippetChunk o) => o -> Text -> m ()
Exported types
newtype SnippetChunk Source #
Memory-managed wrapper type.
SnippetChunk (ManagedPtr SnippetChunk) |
Instances
Eq SnippetChunk Source # | |
Defined in GI.GtkSource.Objects.SnippetChunk (==) :: SnippetChunk -> SnippetChunk -> Bool # (/=) :: SnippetChunk -> SnippetChunk -> Bool # | |
GObject SnippetChunk Source # | |
Defined in GI.GtkSource.Objects.SnippetChunk | |
ManagedPtrNewtype SnippetChunk Source # | |
Defined in GI.GtkSource.Objects.SnippetChunk toManagedPtr :: SnippetChunk -> ManagedPtr SnippetChunk | |
TypedObject SnippetChunk Source # | |
Defined in GI.GtkSource.Objects.SnippetChunk | |
HasParentTypes SnippetChunk Source # | |
Defined in GI.GtkSource.Objects.SnippetChunk | |
IsGValue (Maybe SnippetChunk) Source # | Convert |
Defined in GI.GtkSource.Objects.SnippetChunk gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe SnippetChunk -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe SnippetChunk) | |
type ParentTypes SnippetChunk Source # | |
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
(GObject o, IsDescendantOf SnippetChunk o) => IsSnippetChunk o Source # | |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, copy, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getContext, getData, getFocusPosition, getProperty, getQdata, getSpec, getText, getTextSet, getTooltipText.
Setters
setContext, setData, setDataFull, setFocusPosition, setProperty, setSpec, setText, setTextSet, setTooltipText.
copy
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> m SnippetChunk | Returns: A |
Copies the source snippet.
getContext
snippetChunkGetContext Source #
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> m SnippetContext | Returns: A |
Gets the context for the snippet insertion.
getFocusPosition
snippetChunkGetFocusPosition Source #
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> Int32 |
|
-> 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
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> Text |
|
-> 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
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> Text |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsSnippetChunk a) | |
=> a |
|
-> Bool |
|
-> 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 ]