pub trait GutterRendererExt: IsA<GutterRenderer> + Sealed + 'static {
Show 48 methods // Provided methods fn activate( &self, iter: &mut TextIter, area: &mut Rectangle, event: &mut Event ) { ... } fn end(&self) { ... } fn alignment(&self) -> (f32, f32) { ... } fn alignment_mode(&self) -> GutterRendererAlignmentMode { ... } fn background(&self) -> Option<RGBA> { ... } fn padding(&self) -> (i32, i32) { ... } fn size(&self) -> i32 { ... } fn view(&self) -> Option<TextView> { ... } fn is_visible(&self) -> bool { ... } fn window_type(&self) -> TextWindowType { ... } fn query_activatable( &self, iter: &mut TextIter, area: &mut Rectangle, event: &mut Event ) -> bool { ... } fn query_data( &self, start: &mut TextIter, end: &mut TextIter, state: GutterRendererState ) { ... } fn query_tooltip( &self, iter: &mut TextIter, area: &mut Rectangle, x: i32, y: i32, tooltip: &Tooltip ) -> bool { ... } fn queue_draw(&self) { ... } fn set_alignment(&self, xalign: f32, yalign: f32) { ... } fn set_alignment_mode(&self, mode: GutterRendererAlignmentMode) { ... } fn set_background(&self, color: Option<&RGBA>) { ... } fn set_padding(&self, xpad: i32, ypad: i32) { ... } fn set_size(&self, size: i32) { ... } fn set_visible(&self, visible: bool) { ... } fn background_rgba(&self) -> Option<RGBA> { ... } fn set_background_rgba(&self, background_rgba: Option<&RGBA>) { ... } fn is_background_set(&self) -> bool { ... } fn set_background_set(&self, background_set: bool) { ... } fn xalign(&self) -> f32 { ... } fn set_xalign(&self, xalign: f32) { ... } fn xpad(&self) -> i32 { ... } fn set_xpad(&self, xpad: i32) { ... } fn yalign(&self) -> f32 { ... } fn set_yalign(&self, yalign: f32) { ... } fn ypad(&self) -> i32 { ... } fn set_ypad(&self, ypad: i32) { ... } fn connect_activate<F: Fn(&Self, &TextIter, &Rectangle, &Event) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_query_activatable<F: Fn(&Self, &TextIter, &Rectangle, &Event) -> bool + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_query_data<F: Fn(&Self, &TextIter, &TextIter, GutterRendererState) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_query_tooltip<F: Fn(&Self, &TextIter, &Rectangle, i32, i32, &Tooltip) -> bool + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_queue_draw<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_alignment_mode_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_background_rgba_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_background_set_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_size_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_view_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_visible_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_window_type_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_xalign_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_xpad_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_yalign_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_ypad_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... }
}
Expand description

Provided Methods§

source

fn activate(&self, iter: &mut TextIter, area: &mut Rectangle, event: &mut Event)

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

iter

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

area

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

event

the event that triggered the activation

source

fn end(&self)

Called when drawing a region of lines has ended.

source

fn alignment(&self) -> (f32, f32)

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

Returns
xalign

return location for the x-alignment, or None to ignore.

yalign

return location for the y-alignment, or None to ignore.

source

fn alignment_mode(&self) -> GutterRendererAlignmentMode

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

Returns

a GutterRendererAlignmentMode

source

fn background(&self) -> Option<RGBA>

Get the background color of the renderer.

Returns

true if the background color is set, false otherwise

color

return value for a gdk::RGBA

source

fn padding(&self) -> (i32, i32)

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

Returns
xpad

return location for the x-padding, or None to ignore.

ypad

return location for the y-padding, or None to ignore.

source

fn size(&self) -> i32

Get the size of the renderer.

Returns

the size of the renderer.

source

fn view(&self) -> Option<TextView>

Get the view associated to the gutter renderer

Returns

a gtk::TextView

source

fn is_visible(&self) -> bool

Get whether the gutter renderer is visible.

Returns

true if the renderer is visible, false otherwise

source

fn window_type(&self) -> TextWindowType

