pub struct PaneGridModel {
pub panes: Vec<PaneModel>,
pub root: Option<PaneTreeNode>,
pub active_id: Option<String>,
pub maximized_id: Option<String>,
pub rect: Rect,
pub gap_px: f32,
pub next_split_id: u64,
}Fields§
§panes: Vec<PaneModel>§root: Option<PaneTreeNode>§active_id: Option<String>§maximized_id: Option<String>§rect: Rect§gap_px: f32§next_split_id: u64Implementations§
Source§impl PaneGridModel
impl PaneGridModel
pub fn new(first: PaneModel) -> Self
pub fn from_panes(panes: impl IntoIterator<Item = PaneModel>) -> Self
pub fn with_rect(self, rect: Rect) -> Self
pub fn with_gap(self, gap_px: f32) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn active(&self) -> Option<&PaneModel>
pub fn pane(&self, id: &str) -> Option<&PaneModel>
pub fn pane_mut(&mut self, id: &str) -> Option<&mut PaneModel>
pub fn set_active(&mut self, id: &str) -> bool
pub fn split( &mut self, target_id: &str, axis: PaneSplitAxis, pane: PaneModel, after: bool, ) -> Option<(String, u64)>
pub fn split_with( &mut self, target_id: &str, moving_id: &str, region: PaneDropRegion, ) -> bool
pub fn drop_pane( &mut self, moving_id: &str, target_id: &str, region: PaneDropRegion, ) -> bool
pub fn move_to_edge(&mut self, id: &str, edge: PaneEdge) -> bool
pub fn resize(&mut self, split_id: u64, ratio: f32) -> bool
pub fn swap(&mut self, left: &str, right: &str) -> bool
pub fn close(&mut self, id: &str) -> Option<PaneModel>
pub fn maximize(&mut self, id: &str) -> bool
pub fn restore(&mut self) -> bool
pub fn layout_slots(&self) -> Vec<PaneLayoutSlot>
pub fn layout_panes(&self) -> Vec<PaneModel>
pub fn hit_test(&self, point: Vec2) -> Option<&PaneModel>
pub fn adjacent(&self, id: &str, direction: PaneDirection) -> Option<String>
Trait Implementations§
Source§impl Clone for PaneGridModel
impl Clone for PaneGridModel
Source§fn clone(&self) -> PaneGridModel
fn clone(&self) -> PaneGridModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PaneGridModel
impl Debug for PaneGridModel
Source§impl Default for PaneGridModel
impl Default for PaneGridModel
Source§fn default() -> PaneGridModel
fn default() -> PaneGridModel
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PaneGridModel
impl<'de> Deserialize<'de> for PaneGridModel
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 for PaneGridModel
impl PartialEq for PaneGridModel
Source§fn eq(&self, other: &PaneGridModel) -> bool
fn eq(&self, other: &PaneGridModel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PaneGridModel
impl Serialize for PaneGridModel
impl StructuralPartialEq for PaneGridModel
Auto Trait Implementations§
impl Freeze for PaneGridModel
impl RefUnwindSafe for PaneGridModel
impl Send for PaneGridModel
impl Sync for PaneGridModel
impl Unpin for PaneGridModel
impl UnsafeUnpin for PaneGridModel
impl UnwindSafe for PaneGridModel
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