pub struct ElementMetadata {
pub id: ElementId,
pub region: Region,
pub visibility: Visibility,
pub z_order: u32,
pub focusable: bool,
pub rect: Rect,
pub fixed_height: Option<u16>,
pub mouse_capture: Option<ElementId>,
}Expand description
Metadata about a registered element.
Fields§
§id: ElementIdUnique identifier for this element.
region: RegionLayout region this element belongs to.
visibility: VisibilityCurrent visibility state.
z_order: u32Z-order within the region (higher = rendered on top).
focusable: boolWhether this element can receive focus.
rect: RectCalculated rectangle for this element (updated by layout manager).
fixed_height: Option<u16>Optional height for top/bottom regions (0 = auto/default).
mouse_capture: Option<ElementId>Optional capture state for mouse events.
Implementations§
Source§impl ElementMetadata
impl ElementMetadata
pub fn new(id: ElementId, region: Region) -> ElementMetadata
pub fn with_visibility(self, visibility: Visibility) -> ElementMetadata
pub fn with_z_order(self, z_order: u32) -> ElementMetadata
pub fn with_focusable(self, focusable: bool) -> ElementMetadata
pub fn with_fixed_height(self, height: u16) -> ElementMetadata
pub fn is_visible(&self) -> bool
pub fn can_receive_focus(&self) -> bool
Trait Implementations§
Source§impl Clone for ElementMetadata
impl Clone for ElementMetadata
Source§fn clone(&self) -> ElementMetadata
fn clone(&self) -> ElementMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ElementMetadata
impl RefUnwindSafe for ElementMetadata
impl Send for ElementMetadata
impl Sync for ElementMetadata
impl Unpin for ElementMetadata
impl UnsafeUnpin for ElementMetadata
impl UnwindSafe for ElementMetadata
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more