pub enum AnchorTransform {
None,
InnerOffset(AnchorOffset),
InnerBorderOffset(AnchorOffset),
OuterOffset(AnchorOffset),
InnerTransform,
InnerBorderTransform,
OuterTransform,
CursorOnce {
offset: AnchorOffset,
include_touch: bool,
bounds: Option<SideOffsets>,
},
Cursor {
offset: AnchorOffset,
include_touch: bool,
bounds: Option<SideOffsets>,
},
}Expand description
Options for AnchorMode::transform.
Variants§
None
Widget does not copy any position from the anchor widget.
InnerOffset(AnchorOffset)
The layer widget is translated so that a point in the layer widget outer-bounds aligns with a point in the anchor widget inner-bounds.
InnerBorderOffset(AnchorOffset)
The layer widget is translated so that a point in the layer widget outer-bounds aligns with a point in the anchor widget fill area (inside the border offset).
OuterOffset(AnchorOffset)
The layer widget is translated so that a point in the layer widget outer-bounds aligns with a point in the anchor widget outer-bounds.
InnerTransform
The full inner transform of the anchor object is applied to the widget.
InnerBorderTransform
The full inner transform of the anchor object is applied to the widget plus the border widths offset.
OuterTransform
The full outer transform of the anchor object is applied to the widget.
CursorOnce
The layer widget is translated on the first layout to be at the cursor position.
Fields
offset: AnchorOffsetThe anchor offset place point is resolved in the cursor icon size (approximate).
include_touch: boolIf the latest touch position counts as a cursor.
If true the latest position between mouse move and touch start or move is used, if false
only the latest mouse position is used. Only active touch points count, that is touch start or
move events only.
bounds: Option<SideOffsets>If set defines the offset from the anchor widget inner bounds that is the allowed area for the layer widget origin.
Negative offsets are inside the inner bounds, positive outside.
Cursor
The layer widget is translated to follow the cursor position.
The anchor offset place point is resolved in the cursor icon size (approximate).
Fields
offset: AnchorOffsetThe anchor offset place point is resolved in the cursor icon size (approximate), or in touch point pixel for touch positions.
include_touch: boolIf the latest touch position counts as a cursor.
If true the latest position between mouse move and touch start or move is used, if false
only the latest mouse position is used. Only active touch points count, that is touch start or
move events only. In case multiple touches are active only the first one counts.
bounds: Option<SideOffsets>If set defines the offset from the anchor widget inner bounds that is the allowed area for the layer widget origin.
Negative offsets are inside the inner bounds, positive outside.
Trait Implementations§
Source§impl Clone for AnchorTransform
impl Clone for AnchorTransform
Source§fn clone(&self) -> AnchorTransform
fn clone(&self) -> AnchorTransform
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnchorTransform
impl Debug for AnchorTransform
Source§impl<'de> Deserialize<'de> for AnchorTransform
impl<'de> Deserialize<'de> for AnchorTransform
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AnchorTransform, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AnchorTransform, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<P, O> From<(P, O)> for AnchorTransform
impl<P, O> From<(P, O)> for AnchorTransform
Source§fn from(inner_offset: (P, O)) -> AnchorTransform
fn from(inner_offset: (P, O)) -> AnchorTransform
InnerOffset.
Source§impl From<AnchorOffset> for AnchorTransform
impl From<AnchorOffset> for AnchorTransform
Source§fn from(inner_offset: AnchorOffset) -> AnchorTransform
fn from(inner_offset: AnchorOffset) -> AnchorTransform
InnerOffset.
Source§impl From<AnchorTransform> for AnchorMode
impl From<AnchorTransform> for AnchorMode
Source§fn from(transform: AnchorTransform) -> AnchorMode
fn from(transform: AnchorTransform) -> AnchorMode
Custom transform, all else default.
Source§impl IntoVar<AnchorMode> for AnchorTransform
impl IntoVar<AnchorMode> for AnchorTransform
Source§fn into_var(self) -> Var<AnchorMode>
fn into_var(self) -> Var<AnchorMode>
Custom transform, all else default.
Source§impl<P, O> IntoVar<AnchorTransform> for (P, O)
impl<P, O> IntoVar<AnchorTransform> for (P, O)
Source§fn into_var(self) -> Var<AnchorTransform>
fn into_var(self) -> Var<AnchorTransform>
InnerOffset.
Source§impl IntoVar<AnchorTransform> for AnchorOffset
impl IntoVar<AnchorTransform> for AnchorOffset
Source§fn into_var(self) -> Var<AnchorTransform>
fn into_var(self) -> Var<AnchorTransform>
InnerOffset.
Source§impl PartialEq for AnchorTransform
impl PartialEq for AnchorTransform
Source§impl Serialize for AnchorTransform
impl Serialize for AnchorTransform
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl IntoValue<AnchorMode> for AnchorTransform
impl<P, O> IntoValue<AnchorTransform> for (P, O)
impl IntoValue<AnchorTransform> for AnchorOffset
impl StructuralPartialEq for AnchorTransform
Auto Trait Implementations§
impl Freeze for AnchorTransform
impl RefUnwindSafe for AnchorTransform
impl Send for AnchorTransform
impl Sync for AnchorTransform
impl Unpin for AnchorTransform
impl UnwindSafe for AnchorTransform
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more