gi-gtksource-3.0.15: GtkSource bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GtkSource.Objects.GutterRenderer

Contents

Description

 

Synopsis

Exported types

Methods

activate

gutterRendererActivate Source #

Arguments

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

renderer: a GutterRenderer

-> TextIter

iter: a TextIter at the start of the line where the renderer is activated

-> Rectangle

area: a Rectangle of the cell area where the renderer is activated

-> Event

event: the event that triggered the activation

-> m () 

Emits the GutterRenderer::activate signal of the renderer. This is called from Gutter and should never have to be called manually.

begin

gutterRendererBegin Source #

Arguments

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

renderer: a GutterRenderer

-> Context

cr: a Context

-> Rectangle

backgroundArea: a Rectangle

-> Rectangle

cellArea: a Rectangle

-> TextIter

start: a TextIter

-> TextIter

end: a TextIter

-> m () 

Called when drawing a region begins. The region to be drawn is indicated by start and end. The purpose is to allow the implementation to precompute some state before the draw method is called for each cell.

draw

gutterRendererDraw Source #

Arguments

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

renderer: a GutterRenderer

-> Context

cr: the cairo render context

-> Rectangle

backgroundArea: a Rectangle indicating the total area to be drawn

-> Rectangle

cellArea: a Rectangle indicating the area to draw content

-> TextIter

start: a TextIter

-> TextIter

end: a TextIter

-> [GutterRendererState]

state: a GutterRendererState

-> m () 

Main renderering method. Implementations should implement this method to draw onto the cairo context. The backgroundArea indicates the total area of the cell to be drawn. The cellArea indicates the area where content can be drawn (text, images, etc).

The backgroundArea is the cellArea plus the padding on each side (two times the GutterRenderer:xpad horizontally and two times the GutterRenderer:ypad vertically, so that the cellArea is centered inside backgroundArea).

The state argument indicates the current state of the renderer and should be taken into account to properly draw the different possible states (cursor, prelit, selected) if appropriate.

end

gutterRendererEnd Source #

Arguments

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

renderer: a GutterRenderer

-> m () 

Called when drawing a region of lines has ended.

getAlignmentMode

gutterRendererGetAlignmentMode Source #

Get the alignment mode. The alignment mode describes the manner in which the renderer is aligned (see :xalign and :yalign).

getBackground

gutterRendererGetBackground Source #

Arguments

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

renderer: a GutterRenderer

-> m (Bool, RGBA)

Returns: True if the background color is set, False otherwise

Get the background color of the renderer.

getSize

gutterRendererGetSize Source #

Arguments

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

renderer: a GutterRenderer

-> m Int32

Returns: the size of the renderer.

Get the size of the renderer.

getView

gutterRendererGetView Source #

Arguments

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

renderer: a GutterRenderer

-> m TextView

Returns: a TextView

Get the view associated to the gutter renderer

getVisible

gutterRendererGetVisible Source #

Arguments

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

renderer: a GutterRenderer

-> m Bool

Returns: True if the renderer is visible, False otherwise

Get whether the gutter renderer is visible.

getWindowType

gutterRendererGetWindowType Source #

Arguments

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

renderer: a GutterRenderer

-> m TextWindowType

Returns: a TextWindowType

Get the TextWindowType associated with the gutter renderer.

queryActivatable

gutterRendererQueryActivatable Source #

Arguments

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

renderer: a GutterRenderer

-> TextIter

iter: a TextIter at the start of the line to be activated

-> Rectangle

area: a Rectangle of the cell area to be activated

-> Event

event: the event that triggered the query

-> m Bool

Returns: True if the renderer can be activated, False otherwise

Get whether the renderer is activatable at the location in event. This is called from Gutter to determine whether a renderer is activatable using the mouse pointer.

queryData

gutterRendererQueryData Source #

Arguments

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

renderer: a GutterRenderer.

-> TextIter

start: a TextIter.

-> TextIter

end: a TextIter.

-> [GutterRendererState]

state: a GutterRendererState.

-> m () 

Emit the GutterRenderer::query-data signal. This function is called to query for data just before rendering a cell. This is called from the Gutter. Implementations can override the default signal handler or can connect a signal handler externally to the GutterRenderer::query-data signal.

queryTooltip

gutterRendererQueryTooltip Source #

Arguments

:: (HasCallStack, MonadIO m, IsGutterRenderer a, IsTooltip b) 
=> a

renderer: a GutterRenderer.

-> TextIter

iter: a TextIter.

-> Rectangle

area: a Rectangle.

-> Int32

x: The x position of the tooltip.

-> Int32

y: The y position of the tooltip.

-> b

tooltip: a Tooltip.

-> m Bool

Returns: True if the tooltip has been set, False otherwise

Emits the GutterRenderer::query-tooltip signal. This function is called from Gutter. Implementations can override the default signal handler or can connect to the signal externally.

queueDraw

gutterRendererQueueDraw Source #

Arguments

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

renderer: a GutterRenderer

-> m () 

Emits the GutterRenderer::queue-draw signal of the renderer. Call this from an implementation to inform that the renderer has changed such that it needs to redraw.

setAlignment

gutterRendererSetAlignment Source #

Arguments

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

renderer: a GutterRenderer

-> Float

xalign: the x-alignment

-> Float

yalign: the y-alignment

-> m () 

Set the alignment of the gutter renderer. Both xalign and yalign can be -1, which means the values will not be changed (this allows changing only one of the values).

xalign is the horizontal alignment. Set to 0 for a left alignment. 1 for a right alignment. And 0.5 for centering the cells. yalign is the vertical alignment. Set to 0 for a top alignment. 1 for a bottom alignment.

setAlignmentMode

gutterRendererSetAlignmentMode Source #

Set the alignment mode. The alignment mode describes the manner in which the renderer is aligned (see :xalign and :yalign).

setBackground

gutterRendererSetBackground Source #

Arguments

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

renderer: a GutterRenderer

-> Maybe RGBA

color: a RGBA or Nothing

-> m () 

Set the background color of the renderer. If color is set to Nothing, the renderer will not have a background color.

setPadding

gutterRendererSetPadding Source #

Arguments

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

renderer: a GutterRenderer

-> Int32

xpad: the x-padding

-> Int32

ypad: the y-padding

-> m () 

Set the padding of the gutter renderer. Both xpad and ypad can be -1, which means the values will not be changed (this allows changing only one of the values).

xpad is the left and right padding. ypad is the top and bottom padding.

setSize

gutterRendererSetSize Source #

Arguments

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

renderer: a GutterRenderer

-> Int32

size: the size

-> m () 

Sets the size of the renderer. A value of -1 specifies that the size is to be determined dynamically.

setVisible

gutterRendererSetVisible Source #

Arguments

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

renderer: a GutterRenderer

-> Bool

visible: the visibility

-> m () 

Set whether the gutter renderer is visible.

Properties

alignmentMode

backgroundRgba

backgroundSet

size

view

visible

windowType

xalign

xpad

yalign

ypad

Signals

activate

queryActivatable

queryData

queryTooltip

queueDraw