Trait sourceview5::GutterRendererExt [−][src]
Trait containing all GutterRenderer
methods.
Implementors
Required methods
fn activate(
&self,
iter: &TextIter,
area: &Rectangle,
button: u32,
state: ModifierType,
n_presses: i32
)
[src]
&self,
iter: &TextIter,
area: &Rectangle,
button: u32,
state: ModifierType,
n_presses: i32
)
Emits the GutterRenderer::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
button
the button that was pressed
state
a gdk::ModifierType
n_presses
the number of button presses
fn align_cell(&self, line: u32, width: f32, height: f32) -> (f32, f32)
[src]
Locates where to render content that is width
x height
based on
the renderers alignment and padding.
The location will be placed into x
and y
and is relative to the
renderer’s coordinates.
It is encouraged that renderers use this function when snappshotting to ensure consistent placement of their contents.
Feature: v5_0
line
the line number for content
width
the width of the content to draw
height
the height of the content to draw
x
the X position to render the content
y
the Y position to render the content
fn get_alignment_mode(&self) -> GutterRendererAlignmentMode
[src]
Get the alignment mode. The alignment mode describes the manner in which the renderer is aligned (see :xalign and :yalign).
Returns
a GutterRendererAlignmentMode
fn get_buffer(&self) -> Option<Buffer>
[src]
Gets the Buffer
for which the gutter renderer is drawing.
Feature: v5_0
Returns
a gtk::TextBuffer
or None
fn get_view(&self) -> Option<View>
[src]
fn get_xalign(&self) -> f32
[src]
Gets the “xalign” property of the GutterRenderer
. This may be used
to adjust where within the cell rectangle the renderer will draw.
Feature: v5_0
fn get_xpad(&self) -> i32
[src]
Gets the “xpad” property of the GutterRenderer
. This may be used
to adjust the cell rectangle that the renderer will use to draw.
Feature: v5_0
fn get_yalign(&self) -> f32
[src]
Gets the “yalign” property of the GutterRenderer
. This may be used
to adjust where within the cell rectangle the renderer will draw.
Feature: v5_0
fn get_ypad(&self) -> i32
[src]
Gets the “ypad” property of the GutterRenderer
. This may be used
to adjust the cell rectangle that the renderer will use to draw.
Feature: v5_0
fn query_activatable(&self, iter: &TextIter, area: &Rectangle) -> bool
[src]
Get whether the renderer is activatable at the location provided. 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
Returns
true
if the renderer can be activated, false
otherwise
fn set_alignment_mode(&self, mode: GutterRendererAlignmentMode)
[src]
Set the alignment mode. The alignment mode describes the manner in which the
renderer is aligned (see GutterRenderer:xalign
and
GutterRenderer:yalign
).
mode
a GutterRendererAlignmentMode
fn set_xalign(&self, xalign: f32)
[src]
Adjusts the “xalign” property of the GutterRenderer
. This may be
used to adjust where within the cell rectangle the renderer will draw.
Feature: v5_0
xalign
the Y padding for the drawing cell
fn set_xpad(&self, xpad: i32)
[src]
Adjusts the “xpad” property of the GutterRenderer
. This may be
used to adjust the cell rectangle that the renderer will use to draw.
Feature: v5_0
xpad
the Y padding for the drawing cell
fn set_yalign(&self, yalign: f32)
[src]
Adjusts the “yalign” property of the GutterRenderer
. This may be
used to adjust where within the cell rectangle the renderer will draw.
Feature: v5_0
yalign
the Y padding for the drawing cell
fn set_ypad(&self, ypad: i32)
[src]
Adjusts the “ypad” property of the GutterRenderer
. This may be
used to adjust the cell rectangle that the renderer will use to draw.
Feature: v5_0
ypad
the Y padding for the drawing cell
fn get_property_lines(&self) -> Option<GutterLines>
[src]
The “lines” property contains information about the lines to be
rendered. It should be used by GutterRenderer
implementations from gtk_widget_snapshot
.
fn get_property_xalign(&self) -> f32
[src]
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.
fn set_property_xalign(&self, xalign: f32)
[src]
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.
fn get_property_xpad(&self) -> i32
[src]
The left and right padding of the renderer.
fn set_property_xpad(&self, xpad: i32)
[src]
The left and right padding of the renderer.
fn get_property_yalign(&self) -> f32
[src]
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.
fn set_property_yalign(&self, yalign: f32)
[src]
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.
fn get_property_ypad(&self) -> i32
[src]
The top and bottom padding of the renderer.
fn set_property_ypad(&self, ypad: i32)
[src]
The top and bottom padding of the renderer.
fn connect_activate<F: Fn(&Self, &TextIter, &Rectangle, u32, ModifierType, i32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
The ::activate signal is emitted when the renderer is activated.
iter
a gtk::TextIter
area
a gdk::Rectangle
button
the button that was pressed
state
a gdk::ModifierType
of state
n_presses
the number of button presses
fn connect_query_activatable<F: Fn(&Self, &TextIter, &Rectangle) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&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
fn connect_query_data<F: Fn(&Self, &Object, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_alignment_mode_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_lines_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_view_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_xalign_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_xpad_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_yalign_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_ypad_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<GutterRenderer>> GutterRendererExt for O
[src]
fn activate(
&self,
iter: &TextIter,
area: &Rectangle,
button: u32,
state: ModifierType,
n_presses: i32
)
[src]
&self,
iter: &TextIter,
area: &Rectangle,
button: u32,
state: ModifierType,
n_presses: i32
)
fn align_cell(&self, line: u32, width: f32, height: f32) -> (f32, f32)
[src]
fn get_alignment_mode(&self) -> GutterRendererAlignmentMode
[src]
fn get_buffer(&self) -> Option<Buffer>
[src]
fn get_view(&self) -> Option<View>
[src]
fn get_xalign(&self) -> f32
[src]
fn get_xpad(&self) -> i32
[src]
fn get_yalign(&self) -> f32
[src]
fn get_ypad(&self) -> i32
[src]
fn query_activatable(&self, iter: &TextIter, area: &Rectangle) -> bool
[src]
fn set_alignment_mode(&self, mode: GutterRendererAlignmentMode)
[src]
fn set_xalign(&self, xalign: f32)
[src]
fn set_xpad(&self, xpad: i32)
[src]
fn set_yalign(&self, yalign: f32)
[src]
fn set_ypad(&self, ypad: i32)
[src]
fn get_property_lines(&self) -> Option<GutterLines>
[src]
fn get_property_xalign(&self) -> f32
[src]
fn set_property_xalign(&self, xalign: f32)
[src]
fn get_property_xpad(&self) -> i32
[src]
fn set_property_xpad(&self, xpad: i32)
[src]
fn get_property_yalign(&self) -> f32
[src]
fn set_property_yalign(&self, yalign: f32)
[src]
fn get_property_ypad(&self) -> i32
[src]
fn set_property_ypad(&self, ypad: i32)
[src]
fn connect_activate<F: Fn(&Self, &TextIter, &Rectangle, u32, ModifierType, i32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_query_activatable<F: Fn(&Self, &TextIter, &Rectangle) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_query_data<F: Fn(&Self, &Object, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_alignment_mode_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_lines_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_view_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_xalign_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_xpad_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_yalign_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_ypad_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId