pub struct Layout {
pub ui_space: Rect,
pub items: HashMap<WidgetId, LayoutItem, RandomState>,
}
Fields§
§ui_space: Rect
§items: HashMap<WidgetId, LayoutItem, RandomState>
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) -> Layout
pub fn real_to_virtual(&self, mapping: &CoordsMapping) -> Layout
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<Layout, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Layout, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Layout
impl Serialize for Layout
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
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
§impl<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more