gi-gtksource-5.0.0: 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.GutterLines

Description

Collected information about visible lines.

The GtkSourceGutterLines object is used to collect information about visible lines.

Use this from your signalgutterRenderer[queryData] to collect the necessary information on visible lines. Doing so reduces the number of passes through the text btree allowing GtkSourceView to reach more frames-per-second while performing kinetic scrolling.

Synopsis

Exported types

newtype GutterLines Source #

Memory-managed wrapper type.

Constructors

GutterLines (ManagedPtr GutterLines) 

Instances

Instances details
Eq GutterLines Source # 
Instance details

Defined in GI.GtkSource.Objects.GutterLines

GObject GutterLines Source # 
Instance details

Defined in GI.GtkSource.Objects.GutterLines

ManagedPtrNewtype GutterLines Source # 
Instance details

Defined in GI.GtkSource.Objects.GutterLines

Methods

toManagedPtr :: GutterLines -> ManagedPtr GutterLines

TypedObject GutterLines Source # 
Instance details

Defined in GI.GtkSource.Objects.GutterLines

Methods

glibType :: IO GType

HasParentTypes GutterLines Source # 
Instance details

Defined in GI.GtkSource.Objects.GutterLines

IsGValue (Maybe GutterLines) Source #

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

Instance details

Defined in GI.GtkSource.Objects.GutterLines

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes GutterLines Source # 
Instance details

Defined in GI.GtkSource.Objects.GutterLines

type ParentTypes GutterLines = '[Object]

class (GObject o, IsDescendantOf GutterLines o) => IsGutterLines o Source #

Type class for types which can be safely cast to GutterLines, for instance with toGutterLines.

Instances

Instances details
(GObject o, IsDescendantOf GutterLines o) => IsGutterLines o Source # 
Instance details

Defined in GI.GtkSource.Objects.GutterLines

toGutterLines :: (MonadIO m, IsGutterLines o) => o -> m GutterLines Source #

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

Methods

addClass

gutterLinesAddClass Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> Text

name: a class name

-> m () 

Adds the class name to line.

name will be converted to a [aliasgLib.Quark] as part of this process. A faster version of this function is available via [methodgutterLines.add_qclass] for situations where the [aliasgLib.Quark] is known ahead of time.

addQclass

gutterLinesAddQclass Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> Word32

qname: a class name as a GQuark

-> m () 

Adds the class denoted by qname to line.

You may check if a line has qname by calling [methodgutterLines.has_qclass].

You can remove qname by calling [methodgutterLines.remove_qclass].

getBuffer

gutterLinesGetBuffer Source #

Arguments

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

lines: a GutterLines

-> m TextBuffer

Returns: a TextBuffer

Gets the TextBuffer that the GtkSourceGutterLines represents.

getFirst

gutterLinesGetFirst Source #

Arguments

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

lines: a GutterLines

-> m Word32

Returns: a line number starting from 0

Gets the line number (starting from 0) for the first line that is user visible.

getIterAtLine

gutterLinesGetIterAtLine Source #

Arguments

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

lines: a GutterLines

-> Word32

line: the line number

-> m TextIter 

Gets a TextIter for the current buffer at line

getLast

gutterLinesGetLast Source #

Arguments

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

lines: a GutterLines

-> m Word32

Returns: a line number starting from 0

Gets the line number (starting from 0) for the last line that is user visible.

getLineYrange

gutterLinesGetLineYrange Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> GutterRendererAlignmentMode

mode: a GutterRendererAlignmentMode

-> m (Int32, Int32) 

Gets the Y range for a line based on mode.

The value for y is relative to the renderers widget coordinates.

getView

gutterLinesGetView Source #

Arguments

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

lines: a GutterLines

-> m TextView

Returns: a TextView

Gets the TextView that the GtkSourceGutterLines represents.

hasAnyClass

gutterLinesHasAnyClass Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line contained within lines

-> m Bool

Returns: True if any quark was set for the line

Checks to see if the line has any GQuark classes set. This can be used to help renderer implementations avoid work if nothing has been set on the class.

Since: 5.6

hasClass

gutterLinesHasClass Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> Text

name: a class name that may be converted, to a GQuark

-> m Bool

Returns: True if line contains name

Checks to see if [methodgutterLines.add_class] was called with the name for line.

A faster version of this function is provided via [methodgutterLines.has_qclass] for situations where the quark is known ahead of time.

hasQclass

gutterLinesHasQclass Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> Word32

qname: a GQuark containing the class name

-> m Bool

Returns: True if line contains qname

Checks to see if [methodgutterLines.add_qclass] was called with the quark denoted by qname for line.

isCursor

gutterLinesIsCursor Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> m Bool

Returns: True if the insertion cursor is on line

Checks to see if line contains the insertion cursor.

isPrelit

gutterLinesIsPrelit Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> m Bool

Returns: True if the line is prelit

Checks to see if line is marked as prelit. Generally, this means the mouse pointer is over the line within the gutter.

isSelected

gutterLinesIsSelected Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> m Bool

Returns: True if the line contains a selection

Checks to see if the view had a selection and if that selection overlaps line in some way.

removeClass

gutterLinesRemoveClass Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> Text

name: a class name

-> m () 

Removes the class matching name from line.

A faster version of this function is available via [methodgutterLines.remove_qclass] for situations where the GQuark is known ahead of time.

removeQclass

gutterLinesRemoveQclass Source #

Arguments

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

lines: a GutterLines

-> Word32

line: a line number starting from zero

-> Word32

qname: a GQuark to remove from line

-> m () 

Reverses a call to [methodgutterLines.add_qclass] by removing the [aliasgLib.Quark] matching qname.