Trait sourceview4::prelude::MarkAttributesExt
source · pub trait MarkAttributesExt: IsA<MarkAttributes> + Sealed + 'static {
Show 17 methods
// Provided methods
fn background(&self) -> Option<RGBA> { ... }
fn gicon(&self) -> Option<Icon> { ... }
fn icon_name(&self) -> Option<GString> { ... }
fn pixbuf(&self) -> Option<Pixbuf> { ... }
fn tooltip_markup(&self, mark: &impl IsA<Mark>) -> Option<GString> { ... }
fn tooltip_text(&self, mark: &impl IsA<Mark>) -> Option<GString> { ... }
fn render_icon(
&self,
widget: &impl IsA<Widget>,
size: i32
) -> Option<Pixbuf> { ... }
fn set_background(&self, background: &RGBA) { ... }
fn set_gicon(&self, gicon: &impl IsA<Icon>) { ... }
fn set_icon_name(&self, icon_name: &str) { ... }
fn set_pixbuf(&self, pixbuf: &Pixbuf) { ... }
fn connect_query_tooltip_markup<F: Fn(&Self, &Mark) -> String + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_query_tooltip_text<F: Fn(&Self, &Mark) -> String + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_background_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_gicon_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_pixbuf_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn background(&self) -> Option<RGBA>
fn background(&self) -> Option<RGBA>
Stores background color in background
.
Returns
whether background color for self
was set.
background
a gdk::RGBA
.
sourcefn pixbuf(&self) -> Option<Pixbuf>
fn pixbuf(&self) -> Option<Pixbuf>
Gets a gdk_pixbuf::Pixbuf
to be used as a base for rendered icon. Note that the
pixbuf can be None
if it wasn’t set earlier.
Returns
A pixbuf. The pixbuf belongs to self
and
should not be unreffed.
sourcefn tooltip_markup(&self, mark: &impl IsA<Mark>) -> Option<GString>
fn tooltip_markup(&self, mark: &impl IsA<Mark>) -> Option<GString>
Queries for a tooltip by emitting
a query-tooltip-markup
signal. The tooltip may contain
a markup.
mark
a Mark
.
Returns
A tooltip. The returned string should be freed by
using g_free()
when done with it.
sourcefn tooltip_text(&self, mark: &impl IsA<Mark>) -> Option<GString>
fn tooltip_text(&self, mark: &impl IsA<Mark>) -> Option<GString>
Queries for a tooltip by emitting
a query-tooltip-text
signal. The tooltip is a plain
text.
mark
a Mark
.
Returns
A tooltip. The returned string should be freed by
using g_free()
when done with it.
sourcefn render_icon(&self, widget: &impl IsA<Widget>, size: i32) -> Option<Pixbuf>
fn render_icon(&self, widget: &impl IsA<Widget>, size: i32) -> Option<Pixbuf>
Renders an icon of given size. The base of the icon is set by the last call
to one of: set_pixbuf()
,
set_gicon()
or
set_icon_name()
. size
cannot be lower than 1.
widget
widget of which style settings may be used.
size
size of the rendered icon.
Returns
A rendered pixbuf. The pixbuf belongs to self
and should not be unreffed.
sourcefn set_background(&self, background: &RGBA)
fn set_background(&self, background: &RGBA)
sourcefn set_icon_name(&self, icon_name: &str)
fn set_icon_name(&self, icon_name: &str)
Sets a name of an icon to be used as a base for rendered icon.
icon_name
name of an icon to be used.