Struct ux::Path [−][src]
pub struct Path(_, _);
Implementations
impl Path
[src][−]
pub fn new() -> Path
[src][−]
Creates a new Path
instance with no nodes.
The object has a floating reference so if you add it to a
BehaviourPath
then you do not need to unref it.
Returns
the newly created Path
pub fn with_description(desc: &str) -> Path
[src]
Trait Implementations
impl Clone for Path
[src][+]
pub fn clone(&self) -> Path
[src][−]
Returns a copy of the value. Read more
pub fn clone_from(&mut self, source: &Self)
1.0.0[src][−]
Performs copy-assignment from source
. Read more
impl Debug for Path
[src][+]
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
[src][−]
Formats the value using the given formatter. Read more
impl Default for Path
[src][+]
pub fn default() -> Path
[src][−]
Returns the “default value” for a type. Read more
impl Display for Path
[src][+]
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
[src][−]
Formats the value using the given formatter. Read more
impl Eq for Path
[src]
impl Hash for Path
[src][+]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src][−]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src][−]
H: Hasher,
impl IsA<InitiallyUnowned> for Path
[src]
impl Ord for Path
[src][+]
pub fn cmp(&self, other: &Path) -> Ordering
[src][−]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src][−]
Compares and returns the maximum of two values. Read more
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src][−]
Compares and returns the minimum of two values. Read more
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src][−]
Restrict a value to a certain interval. Read more
impl<T> PartialEq<T> for Path where
T: ObjectType,
[src][+]
T: ObjectType,
pub fn eq(&self, other: &T) -> bool
[src][−]
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests for !=
.
impl<T> PartialOrd<T> for Path where
T: ObjectType,
[src][+]
T: ObjectType,
pub fn partial_cmp(&self, other: &T) -> Option<Ordering>
[src][−]
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl StaticType for Path
[src][+]
pub fn static_type() -> Type
[src][−]
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for Path
impl !Send for Path
impl !Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
pub fn type_id(&self) -> TypeId
[src][−]
Gets the TypeId
of self
. Read more
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow(&self) -> &T
[src][−]
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src][−]
Mutably borrows from an owned value. Read more
impl<Super, Sub> CanDowncast<Sub> for Super where
Sub: IsA<Super>,
Super: IsA<Super>,
[src]
Sub: IsA<Super>,
Super: IsA<Super>,
impl<T> Cast for T where
T: ObjectType,
[src][+]
T: ObjectType,
pub fn upcast<T>(self) -> T where
Self: IsA<T>,
T: ObjectType,
[src][−]
Self: IsA<T>,
T: ObjectType,
Upcasts an object to a superclass or interface T
. Read more
pub fn upcast_ref<T>(&self) -> &T where
Self: IsA<T>,
T: ObjectType,
[src][−]
Self: IsA<T>,
T: ObjectType,
Upcasts an object to a reference of its superclass or interface T
. Read more
pub fn downcast<T>(self) -> Result<T, Self> where
Self: CanDowncast<T>,
T: ObjectType,
[src][−]
Self: CanDowncast<T>,
T: ObjectType,
Tries to downcast to a subclass or interface implementor T
. Read more
pub fn downcast_ref<T>(&self) -> Option<&T> where
Self: CanDowncast<T>,
T: ObjectType,
[src][−]
Self: CanDowncast<T>,
T: ObjectType,
Tries to downcast to a reference of its subclass or interface implementor T
. Read more
pub fn dynamic_cast<T>(self) -> Result<T, Self> where
T: ObjectType,
[src][−]
T: ObjectType,
Tries to cast to an object of type T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read more
pub fn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: ObjectType,
[src][−]
T: ObjectType,
Tries to cast to reference to an object of type T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read more
pub unsafe fn unsafe_cast<T>(self) -> T where
T: ObjectType,
[src][−]
T: ObjectType,
Casts to T
unconditionally. Read more
pub unsafe fn unsafe_cast_ref<T>(&self) -> &T where
T: ObjectType,
[src][−]
T: ObjectType,
Casts to &T
unconditionally. Read more
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ObjectExt for T where
T: ObjectType,
[src][+]
T: ObjectType,
pub fn is<U>(&self) -> bool where
U: StaticType,
[src][−]
U: StaticType,
Returns true
if the object is an instance of (can be cast to) T
.
pub fn get_type(&self) -> Type
[src]
pub fn get_object_class(&self) -> &ObjectClass
[src]
pub fn set_properties(
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
[src]
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
pub fn set_property<'a, N>(
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>,
[src]
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>,
pub fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub unsafe fn set_qdata<QD>(&self, key: Quark, value: QD) where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn get_qdata<QD>(&self, key: Quark) -> Option<&QD> where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD> where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn set_data<QD>(&self, key: &str, value: QD) where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn get_data<QD>(&self, key: &str) -> Option<&QD> where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD> where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub fn block_signal(&self, handler_id: &SignalHandlerId)
[src]
pub fn unblock_signal(&self, handler_id: &SignalHandlerId)
[src]
pub fn stop_signal_emission(&self, signal_name: &str)
[src]
pub fn disconnect(&self, handler_id: SignalHandlerId)
[src]
pub fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
[src]
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
pub unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
[src]
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
pub fn notify<'a, N>(&self, property_name: N) where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn notify_by_pspec(&self, pspec: &ParamSpec)
[src]
pub fn has_property<'a, N>(&self, property_name: N, type_: Option<Type>) -> bool where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn list_properties(&self) -> Vec<ParamSpec, Global>
[src]
pub fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
pub fn connect_local<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value> + 'static,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value> + 'static,
pub unsafe fn connect_unsafe<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value>,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value>,
pub fn emit<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
[src]
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
pub fn downgrade(&self) -> WeakRef<T>
[src]
pub fn bind_property<'a, O, N, M>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
N: Into<&'a str>,
O: ObjectType,
M: Into<&'a str>,
[src]
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
N: Into<&'a str>,
O: ObjectType,
M: Into<&'a str>,
pub fn ref_count(&self) -> u32
[src]
impl<O> PathExt for O where
O: IsA<Path>,
[src][+]
O: IsA<Path>,
pub fn add_close(&self)
[src][−]
Adds a PathNodeType::Close
type node to the path. This creates a
straight line from the last node to the last PathNodeType::MoveTo
type node. Read more
pub fn add_curve_to(
&self,
x_1: i32,
y_1: i32,
x_2: i32,
y_2: i32,
x_3: i32,
y_3: i32
)
[src][−]
&self,
x_1: i32,
y_1: i32,
x_2: i32,
y_2: i32,
x_3: i32,
y_3: i32
)
Adds a PathNodeType::CurveTo
type node to the path. This causes
the actor to follow a bezier from the last node to (x_3
, y_3
) using
(x_1
, y_1
) and (x_2
,y_2
) as control points. Read more
pub fn add_line_to(&self, x: i32, y: i32)
[src][−]
Adds a PathNodeType::LineTo
type node to the path. This causes the
actor to move to the new coordinates in a straight line. Read more
pub fn add_move_to(&self, x: i32, y: i32)
[src][−]
Adds a PathNodeType::MoveTo
type node to the path. This is usually
used as the first node in a path. It can also be used in the middle
of the path to cause the actor to jump to the new coordinate. Read more
pub fn add_node(&self, node: &PathNode)
[src][−]
Adds node
to the end of the path. Read more
pub fn add_rel_curve_to(
&self,
x_1: i32,
y_1: i32,
x_2: i32,
y_2: i32,
x_3: i32,
y_3: i32
)
[src][−]
&self,
x_1: i32,
y_1: i32,
x_2: i32,
y_2: i32,
x_3: i32,
y_3: i32
)
Same as PathExt::add_curve_to
except the coordinates are
relative to the previous node. Read more
pub fn add_rel_line_to(&self, x: i32, y: i32)
[src][−]
Same as PathExt::add_line_to
except the coordinates are
relative to the previous node. Read more
pub fn add_rel_move_to(&self, x: i32, y: i32)
[src][−]
Same as PathExt::add_move_to
except the coordinates are
relative to the previous node. Read more
pub fn add_string(&self, str: &str) -> bool
[src][−]
Adds new nodes to the end of the path as described in str
. The
format is a subset of the SVG path format. Each node is represented
by a letter and is followed by zero, one or three pairs of
coordinates. The coordinates can be separated by spaces or a
comma. The types are: Read more
pub fn clear(&self)
[src][−]
Removes all nodes from the path.
pub fn foreach<P>(&self, callback: P) where
P: FnMut(&PathNode),
[src][−]
P: FnMut(&PathNode),
Calls a function for each node of the path. Read more
pub fn get_description(&self) -> Option<GString>
[src][−]
Returns a newly allocated string describing the path in the same
format as used by PathExt::add_string
. Read more
pub fn get_length(&self) -> u32
[src][−]
Retrieves an approximation of the total length of the path. Read more
pub fn get_n_nodes(&self) -> u32
[src][−]
Retrieves the number of nodes in the path. Read more
pub fn get_node(&self, index_: u32) -> PathNode
[src][−]
Retrieves the node of the path indexed by index
. Read more
pub fn get_nodes(&self) -> Vec<PathNode, Global>
[src][−]
Returns a glib::SList
of PathNode
s. The list should be
freed with glib::SList::free
. The nodes are owned by the path and
should not be freed. Altering the path may cause the nodes in the
list to become invalid so you should copy them if you want to keep
the list. Read more
pub fn get_position(&self, progress: f64) -> (u32, Knot)
[src][−]
The value in progress
represents a position along the path where
0.0 is the beginning and 1.0 is the end of the path. An
interpolated position is then stored in position
. Read more
pub fn insert_node(&self, index_: i32, node: &PathNode)
[src][−]
Inserts node
into the path before the node at the given offset. If
index_
is negative it will append the node to the end of the path. Read more
pub fn remove_node(&self, index_: u32)
[src][−]
Removes the node at the given offset from the path. Read more
pub fn replace_node(&self, index_: u32, node: &PathNode)
[src][−]
Replaces the node at offset index_
with node
. Read more
pub fn set_description(&self, str: &str) -> bool
[src][−]
Replaces all of the nodes in the path with nodes described by
str
. See PathExt::add_string
for details of the format. Read more
pub fn connect_property_description_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_length_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src][−]
Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src][−]
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> ToString for T where
T: Display + ?Sized,
[src][+]
T: Display + ?Sized,
pub default fn to_string(&self) -> String
[src][−]
Converts the given value to a String
. Read more
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src][+]
T: SetValue + ?Sized,
pub fn to_value(&self) -> Value
[src][−]
Returns a Value
clone of self
.
pub fn to_value_type(&self) -> Type
[src][−]
Returns the type identifer of self
. Read more
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][−]
Performs the conversion.
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,