pub struct OpaqueContainer(/* private fields */);Expand description
Opaque wrapper around a container with two optional layouts attached. If both are given, the first refers to the container’s layout itself, whereas the second refers to the container’s content layout. These can be different when working with scroll views for example, which are essentially treated as two adjacent nodes in the layout tree.
Implementations§
Source§impl OpaqueContainer
impl OpaqueContainer
Sourcepub fn new<T>(
layout: LayoutNode,
content_layout: Option<LayoutNode>,
view: T,
) -> OpaqueContainerwhere
T: Container,
pub fn new<T>(
layout: LayoutNode,
content_layout: Option<LayoutNode>,
view: T,
) -> OpaqueContainerwhere
T: Container,
Returns a new opaque container with the given layout, view and optionally a separate content layout.
pub unsafe fn activity(env: *mut c_void, object: *mut c_void) -> OpaqueContainer
Sourcepub fn layout(&self) -> Option<&LayoutNode>
pub fn layout(&self) -> Option<&LayoutNode>
Returns the layout of this container (if applicable).
Sourcepub fn content_layout(&self) -> Option<&LayoutNode>
pub fn content_layout(&self) -> Option<&LayoutNode>
Returns the content layout of this container (if applicable). Returns
None if not applicable, even if the container has a regular layout.
Sourcepub fn container(&self) -> &dyn Container
pub fn container(&self) -> &dyn Container
Returns the container wrapped in this opaque container.
Sourcepub fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: 'static,
pub fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: 'static,
Attempts to downcast this container to a concrete type and if successful, returns a mutable reference.
Trait Implementations§
Source§impl Container<Platform> for OpaqueContainer
impl Container<Platform> for OpaqueContainer
fn mount( &mut self, container: &mut OpaqueContainer, environment: &mut Environment, )
fn unmount(&mut self)
Auto Trait Implementations§
impl Freeze for OpaqueContainer
impl !RefUnwindSafe for OpaqueContainer
impl Send for OpaqueContainer
impl !Sync for OpaqueContainer
impl Unpin for OpaqueContainer
impl !UnwindSafe for OpaqueContainer
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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
Source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
Source§fn convert_into(self) -> U
fn convert_into(self) -> U
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains the unclamped color. Read more