Struct ViewProperties
pub struct ViewProperties {
pub bounding_box: BoundingBox,
pub inset_from_min: Vec3,
pub inset_from_max: Vec3,
pub focus_change: bool,
pub downward_input: bool,
}
Expand description
Represents the properties for a View.
Fields§
§bounding_box: BoundingBox
The View’s bounding box extents can be defined as: { bounding_box.min, bounding_box.max } Content contained within the View is clipped to this bounding box.
inset_from_min: Vec3
insets_from_min
and insets_from_max
specify the distances between the
view’s bounding box and that of its parent.
These properties are not strictly enforced by Scenic, but only used as hints for clients and other components that receives ViewProperties:
View clients can assume that anything drawn outside of { bounding_box.min + inset_from_min, bounding_box.max - inset_from_max } may be obscured by an ancestor view. The reason for obscuring, and the rules surrounding it, is specific to each product.
inset_from_max: Vec3
§focus_change: bool
Whether the View can receive a focus event; default is true. When false, and this View is eligible to receive a focus event, no focus/unfocus event is actually sent to any View.
downward_input: bool
Whether the View allows geometrically underlying Views to receive input; default is true. When false, Scenic does not send input events to underlying Views.
Trait Implementations§
§impl Clone for ViewProperties
impl Clone for ViewProperties
§fn clone(&self) -> ViewProperties
fn clone(&self) -> ViewProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ViewProperties
impl Debug for ViewProperties
§impl<D> Decode<ViewProperties, D> for ViewPropertieswhere
D: ResourceDialect,
impl<D> Decode<ViewProperties, D> for ViewPropertieswhere
D: ResourceDialect,
§fn new_empty() -> ViewProperties
fn new_empty() -> ViewProperties
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<ViewProperties, D> for &ViewPropertieswhere
D: ResourceDialect,
impl<D> Encode<ViewProperties, D> for &ViewPropertieswhere
D: ResourceDialect,
§impl PartialEq for ViewProperties
impl PartialEq for ViewProperties
§impl PartialOrd for ViewProperties
impl PartialOrd for ViewProperties
§impl TypeMarker for ViewProperties
impl TypeMarker for ViewProperties
§type Owned = ViewProperties
type Owned = ViewProperties
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for ViewProperties
impl ValueTypeMarker for ViewProperties
§type Borrowed<'a> = &'a ViewProperties
type Borrowed<'a> = &'a ViewProperties
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<ViewProperties as TypeMarker>::Owned,
) -> <ViewProperties as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ViewProperties as TypeMarker>::Owned, ) -> <ViewProperties as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.