pub struct SplitLayoutController {
pub left: SplitController,
pub right: SplitController,
pub top: SplitController,
pub bottom: SplitController,
/* private fields */
}Expand description
Stores information about split layout.
The layout is split into left, right, top and bottom panel.
Fields§
§left: SplitControllerThe left split controller.
right: SplitControllerThe right split controller.
top: SplitControllerThe top split controller.
bottom: SplitControllerThe bottom split controller.
Implementations§
Source§impl SplitLayoutController
impl SplitLayoutController
Sourcepub fn new(settings: &SplitLayoutSettings) -> SplitLayoutController
pub fn new(settings: &SplitLayoutSettings) -> SplitLayoutController
Creates a new SplitLayoutController.
Sourcepub fn event<E: GenericEvent>(
&mut self,
rect: [f64; 4],
transform: Matrix2x3<f64>,
e: &E,
)
pub fn event<E: GenericEvent>( &mut self, rect: [f64; 4], transform: Matrix2x3<f64>, e: &E, )
Handles event.
Sourcepub fn left_right_layout(&self, purpose: SplitLayoutPurpose) -> SplitLayout
pub fn left_right_layout(&self, purpose: SplitLayoutPurpose) -> SplitLayout
Returns the left/right split layout.
The left/right split layout depends on whether your purpose is to draw something or handle events. When handling events, the rectangle overlaps with the top and bottom split.
Sourcepub fn top_bottom_layout(&self) -> SplitLayout
pub fn top_bottom_layout(&self) -> SplitLayout
Returns the top/bottom split layout.
Sourcepub fn rectangles(&self, rect: [f64; 4]) -> [[f64; 4]; 4]
pub fn rectangles(&self, rect: [f64; 4]) -> [[f64; 4]; 4]
Computes split rectangles for drawing [left, right, top, bottom].
Sourcepub fn states(&self) -> [SplitState; 4]
pub fn states(&self) -> [SplitState; 4]
Returns the split controller states [left, right, top, bottom].
Sourcepub fn panel_rectangles(&self, rect: [f64; 4]) -> [[f64; 4]; 5]
pub fn panel_rectangles(&self, rect: [f64; 4]) -> [[f64; 4]; 5]
Computes panel rectangles for layout [left, right, top, bottom, center].
Auto Trait Implementations§
impl Freeze for SplitLayoutController
impl RefUnwindSafe for SplitLayoutController
impl Send for SplitLayoutController
impl Sync for SplitLayoutController
impl Unpin for SplitLayoutController
impl UnsafeUnpin for SplitLayoutController
impl UnwindSafe for SplitLayoutController
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