gi-gtksource-3.0.22: GtkSource bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GtkSource.Objects.GutterRenderer

Description

No description available in the introspection data.

Synopsis

Exported types

class (GObject o, IsDescendantOf GutterRenderer o) => IsGutterRenderer o Source #

Type class for types which can be safely cast to GutterRenderer, for instance with toGutterRenderer.

Instances

Instances details
(GObject o, IsDescendantOf GutterRenderer o) => IsGutterRenderer o Source # 
Instance details

Defined in GI.GtkSource.Objects.GutterRenderer

toGutterRenderer :: (MonadIO m, IsGutterRenderer o) => o -> m GutterRenderer Source #

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

Methods

Overloaded 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 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 queryData 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 queryData 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 queryTooltip 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 queueDraw 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

The alignment mode of the renderer. This can be used to indicate that in the case a cell spans multiple lines (due to text wrapping) the alignment should work on either the full cell, the first line or the last line.

constructGutterRendererAlignmentMode :: IsGutterRenderer o => GutterRendererAlignmentMode -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “alignment-mode” property. This is rarely needed directly, but it is used by new.

getGutterRendererAlignmentMode :: (MonadIO m, IsGutterRenderer o) => o -> m GutterRendererAlignmentMode Source #

Get the value of the “alignment-mode” property. When overloading is enabled, this is equivalent to

get gutterRenderer #alignmentMode

setGutterRendererAlignmentMode :: (MonadIO m, IsGutterRenderer o) => o -> GutterRendererAlignmentMode -> m () Source #

Set the value of the “alignment-mode” property. When overloading is enabled, this is equivalent to

