gtksourceview2-0.13.1.1: Binding to the GtkSourceView library.

Maintainergtk2hs-users@lists.sourceforge.net
Stabilityprovisional
Portabilityportable (depends on GHC)
Safe HaskellNone
LanguageHaskell98

Graphics.UI.Gtk.SourceView.SourceMark

Contents

Description

 

Synopsis

Description

A SourceMark 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.

SourceMarks are organised in categories which you have to set when you create the mark. Each category can have a pixbuf and a priority associated using gtkSourceViewSetMarkCategoryPixbuf and gtkSourceViewSetMarkCategoryPriority. The pixbuf will be displayed in the margin at the line where the mark residents if the showLineMarks 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.

Types

Methods

sourceMarkNew Source

Arguments

:: GlibString string 
=> Maybe string

name Name of the SourceMark, can be Nothing when not using a name

-> string

category is used to classify marks according to common characteristics (e.g. all the marks representing a bookmark could

-> IO SourceMark 

Creates a text mark. Add it to a buffer using textBufferAddMark. If name is Nothing, the mark is anonymous; otherwise, the mark can be retrieved by name using textBufferGetMark. Normally marks are created using the utility function sourceBufferCreateMark.

sourceMarkGetCategory Source

Arguments

:: (SourceMarkClass mark, GlibString string) 
=> mark 
-> IO string

returns the category of the SourceMark

Returns the mark category

sourceMarkNext Source

Arguments

:: (SourceMarkClass mark, GlibString string) 
=> mark 
-> Maybe string

category a string specifying the mark category or Nothing

-> IO (Maybe SourceMark)

returns the next SourceMark or Nothing

Returns the next SourceMark in the buffer or Nothing if the mark was not added to a buffer. If there is no next mark, Nothing will be returned.

If category is Nothing, looks for marks of any category

sourceMarkPrev Source

Arguments

:: (SourceMarkClass mark, GlibString string) 
=> mark 
-> Maybe string

category a string specifying the mark category or Nothing

-> IO (Maybe SourceMark)

returns the previous SourceMark or Nothing

Returns the previous SourceMark in the buffer or Nothing if the mark was not added to a buffer. If there is no previous mark, Nothing is returned.

If category is Nothing, looks for marks of any category

Attributes

sourceMarkCategory :: (SourceMarkClass mark, GlibString string) => Attr mark string Source

The category of the SourceMark, classifies the mark and controls which pixbuf is used and with which priority it is drawn. Default value: ""