pub enum Positioning {
Top,
TopStart,
TopEnd,
Right,
RightStart,
RightEnd,
Bottom,
BottomStart,
BottomEnd,
Left,
LeftStart,
LeftEnd,
}Variants§
Implementations§
Source§impl Positioning
impl Positioning
Sourcepub fn calculate_position(
self,
trigger_top: f64,
trigger_left: f64,
trigger_width: f64,
trigger_height: f64,
content_height: f64,
content_width: f64,
offset: f64,
) -> (f64, f64)
pub fn calculate_position( self, trigger_top: f64, trigger_left: f64, trigger_width: f64, trigger_height: f64, content_height: f64, content_width: f64, offset: f64, ) -> (f64, f64)
Calculate the position of content relative to a trigger element Returns (top, left) coordinates in pixels
Sourcepub fn calculate_arrow_position(
self,
trigger_top: f64,
trigger_left: f64,
trigger_width: f64,
trigger_height: f64,
arrow_size: f64,
) -> (f64, f64, i32)
pub fn calculate_arrow_position( self, trigger_top: f64, trigger_left: f64, trigger_width: f64, trigger_height: f64, arrow_size: f64, ) -> (f64, f64, i32)
Calculate the position and rotation for an arrow indicator Returns (top, left, rotation) where rotation is in degrees
Trait Implementations§
Source§impl Clone for Positioning
impl Clone for Positioning
Source§fn clone(&self) -> Positioning
fn clone(&self) -> Positioning
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Positioning
impl Debug for Positioning
Source§impl Default for Positioning
impl Default for Positioning
impl Copy for Positioning
Auto Trait Implementations§
impl Freeze for Positioning
impl RefUnwindSafe for Positioning
impl Send for Positioning
impl Sync for Positioning
impl Unpin for Positioning
impl UnwindSafe for Positioning
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
Marker: ?Sized,
impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
Marker: ?Sized,
fn into_element_maybe_signal(self) -> ElementMaybeSignal<T>
Source§impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
Marker: ?Sized,
impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
Marker: ?Sized,
fn into_elements_maybe_signal(self) -> ElementsMaybeSignal<T>
Source§impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.