Struct sourceview5::SpaceDrawer[][src]

pub struct SpaceDrawer(_);

Implementations

impl SpaceDrawer[src]

pub fn new() -> SpaceDrawer[src]

Creates a new SpaceDrawer object. Useful for storing space drawing settings independently of a View.

Returns

a new SpaceDrawer.

pub fn bind_matrix_setting<P: IsA<Settings>>(
    &self,
    settings: &P,
    key: &str,
    flags: SettingsBindFlags
)
[src]

Binds the SpaceDrawer:matrix property to a gio::Settings key.

The gio::Settings key must be of the same type as the SpaceDrawer:matrix property, that is, "au".

The gio::SettingsExt::bind function cannot be used, because the default GIO mapping functions don’t support glib::Variant properties (maybe it will be supported by a future GIO version, in which case this function can be deprecated).

settings

a gio::Settings object.

key

the settings key to bind.

flags

flags for the binding.

pub fn get_enable_matrix(&self) -> bool[src]

Returns

whether the SpaceDrawer:matrix property is enabled.

pub fn get_matrix(&self) -> Option<Variant>[src]

Gets the value of the SpaceDrawer:matrix property, as a glib::Variant. An empty array can be returned in case the matrix is a zero matrix.

The SpaceDrawer::get_types_for_locations function may be more convenient to use.

Returns

the SpaceDrawer:matrix value as a new floating glib::Variant instance.

pub fn get_types_for_locations(
    &self,
    locations: SpaceLocationFlags
) -> SpaceTypeFlags
[src]

If only one location is specified, this function returns what kind of white spaces are drawn at that location. The value is retrieved from the SpaceDrawer:matrix property.

If several locations are specified, this function returns the logical AND for those locations. Which means that if a certain kind of white space is present in the return value, then that kind of white space is drawn at all the specified locations.

locations

one or several SpaceLocationFlags.

Returns

a combination of SpaceTypeFlags.

pub fn set_enable_matrix(&self, enable_matrix: bool)[src]

Sets whether the SpaceDrawer:matrix property is enabled.

enable_matrix

the new value.

pub fn set_matrix(&self, matrix: Option<&Variant>)[src]

Sets a new value to the SpaceDrawer:matrix property, as a glib::Variant. If matrix is None, then an empty array is set.

If matrix is floating, it is consumed.

The SpaceDrawer::set_types_for_locations function may be more convenient to use.

matrix

the new matrix value, or None.

pub fn set_types_for_locations(
    &self,
    locations: SpaceLocationFlags,
    types: SpaceTypeFlags
)
[src]

Modifies the SpaceDrawer:matrix property at the specified locations.

locations

one or several SpaceLocationFlags.

types

a combination of SpaceTypeFlags.

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

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

Trait Implementations

impl Clone for SpaceDrawer[src]

impl Debug for SpaceDrawer[src]

impl Default for SpaceDrawer[src]

impl Display for SpaceDrawer[src]

impl Eq for SpaceDrawer[src]

impl Hash for SpaceDrawer[src]

impl Ord for SpaceDrawer[src]

impl ParentClassIs for SpaceDrawer[src]

type Parent = Object

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

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

impl StaticType for SpaceDrawer[src]

impl StructuralEq for SpaceDrawer[src]

Auto Trait Implementations

impl RefUnwindSafe for SpaceDrawer

impl !Send for SpaceDrawer

impl !Sync for SpaceDrawer

impl Unpin for SpaceDrawer

impl UnwindSafe for SpaceDrawer

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.