Struct egui_tiles::Linear
source · pub struct Linear {
pub children: Vec<TileId>,
pub dir: LinearDir,
pub shares: Shares,
}
Expand description
Horizontal or vertical container.
Fields§
§children: Vec<TileId>
§dir: LinearDir
Implementations§
source§impl Linear
impl Linear
pub fn new(dir: LinearDir, children: Vec<TileId>) -> Self
sourcepub fn new_binary(dir: LinearDir, children: [TileId; 2], fraction: f32) -> Self
pub fn new_binary(dir: LinearDir, children: [TileId; 2], fraction: f32) -> Self
Create a binary split with the given split ratio in the 0.0 - 1.0 range.
The fraction
is the fraction of the total width that the first child should get.
pub fn add_child(&mut self, child: TileId)
pub fn layout<Pane>( &mut self, tiles: &mut Tiles<Pane>, style: &Style, behavior: &mut dyn Behavior<Pane>, rect: Rect )
Trait Implementations§
source§impl<'de> Deserialize<'de> for Linear
impl<'de> Deserialize<'de> for Linear
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Linear> for Linear
impl PartialEq<Linear> for Linear
impl StructuralPartialEq for Linear
Auto Trait Implementations§
impl RefUnwindSafe for Linear
impl Send for Linear
impl Sync for Linear
impl Unpin for Linear
impl UnwindSafe for Linear
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