pub struct Layout {
pub ui_space: Rect,
pub items: HashMap<WidgetId, LayoutItem>,
}
Fields§
§ui_space: Rect
§items: HashMap<WidgetId, LayoutItem>
Implementations§
source§impl Layout
impl Layout
pub fn find(&self, path: &str) -> Option<&LayoutItem>
pub fn find_or_ui_space(&self, path: &str) -> LayoutItem
pub fn virtual_to_real(&self, mapping: &CoordsMapping) -> Self
pub fn real_to_virtual(&self, mapping: &CoordsMapping) -> Self
pub fn rect_relative_to(&self, id: &WidgetId, to: &WidgetId) -> Option<Rect>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Layout
impl<'de> Deserialize<'de> for Layout
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
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)