Skip to main content

SlideContent

Struct SlideContent 

Source
pub struct SlideContent {
Show 29 fields pub title: String, pub content: Vec<String>, pub bullets: Vec<BulletPoint>, pub bullet_style: BulletStyle, pub title_size: Option<u32>, pub content_size: Option<u32>, pub title_bold: bool, pub content_bold: bool, pub title_italic: bool, pub content_italic: bool, pub title_underline: bool, pub content_underline: bool, pub title_color: Option<String>, pub content_color: Option<String>, pub has_table: bool, pub has_chart: bool, pub has_image: bool, pub layout: SlideLayout, pub transition: TransitionType, pub table: Option<Table>, pub shapes: Vec<Shape>, pub images: Vec<Image>, pub notes: Option<String>, pub connectors: Vec<Connector>, pub videos: Vec<Video>, pub audios: Vec<Audio>, pub charts: Vec<Chart>, pub code_blocks: Vec<CodeBlock>, pub ink_annotations: Option<InkAnnotations>,
}
Expand description

Slide content for more complex presentations

Fields§

§title: String§content: Vec<String>§bullets: Vec<BulletPoint>

Rich bullet points with styles and levels

§bullet_style: BulletStyle

Default bullet style for this slide

§title_size: Option<u32>§content_size: Option<u32>§title_bold: bool§content_bold: bool§title_italic: bool§content_italic: bool§title_underline: bool§content_underline: bool§title_color: Option<String>§content_color: Option<String>§has_table: bool§has_chart: bool§has_image: bool§layout: SlideLayout§transition: TransitionType§table: Option<Table>§shapes: Vec<Shape>§images: Vec<Image>§notes: Option<String>

Speaker notes for the slide

§connectors: Vec<Connector>

Connectors between shapes

§videos: Vec<Video>

Videos embedded in slide

§audios: Vec<Audio>

Audio files embedded in slide

§charts: Vec<Chart>

Charts embedded in slide

§code_blocks: Vec<CodeBlock>

Code blocks with syntax highlighting

§ink_annotations: Option<InkAnnotations>

Ink annotations on the slide

Implementations§

Source§

impl SlideContent

Source

pub fn new(title: &str) -> Self

Source

pub fn with_transition(self, transition: TransitionType) -> Self

Set the slide transition

Source

pub fn add_bullet(self, text: &str) -> Self

Add a bullet point with default style

Source

pub fn add_styled_bullet(self, text: &str, style: BulletStyle) -> Self

Add a bullet point with specific style

Source

pub fn add_numbered(self, text: &str) -> Self

Add a numbered item (shorthand for add_styled_bullet with Number)

Source

pub fn add_lettered(self, text: &str) -> Self

Add a lettered item (shorthand for add_styled_bullet with LetterLower)

Source

pub fn add_sub_bullet(self, text: &str) -> Self

Add a sub-bullet (indented)

Source

pub fn with_bullet_style(self, style: BulletStyle) -> Self

Set default bullet style for this slide

Source

pub fn title_size(self, size: u32) -> Self

Source

pub fn content_size(self, size: u32) -> Self

Source

pub fn title_bold(self, bold: bool) -> Self

Source

pub fn content_bold(self, bold: bool) -> Self

Source

pub fn title_italic(self, italic: bool) -> Self

Source

pub fn content_italic(self, italic: bool) -> Self

Source

pub fn title_underline(self, underline: bool) -> Self

Source

pub fn content_underline(self, underline: bool) -> Self

Source

pub fn title_color(self, color: &str) -> Self

Source

pub fn content_color(self, color: &str) -> Self

Source

pub fn with_table(self) -> Self

Source

pub fn with_chart(self) -> Self

Source

pub fn with_image(self) -> Self

Source

pub fn layout(self, layout: SlideLayout) -> Self

Source

pub fn table(self, table: Table) -> Self

Source

pub fn add_shape(self, shape: Shape) -> Self

Add a shape to the slide

Source

pub fn with_shapes(self, shapes: Vec<Shape>) -> Self

Add multiple shapes to the slide

Source

pub fn add_image(self, image: Image) -> Self

Add an image to the slide

Source

pub fn with_images(self, images: Vec<Image>) -> Self

Add multiple images to the slide

Source

pub fn notes(self, notes: &str) -> Self

Add speaker notes to the slide

Source

pub fn has_notes(&self) -> bool

Check if slide has speaker notes

Source

pub fn add_connector(self, connector: Connector) -> Self

Add a connector to the slide

Source

pub fn with_connectors(self, connectors: Vec<Connector>) -> Self

Add multiple connectors to the slide

Source

pub fn add_video(self, video: Video) -> Self

Add a video to the slide

Source

pub fn with_videos(self, videos: Vec<Video>) -> Self

Add multiple videos to the slide

Source

pub fn add_audio(self, audio: Audio) -> Self

Add an audio file to the slide

Source

pub fn with_audios(self, audios: Vec<Audio>) -> Self

Add multiple audio files to the slide

Source

pub fn add_chart(self, chart: Chart) -> Self

Add a chart to the slide

Source

pub fn with_charts(self, charts: Vec<Chart>) -> Self

Add multiple charts to the slide

Source

pub fn with_ink(self, ink: InkAnnotations) -> Self

Add ink annotations to the slide

Source

pub fn has_media(&self) -> bool

Check if slide has any media

Source

pub fn has_connectors(&self) -> bool

Check if slide has connectors

Trait Implementations§

Source§

impl Clone for SlideContent

Source§

fn clone(&self) -> SlideContent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SlideContent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.