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 |
Mark object for [classbuffer
].
A GtkSourceMark
marks a position in the text where you want to display
additional info. It is based on TextMark
and thus is still valid after
the text has changed though its position may change.
GtkSourceMark
s are organized in categories which you have to set
when you create the mark. Each category can have a priority, a pixbuf and
other associated attributes. See [methodview
.set_mark_attributes].
The pixbuf will be displayed in the margin at the line where the mark
residents if the [propertyview
:show-line-marks] property is set to True
. If
there are multiple marks in the same line, the pixbufs will be drawn on top
of each other. The mark with the highest priority will be drawn on top.
Synopsis
- newtype Mark = Mark (ManagedPtr Mark)
- class (GObject o, IsDescendantOf Mark o) => IsMark o
- toMark :: (MonadIO m, IsMark o) => o -> m Mark
- markGetCategory :: (HasCallStack, MonadIO m, IsMark a) => a -> m Text
- markNew :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> m Mark
- markNext :: (HasCallStack, MonadIO m, IsMark a) => a -> Maybe Text -> m (Maybe Mark)
- markPrev :: (HasCallStack, MonadIO m, IsMark a) => a -> Text -> m (Maybe Mark)
- constructMarkCategory :: (IsMark o, MonadIO m) => Text -> m (GValueConstruct o)
- getMarkCategory :: (MonadIO m, IsMark o) => o -> m Text
Exported types
Memory-managed wrapper type.
Instances
Eq Mark Source # | |
GObject Mark Source # | |
Defined in GI.GtkSource.Objects.Mark | |
ManagedPtrNewtype Mark Source # | |
Defined in GI.GtkSource.Objects.Mark toManagedPtr :: Mark -> ManagedPtr Mark | |
TypedObject Mark Source # | |
Defined in GI.GtkSource.Objects.Mark | |
HasParentTypes Mark Source # | |
Defined in GI.GtkSource.Objects.Mark | |
IsGValue (Maybe Mark) Source # | Convert |
Defined in GI.GtkSource.Objects.Mark gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Mark -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Mark) | |
type ParentTypes Mark Source # | |
Defined in GI.GtkSource.Objects.Mark type ParentTypes Mark = '[TextMark, Object] |
class (GObject o, IsDescendantOf Mark o) => IsMark o Source #
Instances
(GObject o, IsDescendantOf Mark o) => IsMark o Source # | |
Defined in GI.GtkSource.Objects.Mark |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, next, notify, notifyByPspec, prev, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getBuffer, getCategory, getData, getDeleted, getLeftGravity, getName, getProperty, getQdata, getVisible.
Setters
getCategory
Returns the mark category.
new
:: (HasCallStack, MonadIO m) | |
=> Maybe Text | |
-> Text |
|
-> m Mark | Returns: a new |
Creates a text mark.
Add it to a buffer using textBufferAddMark
.
If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved
by name using textBufferGetMark
.
Normally marks are created using the utility function
[methodbuffer
.create_source_mark].
next
prev
Properties
category
The category of the GtkSourceMark
, classifies the mark and controls
which pixbuf is used and with which priority it is drawn.
constructMarkCategory :: (IsMark o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “category
” property. This is rarely needed directly, but it is used by new
.
getMarkCategory :: (MonadIO m, IsMark o) => o -> m Text Source #
Get the value of the “category
” property.
When overloading is enabled, this is equivalent to
get
mark #category