pub struct SceneBuilder { /* private fields */ }
Expand description

Fluent builder for scenes.

Implementations§

source§

impl SceneBuilder

source

pub fn new() -> Self

Create a new fluent builder for building Scenes.

source

pub fn round_scene_corners(self, round: bool) -> Self

True if, when running without Scenic, if the scene should round the corners of the screen to match the presentation that sometimes occurs with Scenic.

source

pub fn enable_mouse_cursor(self, enable: bool) -> Self

If true, when running without Scenic, the mouse cursor should be drawn.

source

pub fn background_color(self, background_color: Color) -> Self

Set the color to use for the background of a scene.

source

pub fn mutable(self, mutable: bool) -> Self

If true, the scene can be mutated after being built.

source

pub fn animated(self, animated: bool) -> Self

If true, the scene should be rendered on every frame.

source

pub fn rectangle(&mut self, size: Size, color: Color) -> FacetId

Add a rectangle facet of size and color to the scene.

source

pub fn rounded_rectangle( &mut self, size: Size, corner: Coord, color: Color ) -> FacetId

Add a rounded rectangle facet of size, corner radius and color to the scene.

source

pub fn space(&mut self, size: Size) -> FacetId

Add a spacing facet of size.

source

pub fn h_line( &mut self, width: Coord, thickness: Coord, color: Color, location: Option<Point> ) -> FacetId

Add a horizontal line to the scene.

source

pub fn h_line_with_data( &mut self, width: Coord, thickness: Coord, color: Color, location: Option<Point>, member_data: Option<GroupMemberData> ) -> FacetId

Add a horizontal line to the scene with member data

source

pub fn v_line( &mut self, height: Coord, thickness: Coord, color: Color, location: Option<Point> ) -> FacetId

Add a vertical line to the scene.

source

pub fn v_line_with_data( &mut self, height: Coord, thickness: Coord, color: Color, location: Option<Point>, member_data: Option<GroupMemberData> ) -> FacetId

Add a vertical line to the scene with member data.

source

pub fn text( &mut self, face: FontFace, text: &str, size: f32, location: Point, options: TextFacetOptions ) -> FacetId

Add a text facet to the scene.

source

pub fn text_with_data( &mut self, face: FontFace, text: &str, size: f32, location: Point, options: TextFacetOptions, member_data: Option<GroupMemberData> ) -> FacetId

Add a text facet to the scene along with some data for the group arranger.

source

pub fn facet_with_data( &mut self, facet: FacetPtr, member_data: Option<GroupMemberData> ) -> FacetId

Add an object that implements the Facet trait to the scene, along with some data for the group arranger.

source

pub fn facet(&mut self, facet: FacetPtr) -> FacetId

Add an object that implements the Facet trait to the scene.

source

pub fn facet_at_location(&mut self, facet: FacetPtr, location: Point) -> FacetId

Add an object that implements the Facet trait to the scene and set its location.

source

pub fn start_group_with_member_data( &mut self, label: &str, arranger: ArrangerPtr, member_data: Option<GroupMemberData> )

Start a facet group with member data. Any facets added to the scene or

source

pub fn start_group(&mut self, label: &str, arranger: ArrangerPtr)

Start a facet group. Any facets added to the scene or groups started will become

source

pub fn end_group(&mut self) -> GroupId

End the current group, returning its group ID.

source

pub fn group(&mut self) -> GroupBuilder<'_>

Create a group builder.

source

pub fn build(self) -> Scene

Consume this builder and build the scene.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Encode<Ambiguous1> for T

source§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> Encode<Ambiguous2> for T

source§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<St> WithTag for St

source§

fn tagged<T>(self, tag: T) -> Tagged<T, St>

Produce a new stream from this one which yields item tupled with a constant tag