pub struct PaneDragRect {
pub strip_bounds: Rect,
pub content_bounds: Rect,
pub tab_slots: Vec<(f32, f32)>,
}Expand description
Externally-supplied geometry for one pane, used by
TabGroupController::set_drag_geometry to prime the drag hit-test cache
without a render pass.
Consumers that compute their own per-pane layout (e.g. a native backend
with its own geometry engine) populate one PaneDragRect per pane and
pass the slice to set_drag_geometry. After that call,
handle_tab_drag_move,
handle_tab_drop,
drop_group_rects,
drop_zone_at, and
tab_drag_overlay all work without
ever calling render.
tab_slots uses the same sentinel convention as TabBarHits: pass
(0.0, 0.0) for any tab that is scrolled off the left edge of the strip.
Fields§
§strip_bounds: RectBounds of the tab strip row (top of the pane).
content_bounds: RectBounds of the pane’s content area (below the tab strip).
tab_slots: Vec<(f32, f32)>Absolute (start_x, end_x) for each tab slot, in pane tab-list order.
Tabs that are scrolled off the left edge of the strip must be
represented by a (0.0, 0.0) sentinel so that indices here stay
aligned with the controller’s internal tab vec.
Trait Implementations§
Source§impl Clone for PaneDragRect
impl Clone for PaneDragRect
Source§impl Debug for PaneDragRect
impl Debug for PaneDragRect
Source§impl PartialEq for PaneDragRect
impl PartialEq for PaneDragRect
impl StructuralPartialEq for PaneDragRect
Auto Trait Implementations§
impl Freeze for PaneDragRect
impl RefUnwindSafe for PaneDragRect
impl Send for PaneDragRect
impl Sync for PaneDragRect
impl Unpin for PaneDragRect
impl UnsafeUnpin for PaneDragRect
impl UnwindSafe for PaneDragRect
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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