Get the gtk::TextWindowType associated with the gutter renderer.

Returns

a gtk::TextWindowType

source

fn query_activatable( &self, iter: &mut TextIter, area: &mut Rectangle, event: &mut Event ) -> bool

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.

iter

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

area

a gdk::Rectangle of the cell area to be activated

event

the event that triggered the query

Returns

true if the renderer can be activated, false otherwise

source

fn query_data( &self, start: &mut TextIter, end: &mut TextIter, state: GutterRendererState )

Emit the 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 query-data signal.

start

a gtk::TextIter.

end

a gtk::TextIter.

state

a GutterRendererState.

source

fn query_tooltip( &self, iter: &mut TextIter, area: &mut Rectangle, x: i32, y: i32, tooltip: &Tooltip ) -> bool

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

iter

a gtk::TextIter.

area

a gdk::Rectangle.

x

The x position of the tooltip.

y

The y position of the tooltip.

tooltip

a gtk::Tooltip.

Returns

true if the tooltip has been set, false otherwise

source

fn queue_draw(&self)

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.

source

fn set_alignment(&self, xalign: f32, yalign: f32)

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.

xalign

the x-alignment

yalign

the y-alignment

source

fn set_alignment_mode(&self, mode: GutterRendererAlignmentMode)

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

mode

a GutterRendererAlignmentMode

source

fn set_background(&self, color: Option<&RGBA>)

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

color

a gdk::RGBA or None

source

fn set_padding(&self, xpad: i32, ypad: i32)

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.

xpad

the x-padding

ypad

the y-padding

source

fn set_size(&self, size: i32)

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

size

the size

source

fn set_visible(&self, visible: bool)

Set whether the gutter renderer is visible.

visible

the visibility

source

fn background_rgba(&self) -> Option<RGBA>

source

fn set_background_rgba(&self, background_rgba: Option<&RGBA>)

source

fn is_background_set(&self) -> bool

source

fn set_background_set(&self, background_set: bool)

source

fn xalign(&self) -> f32

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.

source

fn set_xalign(&self, xalign: f32)

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.

source

fn xpad(&self) -> i32

The left and right padding of the renderer.

source

fn set_xpad(&self, xpad: i32)

The left and right padding of the renderer.

source

fn yalign(&self) -> f32

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.

source

fn set_yalign(&self, yalign: f32)

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.

source

fn ypad(&self) -> i32

The top and bottom padding of the renderer.

source

fn set_ypad(&self, ypad: i32)

The top and bottom padding of the renderer.

source

fn connect_activate<F: Fn(&Self, &TextIter, &Rectangle, &Event) + 'static>( &self, f: F ) -> SignalHandlerId

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

iter

a gtk::TextIter

area

a gdk::Rectangle

event

the event that caused the activation

source

fn connect_query_activatable<F: Fn(&Self, &TextIter, &Rectangle, &Event) -> bool + 'static>( &self, f: F ) -> SignalHandlerId

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

iter

a gtk::TextIter

area

a gdk::Rectangle

event

the GdkEvent that is causing the activatable query

source

fn connect_query_data<F: Fn(&Self, &TextIter, &TextIter, GutterRendererState) + 'static>( &self, f: F ) -> SignalHandlerId

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.

start

a gtk::TextIter

end

a gtk::TextIter

state

the renderer state

source

fn connect_query_tooltip<F: Fn(&Self, &TextIter, &Rectangle, i32, i32, &Tooltip) -> bool + 'static>( &self, f: F ) -> SignalHandlerId

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

iter

a gtk::TextIter

area

a gdk::Rectangle

x

the x position (in window coordinates)

y

the y position (in window coordinates)

tooltip

a gtk::Tooltip

source

fn connect_queue_draw<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

The ::queue-draw signal is emitted when the renderer needs to be redrawn. Use queue_draw() to emit this signal from an implementation of the GutterRenderer interface.

source

fn connect_alignment_mode_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_background_rgba_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_background_set_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_view_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_visible_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_window_type_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_xalign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_xpad_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_yalign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_ypad_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Object Safety§

This trait is not object safe.

Implementors§