ppt_rs/generator/slide_content/
layout.rs1#[derive(Clone, Debug, Copy, PartialEq, Eq)]
5pub enum SlideLayout {
6 CenteredTitle,
8 TitleAndContent,
10 TwoColumn,
12 SectionHeader,
14 Blank,
16 TitleOnly,
18 TitleAndBigContent,
20}
21
22impl SlideLayout {
23 pub fn layout_number(&self) -> usize {
25 match self {
26 SlideLayout::CenteredTitle => 1,
27 SlideLayout::TitleAndContent => 2,
28 SlideLayout::TwoColumn => 3,
29 SlideLayout::SectionHeader => 4,
30 SlideLayout::Blank => 5,
31 SlideLayout::TitleOnly => 6,
32 SlideLayout::TitleAndBigContent => 7,
33 }
34 }
35
36 pub fn as_str(&self) -> &'static str {
37 match self {
38 SlideLayout::TitleOnly => "titleOnly",
39 SlideLayout::TitleAndContent => "titleAndContent",
40 SlideLayout::TitleAndBigContent => "titleAndBigContent",
41 SlideLayout::Blank => "blank",
42 SlideLayout::CenteredTitle => "centeredTitle",
43 SlideLayout::TwoColumn => "twoColumn",
44 SlideLayout::SectionHeader => "sectionHeader",
45 }
46 }
47}