Struct carnelian::scene::scene::SceneBuilder
source · pub struct SceneBuilder { /* private fields */ }
Expand description
Fluent builder for scenes.
Implementations§
source§impl SceneBuilder
impl SceneBuilder
sourcepub fn round_scene_corners(self, round: bool) -> Self
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.
sourcepub fn enable_mouse_cursor(self, enable: bool) -> Self
pub fn enable_mouse_cursor(self, enable: bool) -> Self
If true, when running without Scenic, the mouse cursor should be drawn.
sourcepub fn background_color(self, background_color: Color) -> Self
pub fn background_color(self, background_color: Color) -> Self
Set the color to use for the background of a scene.
sourcepub fn mutable(self, mutable: bool) -> Self
pub fn mutable(self, mutable: bool) -> Self
If true, the scene can be mutated after being built.
sourcepub fn animated(self, animated: bool) -> Self
pub fn animated(self, animated: bool) -> Self
If true, the scene should be rendered on every frame.
sourcepub fn rectangle(&mut self, size: Size, color: Color) -> FacetId
pub fn rectangle(&mut self, size: Size, color: Color) -> FacetId
Add a rectangle facet of size and color to the scene.
sourcepub fn rounded_rectangle(
&mut self,
size: Size,
corner: Coord,
color: Color
) -> FacetId
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.
sourcepub fn h_line(
&mut self,
width: Coord,
thickness: Coord,
color: Color,
location: Option<Point>
) -> FacetId
pub fn h_line( &mut self, width: Coord, thickness: Coord, color: Color, location: Option<Point> ) -> FacetId
Add a horizontal line to the scene.
sourcepub fn h_line_with_data(
&mut self,
width: Coord,
thickness: Coord,
color: Color,
location: Option<Point>,
member_data: Option<GroupMemberData>
) -> FacetId
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
sourcepub fn v_line(
&mut self,
height: Coord,
thickness: Coord,
color: Color,
location: Option<Point>
) -> FacetId
pub fn v_line( &mut self, height: Coord, thickness: Coord, color: Color, location: Option<Point> ) -> FacetId
Add a vertical line to the scene.
sourcepub fn v_line_with_data(
&mut self,
height: Coord,
thickness: Coord,
color: Color,
location: Option<Point>,
member_data: Option<GroupMemberData>
) -> FacetId
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.
sourcepub fn text(
&mut self,
face: FontFace,
text: &str,
size: f32,
location: Point,
options: TextFacetOptions
) -> FacetId
pub fn text( &mut self, face: FontFace, text: &str, size: f32, location: Point, options: TextFacetOptions ) -> FacetId
Add a text facet to the scene.
sourcepub fn text_with_data(
&mut self,
face: FontFace,
text: &str,
size: f32,
location: Point,
options: TextFacetOptions,
member_data: Option<GroupMemberData>
) -> FacetId
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.
sourcepub fn facet_with_data(
&mut self,
facet: FacetPtr,
member_data: Option<GroupMemberData>
) -> FacetId
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.
sourcepub fn facet(&mut self, facet: FacetPtr) -> FacetId
pub fn facet(&mut self, facet: FacetPtr) -> FacetId
Add an object that implements the Facet trait to the scene.
sourcepub fn facet_at_location(&mut self, facet: FacetPtr, location: Point) -> FacetId
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.
sourcepub fn start_group_with_member_data(
&mut self,
label: &str,
arranger: ArrangerPtr,
member_data: Option<GroupMemberData>
)
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
sourcepub fn start_group(&mut self, label: &str, arranger: ArrangerPtr)
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
sourcepub fn group(&mut self) -> GroupBuilder<'_>
pub fn group(&mut self) -> GroupBuilder<'_>
Create a group builder.