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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<AnchorOffset> for AnchorTransform
impl From<AnchorOffset> for AnchorTransform
source§fn from(inner_offset: AnchorOffset) -> Self
fn from(inner_offset: AnchorOffset) -> Self
InnerOffset
.
source§impl From<AnchorTransform> for AnchorMode
impl From<AnchorTransform> for AnchorMode
source§fn from(transform: AnchorTransform) -> Self
fn from(transform: AnchorTransform) -> Self
Custom transform, all else default.
source§impl IntoVar<AnchorMode> for AnchorTransform
impl IntoVar<AnchorMode> for AnchorTransform
source§impl IntoVar<AnchorTransform> for AnchorOffset
impl IntoVar<AnchorTransform> for AnchorOffset
source§impl PartialEq for AnchorTransform
impl PartialEq for AnchorTransform
source§impl Serialize for AnchorTransform
impl Serialize for AnchorTransform
impl IntoValue<AnchorMode> for AnchorTransform
impl<P: Into<Point>, O: Into<Point>> 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§
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> 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> 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