gi-gtksource-3.0.12: 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

Unsupported 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

data GutterRendererAlignmentModePropertyInfo Source #

Instances

AttrInfo GutterRendererAlignmentModePropertyInfo Source # 
type AttrOrigin GutterRendererAlignmentModePropertyInfo Source # 
type AttrLabel GutterRendererAlignmentModePropertyInfo Source # 
type AttrGetType GutterRendererAlignmentModePropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererAlignmentModePropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererAlignmentModePropertyInfo Source # 
type AttrAllowedOps GutterRendererAlignmentModePropertyInfo Source # 

backgroundRgba

data GutterRendererBackgroundRgbaPropertyInfo Source #

Instances

AttrInfo GutterRendererBackgroundRgbaPropertyInfo Source # 
type AttrOrigin GutterRendererBackgroundRgbaPropertyInfo Source # 
type AttrLabel GutterRendererBackgroundRgbaPropertyInfo Source # 
type AttrGetType GutterRendererBackgroundRgbaPropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererBackgroundRgbaPropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererBackgroundRgbaPropertyInfo Source # 
type AttrAllowedOps GutterRendererBackgroundRgbaPropertyInfo Source # 

backgroundSet

data GutterRendererBackgroundSetPropertyInfo Source #

Instances

AttrInfo GutterRendererBackgroundSetPropertyInfo Source # 
type AttrOrigin GutterRendererBackgroundSetPropertyInfo Source # 
type AttrLabel GutterRendererBackgroundSetPropertyInfo Source # 
type AttrGetType GutterRendererBackgroundSetPropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererBackgroundSetPropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererBackgroundSetPropertyInfo Source # 
type AttrAllowedOps GutterRendererBackgroundSetPropertyInfo Source # 

size

data GutterRendererSizePropertyInfo Source #

Instances

AttrInfo GutterRendererSizePropertyInfo Source # 
type AttrOrigin GutterRendererSizePropertyInfo Source # 
type AttrLabel GutterRendererSizePropertyInfo Source # 
type AttrGetType GutterRendererSizePropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererSizePropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererSizePropertyInfo Source # 
type AttrAllowedOps GutterRendererSizePropertyInfo Source # 

view

data GutterRendererViewPropertyInfo Source #

Instances

AttrInfo GutterRendererViewPropertyInfo Source # 
type AttrOrigin GutterRendererViewPropertyInfo Source # 
type AttrLabel GutterRendererViewPropertyInfo Source # 
type AttrGetType GutterRendererViewPropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererViewPropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererViewPropertyInfo Source # 
type AttrAllowedOps GutterRendererViewPropertyInfo Source # 

visible

data GutterRendererVisiblePropertyInfo Source #

Instances

AttrInfo GutterRendererVisiblePropertyInfo Source # 
type AttrOrigin GutterRendererVisiblePropertyInfo Source # 
type AttrLabel GutterRendererVisiblePropertyInfo Source # 
type AttrGetType GutterRendererVisiblePropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererVisiblePropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererVisiblePropertyInfo Source # 
type AttrAllowedOps GutterRendererVisiblePropertyInfo Source # 

windowType

data GutterRendererWindowTypePropertyInfo Source #

Instances

AttrInfo GutterRendererWindowTypePropertyInfo Source # 
type AttrOrigin GutterRendererWindowTypePropertyInfo Source # 
type AttrLabel GutterRendererWindowTypePropertyInfo Source # 
type AttrGetType GutterRendererWindowTypePropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererWindowTypePropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererWindowTypePropertyInfo Source # 
type AttrAllowedOps GutterRendererWindowTypePropertyInfo Source # 

xalign

data GutterRendererXalignPropertyInfo Source #

Instances

AttrInfo GutterRendererXalignPropertyInfo Source # 
type AttrOrigin GutterRendererXalignPropertyInfo Source # 
type AttrLabel GutterRendererXalignPropertyInfo Source # 
type AttrGetType GutterRendererXalignPropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererXalignPropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererXalignPropertyInfo Source # 
type AttrAllowedOps GutterRendererXalignPropertyInfo Source # 

xpad

data GutterRendererXpadPropertyInfo Source #

Instances

AttrInfo GutterRendererXpadPropertyInfo Source # 
type AttrOrigin GutterRendererXpadPropertyInfo Source # 
type AttrLabel GutterRendererXpadPropertyInfo Source # 
type AttrGetType GutterRendererXpadPropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererXpadPropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererXpadPropertyInfo Source # 
type AttrAllowedOps GutterRendererXpadPropertyInfo Source # 

yalign

data GutterRendererYalignPropertyInfo Source #

Instances

AttrInfo GutterRendererYalignPropertyInfo Source # 
type AttrOrigin GutterRendererYalignPropertyInfo Source # 
type AttrLabel GutterRendererYalignPropertyInfo Source # 
type AttrGetType GutterRendererYalignPropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererYalignPropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererYalignPropertyInfo Source # 
type AttrAllowedOps GutterRendererYalignPropertyInfo Source # 

ypad

data GutterRendererYpadPropertyInfo Source #

Instances

AttrInfo GutterRendererYpadPropertyInfo Source # 
type AttrOrigin GutterRendererYpadPropertyInfo Source # 
type AttrLabel GutterRendererYpadPropertyInfo Source # 
type AttrGetType GutterRendererYpadPropertyInfo Source # 
type AttrBaseTypeConstraint GutterRendererYpadPropertyInfo Source # 
type AttrSetTypeConstraint GutterRendererYpadPropertyInfo Source # 
type AttrAllowedOps GutterRendererYpadPropertyInfo Source # 

Signals

activate

queryActivatable

queryData

queryTooltip

queueDraw