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: AnchorOffset
The anchor offset place point is resolved in the cursor icon size (approximate).
include_touch: bool
If 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: AnchorOffset
The anchor offset place point is resolved in the cursor icon size (approximate), or in touch point pixel for touch positions.
include_touch: bool
If 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) -> <AnchorTransform as IntoVar<AnchorMode>>::Var
fn into_var(self) -> <AnchorTransform as IntoVar<AnchorMode>>::Var
Custom transform, all else default.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl<P, O> IntoVar<AnchorTransform> for (P, O)
impl<P, O> IntoVar<AnchorTransform> for (P, O)
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<AnchorTransform> for AnchorOffset
impl IntoVar<AnchorTransform> for AnchorOffset
source§fn into_var(self) -> <AnchorOffset as IntoVar<AnchorTransform>>::Var
fn into_var(self) -> <AnchorOffset as IntoVar<AnchorTransform>>::Var
InnerOffset
.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§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 Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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