Trait sourceview4::prelude::SpaceDrawerExt
source · pub trait SpaceDrawerExt: IsA<SpaceDrawer> + Sealed + 'static {
// Provided methods
fn bind_matrix_setting(
&self,
settings: &impl IsA<Settings>,
key: &str,
flags: SettingsBindFlags
) { ... }
fn enables_matrix(&self) -> bool { ... }
fn matrix(&self) -> Option<Variant> { ... }
fn types_for_locations(
&self,
locations: SpaceLocationFlags
) -> SpaceTypeFlags { ... }
fn set_enable_matrix(&self, enable_matrix: bool) { ... }
fn set_matrix(&self, matrix: Option<&Variant>) { ... }
fn set_types_for_locations(
&self,
locations: SpaceLocationFlags,
types: SpaceTypeFlags
) { ... }
fn connect_enable_matrix_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_matrix_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn bind_matrix_setting(
&self,
settings: &impl IsA<Settings>,
key: &str,
flags: SettingsBindFlags
)
fn bind_matrix_setting( &self, settings: &impl IsA<Settings>, key: &str, flags: SettingsBindFlags )
Binds the matrix
property to a gio::Settings
key.
The gio::Settings
key must be of the same type as the
matrix
property, that is, "au"
.
The SettingsExtManual::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.
sourcefn enables_matrix(&self) -> bool
fn enables_matrix(&self) -> bool
sourcefn matrix(&self) -> Option<Variant>
fn matrix(&self) -> Option<Variant>
Gets the value of the matrix
property, as a glib::Variant
.
An empty array can be returned in case the matrix is a zero matrix.
The types_for_locations()
function may be more
convenient to use.
Returns
the matrix
value as a new floating glib::Variant
instance.
sourcefn types_for_locations(&self, locations: SpaceLocationFlags) -> SpaceTypeFlags
fn types_for_locations(&self, locations: SpaceLocationFlags) -> SpaceTypeFlags
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
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
.
sourcefn set_enable_matrix(&self, enable_matrix: bool)
fn set_enable_matrix(&self, enable_matrix: bool)
sourcefn set_matrix(&self, matrix: Option<&Variant>)
fn set_matrix(&self, matrix: Option<&Variant>)
Sets a new value to the matrix
property, as a
glib::Variant
. If matrix
is None
, then an empty array is set.
If matrix
is floating, it is consumed.
The set_types_for_locations()
function may be more
convenient to use.
matrix
the new matrix value, or None
.
sourcefn set_types_for_locations(
&self,
locations: SpaceLocationFlags,
types: SpaceTypeFlags
)
fn set_types_for_locations( &self, locations: SpaceLocationFlags, types: SpaceTypeFlags )
Modifies the matrix
property at the specified
locations
.
locations
one or several SpaceLocationFlags
.
types
a combination of SpaceTypeFlags
.