set gutterRenderer [ #alignmentMode := value ]

backgroundRgba

No description available in the introspection data.

clearGutterRendererBackgroundRgba :: (MonadIO m, IsGutterRenderer o) => o -> m () Source #

Set the value of the “background-rgba” property to Nothing. When overloading is enabled, this is equivalent to

clear #backgroundRgba

constructGutterRendererBackgroundRgba :: IsGutterRenderer o => RGBA -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “background-rgba” property. This is rarely needed directly, but it is used by new.

getGutterRendererBackgroundRgba :: (MonadIO m, IsGutterRenderer o) => o -> m (Maybe RGBA) Source #

Get the value of the “background-rgba” property. When overloading is enabled, this is equivalent to

get gutterRenderer #backgroundRgba

setGutterRendererBackgroundRgba :: (MonadIO m, IsGutterRenderer o) => o -> RGBA -> m () Source #

Set the value of the “background-rgba” property. When overloading is enabled, this is equivalent to

set gutterRenderer [ #backgroundRgba := value ]

backgroundSet

No description available in the introspection data.

constructGutterRendererBackgroundSet :: IsGutterRenderer o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “background-set” property. This is rarely needed directly, but it is used by new.

getGutterRendererBackgroundSet :: (MonadIO m, IsGutterRenderer o) => o -> m Bool Source #

Get the value of the “background-set” property. When overloading is enabled, this is equivalent to

get gutterRenderer #backgroundSet

setGutterRendererBackgroundSet :: (MonadIO m, IsGutterRenderer o) => o -> Bool -> m () Source #

Set the value of the “background-set” property. When overloading is enabled, this is equivalent to

set gutterRenderer [ #backgroundSet := value ]

size

No description available in the introspection data.

constructGutterRendererSize :: IsGutterRenderer o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “size” property. This is rarely needed directly, but it is used by new.

getGutterRendererSize :: (MonadIO m, IsGutterRenderer o) => o -> m Int32 Source #

Get the value of the “size” property. When overloading is enabled, this is equivalent to

get gutterRenderer #size

setGutterRendererSize :: (MonadIO m, IsGutterRenderer o) => o -> Int32 -> m () Source #

Set the value of the “size” property. When overloading is enabled, this is equivalent to

set gutterRenderer [ #size := value ]

view

The view on which the renderer is placed.

getGutterRendererView :: (MonadIO m, IsGutterRenderer o) => o -> m TextView Source #

Get the value of the “view” property. When overloading is enabled, this is equivalent to

get gutterRenderer #view

visible

The visibility of the renderer.

constructGutterRendererVisible :: IsGutterRenderer o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “visible” property. This is rarely needed directly, but it is used by new.

getGutterRendererVisible :: (MonadIO m, IsGutterRenderer o) => o -> m Bool Source #

Get the value of the “visible” property. When overloading is enabled, this is equivalent to

get gutterRenderer #visible

setGutterRendererVisible :: (MonadIO m, IsGutterRenderer o) => o -> Bool -> m () Source #

Set the value of the “visible” property. When overloading is enabled, this is equivalent to

set gutterRenderer [ #visible := value ]

windowType

The window type of the view on which the renderer is placed (left, or right).

getGutterRendererWindowType :: (MonadIO m, IsGutterRenderer o) => o -> m TextWindowType Source #

Get the value of the “window-type” property. When overloading is enabled, this is equivalent to

get gutterRenderer #windowType

xalign

The horizontal alignment of the renderer. Set to 0 for a left alignment. 1 for a right alignment. And 0.5 for centering the cells. A value lower than 0 doesn't modify the alignment.

constructGutterRendererXalign :: IsGutterRenderer o => Float -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “xalign” property. This is rarely needed directly, but it is used by new.

getGutterRendererXalign :: (MonadIO m, IsGutterRenderer o) => o -> m Float Source #

Get the value of the “xalign” property. When overloading is enabled, this is equivalent to

get gutterRenderer #xalign

setGutterRendererXalign :: (MonadIO m, IsGutterRenderer o) => o -> Float -> m () Source #

Set the value of the “xalign” property. When overloading is enabled, this is equivalent to

set gutterRenderer [ #xalign := value ]

xpad

The left and right padding of the renderer.

constructGutterRendererXpad :: IsGutterRenderer o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “xpad” property. This is rarely needed directly, but it is used by new.

getGutterRendererXpad :: (MonadIO m, IsGutterRenderer o) => o -> m Int32 Source #

Get the value of the “xpad” property. When overloading is enabled, this is equivalent to

get gutterRenderer #xpad

setGutterRendererXpad :: (MonadIO m, IsGutterRenderer o) => o -> Int32 -> m () Source #

Set the value of the “xpad” property. When overloading is enabled, this is equivalent to

set gutterRenderer [ #xpad := value ]

yalign

The vertical alignment of the renderer. Set to 0 for a top alignment. 1 for a bottom alignment. And 0.5 for centering the cells. A value lower than 0 doesn't modify the alignment.

constructGutterRendererYalign :: IsGutterRenderer o => Float -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “yalign” property. This is rarely needed directly, but it is used by new.

getGutterRendererYalign :: (MonadIO m, IsGutterRenderer o) => o -> m Float Source #

Get the value of the “yalign” property. When overloading is enabled, this is equivalent to

get gutterRenderer #yalign

setGutterRendererYalign :: (MonadIO m, IsGutterRenderer o) => o -> Float -> m () Source #

Set the value of the “yalign” property. When overloading is enabled, this is equivalent to

set gutterRenderer [ #yalign := value ]

ypad

The top and bottom padding of the renderer.

constructGutterRendererYpad :: IsGutterRenderer o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “ypad” property. This is rarely needed directly, but it is used by new.

getGutterRendererYpad :: (MonadIO m, IsGutterRenderer o) => o -> m Int32 Source #

Get the value of the “ypad” property. When overloading is enabled, this is equivalent to

get gutterRenderer #ypad

setGutterRendererYpad :: (MonadIO m, IsGutterRenderer o) => o -> Int32 -> m () Source #

Set the value of the “ypad” property. When overloading is enabled, this is equivalent to

set gutterRenderer [ #ypad := value ]

Signals

activate

type C_GutterRendererActivateCallback = Ptr () -> Ptr TextIter -> Ptr Rectangle -> Ptr Event -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GutterRendererActivateCallback Source #

Arguments

 = TextIter

iter: a TextIter

-> Rectangle

area: a Rectangle

-> Event

event: the event that caused the activation

-> IO () 

The activate signal is emitted when the renderer is activated.

afterGutterRendererActivate :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererActivateCallback -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gutterRenderer #activate callback

onGutterRendererActivate :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererActivateCallback -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gutterRenderer #activate callback

queryActivatable

type C_GutterRendererQueryActivatableCallback = Ptr () -> Ptr TextIter -> Ptr Rectangle -> Ptr Event -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type GutterRendererQueryActivatableCallback Source #

Arguments

 = TextIter

iter: a TextIter

-> Rectangle

area: a Rectangle

-> Event

event: the Event that is causing the activatable query

-> IO Bool 

The queryActivatable signal is emitted when the renderer can possibly be activated.

afterGutterRendererQueryActivatable :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererQueryActivatableCallback -> m SignalHandlerId Source #

Connect a signal handler for the queryActivatable signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gutterRenderer #queryActivatable callback

onGutterRendererQueryActivatable :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererQueryActivatableCallback -> m SignalHandlerId Source #

Connect a signal handler for the queryActivatable signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gutterRenderer #queryActivatable callback

queryData

type C_GutterRendererQueryDataCallback = Ptr () -> Ptr TextIter -> Ptr TextIter -> CUInt -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GutterRendererQueryDataCallback Source #

Arguments

 = TextIter

start: a TextIter

-> TextIter

end: a TextIter

-> [GutterRendererState]

state: the renderer state

-> IO () 

The queryData signal is emitted when the renderer needs to be filled with data just before a cell is drawn. This can be used by general renderer implementations to allow render data to be filled in externally.

afterGutterRendererQueryData :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererQueryDataCallback -> m SignalHandlerId Source #

Connect a signal handler for the queryData signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gutterRenderer #queryData callback

onGutterRendererQueryData :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererQueryDataCallback -> m SignalHandlerId Source #

Connect a signal handler for the queryData signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gutterRenderer #queryData callback

queryTooltip

type C_GutterRendererQueryTooltipCallback = Ptr () -> Ptr TextIter -> Ptr Rectangle -> Int32 -> Int32 -> Ptr Tooltip -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type GutterRendererQueryTooltipCallback Source #

Arguments

 = TextIter

iter: a TextIter

-> Rectangle

area: a Rectangle

-> Int32

x: the x position (in window coordinates)

-> Int32

y: the y position (in window coordinates)

-> Tooltip

tooltip: a Tooltip

-> IO Bool 

The queryTooltip signal is emitted when the renderer can show a tooltip.

afterGutterRendererQueryTooltip :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererQueryTooltipCallback -> m SignalHandlerId Source #

Connect a signal handler for the queryTooltip signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gutterRenderer #queryTooltip callback

onGutterRendererQueryTooltip :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererQueryTooltipCallback -> m SignalHandlerId Source #

Connect a signal handler for the queryTooltip signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gutterRenderer #queryTooltip callback

queueDraw

type C_GutterRendererQueueDrawCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GutterRendererQueueDrawCallback = IO () Source #

The queueDraw signal is emitted when the renderer needs to be redrawn. Use gutterRendererQueueDraw to emit this signal from an implementation of the GutterRenderer interface.

afterGutterRendererQueueDraw :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererQueueDrawCallback -> m SignalHandlerId Source #

Connect a signal handler for the queueDraw signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gutterRenderer #queueDraw callback

onGutterRendererQueueDraw :: (IsGutterRenderer a, MonadIO m) => a -> GutterRendererQueueDrawCallback -> m SignalHandlerId Source #

Connect a signal handler for the queueDraw signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gutterRenderer #queueDraw callback