Trait sourceview4::prelude::GutterRendererExt
source · 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
Trait containing all GutterRenderer
methods.
Implementors
Provided Methods§
sourcefn activate(&self, iter: &mut TextIter, area: &mut Rectangle, event: &mut Event)
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
sourcefn alignment_mode(&self) -> GutterRendererAlignmentMode
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
sourcefn background(&self) -> Option<RGBA>
fn background(&self) -> Option<RGBA>
sourcefn is_visible(&self) -> bool
fn is_visible(&self) -> bool
sourcefn window_type(&self) -> TextWindowType
fn window_type(&self) -> TextWindowType
sourcefn query_activatable(
&self,
iter: &mut TextIter,
area: &mut Rectangle,
event: &mut Event
) -> bool
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
sourcefn query_data(
&self,
start: &mut TextIter,
end: &mut TextIter,
state: GutterRendererState
)
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
end
state
sourcefn query_tooltip(
&self,
iter: &mut TextIter,
area: &mut Rectangle,
x: i32,
y: i32,
tooltip: &Tooltip
) -> bool
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
area
x
The x position of the tooltip.
y
The y position of the tooltip.
tooltip
a gtk::Tooltip
.
Returns
sourcefn queue_draw(&self)
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.
sourcefn set_alignment(&self, xalign: f32, yalign: f32)
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
sourcefn set_alignment_mode(&self, mode: GutterRendererAlignmentMode)
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
sourcefn set_background(&self, color: Option<&RGBA>)
fn set_background(&self, color: Option<&RGBA>)
sourcefn set_padding(&self, xpad: i32, ypad: i32)
fn set_padding(&self, xpad: i32, ypad: i32)
sourcefn set_size(&self, size: i32)
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
sourcefn set_visible(&self, visible: bool)
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)
sourcefn xalign(&self) -> f32
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.
sourcefn set_xalign(&self, xalign: f32)
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.
sourcefn yalign(&self) -> f32
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.
sourcefn set_yalign(&self, yalign: f32)
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.
sourcefn connect_activate<F: Fn(&Self, &TextIter, &Rectangle, &Event) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_activate<F: Fn(&Self, &TextIter, &Rectangle, &Event) + 'static>( &self, f: F ) -> SignalHandlerId
sourcefn connect_query_activatable<F: Fn(&Self, &TextIter, &Rectangle, &Event) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_query_activatable<F: Fn(&Self, &TextIter, &Rectangle, &Event) -> bool + 'static>( &self, f: F ) -> SignalHandlerId
sourcefn connect_query_data<F: Fn(&Self, &TextIter, &TextIter, GutterRendererState) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_query_data<F: Fn(&Self, &TextIter, &TextIter, GutterRendererState) + 'static>( &self, f: F ) -> SignalHandlerId
sourcefn connect_query_tooltip<F: Fn(&Self, &TextIter, &Rectangle, i32, i32, &Tooltip) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_query_tooltip<F: Fn(&Self, &TextIter, &Rectangle, i32, i32, &Tooltip) -> bool + 'static>( &self, f: F ) -> SignalHandlerId
sourcefn connect_queue_draw<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
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.