pub struct Columns {
pub sidebar: f64,
pub left: f64,
pub right: f64,
}Expand description
The fixed-width columns. The center is derived: see Columns::center.
Fields§
§left: f64§right: f64Implementations§
Source§impl Columns
impl Columns
Sourcepub fn chrome(shown: Shown) -> f64
pub fn chrome(shown: Shown) -> f64
Pixels taken by the resizer bars and hairlines for the columns shown.
Sourcepub fn center(&self, width: f64, shown: Shown) -> f64
pub fn center(&self, width: f64, shown: Shown) -> f64
The center panel’s width in a row width pixels wide.
Sourcepub fn initial(width: f64, shown: Shown) -> Self
pub fn initial(width: f64, shown: Shown) -> Self
The layout a first visit starts from: a 300px sidebar beside panels split 35% / 40% / 25%, the proportions the Studio has always opened with.
Sourcepub fn dragged(
self,
resizer: Resizer,
dx: f64,
width: f64,
shown: Shown,
) -> Self
pub fn dragged( self, resizer: Resizer, dx: f64, width: f64, shown: Shown, ) -> Self
The layout after dragging resizer by dx pixels, where self is the layout on
screen when the drag began. Only the two columns beside the resizer change, and
neither passes its minimum.
Sourcepub fn fit(self, width: f64, shown: Shown) -> Self
pub fn fit(self, width: f64, shown: Shown) -> Self
This layout drawn in a row width pixels wide. Each column is held to its bounds;
any change in width lands on the center first, and when the center would drop below
its minimum the right panel gives way, then the left, then the sidebar, each down to
its own minimum. A column that is not shown keeps its width for when it returns.
Trait Implementations§
impl Copy for Columns
impl StructuralPartialEq for Columns
Auto Trait Implementations§
impl Freeze for Columns
impl RefUnwindSafe for Columns
impl Send for Columns
impl Sync for Columns
impl Unpin for Columns
impl UnsafeUnpin for Columns
impl UnwindSafe for Columns
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,
§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.