SourceGutterRendererText

Constructors

this
this(GtkSourceGutterRendererText* gtkSourceGutterRendererText, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Create a new gsv.SourceGutterRendererText

Members

Functions

getSourceGutterRendererTextStruct
GtkSourceGutterRendererText* getSourceGutterRendererTextStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

measure
void measure(string text, int width, int height)

Measures the text provided using the pango layout used by the gsv.SourceGutterRendererText

measureMarkup
void measureMarkup(string markup, int width, int height)

Measures the pango markup provided using the pango layout used by the gsv.SourceGutterRendererText

setMarkup
void setMarkup(string markup, int length)
setText
void setText(string text, int length)

Static functions

getType
GType getType()

Variables

gtkSourceGutterRendererText
GtkSourceGutterRendererText* gtkSourceGutterRendererText;

the main Gtk struct

Inherited Members

From SourceGutterRenderer

gtkSourceGutterRenderer
GtkSourceGutterRenderer* gtkSourceGutterRenderer;

the main Gtk struct

getSourceGutterRendererStruct
GtkSourceGutterRenderer* getSourceGutterRendererStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
activate
void activate(TextIter iter, GdkRectangle* area, Event event)

Emits the activate signal of the renderer. This is called from gsv.SourceGutter and should never have to be called manually.

begin
void begin(Context cr, GdkRectangle* backgroundArea, GdkRectangle* cellArea, TextIter start, TextIter end)

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
void draw(Context cr, GdkRectangle* backgroundArea, GdkRectangle* cellArea, TextIter start, TextIter end, GtkSourceGutterRendererState state)

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

end
void end()

Called when drawing a region of lines has ended.

getAlignment
void getAlignment(float xalign, float yalign)

Get the x-alignment and y-alignment of the gutter renderer.

getAlignmentMode
GtkSourceGutterRendererAlignmentMode getAlignmentMode()

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

getBackground
bool getBackground(RGBA color)

Get the background color of the renderer.

getPadding
void getPadding(int xpad, int ypad)

Get the x-padding and y-padding of the gutter renderer.

getSize
int getSize()

Get the size of the renderer.

getView
TextView getView()

Get the view associated to the gutter renderer

getVisible
bool getVisible()

Get whether the gutter renderer is visible.

getWindowType
GtkTextWindowType getWindowType()

Get the GtkTextWindowType associated with the gutter renderer.

queryActivatable
bool queryActivatable(TextIter iter, GdkRectangle* area, Event event)

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

queryData
void queryData(TextIter start, TextIter end, GtkSourceGutterRendererState state)

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

queryTooltip
bool queryTooltip(TextIter iter, GdkRectangle* area, int x, int y, Tooltip tooltip)

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

queueDraw
void queueDraw()

Emits the 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
void setAlignment(float xalign, float yalign)

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).

setAlignmentMode
void setAlignmentMode(GtkSourceGutterRendererAlignmentMode mode)

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

setBackground
void setBackground(RGBA color)

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

setPadding
void setPadding(int xpad, int ypad)

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).

setSize
void setSize(int size)

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

setVisible
void setVisible(bool visible)

Set whether the gutter renderer is visible.

addOnActivate
gulong addOnActivate(void delegate(TextIter, GdkRectangle*, Event, SourceGutterRenderer) dlg, ConnectFlags connectFlags)

The ::activate signal is emitted when the renderer is activated.

addOnQueryActivatable
gulong addOnQueryActivatable(bool delegate(TextIter, GdkRectangle*, Event, SourceGutterRenderer) dlg, ConnectFlags connectFlags)

The ::query-activatable signal is emitted when the renderer can possibly be activated.

addOnQueryData
gulong addOnQueryData(void delegate(TextIter, TextIter, GtkSourceGutterRendererState, SourceGutterRenderer) dlg, ConnectFlags connectFlags)

The ::query-data 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.

addOnQueryTooltip
gulong addOnQueryTooltip(bool delegate(TextIter, GdkRectangle*, int, int, Tooltip, SourceGutterRenderer) dlg, ConnectFlags connectFlags)

The ::query-tooltip signal is emitted when the renderer can show a tooltip.

addOnQueueDraw
gulong addOnQueueDraw(void delegate(SourceGutterRenderer) dlg, ConnectFlags connectFlags)

The ::queue-draw signal is emitted when the renderer needs to be redrawn. Use Source.gutterRendererQueueDraw to emit this signal from an implementation of the gsv.SourceGutterRenderer interface.