Struct sourceview5::MarkAttributes[][src]

pub struct MarkAttributes(_);

Implementations

impl MarkAttributes[src]

pub fn new() -> MarkAttributes[src]

Creates a new source mark attributes.

Returns

a new source mark attributes.

pub fn get_background(&self) -> Option<RGBA>[src]

Stores background color in background.

background

a gdk::RGBA.

Returns

whether background color for self was set.

pub fn get_gicon(&self) -> Option<Icon>[src]

Gets a gio::Icon to be used as a base for rendered icon. Note that the icon can be None if it wasn’t set earlier.

Returns

An icon. The icon belongs to self and should not be unreffed.

pub fn get_icon_name(&self) -> Option<GString>[src]

Gets a name of an icon to be used as a base for rendered icon. Note that the icon name can be None if it wasn’t set earlier.

Returns

An icon name. The string belongs to self and should not be freed.

pub fn get_pixbuf(&self) -> Option<Pixbuf>[src]

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.

pub fn get_tooltip_markup<P: IsA<Mark>>(&self, mark: &P) -> Option<GString>[src]

Queries for a tooltip by emitting a MarkAttributes::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.

pub fn get_tooltip_text<P: IsA<Mark>>(&self, mark: &P) -> Option<GString>[src]

Queries for a tooltip by emitting a MarkAttributes::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.

pub fn render_icon<P: IsA<Widget>>(
    &self,
    widget: &P,
    size: i32
) -> Option<Paintable>
[src]

Renders an icon of given size. The base of the icon is set by the last call to one of: MarkAttributes::set_pixbuf, MarkAttributes::set_gicon or MarkAttributes::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 gdk::Paintable. The paintable belongs to self and should not be unreffed.

pub fn set_background(&self, background: &RGBA)[src]

Sets background color to the one given in background.

background

a gdk::RGBA.

pub fn set_gicon<P: IsA<Icon>>(&self, gicon: &P)[src]

Sets an icon to be used as a base for rendered icon.

gicon

a gio::Icon to be used.

pub fn set_icon_name(&self, icon_name: &str)[src]

Sets a name of an icon to be used as a base for rendered icon.

icon_name

name of an icon to be used.

pub fn set_pixbuf(&self, pixbuf: &Pixbuf)[src]

Sets a pixbuf to be used as a base for rendered icon.

pixbuf

a gdk_pixbuf::Pixbuf to be used.

pub fn connect_query_tooltip_markup<F: Fn(&MarkAttributes, &Mark) -> String + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

The code should connect to this signal to provide a tooltip for given mark. The tooltip can contain a markup.

mark

The Mark.

Returns

A tooltip. The string should be freed with g_free when done with it.

pub fn connect_query_tooltip_text<F: Fn(&MarkAttributes, &Mark) -> String + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

The code should connect to this signal to provide a tooltip for given mark. The tooltip should be just a plain text.

mark

The Mark.

Returns

A tooltip. The string should be freed with g_free when done with it.

pub fn connect_property_background_notify<F: Fn(&MarkAttributes) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_gicon_notify<F: Fn(&MarkAttributes) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_icon_name_notify<F: Fn(&MarkAttributes) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_pixbuf_notify<F: Fn(&MarkAttributes) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Trait Implementations

impl Clone for MarkAttributes[src]

impl Debug for MarkAttributes[src]

impl Default for MarkAttributes[src]

impl Display for MarkAttributes[src]

impl Eq for MarkAttributes[src]

impl Hash for MarkAttributes[src]

impl Ord for MarkAttributes[src]

impl ParentClassIs for MarkAttributes[src]

type Parent = Object

impl<T: ObjectType> PartialEq<T> for MarkAttributes[src]

impl<T: ObjectType> PartialOrd<T> for MarkAttributes[src]

impl StaticType for MarkAttributes[src]

impl StructuralEq for MarkAttributes[src]

Auto Trait Implementations

impl RefUnwindSafe for MarkAttributes

impl !Send for MarkAttributes

impl !Sync for MarkAttributes

impl Unpin for MarkAttributes

impl UnwindSafe for MarkAttributes

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.