gtksourceview2-0.12.1: Binding to the GtkSourceView library.Source codeContentsIndex
Graphics.UI.Gtk.SourceView.SourceMark
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Description
Types
Methods
Attributes
Description
Synopsis
data SourceMark
class TextMarkClass o => SourceMarkClass o
castToSourceMark :: GObjectClass obj => obj -> SourceMark
sourceMarkNew :: Maybe String -> String -> IO SourceMark
sourceMarkGetCategory :: SourceMarkClass mark => mark -> IO String
sourceMarkNext :: SourceMarkClass mark => mark -> Maybe String -> IO (Maybe SourceMark)
sourceMarkPrev :: SourceMarkClass mark => mark -> Maybe String -> IO (Maybe SourceMark)
sourceMarkCategory :: SourceMarkClass mark => Attr mark String
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
data SourceMark Source
show/hide Instances
class TextMarkClass o => SourceMarkClass o Source
show/hide Instances
Methods
castToSourceMark :: GObjectClass obj => obj -> SourceMarkSource
sourceMarkNewSource
:: Maybe Stringname Name of the SourceMark, can be Nothing when not using a name
-> Stringcategory 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.
sourceMarkGetCategorySource
:: SourceMarkClass mark
=> mark
-> IO Stringreturns the category of the SourceMark
Returns the mark category
sourceMarkNextSource
:: SourceMarkClass mark
=> mark
-> Maybe Stringcategory 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

sourceMarkPrevSource
:: SourceMarkClass mark
=> mark
-> Maybe Stringcategory 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 => Attr mark StringSource
The category of the SourceMark, classifies the mark and controls which pixbuf is used and with which priority it is drawn. Default value: ""
Produced by Haddock version 2.6.1