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

Examples found in repository?
examples/table_generation.rs (line 69)
56fn create_simple_table_example() -> Result<(), Box<dyn std::error::Error>> {
57    let table = Table::from_data(
58        vec![
59            vec!["Name", "Age"],
60            vec!["Alice", "30"],
61            vec!["Bob", "25"],
62        ],
63        vec![2000000, 2000000],
64        500000,
65        1500000,
66    );
67
68    let slides = vec![
69        SlideContent::new("Simple 2x2 Table")
70            .add_bullet("Table with basic structure")
71            .add_bullet("Headers and data rows"),
72        SlideContent::new("Table Data")
73            .table(table),
74    ];
75
76    let pptx_data = create_pptx_with_content("Simple Table", slides)?;
77    fs::write("examples/output/simple_table.pptx", pptx_data)?;
78    Ok(())
79}
80
81fn create_styled_table_example() -> Result<(), Box<dyn std::error::Error>> {
82    let header_cells = vec![
83        TableCell::new("Name").bold().background_color("003366"),
84        TableCell::new("Age").bold().background_color("003366"),
85        TableCell::new("City").bold().background_color("003366"),
86    ];
87    let header_row = TableRow::new(header_cells);
88
89    let data_rows = vec![
90        TableRow::new(vec![
91            TableCell::new("Alice"),
92            TableCell::new("30"),
93            TableCell::new("NYC"),
94        ]),
95        TableRow::new(vec![
96            TableCell::new("Bob"),
97            TableCell::new("28"),
98            TableCell::new("LA"),
99        ]),
100        TableRow::new(vec![
101            TableCell::new("Carol"),
102            TableCell::new("35"),
103            TableCell::new("Chicago"),
104        ]),
105    ];
106
107    let table = Table::new(
108        vec![vec![header_row], data_rows].concat(),
109        vec![1500000, 1500000, 1500000],
110        500000,
111        1500000,
112    );
113
114    let slides = vec![
115        SlideContent::new("Styled Table")
116            .title_bold(true)
117            .title_color("003366")
118            .add_bullet("Table with formatting"),
119        SlideContent::new("People Data")
120            .table(table),
121    ];
122
123    let pptx_data = create_pptx_with_content("Styled Table", slides)?;
124    fs::write("examples/output/styled_table.pptx", pptx_data)?;
125    Ok(())
126}
127
128fn create_data_table_example() -> Result<(), Box<dyn std::error::Error>> {
129    let header_cells = vec![
130        TableCell::new("Product").bold().background_color("1F497D"),
131        TableCell::new("Revenue").bold().background_color("1F497D"),
132        TableCell::new("Growth").bold().background_color("1F497D"),
133    ];
134    let header_row = TableRow::new(header_cells);
135
136    let data_rows = vec![
137        TableRow::new(vec![
138            TableCell::new("Product A"),
139            TableCell::new("$100K"),
140            TableCell::new("+15%"),
141        ]),
142        TableRow::new(vec![
143            TableCell::new("Product B"),
144            TableCell::new("$150K"),
145            TableCell::new("+22%"),
146        ]),
147        TableRow::new(vec![
148            TableCell::new("Product C"),
149            TableCell::new("$200K"),
150            TableCell::new("+18%"),
151        ]),
152    ];
153
154    let table = Table::new(
155        vec![vec![header_row], data_rows].concat(),
156        vec![2000000, 2000000, 1500000],
157        457200,
158        1400000,
159    );
160
161    let slides = vec![
162        SlideContent::new("Sales Data Table")
163            .title_bold(true)
164            .title_size(48)
165            .add_bullet("Quarterly sales figures"),
166        SlideContent::new("Q1 2025 Sales")
167            .table(table),
168        SlideContent::new("Summary")
169            .content_bold(true)
170            .add_bullet("Total Revenue: $450K")
171            .add_bullet("Average Growth: +18.3%")
172            .add_bullet("Best Performer: Product C"),
173    ];
174
175    let pptx_data = create_pptx_with_content("Sales Data", slides)?;
176    fs::write("examples/output/data_table.pptx", pptx_data)?;
177    Ok(())
178}
179
180fn create_multiple_tables_example() -> Result<(), Box<dyn std::error::Error>> {
181    // Table 1: Employees
182    let emp_header = TableRow::new(vec![
183        TableCell::new("ID").bold().background_color("4F81BD"),
184        TableCell::new("Name").bold().background_color("4F81BD"),
185        TableCell::new("Department").bold().background_color("4F81BD"),
186    ]);
187    let emp_rows = vec![
188        TableRow::new(vec![
189            TableCell::new("001"),
190            TableCell::new("Alice"),
191            TableCell::new("Engineering"),
192        ]),
193        TableRow::new(vec![
194            TableCell::new("002"),
195            TableCell::new("Bob"),
196            TableCell::new("Sales"),
197        ]),
198        TableRow::new(vec![
199            TableCell::new("003"),
200            TableCell::new("Carol"),
201            TableCell::new("Marketing"),
202        ]),
203    ];
204    let emp_table = Table::new(
205        vec![vec![emp_header], emp_rows].concat(),
206        vec![1000000, 2000000, 2000000],
207        500000,
208        1500000,
209    );
210
211    // Table 2: Projects
212    let proj_header = TableRow::new(vec![
213        TableCell::new("Project").bold().background_color("003366"),
214        TableCell::new("Status").bold().background_color("003366"),
215        TableCell::new("Owner").bold().background_color("003366"),
216    ]);
217    let proj_rows = vec![
218        TableRow::new(vec![
219            TableCell::new("Project A"),
220            TableCell::new("In Progress"),
221            TableCell::new("Alice"),
222        ]),
223        TableRow::new(vec![
224            TableCell::new("Project B"),
225            TableCell::new("Completed"),
226            TableCell::new("Bob"),
227        ]),
228        TableRow::new(vec![
229            TableCell::new("Project C"),
230            TableCell::new("Planning"),
231            TableCell::new("Carol"),
232        ]),
233    ];
234    let proj_table = Table::new(
235        vec![vec![proj_header], proj_rows].concat(),
236        vec![2000000, 2000000, 1500000],
237        500000,
238        1500000,
239    );
240
241    let slides = vec![
242        SlideContent::new("Multiple Tables")
243            .title_bold(true)
244            .add_bullet("Slide with multiple tables"),
245        SlideContent::new("Table 1: Employees")
246            .table(emp_table),
247        SlideContent::new("Table 2: Projects")
248            .table(proj_table),
249        SlideContent::new("Summary")
250            .add_bullet("Total Employees: 3")
251            .add_bullet("Active Projects: 3")
252            .add_bullet("Completion Rate: 33%"),
253    ];
254
255    let pptx_data = create_pptx_with_content("Multiple Tables", slides)?;
256    fs::write("examples/output/multiple_tables.pptx", pptx_data)?;
257    Ok(())
258}
More examples
Hide additional examples
examples/styled_presentation.rs (line 51)
49fn create_large_title_example() -> Result<(), Box<dyn std::error::Error>> {
50    let slides = vec![
51        SlideContent::new("Large Title Slide")
52            .title_size(60)  // 60pt title
53            .content_size(16) // 16pt content
54            .add_bullet("Small bullet point 1")
55            .add_bullet("Small bullet point 2")
56            .add_bullet("Small bullet point 3"),
57        SlideContent::new("Regular Formatting")
58            .add_bullet("Default 44pt title")
59            .add_bullet("Default 28pt content")
60            .add_bullet("Standard formatting"),
61    ];
62
63    let pptx_data = create_pptx_with_content("Large Title Example", slides)?;
64    fs::write("examples/output/large_title.pptx", pptx_data)?;
65    Ok(())
66}
67
68fn create_bold_content_example() -> Result<(), Box<dyn std::error::Error>> {
69    let slides = vec![
70        SlideContent::new("Bold Content Slide")
71            .title_bold(true)
72            .content_bold(true)  // Make bullets bold
73            .add_bullet("Bold bullet point 1")
74            .add_bullet("Bold bullet point 2")
75            .add_bullet("Bold bullet point 3"),
76        SlideContent::new("Regular Content")
77            .title_bold(true)
78            .content_bold(false)  // Regular bullets
79            .add_bullet("Regular bullet point 1")
80            .add_bullet("Regular bullet point 2"),
81    ];
82
83    let pptx_data = create_pptx_with_content("Bold Content Example", slides)?;
84    fs::write("examples/output/bold_content.pptx", pptx_data)?;
85    Ok(())
86}
87
88fn create_mixed_formatting_example() -> Result<(), Box<dyn std::error::Error>> {
89    let slides = vec![
90        SlideContent::new("Title Slide")
91            .title_size(52)
92            .title_bold(true)
93            .content_size(24)
94            .content_bold(false)
95            .add_bullet("Large content text")
96            .add_bullet("Still readable")
97            .add_bullet("Professional look"),
98        SlideContent::new("Compact Slide")
99            .title_size(36)
100            .title_bold(false)
101            .content_size(18)
102            .content_bold(true)
103            .add_bullet("Smaller title")
104            .add_bullet("Bold content")
105            .add_bullet("Tight spacing"),
106        SlideContent::new("Summary")
107            .title_size(48)
108            .title_bold(true)
109            .content_size(32)
110            .content_bold(true)
111            .add_bullet("Large bold text")
112            .add_bullet("High impact")
113            .add_bullet("Great for emphasis"),
114    ];
115
116    let pptx_data = create_pptx_with_content("Mixed Formatting Example", slides)?;
117    fs::write("examples/output/mixed_formatting.pptx", pptx_data)?;
118    Ok(())
119}
examples/table_demo.rs (line 6)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title
6        SlideContent::new("Table Examples")
7            .add_bullet("Demonstrating table rendering in PPTX"),
8
9        // Slide 2: Simple 2x3 table
10        SlideContent::new("Employee Data")
11            .table(create_employee_table()),
12
13        // Slide 3: Styled table with colors
14        SlideContent::new("Sales Summary")
15            .table(create_sales_table()),
16
17        // Slide 4: Data table
18        SlideContent::new("Quarterly Results")
19            .table(create_quarterly_table()),
20    ];
21
22    let pptx_data = create_pptx_with_content("Table Demo", slides)?;
23    std::fs::write("table_demo.pptx", pptx_data)?;
24    println!("✓ Created table_demo.pptx with 4 slides containing tables");
25
26    Ok(())
27}
examples/text_styling_complete.rs (line 55)
53fn create_italic_underline_example() -> Result<(), Box<dyn std::error::Error>> {
54    let slides = vec![
55        SlideContent::new("Italic Text")
56            .title_italic(true)
57            .add_bullet("This is italic content")
58            .add_bullet("More italic text here"),
59        SlideContent::new("Underlined Text")
60            .title_underline(true)
61            .content_underline(true)
62            .add_bullet("Underlined bullet point 1")
63            .add_bullet("Underlined bullet point 2"),
64        SlideContent::new("Combined Effects")
65            .title_italic(true)
66            .title_underline(true)
67            .content_italic(true)
68            .add_bullet("Italic and underlined content")
69            .add_bullet("Multiple effects combined"),
70    ];
71
72    let pptx_data = create_pptx_with_content("Italic and Underline", slides)?;
73    fs::write("examples/output/italic_underline.pptx", pptx_data)?;
74    Ok(())
75}
76
77fn create_colored_text_example() -> Result<(), Box<dyn std::error::Error>> {
78    let slides = vec![
79        SlideContent::new("Red Title")
80            .title_color("FF0000")
81            .add_bullet("Red title text")
82            .add_bullet("Regular content"),
83        SlideContent::new("Blue Content")
84            .content_color("0000FF")
85            .add_bullet("Blue bullet point 1")
86            .add_bullet("Blue bullet point 2")
87            .add_bullet("Blue bullet point 3"),
88        SlideContent::new("Green Title & Content")
89            .title_color("00AA00")
90            .content_color("00AA00")
91            .add_bullet("Green title and content")
92            .add_bullet("All text is green"),
93        SlideContent::new("Purple Accent")
94            .title_color("9933FF")
95            .add_bullet("Purple title")
96            .add_bullet("Regular content"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Colored Text", slides)?;
100    fs::write("examples/output/colored_text.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
examples/advanced_features.rs (line 52)
50fn create_text_formatting_example() -> Result<(), Box<dyn std::error::Error>> {
51    let slides = vec![
52        SlideContent::new("Text Formatting Examples")
53            .add_bullet("Bold text demonstration")
54            .add_bullet("Italic text demonstration")
55            .add_bullet("Underlined text demonstration")
56            .add_bullet("Colored text demonstration"),
57        SlideContent::new("Font Sizes")
58            .add_bullet("Small text (12pt)")
59            .add_bullet("Normal text (18pt)")
60            .add_bullet("Large text (24pt)")
61            .add_bullet("Extra large text (32pt)"),
62        SlideContent::new("Combined Formatting")
63            .add_bullet("Bold and italic together")
64            .add_bullet("Colored and underlined text")
65            .add_bullet("Large bold red text")
66            .add_bullet("Small italic blue text"),
67    ];
68
69    let pptx_data = create_pptx_with_content("Text Formatting", slides)?;
70    fs::write("examples/output/text_formatting.pptx", pptx_data)?;
71    Ok(())
72}
73
74fn create_shapes_example() -> Result<(), Box<dyn std::error::Error>> {
75    let slides = vec![
76        SlideContent::new("Shape Types")
77            .add_bullet("Rectangle - basic rectangular shape")
78            .add_bullet("Circle - round elliptical shape")
79            .add_bullet("Triangle - three-sided polygon")
80            .add_bullet("Diamond - rotated square")
81            .add_bullet("Arrow - directional indicator")
82            .add_bullet("Star - five-pointed star")
83            .add_bullet("Hexagon - six-sided polygon"),
84        SlideContent::new("Shape Properties")
85            .add_bullet("Fill colors - solid color fills")
86            .add_bullet("Transparency - adjustable opacity")
87            .add_bullet("Borders - customizable lines")
88            .add_bullet("Text - add text inside shapes")
89            .add_bullet("Positioning - precise placement")
90            .add_bullet("Sizing - flexible dimensions"),
91        SlideContent::new("Shape Examples")
92            .add_bullet("Rectangle: 2x1 inch blue box")
93            .add_bullet("Circle: 1 inch red circle")
94            .add_bullet("Triangle: green triangle with border")
95            .add_bullet("Diamond: yellow diamond with text")
96            .add_bullet("Arrow: orange arrow pointing right"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Shape Demonstrations", slides)?;
100    fs::write("examples/output/shapes_demo.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_tables_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Table Basics")
107            .add_bullet("Tables organize data in rows and columns")
108            .add_bullet("Headers can be formatted differently")
109            .add_bullet("Cells can have background colors")
110            .add_bullet("Text can be bold or styled")
111            .add_bullet("Column widths are customizable"),
112        SlideContent::new("Sales Data Example")
113            .add_bullet("Q1 2025: $2.5M revenue")
114            .add_bullet("Q2 2025: $3.1M revenue")
115            .add_bullet("Q3 2025: $3.8M revenue")
116            .add_bullet("Q4 2025: $4.2M revenue (projected)")
117            .add_bullet("Total: $13.6M annual revenue"),
118        SlideContent::new("Team Members")
119            .add_bullet("Alice Johnson - Engineering Lead")
120            .add_bullet("Bob Smith - Product Manager")
121            .add_bullet("Carol Davis - Design Lead")
122            .add_bullet("David Wilson - Marketing Manager")
123            .add_bullet("Eve Martinez - Operations"),
124    ];
125
126    let pptx_data = create_pptx_with_content("Table Examples", slides)?;
127    fs::write("examples/output/tables_demo.pptx", pptx_data)?;
128    Ok(())
129}
examples/table_text_formatting.rs (line 6)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title
6        SlideContent::new("Table Text Formatting Examples")
7            .add_bullet("Demonstrating rich text content in table cells"),
8
9        // Slide 2: Text formatting examples
10        SlideContent::new("Text Formatting in Tables")
11            .table(create_text_formatting_table()),
12
13        // Slide 3: Color examples
14        SlideContent::new("Text and Background Colors")
15            .table(create_color_table()),
16
17        // Slide 4: Font examples
18        SlideContent::new("Font Size and Family")
19            .table(create_font_table()),
20
21        // Slide 5: Combined formatting
22        SlideContent::new("Combined Formatting")
23            .table(create_combined_table()),
24    ];
25
26    let pptx_data = create_pptx_with_content("Table Text Formatting", slides)?;
27    std::fs::write("examples/output/table_text_formatting.pptx", pptx_data)?;
28    println!("✓ Created table_text_formatting.pptx with rich text formatting examples");
29
30    Ok(())
31}
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

Examples found in repository?
examples/table_generation.rs (line 70)
56fn create_simple_table_example() -> Result<(), Box<dyn std::error::Error>> {
57    let table = Table::from_data(
58        vec![
59            vec!["Name", "Age"],
60            vec!["Alice", "30"],
61            vec!["Bob", "25"],
62        ],
63        vec![2000000, 2000000],
64        500000,
65        1500000,
66    );
67
68    let slides = vec![
69        SlideContent::new("Simple 2x2 Table")
70            .add_bullet("Table with basic structure")
71            .add_bullet("Headers and data rows"),
72        SlideContent::new("Table Data")
73            .table(table),
74    ];
75
76    let pptx_data = create_pptx_with_content("Simple Table", slides)?;
77    fs::write("examples/output/simple_table.pptx", pptx_data)?;
78    Ok(())
79}
80
81fn create_styled_table_example() -> Result<(), Box<dyn std::error::Error>> {
82    let header_cells = vec![
83        TableCell::new("Name").bold().background_color("003366"),
84        TableCell::new("Age").bold().background_color("003366"),
85        TableCell::new("City").bold().background_color("003366"),
86    ];
87    let header_row = TableRow::new(header_cells);
88
89    let data_rows = vec![
90        TableRow::new(vec![
91            TableCell::new("Alice"),
92            TableCell::new("30"),
93            TableCell::new("NYC"),
94        ]),
95        TableRow::new(vec![
96            TableCell::new("Bob"),
97            TableCell::new("28"),
98            TableCell::new("LA"),
99        ]),
100        TableRow::new(vec![
101            TableCell::new("Carol"),
102            TableCell::new("35"),
103            TableCell::new("Chicago"),
104        ]),
105    ];
106
107    let table = Table::new(
108        vec![vec![header_row], data_rows].concat(),
109        vec![1500000, 1500000, 1500000],
110        500000,
111        1500000,
112    );
113
114    let slides = vec![
115        SlideContent::new("Styled Table")
116            .title_bold(true)
117            .title_color("003366")
118            .add_bullet("Table with formatting"),
119        SlideContent::new("People Data")
120            .table(table),
121    ];
122
123    let pptx_data = create_pptx_with_content("Styled Table", slides)?;
124    fs::write("examples/output/styled_table.pptx", pptx_data)?;
125    Ok(())
126}
127
128fn create_data_table_example() -> Result<(), Box<dyn std::error::Error>> {
129    let header_cells = vec![
130        TableCell::new("Product").bold().background_color("1F497D"),
131        TableCell::new("Revenue").bold().background_color("1F497D"),
132        TableCell::new("Growth").bold().background_color("1F497D"),
133    ];
134    let header_row = TableRow::new(header_cells);
135
136    let data_rows = vec![
137        TableRow::new(vec![
138            TableCell::new("Product A"),
139            TableCell::new("$100K"),
140            TableCell::new("+15%"),
141        ]),
142        TableRow::new(vec![
143            TableCell::new("Product B"),
144            TableCell::new("$150K"),
145            TableCell::new("+22%"),
146        ]),
147        TableRow::new(vec![
148            TableCell::new("Product C"),
149            TableCell::new("$200K"),
150            TableCell::new("+18%"),
151        ]),
152    ];
153
154    let table = Table::new(
155        vec![vec![header_row], data_rows].concat(),
156        vec![2000000, 2000000, 1500000],
157        457200,
158        1400000,
159    );
160
161    let slides = vec![
162        SlideContent::new("Sales Data Table")
163            .title_bold(true)
164            .title_size(48)
165            .add_bullet("Quarterly sales figures"),
166        SlideContent::new("Q1 2025 Sales")
167            .table(table),
168        SlideContent::new("Summary")
169            .content_bold(true)
170            .add_bullet("Total Revenue: $450K")
171            .add_bullet("Average Growth: +18.3%")
172            .add_bullet("Best Performer: Product C"),
173    ];
174
175    let pptx_data = create_pptx_with_content("Sales Data", slides)?;
176    fs::write("examples/output/data_table.pptx", pptx_data)?;
177    Ok(())
178}
179
180fn create_multiple_tables_example() -> Result<(), Box<dyn std::error::Error>> {
181    // Table 1: Employees
182    let emp_header = TableRow::new(vec![
183        TableCell::new("ID").bold().background_color("4F81BD"),
184        TableCell::new("Name").bold().background_color("4F81BD"),
185        TableCell::new("Department").bold().background_color("4F81BD"),
186    ]);
187    let emp_rows = vec![
188        TableRow::new(vec![
189            TableCell::new("001"),
190            TableCell::new("Alice"),
191            TableCell::new("Engineering"),
192        ]),
193        TableRow::new(vec![
194            TableCell::new("002"),
195            TableCell::new("Bob"),
196            TableCell::new("Sales"),
197        ]),
198        TableRow::new(vec![
199            TableCell::new("003"),
200            TableCell::new("Carol"),
201            TableCell::new("Marketing"),
202        ]),
203    ];
204    let emp_table = Table::new(
205        vec![vec![emp_header], emp_rows].concat(),
206        vec![1000000, 2000000, 2000000],
207        500000,
208        1500000,
209    );
210
211    // Table 2: Projects
212    let proj_header = TableRow::new(vec![
213        TableCell::new("Project").bold().background_color("003366"),
214        TableCell::new("Status").bold().background_color("003366"),
215        TableCell::new("Owner").bold().background_color("003366"),
216    ]);
217    let proj_rows = vec![
218        TableRow::new(vec![
219            TableCell::new("Project A"),
220            TableCell::new("In Progress"),
221            TableCell::new("Alice"),
222        ]),
223        TableRow::new(vec![
224            TableCell::new("Project B"),
225            TableCell::new("Completed"),
226            TableCell::new("Bob"),
227        ]),
228        TableRow::new(vec![
229            TableCell::new("Project C"),
230            TableCell::new("Planning"),
231            TableCell::new("Carol"),
232        ]),
233    ];
234    let proj_table = Table::new(
235        vec![vec![proj_header], proj_rows].concat(),
236        vec![2000000, 2000000, 1500000],
237        500000,
238        1500000,
239    );
240
241    let slides = vec![
242        SlideContent::new("Multiple Tables")
243            .title_bold(true)
244            .add_bullet("Slide with multiple tables"),
245        SlideContent::new("Table 1: Employees")
246            .table(emp_table),
247        SlideContent::new("Table 2: Projects")
248            .table(proj_table),
249        SlideContent::new("Summary")
250            .add_bullet("Total Employees: 3")
251            .add_bullet("Active Projects: 3")
252            .add_bullet("Completion Rate: 33%"),
253    ];
254
255    let pptx_data = create_pptx_with_content("Multiple Tables", slides)?;
256    fs::write("examples/output/multiple_tables.pptx", pptx_data)?;
257    Ok(())
258}
More examples
Hide additional examples
examples/styled_presentation.rs (line 54)
49fn create_large_title_example() -> Result<(), Box<dyn std::error::Error>> {
50    let slides = vec![
51        SlideContent::new("Large Title Slide")
52            .title_size(60)  // 60pt title
53            .content_size(16) // 16pt content
54            .add_bullet("Small bullet point 1")
55            .add_bullet("Small bullet point 2")
56            .add_bullet("Small bullet point 3"),
57        SlideContent::new("Regular Formatting")
58            .add_bullet("Default 44pt title")
59            .add_bullet("Default 28pt content")
60            .add_bullet("Standard formatting"),
61    ];
62
63    let pptx_data = create_pptx_with_content("Large Title Example", slides)?;
64    fs::write("examples/output/large_title.pptx", pptx_data)?;
65    Ok(())
66}
67
68fn create_bold_content_example() -> Result<(), Box<dyn std::error::Error>> {
69    let slides = vec![
70        SlideContent::new("Bold Content Slide")
71            .title_bold(true)
72            .content_bold(true)  // Make bullets bold
73            .add_bullet("Bold bullet point 1")
74            .add_bullet("Bold bullet point 2")
75            .add_bullet("Bold bullet point 3"),
76        SlideContent::new("Regular Content")
77            .title_bold(true)
78            .content_bold(false)  // Regular bullets
79            .add_bullet("Regular bullet point 1")
80            .add_bullet("Regular bullet point 2"),
81    ];
82
83    let pptx_data = create_pptx_with_content("Bold Content Example", slides)?;
84    fs::write("examples/output/bold_content.pptx", pptx_data)?;
85    Ok(())
86}
87
88fn create_mixed_formatting_example() -> Result<(), Box<dyn std::error::Error>> {
89    let slides = vec![
90        SlideContent::new("Title Slide")
91            .title_size(52)
92            .title_bold(true)
93            .content_size(24)
94            .content_bold(false)
95            .add_bullet("Large content text")
96            .add_bullet("Still readable")
97            .add_bullet("Professional look"),
98        SlideContent::new("Compact Slide")
99            .title_size(36)
100            .title_bold(false)
101            .content_size(18)
102            .content_bold(true)
103            .add_bullet("Smaller title")
104            .add_bullet("Bold content")
105            .add_bullet("Tight spacing"),
106        SlideContent::new("Summary")
107            .title_size(48)
108            .title_bold(true)
109            .content_size(32)
110            .content_bold(true)
111            .add_bullet("Large bold text")
112            .add_bullet("High impact")
113            .add_bullet("Great for emphasis"),
114    ];
115
116    let pptx_data = create_pptx_with_content("Mixed Formatting Example", slides)?;
117    fs::write("examples/output/mixed_formatting.pptx", pptx_data)?;
118    Ok(())
119}
examples/table_demo.rs (line 7)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title
6        SlideContent::new("Table Examples")
7            .add_bullet("Demonstrating table rendering in PPTX"),
8
9        // Slide 2: Simple 2x3 table
10        SlideContent::new("Employee Data")
11            .table(create_employee_table()),
12
13        // Slide 3: Styled table with colors
14        SlideContent::new("Sales Summary")
15            .table(create_sales_table()),
16
17        // Slide 4: Data table
18        SlideContent::new("Quarterly Results")
19            .table(create_quarterly_table()),
20    ];
21
22    let pptx_data = create_pptx_with_content("Table Demo", slides)?;
23    std::fs::write("table_demo.pptx", pptx_data)?;
24    println!("✓ Created table_demo.pptx with 4 slides containing tables");
25
26    Ok(())
27}
examples/text_styling_complete.rs (line 57)
53fn create_italic_underline_example() -> Result<(), Box<dyn std::error::Error>> {
54    let slides = vec![
55        SlideContent::new("Italic Text")
56            .title_italic(true)
57            .add_bullet("This is italic content")
58            .add_bullet("More italic text here"),
59        SlideContent::new("Underlined Text")
60            .title_underline(true)
61            .content_underline(true)
62            .add_bullet("Underlined bullet point 1")
63            .add_bullet("Underlined bullet point 2"),
64        SlideContent::new("Combined Effects")
65            .title_italic(true)
66            .title_underline(true)
67            .content_italic(true)
68            .add_bullet("Italic and underlined content")
69            .add_bullet("Multiple effects combined"),
70    ];
71
72    let pptx_data = create_pptx_with_content("Italic and Underline", slides)?;
73    fs::write("examples/output/italic_underline.pptx", pptx_data)?;
74    Ok(())
75}
76
77fn create_colored_text_example() -> Result<(), Box<dyn std::error::Error>> {
78    let slides = vec![
79        SlideContent::new("Red Title")
80            .title_color("FF0000")
81            .add_bullet("Red title text")
82            .add_bullet("Regular content"),
83        SlideContent::new("Blue Content")
84            .content_color("0000FF")
85            .add_bullet("Blue bullet point 1")
86            .add_bullet("Blue bullet point 2")
87            .add_bullet("Blue bullet point 3"),
88        SlideContent::new("Green Title & Content")
89            .title_color("00AA00")
90            .content_color("00AA00")
91            .add_bullet("Green title and content")
92            .add_bullet("All text is green"),
93        SlideContent::new("Purple Accent")
94            .title_color("9933FF")
95            .add_bullet("Purple title")
96            .add_bullet("Regular content"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Colored Text", slides)?;
100    fs::write("examples/output/colored_text.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
examples/advanced_features.rs (line 53)
50fn create_text_formatting_example() -> Result<(), Box<dyn std::error::Error>> {
51    let slides = vec![
52        SlideContent::new("Text Formatting Examples")
53            .add_bullet("Bold text demonstration")
54            .add_bullet("Italic text demonstration")
55            .add_bullet("Underlined text demonstration")
56            .add_bullet("Colored text demonstration"),
57        SlideContent::new("Font Sizes")
58            .add_bullet("Small text (12pt)")
59            .add_bullet("Normal text (18pt)")
60            .add_bullet("Large text (24pt)")
61            .add_bullet("Extra large text (32pt)"),
62        SlideContent::new("Combined Formatting")
63            .add_bullet("Bold and italic together")
64            .add_bullet("Colored and underlined text")
65            .add_bullet("Large bold red text")
66            .add_bullet("Small italic blue text"),
67    ];
68
69    let pptx_data = create_pptx_with_content("Text Formatting", slides)?;
70    fs::write("examples/output/text_formatting.pptx", pptx_data)?;
71    Ok(())
72}
73
74fn create_shapes_example() -> Result<(), Box<dyn std::error::Error>> {
75    let slides = vec![
76        SlideContent::new("Shape Types")
77            .add_bullet("Rectangle - basic rectangular shape")
78            .add_bullet("Circle - round elliptical shape")
79            .add_bullet("Triangle - three-sided polygon")
80            .add_bullet("Diamond - rotated square")
81            .add_bullet("Arrow - directional indicator")
82            .add_bullet("Star - five-pointed star")
83            .add_bullet("Hexagon - six-sided polygon"),
84        SlideContent::new("Shape Properties")
85            .add_bullet("Fill colors - solid color fills")
86            .add_bullet("Transparency - adjustable opacity")
87            .add_bullet("Borders - customizable lines")
88            .add_bullet("Text - add text inside shapes")
89            .add_bullet("Positioning - precise placement")
90            .add_bullet("Sizing - flexible dimensions"),
91        SlideContent::new("Shape Examples")
92            .add_bullet("Rectangle: 2x1 inch blue box")
93            .add_bullet("Circle: 1 inch red circle")
94            .add_bullet("Triangle: green triangle with border")
95            .add_bullet("Diamond: yellow diamond with text")
96            .add_bullet("Arrow: orange arrow pointing right"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Shape Demonstrations", slides)?;
100    fs::write("examples/output/shapes_demo.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_tables_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Table Basics")
107            .add_bullet("Tables organize data in rows and columns")
108            .add_bullet("Headers can be formatted differently")
109            .add_bullet("Cells can have background colors")
110            .add_bullet("Text can be bold or styled")
111            .add_bullet("Column widths are customizable"),
112        SlideContent::new("Sales Data Example")
113            .add_bullet("Q1 2025: $2.5M revenue")
114            .add_bullet("Q2 2025: $3.1M revenue")
115            .add_bullet("Q3 2025: $3.8M revenue")
116            .add_bullet("Q4 2025: $4.2M revenue (projected)")
117            .add_bullet("Total: $13.6M annual revenue"),
118        SlideContent::new("Team Members")
119            .add_bullet("Alice Johnson - Engineering Lead")
120            .add_bullet("Bob Smith - Product Manager")
121            .add_bullet("Carol Davis - Design Lead")
122            .add_bullet("David Wilson - Marketing Manager")
123            .add_bullet("Eve Martinez - Operations"),
124    ];
125
126    let pptx_data = create_pptx_with_content("Table Examples", slides)?;
127    fs::write("examples/output/tables_demo.pptx", pptx_data)?;
128    Ok(())
129}
examples/table_text_formatting.rs (line 7)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title
6        SlideContent::new("Table Text Formatting Examples")
7            .add_bullet("Demonstrating rich text content in table cells"),
8
9        // Slide 2: Text formatting examples
10        SlideContent::new("Text Formatting in Tables")
11            .table(create_text_formatting_table()),
12
13        // Slide 3: Color examples
14        SlideContent::new("Text and Background Colors")
15            .table(create_color_table()),
16
17        // Slide 4: Font examples
18        SlideContent::new("Font Size and Family")
19            .table(create_font_table()),
20
21        // Slide 5: Combined formatting
22        SlideContent::new("Combined Formatting")
23            .table(create_combined_table()),
24    ];
25
26    let pptx_data = create_pptx_with_content("Table Text Formatting", slides)?;
27    std::fs::write("examples/output/table_text_formatting.pptx", pptx_data)?;
28    println!("✓ Created table_text_formatting.pptx with rich text formatting examples");
29
30    Ok(())
31}
Source

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

Add a bullet point with specific style

Examples found in repository?
examples/new_features_demo.rs (line 51)
13fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
14    // Create output directory
15    std::fs::create_dir_all("examples/output")?;
16
17    // 1. Bullet Styles Demo
18    println!("Creating bullet styles demo...");
19    
20    // Numbered list slide
21    let numbered_slide = SlideContent::new("Numbered List")
22        .with_bullet_style(BulletStyle::Number)
23        .add_bullet("First step")
24        .add_bullet("Second step")
25        .add_bullet("Third step")
26        .add_bullet("Fourth step");
27    
28    // Lettered list slide
29    let lettered_slide = SlideContent::new("Lettered List")
30        .add_lettered("Option A")
31        .add_lettered("Option B")
32        .add_lettered("Option C");
33    
34    // Roman numerals slide
35    let roman_slide = SlideContent::new("Roman Numerals")
36        .with_bullet_style(BulletStyle::RomanUpper)
37        .add_bullet("Chapter I")
38        .add_bullet("Chapter II")
39        .add_bullet("Chapter III");
40    
41    // Mixed bullets with sub-bullets
42    let mixed_slide = SlideContent::new("Mixed Bullets")
43        .add_bullet("Main point")
44        .add_sub_bullet("Supporting detail 1")
45        .add_sub_bullet("Supporting detail 2")
46        .add_bullet("Another main point")
47        .add_sub_bullet("More details");
48    
49    // Custom bullet slide
50    let custom_slide = SlideContent::new("Custom Bullets")
51        .add_styled_bullet("Star bullet", BulletStyle::Custom('★'))
52        .add_styled_bullet("Arrow bullet", BulletStyle::Custom('→'))
53        .add_styled_bullet("Check bullet", BulletStyle::Custom('✓'))
54        .add_styled_bullet("Diamond bullet", BulletStyle::Custom('◆'));
55    
56    let bullet_demo = pptx!("Bullet Styles Demo")
57        .title_slide("Bullet Styles - Demonstrating various list formats")
58        .content_slide(numbered_slide)
59        .content_slide(lettered_slide)
60        .content_slide(roman_slide)
61        .content_slide(mixed_slide)
62        .content_slide(custom_slide)
63        .build()?;
64    
65    std::fs::write("examples/output/bullet_styles.pptx", bullet_demo)?;
66    println!("  ✓ Created examples/output/bullet_styles.pptx");
67
68    // 2. Text Formatting Demo
69    println!("Creating text formatting demo...");
70    
71    let text_demo = pptx!("Text Formatting Demo")
72        .title_slide("Text Formatting - Strikethrough, highlight, subscript, superscript")
73        .slide("Text Styles", &[
74            "Normal text for comparison",
75            "This demonstrates various formatting options",
76            "Use TextFormat for rich text styling",
77        ])
78        .slide("Font Size Presets", &[
79            &format!("TITLE: {}pt - For main titles", font_sizes::TITLE),
80            &format!("SUBTITLE: {}pt - For subtitles", font_sizes::SUBTITLE),
81            &format!("HEADING: {}pt - For section headers", font_sizes::HEADING),
82            &format!("BODY: {}pt - For regular content", font_sizes::BODY),
83            &format!("SMALL: {}pt - For smaller text", font_sizes::SMALL),
84            &format!("CAPTION: {}pt - For captions", font_sizes::CAPTION),
85        ])
86        .slide("Text Effects", &[
87            "Strikethrough: For deleted text",
88            "Highlight: For emphasized text",
89            "Subscript: H₂O style formatting",
90            "Superscript: x² style formatting",
91        ])
92        .build()?;
93    
94    std::fs::write("examples/output/text_formatting.pptx", text_demo)?;
95    println!("  ✓ Created examples/output/text_formatting.pptx");
96
97    // 3. Image from Base64 Demo
98    println!("Creating image demo...");
99    
100    // 1x1 red PNG pixel in base64
101    let red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
102    
103    // Create image from base64
104    let img = ImageBuilder::from_base64(red_pixel_base64, inches(2.0), inches(2.0), "PNG")
105        .position(inches(4.0), inches(3.0))
106        .build();
107    
108    let image_slide = SlideContent::new("Image from Base64")
109        .add_bullet("Images can be loaded from base64 encoded data")
110        .add_bullet("Useful for embedding images without file access")
111        .add_bullet("Supports PNG, JPEG, GIF formats")
112        .add_image(img);
113    
114    let image_demo = pptx!("Image Features Demo")
115        .title_slide("Image Features - Loading images from various sources")
116        .content_slide(image_slide)
117        .slide("Image Sources", &[
118            "Image::new(filename) - From file path",
119            "Image::from_base64(data) - From base64 string",
120            "Image::from_bytes(data) - From raw bytes",
121            "ImageBuilder for fluent API",
122        ])
123        .build()?;
124    
125    std::fs::write("examples/output/image_features.pptx", image_demo)?;
126    println!("  ✓ Created examples/output/image_features.pptx");
127
128    // 4. Theme Colors Demo
129    println!("Creating themes demo...");
130    
131    let all_themes = themes::all();
132    let theme_info: Vec<String> = all_themes.iter().map(|t| {
133        format!("{}: Primary={}, Accent={}", t.name, t.primary, t.accent)
134    }).collect();
135    
136    let themes_demo = pptx!("Theme Colors Demo")
137        .title_slide("Theme Colors - Predefined color palettes")
138        .slide("Available Themes", &theme_info.iter().map(|s| s.as_str()).collect::<Vec<_>>())
139        .slide("Color Constants", &[
140            &format!("Material Red: {}", colors::MATERIAL_RED),
141            &format!("Material Blue: {}", colors::MATERIAL_BLUE),
142            &format!("Material Green: {}", colors::MATERIAL_GREEN),
143            &format!("Carbon Blue 60: {}", colors::CARBON_BLUE_60),
144            &format!("Carbon Gray 100: {}", colors::CARBON_GRAY_100),
145        ])
146        .build()?;
147    
148    std::fs::write("examples/output/themes_demo.pptx", themes_demo)?;
149    println!("  ✓ Created examples/output/themes_demo.pptx");
150
151    // 5. Complete Feature Showcase
152    println!("Creating complete feature showcase...");
153    
154    let showcase = pptx!("ppt-rs v0.2.1 Features")
155        .title_slide("New Features in ppt-rs v0.2.1")
156        .slide("Bullet Formatting", &[
157            "BulletStyle::Number - 1, 2, 3...",
158            "BulletStyle::LetterLower/Upper - a, b, c / A, B, C",
159            "BulletStyle::RomanLower/Upper - i, ii, iii / I, II, III",
160            "BulletStyle::Custom(char) - Any custom character",
161            "Sub-bullets with indentation",
162        ])
163        .slide("Text Enhancements", &[
164            "TextFormat::strikethrough() - Strike through text",
165            "TextFormat::highlight(color) - Background highlight",
166            "TextFormat::subscript() - H₂O style",
167            "TextFormat::superscript() - x² style",
168            "font_sizes module with presets",
169        ])
170        .slide("Image Loading", &[
171            "Image::from_base64() - Base64 encoded images",
172            "Image::from_bytes() - Raw byte arrays",
173            "ImageSource enum for flexible handling",
174            "Built-in base64 decoder",
175        ])
176        .slide("Templates", &[
177            "templates::business_proposal()",
178            "templates::status_report()",
179            "templates::training_material()",
180            "templates::technical_doc()",
181            "templates::simple()",
182        ])
183        .slide("Themes & Colors", &[
184            "themes::CORPORATE, MODERN, VIBRANT, DARK",
185            "themes::NATURE, TECH, CARBON",
186            "colors module with Material Design colors",
187            "colors module with IBM Carbon colors",
188        ])
189        .build()?;
190    
191    std::fs::write("examples/output/feature_showcase.pptx", showcase)?;
192    println!("  ✓ Created examples/output/feature_showcase.pptx");
193
194    println!("\n✅ All demos created successfully!");
195    println!("   Check examples/output/ for the generated files.");
196    
197    Ok(())
198}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 923)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Add a numbered item (shorthand for add_styled_bullet with Number)

Examples found in repository?
examples/comprehensive_demo.rs (line 1149)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Add a lettered item (shorthand for add_styled_bullet with LetterLower)

Examples found in repository?
examples/new_features_demo.rs (line 30)
13fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
14    // Create output directory
15    std::fs::create_dir_all("examples/output")?;
16
17    // 1. Bullet Styles Demo
18    println!("Creating bullet styles demo...");
19    
20    // Numbered list slide
21    let numbered_slide = SlideContent::new("Numbered List")
22        .with_bullet_style(BulletStyle::Number)
23        .add_bullet("First step")
24        .add_bullet("Second step")
25        .add_bullet("Third step")
26        .add_bullet("Fourth step");
27    
28    // Lettered list slide
29    let lettered_slide = SlideContent::new("Lettered List")
30        .add_lettered("Option A")
31        .add_lettered("Option B")
32        .add_lettered("Option C");
33    
34    // Roman numerals slide
35    let roman_slide = SlideContent::new("Roman Numerals")
36        .with_bullet_style(BulletStyle::RomanUpper)
37        .add_bullet("Chapter I")
38        .add_bullet("Chapter II")
39        .add_bullet("Chapter III");
40    
41    // Mixed bullets with sub-bullets
42    let mixed_slide = SlideContent::new("Mixed Bullets")
43        .add_bullet("Main point")
44        .add_sub_bullet("Supporting detail 1")
45        .add_sub_bullet("Supporting detail 2")
46        .add_bullet("Another main point")
47        .add_sub_bullet("More details");
48    
49    // Custom bullet slide
50    let custom_slide = SlideContent::new("Custom Bullets")
51        .add_styled_bullet("Star bullet", BulletStyle::Custom('★'))
52        .add_styled_bullet("Arrow bullet", BulletStyle::Custom('→'))
53        .add_styled_bullet("Check bullet", BulletStyle::Custom('✓'))
54        .add_styled_bullet("Diamond bullet", BulletStyle::Custom('◆'));
55    
56    let bullet_demo = pptx!("Bullet Styles Demo")
57        .title_slide("Bullet Styles - Demonstrating various list formats")
58        .content_slide(numbered_slide)
59        .content_slide(lettered_slide)
60        .content_slide(roman_slide)
61        .content_slide(mixed_slide)
62        .content_slide(custom_slide)
63        .build()?;
64    
65    std::fs::write("examples/output/bullet_styles.pptx", bullet_demo)?;
66    println!("  ✓ Created examples/output/bullet_styles.pptx");
67
68    // 2. Text Formatting Demo
69    println!("Creating text formatting demo...");
70    
71    let text_demo = pptx!("Text Formatting Demo")
72        .title_slide("Text Formatting - Strikethrough, highlight, subscript, superscript")
73        .slide("Text Styles", &[
74            "Normal text for comparison",
75            "This demonstrates various formatting options",
76            "Use TextFormat for rich text styling",
77        ])
78        .slide("Font Size Presets", &[
79            &format!("TITLE: {}pt - For main titles", font_sizes::TITLE),
80            &format!("SUBTITLE: {}pt - For subtitles", font_sizes::SUBTITLE),
81            &format!("HEADING: {}pt - For section headers", font_sizes::HEADING),
82            &format!("BODY: {}pt - For regular content", font_sizes::BODY),
83            &format!("SMALL: {}pt - For smaller text", font_sizes::SMALL),
84            &format!("CAPTION: {}pt - For captions", font_sizes::CAPTION),
85        ])
86        .slide("Text Effects", &[
87            "Strikethrough: For deleted text",
88            "Highlight: For emphasized text",
89            "Subscript: H₂O style formatting",
90            "Superscript: x² style formatting",
91        ])
92        .build()?;
93    
94    std::fs::write("examples/output/text_formatting.pptx", text_demo)?;
95    println!("  ✓ Created examples/output/text_formatting.pptx");
96
97    // 3. Image from Base64 Demo
98    println!("Creating image demo...");
99    
100    // 1x1 red PNG pixel in base64
101    let red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
102    
103    // Create image from base64
104    let img = ImageBuilder::from_base64(red_pixel_base64, inches(2.0), inches(2.0), "PNG")
105        .position(inches(4.0), inches(3.0))
106        .build();
107    
108    let image_slide = SlideContent::new("Image from Base64")
109        .add_bullet("Images can be loaded from base64 encoded data")
110        .add_bullet("Useful for embedding images without file access")
111        .add_bullet("Supports PNG, JPEG, GIF formats")
112        .add_image(img);
113    
114    let image_demo = pptx!("Image Features Demo")
115        .title_slide("Image Features - Loading images from various sources")
116        .content_slide(image_slide)
117        .slide("Image Sources", &[
118            "Image::new(filename) - From file path",
119            "Image::from_base64(data) - From base64 string",
120            "Image::from_bytes(data) - From raw bytes",
121            "ImageBuilder for fluent API",
122        ])
123        .build()?;
124    
125    std::fs::write("examples/output/image_features.pptx", image_demo)?;
126    println!("  ✓ Created examples/output/image_features.pptx");
127
128    // 4. Theme Colors Demo
129    println!("Creating themes demo...");
130    
131    let all_themes = themes::all();
132    let theme_info: Vec<String> = all_themes.iter().map(|t| {
133        format!("{}: Primary={}, Accent={}", t.name, t.primary, t.accent)
134    }).collect();
135    
136    let themes_demo = pptx!("Theme Colors Demo")
137        .title_slide("Theme Colors - Predefined color palettes")
138        .slide("Available Themes", &theme_info.iter().map(|s| s.as_str()).collect::<Vec<_>>())
139        .slide("Color Constants", &[
140            &format!("Material Red: {}", colors::MATERIAL_RED),
141            &format!("Material Blue: {}", colors::MATERIAL_BLUE),
142            &format!("Material Green: {}", colors::MATERIAL_GREEN),
143            &format!("Carbon Blue 60: {}", colors::CARBON_BLUE_60),
144            &format!("Carbon Gray 100: {}", colors::CARBON_GRAY_100),
145        ])
146        .build()?;
147    
148    std::fs::write("examples/output/themes_demo.pptx", themes_demo)?;
149    println!("  ✓ Created examples/output/themes_demo.pptx");
150
151    // 5. Complete Feature Showcase
152    println!("Creating complete feature showcase...");
153    
154    let showcase = pptx!("ppt-rs v0.2.1 Features")
155        .title_slide("New Features in ppt-rs v0.2.1")
156        .slide("Bullet Formatting", &[
157            "BulletStyle::Number - 1, 2, 3...",
158            "BulletStyle::LetterLower/Upper - a, b, c / A, B, C",
159            "BulletStyle::RomanLower/Upper - i, ii, iii / I, II, III",
160            "BulletStyle::Custom(char) - Any custom character",
161            "Sub-bullets with indentation",
162        ])
163        .slide("Text Enhancements", &[
164            "TextFormat::strikethrough() - Strike through text",
165            "TextFormat::highlight(color) - Background highlight",
166            "TextFormat::subscript() - H₂O style",
167            "TextFormat::superscript() - x² style",
168            "font_sizes module with presets",
169        ])
170        .slide("Image Loading", &[
171            "Image::from_base64() - Base64 encoded images",
172            "Image::from_bytes() - Raw byte arrays",
173            "ImageSource enum for flexible handling",
174            "Built-in base64 decoder",
175        ])
176        .slide("Templates", &[
177            "templates::business_proposal()",
178            "templates::status_report()",
179            "templates::training_material()",
180            "templates::technical_doc()",
181            "templates::simple()",
182        ])
183        .slide("Themes & Colors", &[
184            "themes::CORPORATE, MODERN, VIBRANT, DARK",
185            "themes::NATURE, TECH, CARBON",
186            "colors module with Material Design colors",
187            "colors module with IBM Carbon colors",
188        ])
189        .build()?;
190    
191    std::fs::write("examples/output/feature_showcase.pptx", showcase)?;
192    println!("  ✓ Created examples/output/feature_showcase.pptx");
193
194    println!("\n✅ All demos created successfully!");
195    println!("   Check examples/output/ for the generated files.");
196    
197    Ok(())
198}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 887)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Add a sub-bullet (indented)

Examples found in repository?
examples/new_features_demo.rs (line 44)
13fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
14    // Create output directory
15    std::fs::create_dir_all("examples/output")?;
16
17    // 1. Bullet Styles Demo
18    println!("Creating bullet styles demo...");
19    
20    // Numbered list slide
21    let numbered_slide = SlideContent::new("Numbered List")
22        .with_bullet_style(BulletStyle::Number)
23        .add_bullet("First step")
24        .add_bullet("Second step")
25        .add_bullet("Third step")
26        .add_bullet("Fourth step");
27    
28    // Lettered list slide
29    let lettered_slide = SlideContent::new("Lettered List")
30        .add_lettered("Option A")
31        .add_lettered("Option B")
32        .add_lettered("Option C");
33    
34    // Roman numerals slide
35    let roman_slide = SlideContent::new("Roman Numerals")
36        .with_bullet_style(BulletStyle::RomanUpper)
37        .add_bullet("Chapter I")
38        .add_bullet("Chapter II")
39        .add_bullet("Chapter III");
40    
41    // Mixed bullets with sub-bullets
42    let mixed_slide = SlideContent::new("Mixed Bullets")
43        .add_bullet("Main point")
44        .add_sub_bullet("Supporting detail 1")
45        .add_sub_bullet("Supporting detail 2")
46        .add_bullet("Another main point")
47        .add_sub_bullet("More details");
48    
49    // Custom bullet slide
50    let custom_slide = SlideContent::new("Custom Bullets")
51        .add_styled_bullet("Star bullet", BulletStyle::Custom('★'))
52        .add_styled_bullet("Arrow bullet", BulletStyle::Custom('→'))
53        .add_styled_bullet("Check bullet", BulletStyle::Custom('✓'))
54        .add_styled_bullet("Diamond bullet", BulletStyle::Custom('◆'));
55    
56    let bullet_demo = pptx!("Bullet Styles Demo")
57        .title_slide("Bullet Styles - Demonstrating various list formats")
58        .content_slide(numbered_slide)
59        .content_slide(lettered_slide)
60        .content_slide(roman_slide)
61        .content_slide(mixed_slide)
62        .content_slide(custom_slide)
63        .build()?;
64    
65    std::fs::write("examples/output/bullet_styles.pptx", bullet_demo)?;
66    println!("  ✓ Created examples/output/bullet_styles.pptx");
67
68    // 2. Text Formatting Demo
69    println!("Creating text formatting demo...");
70    
71    let text_demo = pptx!("Text Formatting Demo")
72        .title_slide("Text Formatting - Strikethrough, highlight, subscript, superscript")
73        .slide("Text Styles", &[
74            "Normal text for comparison",
75            "This demonstrates various formatting options",
76            "Use TextFormat for rich text styling",
77        ])
78        .slide("Font Size Presets", &[
79            &format!("TITLE: {}pt - For main titles", font_sizes::TITLE),
80            &format!("SUBTITLE: {}pt - For subtitles", font_sizes::SUBTITLE),
81            &format!("HEADING: {}pt - For section headers", font_sizes::HEADING),
82            &format!("BODY: {}pt - For regular content", font_sizes::BODY),
83            &format!("SMALL: {}pt - For smaller text", font_sizes::SMALL),
84            &format!("CAPTION: {}pt - For captions", font_sizes::CAPTION),
85        ])
86        .slide("Text Effects", &[
87            "Strikethrough: For deleted text",
88            "Highlight: For emphasized text",
89            "Subscript: H₂O style formatting",
90            "Superscript: x² style formatting",
91        ])
92        .build()?;
93    
94    std::fs::write("examples/output/text_formatting.pptx", text_demo)?;
95    println!("  ✓ Created examples/output/text_formatting.pptx");
96
97    // 3. Image from Base64 Demo
98    println!("Creating image demo...");
99    
100    // 1x1 red PNG pixel in base64
101    let red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
102    
103    // Create image from base64
104    let img = ImageBuilder::from_base64(red_pixel_base64, inches(2.0), inches(2.0), "PNG")
105        .position(inches(4.0), inches(3.0))
106        .build();
107    
108    let image_slide = SlideContent::new("Image from Base64")
109        .add_bullet("Images can be loaded from base64 encoded data")
110        .add_bullet("Useful for embedding images without file access")
111        .add_bullet("Supports PNG, JPEG, GIF formats")
112        .add_image(img);
113    
114    let image_demo = pptx!("Image Features Demo")
115        .title_slide("Image Features - Loading images from various sources")
116        .content_slide(image_slide)
117        .slide("Image Sources", &[
118            "Image::new(filename) - From file path",
119            "Image::from_base64(data) - From base64 string",
120            "Image::from_bytes(data) - From raw bytes",
121            "ImageBuilder for fluent API",
122        ])
123        .build()?;
124    
125    std::fs::write("examples/output/image_features.pptx", image_demo)?;
126    println!("  ✓ Created examples/output/image_features.pptx");
127
128    // 4. Theme Colors Demo
129    println!("Creating themes demo...");
130    
131    let all_themes = themes::all();
132    let theme_info: Vec<String> = all_themes.iter().map(|t| {
133        format!("{}: Primary={}, Accent={}", t.name, t.primary, t.accent)
134    }).collect();
135    
136    let themes_demo = pptx!("Theme Colors Demo")
137        .title_slide("Theme Colors - Predefined color palettes")
138        .slide("Available Themes", &theme_info.iter().map(|s| s.as_str()).collect::<Vec<_>>())
139        .slide("Color Constants", &[
140            &format!("Material Red: {}", colors::MATERIAL_RED),
141            &format!("Material Blue: {}", colors::MATERIAL_BLUE),
142            &format!("Material Green: {}", colors::MATERIAL_GREEN),
143            &format!("Carbon Blue 60: {}", colors::CARBON_BLUE_60),
144            &format!("Carbon Gray 100: {}", colors::CARBON_GRAY_100),
145        ])
146        .build()?;
147    
148    std::fs::write("examples/output/themes_demo.pptx", themes_demo)?;
149    println!("  ✓ Created examples/output/themes_demo.pptx");
150
151    // 5. Complete Feature Showcase
152    println!("Creating complete feature showcase...");
153    
154    let showcase = pptx!("ppt-rs v0.2.1 Features")
155        .title_slide("New Features in ppt-rs v0.2.1")
156        .slide("Bullet Formatting", &[
157            "BulletStyle::Number - 1, 2, 3...",
158            "BulletStyle::LetterLower/Upper - a, b, c / A, B, C",
159            "BulletStyle::RomanLower/Upper - i, ii, iii / I, II, III",
160            "BulletStyle::Custom(char) - Any custom character",
161            "Sub-bullets with indentation",
162        ])
163        .slide("Text Enhancements", &[
164            "TextFormat::strikethrough() - Strike through text",
165            "TextFormat::highlight(color) - Background highlight",
166            "TextFormat::subscript() - H₂O style",
167            "TextFormat::superscript() - x² style",
168            "font_sizes module with presets",
169        ])
170        .slide("Image Loading", &[
171            "Image::from_base64() - Base64 encoded images",
172            "Image::from_bytes() - Raw byte arrays",
173            "ImageSource enum for flexible handling",
174            "Built-in base64 decoder",
175        ])
176        .slide("Templates", &[
177            "templates::business_proposal()",
178            "templates::status_report()",
179            "templates::training_material()",
180            "templates::technical_doc()",
181            "templates::simple()",
182        ])
183        .slide("Themes & Colors", &[
184            "themes::CORPORATE, MODERN, VIBRANT, DARK",
185            "themes::NATURE, TECH, CARBON",
186            "colors module with Material Design colors",
187            "colors module with IBM Carbon colors",
188        ])
189        .build()?;
190    
191    std::fs::write("examples/output/feature_showcase.pptx", showcase)?;
192    println!("  ✓ Created examples/output/feature_showcase.pptx");
193
194    println!("\n✅ All demos created successfully!");
195    println!("   Check examples/output/ for the generated files.");
196    
197    Ok(())
198}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 942)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Set default bullet style for this slide

Examples found in repository?
examples/new_features_demo.rs (line 22)
13fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
14    // Create output directory
15    std::fs::create_dir_all("examples/output")?;
16
17    // 1. Bullet Styles Demo
18    println!("Creating bullet styles demo...");
19    
20    // Numbered list slide
21    let numbered_slide = SlideContent::new("Numbered List")
22        .with_bullet_style(BulletStyle::Number)
23        .add_bullet("First step")
24        .add_bullet("Second step")
25        .add_bullet("Third step")
26        .add_bullet("Fourth step");
27    
28    // Lettered list slide
29    let lettered_slide = SlideContent::new("Lettered List")
30        .add_lettered("Option A")
31        .add_lettered("Option B")
32        .add_lettered("Option C");
33    
34    // Roman numerals slide
35    let roman_slide = SlideContent::new("Roman Numerals")
36        .with_bullet_style(BulletStyle::RomanUpper)
37        .add_bullet("Chapter I")
38        .add_bullet("Chapter II")
39        .add_bullet("Chapter III");
40    
41    // Mixed bullets with sub-bullets
42    let mixed_slide = SlideContent::new("Mixed Bullets")
43        .add_bullet("Main point")
44        .add_sub_bullet("Supporting detail 1")
45        .add_sub_bullet("Supporting detail 2")
46        .add_bullet("Another main point")
47        .add_sub_bullet("More details");
48    
49    // Custom bullet slide
50    let custom_slide = SlideContent::new("Custom Bullets")
51        .add_styled_bullet("Star bullet", BulletStyle::Custom('★'))
52        .add_styled_bullet("Arrow bullet", BulletStyle::Custom('→'))
53        .add_styled_bullet("Check bullet", BulletStyle::Custom('✓'))
54        .add_styled_bullet("Diamond bullet", BulletStyle::Custom('◆'));
55    
56    let bullet_demo = pptx!("Bullet Styles Demo")
57        .title_slide("Bullet Styles - Demonstrating various list formats")
58        .content_slide(numbered_slide)
59        .content_slide(lettered_slide)
60        .content_slide(roman_slide)
61        .content_slide(mixed_slide)
62        .content_slide(custom_slide)
63        .build()?;
64    
65    std::fs::write("examples/output/bullet_styles.pptx", bullet_demo)?;
66    println!("  ✓ Created examples/output/bullet_styles.pptx");
67
68    // 2. Text Formatting Demo
69    println!("Creating text formatting demo...");
70    
71    let text_demo = pptx!("Text Formatting Demo")
72        .title_slide("Text Formatting - Strikethrough, highlight, subscript, superscript")
73        .slide("Text Styles", &[
74            "Normal text for comparison",
75            "This demonstrates various formatting options",
76            "Use TextFormat for rich text styling",
77        ])
78        .slide("Font Size Presets", &[
79            &format!("TITLE: {}pt - For main titles", font_sizes::TITLE),
80            &format!("SUBTITLE: {}pt - For subtitles", font_sizes::SUBTITLE),
81            &format!("HEADING: {}pt - For section headers", font_sizes::HEADING),
82            &format!("BODY: {}pt - For regular content", font_sizes::BODY),
83            &format!("SMALL: {}pt - For smaller text", font_sizes::SMALL),
84            &format!("CAPTION: {}pt - For captions", font_sizes::CAPTION),
85        ])
86        .slide("Text Effects", &[
87            "Strikethrough: For deleted text",
88            "Highlight: For emphasized text",
89            "Subscript: H₂O style formatting",
90            "Superscript: x² style formatting",
91        ])
92        .build()?;
93    
94    std::fs::write("examples/output/text_formatting.pptx", text_demo)?;
95    println!("  ✓ Created examples/output/text_formatting.pptx");
96
97    // 3. Image from Base64 Demo
98    println!("Creating image demo...");
99    
100    // 1x1 red PNG pixel in base64
101    let red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
102    
103    // Create image from base64
104    let img = ImageBuilder::from_base64(red_pixel_base64, inches(2.0), inches(2.0), "PNG")
105        .position(inches(4.0), inches(3.0))
106        .build();
107    
108    let image_slide = SlideContent::new("Image from Base64")
109        .add_bullet("Images can be loaded from base64 encoded data")
110        .add_bullet("Useful for embedding images without file access")
111        .add_bullet("Supports PNG, JPEG, GIF formats")
112        .add_image(img);
113    
114    let image_demo = pptx!("Image Features Demo")
115        .title_slide("Image Features - Loading images from various sources")
116        .content_slide(image_slide)
117        .slide("Image Sources", &[
118            "Image::new(filename) - From file path",
119            "Image::from_base64(data) - From base64 string",
120            "Image::from_bytes(data) - From raw bytes",
121            "ImageBuilder for fluent API",
122        ])
123        .build()?;
124    
125    std::fs::write("examples/output/image_features.pptx", image_demo)?;
126    println!("  ✓ Created examples/output/image_features.pptx");
127
128    // 4. Theme Colors Demo
129    println!("Creating themes demo...");
130    
131    let all_themes = themes::all();
132    let theme_info: Vec<String> = all_themes.iter().map(|t| {
133        format!("{}: Primary={}, Accent={}", t.name, t.primary, t.accent)
134    }).collect();
135    
136    let themes_demo = pptx!("Theme Colors Demo")
137        .title_slide("Theme Colors - Predefined color palettes")
138        .slide("Available Themes", &theme_info.iter().map(|s| s.as_str()).collect::<Vec<_>>())
139        .slide("Color Constants", &[
140            &format!("Material Red: {}", colors::MATERIAL_RED),
141            &format!("Material Blue: {}", colors::MATERIAL_BLUE),
142            &format!("Material Green: {}", colors::MATERIAL_GREEN),
143            &format!("Carbon Blue 60: {}", colors::CARBON_BLUE_60),
144            &format!("Carbon Gray 100: {}", colors::CARBON_GRAY_100),
145        ])
146        .build()?;
147    
148    std::fs::write("examples/output/themes_demo.pptx", themes_demo)?;
149    println!("  ✓ Created examples/output/themes_demo.pptx");
150
151    // 5. Complete Feature Showcase
152    println!("Creating complete feature showcase...");
153    
154    let showcase = pptx!("ppt-rs v0.2.1 Features")
155        .title_slide("New Features in ppt-rs v0.2.1")
156        .slide("Bullet Formatting", &[
157            "BulletStyle::Number - 1, 2, 3...",
158            "BulletStyle::LetterLower/Upper - a, b, c / A, B, C",
159            "BulletStyle::RomanLower/Upper - i, ii, iii / I, II, III",
160            "BulletStyle::Custom(char) - Any custom character",
161            "Sub-bullets with indentation",
162        ])
163        .slide("Text Enhancements", &[
164            "TextFormat::strikethrough() - Strike through text",
165            "TextFormat::highlight(color) - Background highlight",
166            "TextFormat::subscript() - H₂O style",
167            "TextFormat::superscript() - x² style",
168            "font_sizes module with presets",
169        ])
170        .slide("Image Loading", &[
171            "Image::from_base64() - Base64 encoded images",
172            "Image::from_bytes() - Raw byte arrays",
173            "ImageSource enum for flexible handling",
174            "Built-in base64 decoder",
175        ])
176        .slide("Templates", &[
177            "templates::business_proposal()",
178            "templates::status_report()",
179            "templates::training_material()",
180            "templates::technical_doc()",
181            "templates::simple()",
182        ])
183        .slide("Themes & Colors", &[
184            "themes::CORPORATE, MODERN, VIBRANT, DARK",
185            "themes::NATURE, TECH, CARBON",
186            "colors module with Material Design colors",
187            "colors module with IBM Carbon colors",
188        ])
189        .build()?;
190    
191    std::fs::write("examples/output/feature_showcase.pptx", showcase)?;
192    println!("  ✓ Created examples/output/feature_showcase.pptx");
193
194    println!("\n✅ All demos created successfully!");
195    println!("   Check examples/output/ for the generated files.");
196    
197    Ok(())
198}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 869)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Examples found in repository?
examples/styled_presentation.rs (line 52)
49fn create_large_title_example() -> Result<(), Box<dyn std::error::Error>> {
50    let slides = vec![
51        SlideContent::new("Large Title Slide")
52            .title_size(60)  // 60pt title
53            .content_size(16) // 16pt content
54            .add_bullet("Small bullet point 1")
55            .add_bullet("Small bullet point 2")
56            .add_bullet("Small bullet point 3"),
57        SlideContent::new("Regular Formatting")
58            .add_bullet("Default 44pt title")
59            .add_bullet("Default 28pt content")
60            .add_bullet("Standard formatting"),
61    ];
62
63    let pptx_data = create_pptx_with_content("Large Title Example", slides)?;
64    fs::write("examples/output/large_title.pptx", pptx_data)?;
65    Ok(())
66}
67
68fn create_bold_content_example() -> Result<(), Box<dyn std::error::Error>> {
69    let slides = vec![
70        SlideContent::new("Bold Content Slide")
71            .title_bold(true)
72            .content_bold(true)  // Make bullets bold
73            .add_bullet("Bold bullet point 1")
74            .add_bullet("Bold bullet point 2")
75            .add_bullet("Bold bullet point 3"),
76        SlideContent::new("Regular Content")
77            .title_bold(true)
78            .content_bold(false)  // Regular bullets
79            .add_bullet("Regular bullet point 1")
80            .add_bullet("Regular bullet point 2"),
81    ];
82
83    let pptx_data = create_pptx_with_content("Bold Content Example", slides)?;
84    fs::write("examples/output/bold_content.pptx", pptx_data)?;
85    Ok(())
86}
87
88fn create_mixed_formatting_example() -> Result<(), Box<dyn std::error::Error>> {
89    let slides = vec![
90        SlideContent::new("Title Slide")
91            .title_size(52)
92            .title_bold(true)
93            .content_size(24)
94            .content_bold(false)
95            .add_bullet("Large content text")
96            .add_bullet("Still readable")
97            .add_bullet("Professional look"),
98        SlideContent::new("Compact Slide")
99            .title_size(36)
100            .title_bold(false)
101            .content_size(18)
102            .content_bold(true)
103            .add_bullet("Smaller title")
104            .add_bullet("Bold content")
105            .add_bullet("Tight spacing"),
106        SlideContent::new("Summary")
107            .title_size(48)
108            .title_bold(true)
109            .content_size(32)
110            .content_bold(true)
111            .add_bullet("Large bold text")
112            .add_bullet("High impact")
113            .add_bullet("Great for emphasis"),
114    ];
115
116    let pptx_data = create_pptx_with_content("Mixed Formatting Example", slides)?;
117    fs::write("examples/output/mixed_formatting.pptx", pptx_data)?;
118    Ok(())
119}
More examples
Hide additional examples
examples/test_notes.rs (line 12)
6fn main() -> Result<(), Box<dyn std::error::Error>> {
7    println!("Creating test presentation with speaker notes...");
8    
9    let slides = vec![
10        SlideContent::new("Slide 1 - With Notes")
11            .layout(SlideLayout::CenteredTitle)
12            .title_size(54)
13            .title_bold(true)
14            .notes("This is a speaker note for slide 1. It should appear in presenter view."),
15        
16        SlideContent::new("Slide 2 - Also With Notes")
17            .add_bullet("Bullet point 1")
18            .add_bullet("Bullet point 2")
19            .add_bullet("Bullet point 3")
20            .notes("Notes for slide 2 with bullet points."),
21        
22        SlideContent::new("Slide 3 - No Notes")
23            .add_bullet("This slide has no notes"),
24        
25        SlideContent::new("Slide 4 - More Notes")
26            .layout(SlideLayout::TwoColumn)
27            .add_bullet("Left 1")
28            .add_bullet("Left 2")
29            .add_bullet("Right 1")
30            .add_bullet("Right 2")
31            .notes("Two column layout with speaker notes."),
32    ];
33    
34    let pptx_data = create_pptx_with_content("Test Notes", slides)?;
35    fs::write("test_notes.pptx", &pptx_data)?;
36    println!("Created test_notes.pptx ({} bytes)", pptx_data.len());
37    println!("\nOpen in PowerPoint and check presenter view for notes!");
38    
39    Ok(())
40}
examples/text_styling_complete.rs (line 110)
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
examples/alignment_test.rs (line 23)
13fn main() -> Result<(), Box<dyn std::error::Error>> {
14    println!("=== Alignment Test: ppt-rs vs python-pptx ===\n");
15    
16    // Create output directory
17    fs::create_dir_all("examples/output")?;
18    
19    // Create slides matching the reference presentation structure
20    let slides = vec![
21        // Slide 1: Title Slide
22        SlideContent::new("Alignment Test Presentation")
23            .title_size(54)
24            .title_bold(true)
25            .title_color("003366"),  // RGB(0, 51, 102)
26        
27        // Slide 2: Content Slide
28        SlideContent::new("Shapes and Formatting")
29            .title_size(44)
30            .title_bold(true)
31            .title_color("003366")
32            .add_bullet("Text formatting (bold, colors, sizes)")
33            .add_bullet("Shape creation and positioning")
34            .add_bullet("Multiple slides and layouts"),
35    ];
36    
37    // Generate PPTX
38    let pptx_data = create_pptx_with_content(
39        "Alignment Test Presentation",
40        slides,
41    )?;
42    
43    // Write to file
44    let output_path = "examples/output/alignment_test_ppt_rs.pptx";
45    fs::write(output_path, pptx_data)?;
46    
47    println!("✓ Created presentation: {output_path}");
48    println!("  - Title: Alignment Test Presentation");
49    println!("  - Slides: 2");
50    println!("\nNext steps:");
51    println!("  1. Open the generated file in PowerPoint to verify");
52    println!("  2. Compare with a python-pptx reference if available");
53    
54    Ok(())
55}
examples/table_generation.rs (line 164)
128fn create_data_table_example() -> Result<(), Box<dyn std::error::Error>> {
129    let header_cells = vec![
130        TableCell::new("Product").bold().background_color("1F497D"),
131        TableCell::new("Revenue").bold().background_color("1F497D"),
132        TableCell::new("Growth").bold().background_color("1F497D"),
133    ];
134    let header_row = TableRow::new(header_cells);
135
136    let data_rows = vec![
137        TableRow::new(vec![
138            TableCell::new("Product A"),
139            TableCell::new("$100K"),
140            TableCell::new("+15%"),
141        ]),
142        TableRow::new(vec![
143            TableCell::new("Product B"),
144            TableCell::new("$150K"),
145            TableCell::new("+22%"),
146        ]),
147        TableRow::new(vec![
148            TableCell::new("Product C"),
149            TableCell::new("$200K"),
150            TableCell::new("+18%"),
151        ]),
152    ];
153
154    let table = Table::new(
155        vec![vec![header_row], data_rows].concat(),
156        vec![2000000, 2000000, 1500000],
157        457200,
158        1400000,
159    );
160
161    let slides = vec![
162        SlideContent::new("Sales Data Table")
163            .title_bold(true)
164            .title_size(48)
165            .add_bullet("Quarterly sales figures"),
166        SlideContent::new("Q1 2025 Sales")
167            .table(table),
168        SlideContent::new("Summary")
169            .content_bold(true)
170            .add_bullet("Total Revenue: $450K")
171            .add_bullet("Average Growth: +18.3%")
172            .add_bullet("Best Performer: Product C"),
173    ];
174
175    let pptx_data = create_pptx_with_content("Sales Data", slides)?;
176    fs::write("examples/output/data_table.pptx", pptx_data)?;
177    Ok(())
178}
examples/layout_demo.rs (line 12)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title Only
6        SlideContent::new("Welcome to Layout Demo")
7            .layout(SlideLayout::TitleOnly),
8
9        // Slide 2: Centered Title (good for cover slides)
10        SlideContent::new("Centered Title Slide")
11            .layout(SlideLayout::CenteredTitle)
12            .title_size(60)
13            .title_color("4F81BD"),
14
15        // Slide 3: Title and Content (standard layout)
16        SlideContent::new("Standard Layout")
17            .add_bullet("Point 1: Title at top")
18            .add_bullet("Point 2: Content below")
19            .add_bullet("Point 3: Most common layout")
20            .layout(SlideLayout::TitleAndContent),
21
22        // Slide 4: Title and Big Content
23        SlideContent::new("Big Content Area")
24            .add_bullet("More space for content")
25            .add_bullet("Smaller title area")
26            .add_bullet("Good for detailed slides")
27            .add_bullet("Maximizes content space")
28            .layout(SlideLayout::TitleAndBigContent),
29
30        // Slide 5: Two Column Layout
31        SlideContent::new("Two Column Layout")
32            .add_bullet("Left column content")
33            .add_bullet("Organized side by side")
34            .add_bullet("Great for comparisons")
35            .layout(SlideLayout::TwoColumn),
36
37        // Slide 6: Blank Slide
38        SlideContent::new("")
39            .layout(SlideLayout::Blank),
40
41        // Slide 7: Summary with different formatting
42        SlideContent::new("Summary")
43            .title_size(48)
44            .title_bold(true)
45            .title_color("C0504D")
46            .add_bullet("Layout types implemented:")
47            .add_bullet("• TitleOnly - Just title")
48            .add_bullet("• CenteredTitle - Title centered")
49            .add_bullet("• TitleAndContent - Standard")
50            .add_bullet("• TitleAndBigContent - Large content")
51            .add_bullet("• TwoColumn - Side by side")
52            .add_bullet("• Blank - Empty slide")
53            .content_size(20)
54            .layout(SlideLayout::TitleAndContent),
55    ];
56
57    let pptx_data = create_pptx_with_content("Layout Demo Presentation", slides)?;
58    std::fs::write("layout_demo.pptx", pptx_data)?;
59    println!("✓ Created layout_demo.pptx with 7 slides demonstrating different layouts");
60
61    Ok(())
62}
Source

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

Examples found in repository?
examples/styled_presentation.rs (line 53)
49fn create_large_title_example() -> Result<(), Box<dyn std::error::Error>> {
50    let slides = vec![
51        SlideContent::new("Large Title Slide")
52            .title_size(60)  // 60pt title
53            .content_size(16) // 16pt content
54            .add_bullet("Small bullet point 1")
55            .add_bullet("Small bullet point 2")
56            .add_bullet("Small bullet point 3"),
57        SlideContent::new("Regular Formatting")
58            .add_bullet("Default 44pt title")
59            .add_bullet("Default 28pt content")
60            .add_bullet("Standard formatting"),
61    ];
62
63    let pptx_data = create_pptx_with_content("Large Title Example", slides)?;
64    fs::write("examples/output/large_title.pptx", pptx_data)?;
65    Ok(())
66}
67
68fn create_bold_content_example() -> Result<(), Box<dyn std::error::Error>> {
69    let slides = vec![
70        SlideContent::new("Bold Content Slide")
71            .title_bold(true)
72            .content_bold(true)  // Make bullets bold
73            .add_bullet("Bold bullet point 1")
74            .add_bullet("Bold bullet point 2")
75            .add_bullet("Bold bullet point 3"),
76        SlideContent::new("Regular Content")
77            .title_bold(true)
78            .content_bold(false)  // Regular bullets
79            .add_bullet("Regular bullet point 1")
80            .add_bullet("Regular bullet point 2"),
81    ];
82
83    let pptx_data = create_pptx_with_content("Bold Content Example", slides)?;
84    fs::write("examples/output/bold_content.pptx", pptx_data)?;
85    Ok(())
86}
87
88fn create_mixed_formatting_example() -> Result<(), Box<dyn std::error::Error>> {
89    let slides = vec![
90        SlideContent::new("Title Slide")
91            .title_size(52)
92            .title_bold(true)
93            .content_size(24)
94            .content_bold(false)
95            .add_bullet("Large content text")
96            .add_bullet("Still readable")
97            .add_bullet("Professional look"),
98        SlideContent::new("Compact Slide")
99            .title_size(36)
100            .title_bold(false)
101            .content_size(18)
102            .content_bold(true)
103            .add_bullet("Smaller title")
104            .add_bullet("Bold content")
105            .add_bullet("Tight spacing"),
106        SlideContent::new("Summary")
107            .title_size(48)
108            .title_bold(true)
109            .content_size(32)
110            .content_bold(true)
111            .add_bullet("Large bold text")
112            .add_bullet("High impact")
113            .add_bullet("Great for emphasis"),
114    ];
115
116    let pptx_data = create_pptx_with_content("Mixed Formatting Example", slides)?;
117    fs::write("examples/output/mixed_formatting.pptx", pptx_data)?;
118    Ok(())
119}
More examples
Hide additional examples
examples/text_styling_complete.rs (line 130)
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
examples/layout_demo.rs (line 53)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title Only
6        SlideContent::new("Welcome to Layout Demo")
7            .layout(SlideLayout::TitleOnly),
8
9        // Slide 2: Centered Title (good for cover slides)
10        SlideContent::new("Centered Title Slide")
11            .layout(SlideLayout::CenteredTitle)
12            .title_size(60)
13            .title_color("4F81BD"),
14
15        // Slide 3: Title and Content (standard layout)
16        SlideContent::new("Standard Layout")
17            .add_bullet("Point 1: Title at top")
18            .add_bullet("Point 2: Content below")
19            .add_bullet("Point 3: Most common layout")
20            .layout(SlideLayout::TitleAndContent),
21
22        // Slide 4: Title and Big Content
23        SlideContent::new("Big Content Area")
24            .add_bullet("More space for content")
25            .add_bullet("Smaller title area")
26            .add_bullet("Good for detailed slides")
27            .add_bullet("Maximizes content space")
28            .layout(SlideLayout::TitleAndBigContent),
29
30        // Slide 5: Two Column Layout
31        SlideContent::new("Two Column Layout")
32            .add_bullet("Left column content")
33            .add_bullet("Organized side by side")
34            .add_bullet("Great for comparisons")
35            .layout(SlideLayout::TwoColumn),
36
37        // Slide 6: Blank Slide
38        SlideContent::new("")
39            .layout(SlideLayout::Blank),
40
41        // Slide 7: Summary with different formatting
42        SlideContent::new("Summary")
43            .title_size(48)
44            .title_bold(true)
45            .title_color("C0504D")
46            .add_bullet("Layout types implemented:")
47            .add_bullet("• TitleOnly - Just title")
48            .add_bullet("• CenteredTitle - Title centered")
49            .add_bullet("• TitleAndContent - Standard")
50            .add_bullet("• TitleAndBigContent - Large content")
51            .add_bullet("• TwoColumn - Side by side")
52            .add_bullet("• Blank - Empty slide")
53            .content_size(20)
54            .layout(SlideLayout::TitleAndContent),
55    ];
56
57    let pptx_data = create_pptx_with_content("Layout Demo Presentation", slides)?;
58    std::fs::write("layout_demo.pptx", pptx_data)?;
59    println!("✓ Created layout_demo.pptx with 7 slides demonstrating different layouts");
60
61    Ok(())
62}
examples/dimension_demo.rs (line 338)
21fn main() -> Result<(), Box<dyn std::error::Error>> {
22    println!("╔══════════════════════════════════════════════════════════════╗");
23    println!("║       Dimension API Demo — Flexible Positioning & Sizing     ║");
24    println!("╚══════════════════════════════════════════════════════════════╝\n");
25
26    let mut slides = Vec::new();
27
28    // =========================================================================
29    // SLIDE 1: Title
30    // =========================================================================
31    slides.push(
32        SlideContent::new("Dimension API — Flexible Positioning & Sizing")
33            .layout(SlideLayout::CenteredTitle)
34            .title_size(44)
35            .title_bold(true)
36            .title_color("1F497D")
37    );
38
39    // =========================================================================
40    // SLIDE 2: All Unit Types Side-by-Side
41    // =========================================================================
42    println!("📏 Slide 2: All Unit Types");
43
44    // Each shape is 1 inch wide, positioned using a different unit type
45    let emu_shape = Shape::from_dimensions(ShapeType::Rectangle,
46        Dimension::Emu(457200), Dimension::Inches(1.5),
47        Dimension::Emu(1371600), Dimension::Inches(0.8),
48    ).with_fill(ShapeFill::new("1565C0")).with_text("EMU");
49
50    let inch_shape = Shape::from_dimensions(ShapeType::Rectangle,
51        Dimension::Inches(2.0), Dimension::Inches(1.5),
52        Dimension::Inches(1.5), Dimension::Inches(0.8),
53    ).with_fill(ShapeFill::new("2E7D32")).with_text("Inches");
54
55    let cm_shape = Shape::from_dimensions(ShapeType::Rectangle,
56        Dimension::Cm(9.0), Dimension::Inches(1.5),
57        Dimension::Cm(3.81), Dimension::Inches(0.8),
58    ).with_fill(ShapeFill::new("C62828")).with_text("Cm");
59
60    let pt_shape = Shape::from_dimensions(ShapeType::Rectangle,
61        Dimension::Pt(324.0), Dimension::Inches(1.5),
62        Dimension::Pt(108.0), Dimension::Inches(0.8),
63    ).with_fill(ShapeFill::new("7B1FA2")).with_text("Pt");
64
65    let ratio_shape = Shape::from_dimensions(ShapeType::Rectangle,
66        Dimension::Ratio(0.52), Dimension::Inches(1.5),
67        Dimension::Ratio(0.15), Dimension::Inches(0.8),
68    ).with_fill(ShapeFill::new("EF6C00")).with_text("Ratio");
69
70    let pct_shape = Shape::from_dimensions(ShapeType::Rectangle,
71        Dimension::percent(69.0), Dimension::Inches(1.5),
72        Dimension::percent(15.0), Dimension::Inches(0.8),
73    ).with_fill(ShapeFill::new("00838F")).with_text("Percent");
74
75    // Labels row
76    let label = Shape::from_dimensions(ShapeType::Rectangle,
77        Dimension::Inches(0.5), Dimension::Inches(0.8),
78        Dimension::Inches(9.0), Dimension::Inches(0.5),
79    ).with_text("Each shape below uses a different unit type for X position:");
80
81    slides.push(
82        SlideContent::new("All Dimension Unit Types")
83            .layout(SlideLayout::TitleOnly)
84            .title_color("1F497D").title_bold(true)
85            .add_shape(label)
86            .add_shape(emu_shape)
87            .add_shape(inch_shape)
88            .add_shape(cm_shape)
89            .add_shape(pt_shape)
90            .add_shape(ratio_shape)
91            .add_shape(pct_shape)
92    );
93
94    // =========================================================================
95    // SLIDE 3: Ratio-Based Grid Layout
96    // =========================================================================
97    println!("📐 Slide 3: Ratio-Based Grid (auto-adapts to slide size)");
98
99    let margin = 0.03;  // 3% margin
100    let gap = 0.02;     // 2% gap
101    let cell_w = (1.0 - 2.0 * margin - 2.0 * gap) / 3.0;
102    let cell_h = (0.7 - 2.0 * gap) / 3.0;  // 70% of slide height for grid
103    let y_start = 0.22; // below title
104
105    let colors = [
106        "1565C0", "2E7D32", "C62828",
107        "7B1FA2", "EF6C00", "00838F",
108        "AD1457", "4E342E", "37474F",
109    ];
110    let labels = [
111        "Top-Left", "Top-Center", "Top-Right",
112        "Mid-Left", "Mid-Center", "Mid-Right",
113        "Bot-Left", "Bot-Center", "Bot-Right",
114    ];
115
116    let mut grid_slide = SlideContent::new("Ratio-Based 3x3 Grid Layout")
117        .layout(SlideLayout::TitleOnly)
118        .title_color("1F497D").title_bold(true);
119
120    for row in 0..3 {
121        for col in 0..3 {
122            let idx = row * 3 + col;
123            let x = margin + col as f64 * (cell_w + gap);
124            let y = y_start + row as f64 * (cell_h + gap);
125            let shape = Shape::from_dimensions(ShapeType::RoundedRectangle,
126                Dimension::Ratio(x), Dimension::Ratio(y),
127                Dimension::Ratio(cell_w), Dimension::Ratio(cell_h),
128            ).with_fill(ShapeFill::new(colors[idx])).with_text(labels[idx]);
129            grid_slide = grid_slide.add_shape(shape);
130        }
131    }
132
133    slides.push(grid_slide);
134
135    // =========================================================================
136    // SLIDE 4: Mixed-Unit Positioning
137    // =========================================================================
138    println!("🔀 Slide 4: Mixed-Unit Positioning");
139
140    // Title area: inches for position, ratio for width
141    let title_box = Shape::from_dimensions(ShapeType::RoundedRectangle,
142        Dimension::Inches(0.5), Dimension::Inches(1.5),
143        Dimension::Ratio(0.9), Dimension::Cm(2.0),
144    ).with_fill(ShapeFill::new("1F497D")).with_text("Inches X + Ratio Width + Cm Height");
145
146    // Content area: cm for position, pt for size
147    let content_box = Shape::from_dimensions(ShapeType::Rectangle,
148        Dimension::Cm(2.0), Dimension::Cm(6.0),
149        Dimension::Pt(432.0), Dimension::Pt(108.0),  // 6in x 1.5in
150    ).with_fill(ShapeFill::new("2E7D32")).with_text("Cm position + Pt size");
151
152    // Footer area: percent for everything
153    let footer_box = Shape::from_dimensions(ShapeType::Rectangle,
154        Dimension::percent(5.0), Dimension::percent(75.0),
155        Dimension::percent(90.0), Dimension::percent(10.0),
156    ).with_fill(ShapeFill::new("C62828")).with_text("100% percent-based");
157
158    // Sidebar: EMU for position, inches for size
159    let sidebar = Shape::from_dimensions(ShapeType::Rectangle,
160        Dimension::Emu(8000000), Dimension::Inches(1.5),
161        Dimension::Inches(1.0), Dimension::Ratio(0.6),
162    ).with_fill(ShapeFill::new("7B1FA2")).with_text("EMU + Inches + Ratio");
163
164    slides.push(
165        SlideContent::new("Mixed-Unit Positioning")
166            .layout(SlideLayout::TitleOnly)
167            .title_color("1F497D").title_bold(true)
168            .add_shape(title_box)
169            .add_shape(content_box)
170            .add_shape(footer_box)
171            .add_shape(sidebar)
172    );
173
174    // =========================================================================
175    // SLIDE 5: Fluent .at() and .with_dimensions() Chaining
176    // =========================================================================
177    println!("🔗 Slide 5: Fluent Chaining API");
178
179    // Build shapes step by step with chaining
180    let shape1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
181        .at(Dimension::percent(10.0), Dimension::percent(25.0))
182        .with_dimensions(Dimension::Inches(2.5), Dimension::Inches(2.5))
183        .with_fill(ShapeFill::new("1565C0"))
184        .with_text(".at() + .with_dimensions()");
185
186    let shape2 = Shape::new(ShapeType::RoundedRectangle, 0, 0, 0, 0)
187        .at(Dimension::Inches(4.0), Dimension::Cm(5.0))
188        .with_dimensions(Dimension::Ratio(0.3), Dimension::Inches(2.0))
189        .with_fill(ShapeFill::new("2E7D32"))
190        .with_line(ShapeLine::new("1B5E20", 25400))
191        .with_text("Chained with fill + line");
192
193    let shape3 = Shape::new(ShapeType::Star5, 0, 0, 0, 0)
194        .at(Dimension::percent(70.0), Dimension::percent(55.0))
195        .with_dimensions(Dimension::Inches(2.0), Dimension::Inches(2.0))
196        .with_fill(ShapeFill::new("FFC107"))
197        .with_rotation(15)
198        .with_text("+ rotation");
199
200    slides.push(
201        SlideContent::new("Fluent .at() and .with_dimensions() Chaining")
202            .layout(SlideLayout::TitleOnly)
203            .title_color("1F497D").title_bold(true)
204            .add_shape(shape1)
205            .add_shape(shape2)
206            .add_shape(shape3)
207    );
208
209    // =========================================================================
210    // SLIDE 6: Prelude Shape Builders
211    // =========================================================================
212    println!("🧰 Slide 6: Prelude Shape Builders");
213
214    // shapes::dim() — generic Dimension-based builder
215    let dim_shape = shapes::dim(ShapeType::Diamond,
216        Dimension::percent(5.0), Dimension::percent(25.0),
217        Dimension::percent(25.0), Dimension::percent(35.0),
218    ).with_fill(ShapeFill::new("7B1FA2")).with_text("shapes::dim()");
219
220    // shapes::rect_ratio() — ratio-based rectangle
221    let ratio_rect = shapes::rect_ratio(0.35, 0.25, 0.28, 0.35)
222        .with_fill(ShapeFill::new("EF6C00")).with_text("shapes::rect_ratio()");
223
224    // shapes::text_box_ratio() — ratio-based text box
225    let ratio_text = shapes::text_box_ratio(0.68, 0.25, 0.28, 0.35, "shapes::text_box_ratio()")
226        .with_fill(ShapeFill::new("00838F"));
227
228    // Traditional shapes::rect() still works (inches)
229    let inch_rect = shapes::rect(1.0, 5.0, 3.0, 1.0)
230        .with_fill(ShapeFill::new("A5A5A5")).with_text("shapes::rect() (inches)");
231
232    slides.push(
233        SlideContent::new("Prelude Shape Builders")
234            .layout(SlideLayout::TitleOnly)
235            .title_color("1F497D").title_bold(true)
236            .add_shape(dim_shape)
237            .add_shape(ratio_rect)
238            .add_shape(ratio_text)
239            .add_shape(inch_rect)
240    );
241
242    // =========================================================================
243    // SLIDE 7: FlexPosition & FlexSize Structs
244    // =========================================================================
245    println!("📦 Slide 7: FlexPosition & FlexSize");
246
247    // Demonstrate FlexPosition and FlexSize for reusable layout definitions
248    let header_pos = FlexPosition::new(Dimension::percent(5.0), Dimension::percent(20.0));
249    let header_size = FlexSize::new(Dimension::percent(90.0), Dimension::percent(12.0));
250    let (hx, hy) = header_pos.to_emu();
251    let (hw, hh) = header_size.to_emu();
252    let header = Shape::new(ShapeType::RoundedRectangle, hx, hy, hw, hh)
253        .with_fill(ShapeFill::new("1F497D"))
254        .with_text("FlexPosition + FlexSize → header");
255
256    let body_pos = FlexPosition::new(Dimension::percent(5.0), Dimension::percent(35.0));
257    let body_size = FlexSize::new(Dimension::percent(60.0), Dimension::percent(50.0));
258    let (bx, by) = body_pos.to_emu();
259    let (bw, bh) = body_size.to_emu();
260    let body = Shape::new(ShapeType::Rectangle, bx, by, bw, bh)
261        .with_fill(ShapeFill::new("E8EAF6"))
262        .with_line(ShapeLine::new("3F51B5", 12700))
263        .with_text("Body area (60% x 50%)");
264
265    let sidebar_pos = FlexPosition::new(Dimension::percent(68.0), Dimension::percent(35.0));
266    let sidebar_size = FlexSize::new(Dimension::percent(27.0), Dimension::percent(50.0));
267    let (sx, sy) = sidebar_pos.to_emu();
268    let (sw, sh) = sidebar_size.to_emu();
269    let sidebar_shape = Shape::new(ShapeType::Rectangle, sx, sy, sw, sh)
270        .with_fill(ShapeFill::new("FFF3E0"))
271        .with_line(ShapeLine::new("EF6C00", 12700))
272        .with_text("Sidebar (27% x 50%)");
273
274    slides.push(
275        SlideContent::new("FlexPosition & FlexSize — Reusable Layouts")
276            .layout(SlideLayout::TitleOnly)
277            .title_color("1F497D").title_bold(true)
278            .add_shape(header)
279            .add_shape(body)
280            .add_shape(sidebar_shape)
281    );
282
283    // =========================================================================
284    // SLIDE 8: Real-World Dashboard with Dimension API
285    // =========================================================================
286    println!("📊 Slide 8: Real-World Dashboard");
287
288    // 4 evenly-spaced KPI cards using percent
289    let kpi_colors = ["1565C0", "2E7D32", "EF6C00", "7B1FA2"];
290    let kpi_labels = [
291        "Revenue\n$2.14M\n+15%",
292        "Users\n12,450\n+22%",
293        "NPS\n72\n+8 pts",
294        "Uptime\n99.9%\n+0.1%",
295    ];
296
297    let mut dashboard = SlideContent::new("KPI Dashboard — Dimension API")
298        .layout(SlideLayout::TitleOnly)
299        .title_color("1F497D").title_bold(true);
300
301    for i in 0..4 {
302        let x_pct = 3.0 + i as f64 * 24.5;
303        let card = Shape::from_dimensions(ShapeType::RoundedRectangle,
304            Dimension::percent(x_pct), Dimension::percent(22.0),
305            Dimension::percent(22.0), Dimension::percent(30.0),
306        ).with_fill(ShapeFill::new(kpi_colors[i])).with_text(kpi_labels[i]);
307        dashboard = dashboard.add_shape(card);
308    }
309
310    // Bottom chart placeholder
311    let chart_area = Shape::from_dimensions(ShapeType::Rectangle,
312        Dimension::percent(3.0), Dimension::percent(58.0),
313        Dimension::percent(94.0), Dimension::percent(35.0),
314    ).with_fill(ShapeFill::new("ECEFF1"))
315     .with_line(ShapeLine::new("B0BEC5", 12700))
316     .with_text("Chart Area (94% x 35%)");
317    dashboard = dashboard.add_shape(chart_area);
318
319    slides.push(dashboard);
320
321    // =========================================================================
322    // SLIDE 9: Unit Equivalence Reference
323    // =========================================================================
324    println!("📖 Slide 9: Unit Equivalence Reference");
325
326    slides.push(
327        SlideContent::new("Dimension Unit Reference")
328            .layout(SlideLayout::TitleAndContent)
329            .title_color("1F497D").title_bold(true)
330            .add_bullet(&format!("1 inch = {} EMU = Dimension::Inches(1.0)", 914400))
331            .add_bullet(&format!("1 cm   = {} EMU = Dimension::Cm(1.0)", 360000))
332            .add_bullet(&format!("1 pt   = {} EMU = Dimension::Pt(1.0)", 12700))
333            .add_bullet(&format!("Slide width  = {} EMU = 10 inches", SLIDE_WIDTH_EMU))
334            .add_bullet(&format!("Slide height = {} EMU = 7.5 inches", SLIDE_HEIGHT_EMU))
335            .add_bullet("Ratio(0.1) on X = 10% of slide width = 1 inch")
336            .add_bullet("Ratio(0.5) on Y = 50% of slide height = 3.75 inches")
337            .add_bullet("percent(50.0) = Ratio(0.5)")
338            .content_size(22)
339    );
340
341    // =========================================================================
342    // Generate PPTX
343    // =========================================================================
344    fs::create_dir_all("examples/output")?;
345    let num_slides = slides.len();
346    let pptx_data = create_pptx_with_content("Dimension API Demo", slides)?;
347    fs::write("examples/output/dimension_demo.pptx", &pptx_data)?;
348
349    println!("\n╔══════════════════════════════════════════════════════════════╗");
350    println!("║                 Dimension API Demo Complete                   ║");
351    println!("╠══════════════════════════════════════════════════════════════╣");
352    println!("║  Output: examples/output/dimension_demo.pptx                 ║");
353    println!("║  Slides: {}                                                   ║", num_slides);
354    println!("║  Size:   {} KB                                               ║", pptx_data.len() / 1024);
355    println!("╠══════════════════════════════════════════════════════════════╣");
356    println!("║  Showcased:                                                  ║");
357    println!("║    ✓ All 6 unit types: EMU, Inches, Cm, Pt, Ratio, Percent   ║");
358    println!("║    ✓ Shape::from_dimensions() constructor                    ║");
359    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
360    println!("║    ✓ Mixed-unit positioning                                  ║");
361    println!("║    ✓ Prelude helpers: dim(), rect_ratio(), text_box_ratio()  ║");
362    println!("║    ✓ FlexPosition & FlexSize structs                         ║");
363    println!("║    ✓ Ratio-based grid layout (auto-adapts)                   ║");
364    println!("║    ✓ Real-world KPI dashboard                                ║");
365    println!("╚══════════════════════════════════════════════════════════════╝");
366
367    Ok(())
368}
examples/comprehensive_demo.rs (line 121)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Examples found in repository?
examples/styled_presentation.rs (line 71)
68fn create_bold_content_example() -> Result<(), Box<dyn std::error::Error>> {
69    let slides = vec![
70        SlideContent::new("Bold Content Slide")
71            .title_bold(true)
72            .content_bold(true)  // Make bullets bold
73            .add_bullet("Bold bullet point 1")
74            .add_bullet("Bold bullet point 2")
75            .add_bullet("Bold bullet point 3"),
76        SlideContent::new("Regular Content")
77            .title_bold(true)
78            .content_bold(false)  // Regular bullets
79            .add_bullet("Regular bullet point 1")
80            .add_bullet("Regular bullet point 2"),
81    ];
82
83    let pptx_data = create_pptx_with_content("Bold Content Example", slides)?;
84    fs::write("examples/output/bold_content.pptx", pptx_data)?;
85    Ok(())
86}
87
88fn create_mixed_formatting_example() -> Result<(), Box<dyn std::error::Error>> {
89    let slides = vec![
90        SlideContent::new("Title Slide")
91            .title_size(52)
92            .title_bold(true)
93            .content_size(24)
94            .content_bold(false)
95            .add_bullet("Large content text")
96            .add_bullet("Still readable")
97            .add_bullet("Professional look"),
98        SlideContent::new("Compact Slide")
99            .title_size(36)
100            .title_bold(false)
101            .content_size(18)
102            .content_bold(true)
103            .add_bullet("Smaller title")
104            .add_bullet("Bold content")
105            .add_bullet("Tight spacing"),
106        SlideContent::new("Summary")
107            .title_size(48)
108            .title_bold(true)
109            .content_size(32)
110            .content_bold(true)
111            .add_bullet("Large bold text")
112            .add_bullet("High impact")
113            .add_bullet("Great for emphasis"),
114    ];
115
116    let pptx_data = create_pptx_with_content("Mixed Formatting Example", slides)?;
117    fs::write("examples/output/mixed_formatting.pptx", pptx_data)?;
118    Ok(())
119}
More examples
Hide additional examples
examples/test_notes.rs (line 13)
6fn main() -> Result<(), Box<dyn std::error::Error>> {
7    println!("Creating test presentation with speaker notes...");
8    
9    let slides = vec![
10        SlideContent::new("Slide 1 - With Notes")
11            .layout(SlideLayout::CenteredTitle)
12            .title_size(54)
13            .title_bold(true)
14            .notes("This is a speaker note for slide 1. It should appear in presenter view."),
15        
16        SlideContent::new("Slide 2 - Also With Notes")
17            .add_bullet("Bullet point 1")
18            .add_bullet("Bullet point 2")
19            .add_bullet("Bullet point 3")
20            .notes("Notes for slide 2 with bullet points."),
21        
22        SlideContent::new("Slide 3 - No Notes")
23            .add_bullet("This slide has no notes"),
24        
25        SlideContent::new("Slide 4 - More Notes")
26            .layout(SlideLayout::TwoColumn)
27            .add_bullet("Left 1")
28            .add_bullet("Left 2")
29            .add_bullet("Right 1")
30            .add_bullet("Right 2")
31            .notes("Two column layout with speaker notes."),
32    ];
33    
34    let pptx_data = create_pptx_with_content("Test Notes", slides)?;
35    fs::write("test_notes.pptx", &pptx_data)?;
36    println!("Created test_notes.pptx ({} bytes)", pptx_data.len());
37    println!("\nOpen in PowerPoint and check presenter view for notes!");
38    
39    Ok(())
40}
examples/table_generation.rs (line 116)
81fn create_styled_table_example() -> Result<(), Box<dyn std::error::Error>> {
82    let header_cells = vec![
83        TableCell::new("Name").bold().background_color("003366"),
84        TableCell::new("Age").bold().background_color("003366"),
85        TableCell::new("City").bold().background_color("003366"),
86    ];
87    let header_row = TableRow::new(header_cells);
88
89    let data_rows = vec![
90        TableRow::new(vec![
91            TableCell::new("Alice"),
92            TableCell::new("30"),
93            TableCell::new("NYC"),
94        ]),
95        TableRow::new(vec![
96            TableCell::new("Bob"),
97            TableCell::new("28"),
98            TableCell::new("LA"),
99        ]),
100        TableRow::new(vec![
101            TableCell::new("Carol"),
102            TableCell::new("35"),
103            TableCell::new("Chicago"),
104        ]),
105    ];
106
107    let table = Table::new(
108        vec![vec![header_row], data_rows].concat(),
109        vec![1500000, 1500000, 1500000],
110        500000,
111        1500000,
112    );
113
114    let slides = vec![
115        SlideContent::new("Styled Table")
116            .title_bold(true)
117            .title_color("003366")
118            .add_bullet("Table with formatting"),
119        SlideContent::new("People Data")
120            .table(table),
121    ];
122
123    let pptx_data = create_pptx_with_content("Styled Table", slides)?;
124    fs::write("examples/output/styled_table.pptx", pptx_data)?;
125    Ok(())
126}
127
128fn create_data_table_example() -> Result<(), Box<dyn std::error::Error>> {
129    let header_cells = vec![
130        TableCell::new("Product").bold().background_color("1F497D"),
131        TableCell::new("Revenue").bold().background_color("1F497D"),
132        TableCell::new("Growth").bold().background_color("1F497D"),
133    ];
134    let header_row = TableRow::new(header_cells);
135
136    let data_rows = vec![
137        TableRow::new(vec![
138            TableCell::new("Product A"),
139            TableCell::new("$100K"),
140            TableCell::new("+15%"),
141        ]),
142        TableRow::new(vec![
143            TableCell::new("Product B"),
144            TableCell::new("$150K"),
145            TableCell::new("+22%"),
146        ]),
147        TableRow::new(vec![
148            TableCell::new("Product C"),
149            TableCell::new("$200K"),
150            TableCell::new("+18%"),
151        ]),
152    ];
153
154    let table = Table::new(
155        vec![vec![header_row], data_rows].concat(),
156        vec![2000000, 2000000, 1500000],
157        457200,
158        1400000,
159    );
160
161    let slides = vec![
162        SlideContent::new("Sales Data Table")
163            .title_bold(true)
164            .title_size(48)
165            .add_bullet("Quarterly sales figures"),
166        SlideContent::new("Q1 2025 Sales")
167            .table(table),
168        SlideContent::new("Summary")
169            .content_bold(true)
170            .add_bullet("Total Revenue: $450K")
171            .add_bullet("Average Growth: +18.3%")
172            .add_bullet("Best Performer: Product C"),
173    ];
174
175    let pptx_data = create_pptx_with_content("Sales Data", slides)?;
176    fs::write("examples/output/data_table.pptx", pptx_data)?;
177    Ok(())
178}
179
180fn create_multiple_tables_example() -> Result<(), Box<dyn std::error::Error>> {
181    // Table 1: Employees
182    let emp_header = TableRow::new(vec![
183        TableCell::new("ID").bold().background_color("4F81BD"),
184        TableCell::new("Name").bold().background_color("4F81BD"),
185        TableCell::new("Department").bold().background_color("4F81BD"),
186    ]);
187    let emp_rows = vec![
188        TableRow::new(vec![
189            TableCell::new("001"),
190            TableCell::new("Alice"),
191            TableCell::new("Engineering"),
192        ]),
193        TableRow::new(vec![
194            TableCell::new("002"),
195            TableCell::new("Bob"),
196            TableCell::new("Sales"),
197        ]),
198        TableRow::new(vec![
199            TableCell::new("003"),
200            TableCell::new("Carol"),
201            TableCell::new("Marketing"),
202        ]),
203    ];
204    let emp_table = Table::new(
205        vec![vec![emp_header], emp_rows].concat(),
206        vec![1000000, 2000000, 2000000],
207        500000,
208        1500000,
209    );
210
211    // Table 2: Projects
212    let proj_header = TableRow::new(vec![
213        TableCell::new("Project").bold().background_color("003366"),
214        TableCell::new("Status").bold().background_color("003366"),
215        TableCell::new("Owner").bold().background_color("003366"),
216    ]);
217    let proj_rows = vec![
218        TableRow::new(vec![
219            TableCell::new("Project A"),
220            TableCell::new("In Progress"),
221            TableCell::new("Alice"),
222        ]),
223        TableRow::new(vec![
224            TableCell::new("Project B"),
225            TableCell::new("Completed"),
226            TableCell::new("Bob"),
227        ]),
228        TableRow::new(vec![
229            TableCell::new("Project C"),
230            TableCell::new("Planning"),
231            TableCell::new("Carol"),
232        ]),
233    ];
234    let proj_table = Table::new(
235        vec![vec![proj_header], proj_rows].concat(),
236        vec![2000000, 2000000, 1500000],
237        500000,
238        1500000,
239    );
240
241    let slides = vec![
242        SlideContent::new("Multiple Tables")
243            .title_bold(true)
244            .add_bullet("Slide with multiple tables"),
245        SlideContent::new("Table 1: Employees")
246            .table(emp_table),
247        SlideContent::new("Table 2: Projects")
248            .table(proj_table),
249        SlideContent::new("Summary")
250            .add_bullet("Total Employees: 3")
251            .add_bullet("Active Projects: 3")
252            .add_bullet("Completion Rate: 33%"),
253    ];
254
255    let pptx_data = create_pptx_with_content("Multiple Tables", slides)?;
256    fs::write("examples/output/multiple_tables.pptx", pptx_data)?;
257    Ok(())
258}
examples/text_styling_complete.rs (line 107)
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
examples/alignment_test.rs (line 24)
13fn main() -> Result<(), Box<dyn std::error::Error>> {
14    println!("=== Alignment Test: ppt-rs vs python-pptx ===\n");
15    
16    // Create output directory
17    fs::create_dir_all("examples/output")?;
18    
19    // Create slides matching the reference presentation structure
20    let slides = vec![
21        // Slide 1: Title Slide
22        SlideContent::new("Alignment Test Presentation")
23            .title_size(54)
24            .title_bold(true)
25            .title_color("003366"),  // RGB(0, 51, 102)
26        
27        // Slide 2: Content Slide
28        SlideContent::new("Shapes and Formatting")
29            .title_size(44)
30            .title_bold(true)
31            .title_color("003366")
32            .add_bullet("Text formatting (bold, colors, sizes)")
33            .add_bullet("Shape creation and positioning")
34            .add_bullet("Multiple slides and layouts"),
35    ];
36    
37    // Generate PPTX
38    let pptx_data = create_pptx_with_content(
39        "Alignment Test Presentation",
40        slides,
41    )?;
42    
43    // Write to file
44    let output_path = "examples/output/alignment_test_ppt_rs.pptx";
45    fs::write(output_path, pptx_data)?;
46    
47    println!("✓ Created presentation: {output_path}");
48    println!("  - Title: Alignment Test Presentation");
49    println!("  - Slides: 2");
50    println!("\nNext steps:");
51    println!("  1. Open the generated file in PowerPoint to verify");
52    println!("  2. Compare with a python-pptx reference if available");
53    
54    Ok(())
55}
examples/layout_demo.rs (line 44)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title Only
6        SlideContent::new("Welcome to Layout Demo")
7            .layout(SlideLayout::TitleOnly),
8
9        // Slide 2: Centered Title (good for cover slides)
10        SlideContent::new("Centered Title Slide")
11            .layout(SlideLayout::CenteredTitle)
12            .title_size(60)
13            .title_color("4F81BD"),
14
15        // Slide 3: Title and Content (standard layout)
16        SlideContent::new("Standard Layout")
17            .add_bullet("Point 1: Title at top")
18            .add_bullet("Point 2: Content below")
19            .add_bullet("Point 3: Most common layout")
20            .layout(SlideLayout::TitleAndContent),
21
22        // Slide 4: Title and Big Content
23        SlideContent::new("Big Content Area")
24            .add_bullet("More space for content")
25            .add_bullet("Smaller title area")
26            .add_bullet("Good for detailed slides")
27            .add_bullet("Maximizes content space")
28            .layout(SlideLayout::TitleAndBigContent),
29
30        // Slide 5: Two Column Layout
31        SlideContent::new("Two Column Layout")
32            .add_bullet("Left column content")
33            .add_bullet("Organized side by side")
34            .add_bullet("Great for comparisons")
35            .layout(SlideLayout::TwoColumn),
36
37        // Slide 6: Blank Slide
38        SlideContent::new("")
39            .layout(SlideLayout::Blank),
40
41        // Slide 7: Summary with different formatting
42        SlideContent::new("Summary")
43            .title_size(48)
44            .title_bold(true)
45            .title_color("C0504D")
46            .add_bullet("Layout types implemented:")
47            .add_bullet("• TitleOnly - Just title")
48            .add_bullet("• CenteredTitle - Title centered")
49            .add_bullet("• TitleAndContent - Standard")
50            .add_bullet("• TitleAndBigContent - Large content")
51            .add_bullet("• TwoColumn - Side by side")
52            .add_bullet("• Blank - Empty slide")
53            .content_size(20)
54            .layout(SlideLayout::TitleAndContent),
55    ];
56
57    let pptx_data = create_pptx_with_content("Layout Demo Presentation", slides)?;
58    std::fs::write("layout_demo.pptx", pptx_data)?;
59    println!("✓ Created layout_demo.pptx with 7 slides demonstrating different layouts");
60
61    Ok(())
62}
Source

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

Examples found in repository?
examples/styled_presentation.rs (line 72)
68fn create_bold_content_example() -> Result<(), Box<dyn std::error::Error>> {
69    let slides = vec![
70        SlideContent::new("Bold Content Slide")
71            .title_bold(true)
72            .content_bold(true)  // Make bullets bold
73            .add_bullet("Bold bullet point 1")
74            .add_bullet("Bold bullet point 2")
75            .add_bullet("Bold bullet point 3"),
76        SlideContent::new("Regular Content")
77            .title_bold(true)
78            .content_bold(false)  // Regular bullets
79            .add_bullet("Regular bullet point 1")
80            .add_bullet("Regular bullet point 2"),
81    ];
82
83    let pptx_data = create_pptx_with_content("Bold Content Example", slides)?;
84    fs::write("examples/output/bold_content.pptx", pptx_data)?;
85    Ok(())
86}
87
88fn create_mixed_formatting_example() -> Result<(), Box<dyn std::error::Error>> {
89    let slides = vec![
90        SlideContent::new("Title Slide")
91            .title_size(52)
92            .title_bold(true)
93            .content_size(24)
94            .content_bold(false)
95            .add_bullet("Large content text")
96            .add_bullet("Still readable")
97            .add_bullet("Professional look"),
98        SlideContent::new("Compact Slide")
99            .title_size(36)
100            .title_bold(false)
101            .content_size(18)
102            .content_bold(true)
103            .add_bullet("Smaller title")
104            .add_bullet("Bold content")
105            .add_bullet("Tight spacing"),
106        SlideContent::new("Summary")
107            .title_size(48)
108            .title_bold(true)
109            .content_size(32)
110            .content_bold(true)
111            .add_bullet("Large bold text")
112            .add_bullet("High impact")
113            .add_bullet("Great for emphasis"),
114    ];
115
116    let pptx_data = create_pptx_with_content("Mixed Formatting Example", slides)?;
117    fs::write("examples/output/mixed_formatting.pptx", pptx_data)?;
118    Ok(())
119}
More examples
Hide additional examples
examples/text_styling_complete.rs (line 115)
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
examples/table_generation.rs (line 169)
128fn create_data_table_example() -> Result<(), Box<dyn std::error::Error>> {
129    let header_cells = vec![
130        TableCell::new("Product").bold().background_color("1F497D"),
131        TableCell::new("Revenue").bold().background_color("1F497D"),
132        TableCell::new("Growth").bold().background_color("1F497D"),
133    ];
134    let header_row = TableRow::new(header_cells);
135
136    let data_rows = vec![
137        TableRow::new(vec![
138            TableCell::new("Product A"),
139            TableCell::new("$100K"),
140            TableCell::new("+15%"),
141        ]),
142        TableRow::new(vec![
143            TableCell::new("Product B"),
144            TableCell::new("$150K"),
145            TableCell::new("+22%"),
146        ]),
147        TableRow::new(vec![
148            TableCell::new("Product C"),
149            TableCell::new("$200K"),
150            TableCell::new("+18%"),
151        ]),
152    ];
153
154    let table = Table::new(
155        vec![vec![header_row], data_rows].concat(),
156        vec![2000000, 2000000, 1500000],
157        457200,
158        1400000,
159    );
160
161    let slides = vec![
162        SlideContent::new("Sales Data Table")
163            .title_bold(true)
164            .title_size(48)
165            .add_bullet("Quarterly sales figures"),
166        SlideContent::new("Q1 2025 Sales")
167            .table(table),
168        SlideContent::new("Summary")
169            .content_bold(true)
170            .add_bullet("Total Revenue: $450K")
171            .add_bullet("Average Growth: +18.3%")
172            .add_bullet("Best Performer: Product C"),
173    ];
174
175    let pptx_data = create_pptx_with_content("Sales Data", slides)?;
176    fs::write("examples/output/data_table.pptx", pptx_data)?;
177    Ok(())
178}
examples/edit_presentation.rs (line 95)
14fn main() -> Result<(), Box<dyn std::error::Error>> {
15    println!("╔════════════════════════════════════════════════════════════╗");
16    println!("║         PPTX Editing Demo                                  ║");
17    println!("╚════════════════════════════════════════════════════════════╝\n");
18
19    // =========================================================================
20    // Step 1: Create an initial presentation
21    // =========================================================================
22    println!("📝 Step 1: Creating initial presentation...");
23    
24    let initial_slides = vec![
25        SlideContent::new("Original Presentation")
26            .layout(SlideLayout::CenteredTitle)
27            .title_bold(true)
28            .title_color("1F497D"),
29        
30        SlideContent::new("Slide 1: Introduction")
31            .add_bullet("This is the original content")
32            .add_bullet("Created programmatically"),
33        
34        SlideContent::new("Slide 2: Features")
35            .add_bullet("Feature A")
36            .add_bullet("Feature B")
37            .add_bullet("Feature C"),
38    ];
39    
40    let pptx_data = create_pptx_with_content("Original Presentation", initial_slides)?;
41    fs::write("original.pptx", &pptx_data)?;
42    println!("   ✓ Created original.pptx with 3 slides\n");
43
44    // =========================================================================
45    // Step 2: Open and inspect the presentation
46    // =========================================================================
47    println!("📖 Step 2: Opening presentation for editing...");
48    
49    let mut editor = PresentationEditor::open("original.pptx")?;
50    println!("   ✓ Opened original.pptx");
51    println!("   ├── Slide count: {}", editor.slide_count());
52    
53    // Read first slide
54    let slide0 = editor.get_slide(0)?;
55    println!("   └── First slide title: {:?}\n", slide0.title);
56
57    // =========================================================================
58    // Step 3: Add new slides
59    // =========================================================================
60    println!("➕ Step 3: Adding new slides...");
61    
62    // Add a new slide at the end
63    let new_slide1 = SlideContent::new("New Slide: Added via Editor")
64        .add_bullet("This slide was added programmatically")
65        .add_bullet("Using PresentationEditor")
66        .add_bullet("After the presentation was created")
67        .title_color("9BBB59");
68    
69    let idx1 = editor.add_slide(new_slide1)?;
70    println!("   ✓ Added slide at index {}", idx1);
71    
72    // Add another slide
73    let new_slide2 = SlideContent::new("Another New Slide")
74        .layout(SlideLayout::TwoColumn)
75        .add_bullet("Left column item 1")
76        .add_bullet("Left column item 2")
77        .add_bullet("Right column item 1")
78        .add_bullet("Right column item 2");
79    
80    let idx2 = editor.add_slide(new_slide2)?;
81    println!("   ✓ Added slide at index {}", idx2);
82    println!("   └── Total slides now: {}\n", editor.slide_count());
83
84    // =========================================================================
85    // Step 4: Update existing slide
86    // =========================================================================
87    println!("✏️  Step 4: Updating existing slide...");
88    
89    let updated_slide = SlideContent::new("Slide 2: Updated Features")
90        .add_bullet("Feature A - Enhanced!")
91        .add_bullet("Feature B - Improved!")
92        .add_bullet("Feature C - Optimized!")
93        .add_bullet("Feature D - NEW!")
94        .title_color("C0504D")
95        .content_bold(true);
96    
97    editor.update_slide(2, updated_slide)?;
98    println!("   ✓ Updated slide at index 2\n");
99
100    // =========================================================================
101    // Step 5: Save modified presentation
102    // =========================================================================
103    println!("💾 Step 5: Saving modified presentation...");
104    
105    editor.save("modified.pptx")?;
106    println!("   ✓ Saved as modified.pptx\n");
107
108    // =========================================================================
109    // Step 6: Verify the changes
110    // =========================================================================
111    println!("🔍 Step 6: Verifying changes...");
112    
113    let reader = PresentationReader::open("modified.pptx")?;
114    println!("   Modified presentation:");
115    println!("   ├── Slide count: {}", reader.slide_count());
116    
117    for i in 0..reader.slide_count() {
118        let slide = reader.get_slide(i)?;
119        let title = slide.title.as_deref().unwrap_or("(no title)");
120        let bullets = slide.body_text.len();
121        println!("   {}── Slide {}: \"{}\" ({} bullets)", 
122                 if i == reader.slide_count() - 1 { "└" } else { "├" },
123                 i + 1, 
124                 title,
125                 bullets);
126    }
127
128    // =========================================================================
129    // Step 7: Demonstrate slide removal
130    // =========================================================================
131    println!("\n🗑️  Step 7: Demonstrating slide removal...");
132    
133    let mut editor2 = PresentationEditor::open("modified.pptx")?;
134    println!("   Before removal: {} slides", editor2.slide_count());
135    
136    // Remove the last slide
137    editor2.remove_slide(editor2.slide_count() - 1)?;
138    println!("   ✓ Removed last slide");
139    println!("   After removal: {} slides", editor2.slide_count());
140    
141    editor2.save("trimmed.pptx")?;
142    println!("   ✓ Saved as trimmed.pptx");
143
144    // Cleanup
145    fs::remove_file("original.pptx").ok();
146    fs::remove_file("modified.pptx").ok();
147    fs::remove_file("trimmed.pptx").ok();
148
149    // =========================================================================
150    // Summary
151    // =========================================================================
152    println!("\n╔════════════════════════════════════════════════════════════╗");
153    println!("║                    Demo Complete                           ║");
154    println!("╠════════════════════════════════════════════════════════════╣");
155    println!("║  Capabilities Demonstrated:                                ║");
156    println!("║  ✓ PresentationEditor::open() - Open for editing           ║");
157    println!("║  ✓ editor.add_slide() - Add new slides                     ║");
158    println!("║  ✓ editor.update_slide() - Modify existing slides          ║");
159    println!("║  ✓ editor.remove_slide() - Remove slides                   ║");
160    println!("║  ✓ editor.save() - Save modified presentation              ║");
161    println!("║  ✓ editor.get_slide() - Read slide content                 ║");
162    println!("╚════════════════════════════════════════════════════════════╝");
163
164    Ok(())
165}
examples/comprehensive_demo.rs (line 118)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Examples found in repository?
examples/text_styling_complete.rs (line 56)
53fn create_italic_underline_example() -> Result<(), Box<dyn std::error::Error>> {
54    let slides = vec![
55        SlideContent::new("Italic Text")
56            .title_italic(true)
57            .add_bullet("This is italic content")
58            .add_bullet("More italic text here"),
59        SlideContent::new("Underlined Text")
60            .title_underline(true)
61            .content_underline(true)
62            .add_bullet("Underlined bullet point 1")
63            .add_bullet("Underlined bullet point 2"),
64        SlideContent::new("Combined Effects")
65            .title_italic(true)
66            .title_underline(true)
67            .content_italic(true)
68            .add_bullet("Italic and underlined content")
69            .add_bullet("Multiple effects combined"),
70    ];
71
72    let pptx_data = create_pptx_with_content("Italic and Underline", slides)?;
73    fs::write("examples/output/italic_underline.pptx", pptx_data)?;
74    Ok(())
75}
76
77fn create_colored_text_example() -> Result<(), Box<dyn std::error::Error>> {
78    let slides = vec![
79        SlideContent::new("Red Title")
80            .title_color("FF0000")
81            .add_bullet("Red title text")
82            .add_bullet("Regular content"),
83        SlideContent::new("Blue Content")
84            .content_color("0000FF")
85            .add_bullet("Blue bullet point 1")
86            .add_bullet("Blue bullet point 2")
87            .add_bullet("Blue bullet point 3"),
88        SlideContent::new("Green Title & Content")
89            .title_color("00AA00")
90            .content_color("00AA00")
91            .add_bullet("Green title and content")
92            .add_bullet("All text is green"),
93        SlideContent::new("Purple Accent")
94            .title_color("9933FF")
95            .add_bullet("Purple title")
96            .add_bullet("Regular content"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Colored Text", slides)?;
100    fs::write("examples/output/colored_text.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 109)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Examples found in repository?
examples/text_styling_complete.rs (line 67)
53fn create_italic_underline_example() -> Result<(), Box<dyn std::error::Error>> {
54    let slides = vec![
55        SlideContent::new("Italic Text")
56            .title_italic(true)
57            .add_bullet("This is italic content")
58            .add_bullet("More italic text here"),
59        SlideContent::new("Underlined Text")
60            .title_underline(true)
61            .content_underline(true)
62            .add_bullet("Underlined bullet point 1")
63            .add_bullet("Underlined bullet point 2"),
64        SlideContent::new("Combined Effects")
65            .title_italic(true)
66            .title_underline(true)
67            .content_italic(true)
68            .add_bullet("Italic and underlined content")
69            .add_bullet("Multiple effects combined"),
70    ];
71
72    let pptx_data = create_pptx_with_content("Italic and Underline", slides)?;
73    fs::write("examples/output/italic_underline.pptx", pptx_data)?;
74    Ok(())
75}
76
77fn create_colored_text_example() -> Result<(), Box<dyn std::error::Error>> {
78    let slides = vec![
79        SlideContent::new("Red Title")
80            .title_color("FF0000")
81            .add_bullet("Red title text")
82            .add_bullet("Regular content"),
83        SlideContent::new("Blue Content")
84            .content_color("0000FF")
85            .add_bullet("Blue bullet point 1")
86            .add_bullet("Blue bullet point 2")
87            .add_bullet("Blue bullet point 3"),
88        SlideContent::new("Green Title & Content")
89            .title_color("00AA00")
90            .content_color("00AA00")
91            .add_bullet("Green title and content")
92            .add_bullet("All text is green"),
93        SlideContent::new("Purple Accent")
94            .title_color("9933FF")
95            .add_bullet("Purple title")
96            .add_bullet("Regular content"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Colored Text", slides)?;
100    fs::write("examples/output/colored_text.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 119)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Examples found in repository?
examples/text_styling_complete.rs (line 60)
53fn create_italic_underline_example() -> Result<(), Box<dyn std::error::Error>> {
54    let slides = vec![
55        SlideContent::new("Italic Text")
56            .title_italic(true)
57            .add_bullet("This is italic content")
58            .add_bullet("More italic text here"),
59        SlideContent::new("Underlined Text")
60            .title_underline(true)
61            .content_underline(true)
62            .add_bullet("Underlined bullet point 1")
63            .add_bullet("Underlined bullet point 2"),
64        SlideContent::new("Combined Effects")
65            .title_italic(true)
66            .title_underline(true)
67            .content_italic(true)
68            .add_bullet("Italic and underlined content")
69            .add_bullet("Multiple effects combined"),
70    ];
71
72    let pptx_data = create_pptx_with_content("Italic and Underline", slides)?;
73    fs::write("examples/output/italic_underline.pptx", pptx_data)?;
74    Ok(())
75}
76
77fn create_colored_text_example() -> Result<(), Box<dyn std::error::Error>> {
78    let slides = vec![
79        SlideContent::new("Red Title")
80            .title_color("FF0000")
81            .add_bullet("Red title text")
82            .add_bullet("Regular content"),
83        SlideContent::new("Blue Content")
84            .content_color("0000FF")
85            .add_bullet("Blue bullet point 1")
86            .add_bullet("Blue bullet point 2")
87            .add_bullet("Blue bullet point 3"),
88        SlideContent::new("Green Title & Content")
89            .title_color("00AA00")
90            .content_color("00AA00")
91            .add_bullet("Green title and content")
92            .add_bullet("All text is green"),
93        SlideContent::new("Purple Accent")
94            .title_color("9933FF")
95            .add_bullet("Purple title")
96            .add_bullet("Regular content"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Colored Text", slides)?;
100    fs::write("examples/output/colored_text.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 110)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Examples found in repository?
examples/text_styling_complete.rs (line 61)
53fn create_italic_underline_example() -> Result<(), Box<dyn std::error::Error>> {
54    let slides = vec![
55        SlideContent::new("Italic Text")
56            .title_italic(true)
57            .add_bullet("This is italic content")
58            .add_bullet("More italic text here"),
59        SlideContent::new("Underlined Text")
60            .title_underline(true)
61            .content_underline(true)
62            .add_bullet("Underlined bullet point 1")
63            .add_bullet("Underlined bullet point 2"),
64        SlideContent::new("Combined Effects")
65            .title_italic(true)
66            .title_underline(true)
67            .content_italic(true)
68            .add_bullet("Italic and underlined content")
69            .add_bullet("Multiple effects combined"),
70    ];
71
72    let pptx_data = create_pptx_with_content("Italic and Underline", slides)?;
73    fs::write("examples/output/italic_underline.pptx", pptx_data)?;
74    Ok(())
75}
76
77fn create_colored_text_example() -> Result<(), Box<dyn std::error::Error>> {
78    let slides = vec![
79        SlideContent::new("Red Title")
80            .title_color("FF0000")
81            .add_bullet("Red title text")
82            .add_bullet("Regular content"),
83        SlideContent::new("Blue Content")
84            .content_color("0000FF")
85            .add_bullet("Blue bullet point 1")
86            .add_bullet("Blue bullet point 2")
87            .add_bullet("Blue bullet point 3"),
88        SlideContent::new("Green Title & Content")
89            .title_color("00AA00")
90            .content_color("00AA00")
91            .add_bullet("Green title and content")
92            .add_bullet("All text is green"),
93        SlideContent::new("Purple Accent")
94            .title_color("9933FF")
95            .add_bullet("Purple title")
96            .add_bullet("Regular content"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Colored Text", slides)?;
100    fs::write("examples/output/colored_text.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 120)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Examples found in repository?
examples/text_styling_complete.rs (line 80)
77fn create_colored_text_example() -> Result<(), Box<dyn std::error::Error>> {
78    let slides = vec![
79        SlideContent::new("Red Title")
80            .title_color("FF0000")
81            .add_bullet("Red title text")
82            .add_bullet("Regular content"),
83        SlideContent::new("Blue Content")
84            .content_color("0000FF")
85            .add_bullet("Blue bullet point 1")
86            .add_bullet("Blue bullet point 2")
87            .add_bullet("Blue bullet point 3"),
88        SlideContent::new("Green Title & Content")
89            .title_color("00AA00")
90            .content_color("00AA00")
91            .add_bullet("Green title and content")
92            .add_bullet("All text is green"),
93        SlideContent::new("Purple Accent")
94            .title_color("9933FF")
95            .add_bullet("Purple title")
96            .add_bullet("Regular content"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Colored Text", slides)?;
100    fs::write("examples/output/colored_text.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
More examples
Hide additional examples
examples/table_generation.rs (line 117)
81fn create_styled_table_example() -> Result<(), Box<dyn std::error::Error>> {
82    let header_cells = vec![
83        TableCell::new("Name").bold().background_color("003366"),
84        TableCell::new("Age").bold().background_color("003366"),
85        TableCell::new("City").bold().background_color("003366"),
86    ];
87    let header_row = TableRow::new(header_cells);
88
89    let data_rows = vec![
90        TableRow::new(vec![
91            TableCell::new("Alice"),
92            TableCell::new("30"),
93            TableCell::new("NYC"),
94        ]),
95        TableRow::new(vec![
96            TableCell::new("Bob"),
97            TableCell::new("28"),
98            TableCell::new("LA"),
99        ]),
100        TableRow::new(vec![
101            TableCell::new("Carol"),
102            TableCell::new("35"),
103            TableCell::new("Chicago"),
104        ]),
105    ];
106
107    let table = Table::new(
108        vec![vec![header_row], data_rows].concat(),
109        vec![1500000, 1500000, 1500000],
110        500000,
111        1500000,
112    );
113
114    let slides = vec![
115        SlideContent::new("Styled Table")
116            .title_bold(true)
117            .title_color("003366")
118            .add_bullet("Table with formatting"),
119        SlideContent::new("People Data")
120            .table(table),
121    ];
122
123    let pptx_data = create_pptx_with_content("Styled Table", slides)?;
124    fs::write("examples/output/styled_table.pptx", pptx_data)?;
125    Ok(())
126}
examples/alignment_test.rs (line 25)
13fn main() -> Result<(), Box<dyn std::error::Error>> {
14    println!("=== Alignment Test: ppt-rs vs python-pptx ===\n");
15    
16    // Create output directory
17    fs::create_dir_all("examples/output")?;
18    
19    // Create slides matching the reference presentation structure
20    let slides = vec![
21        // Slide 1: Title Slide
22        SlideContent::new("Alignment Test Presentation")
23            .title_size(54)
24            .title_bold(true)
25            .title_color("003366"),  // RGB(0, 51, 102)
26        
27        // Slide 2: Content Slide
28        SlideContent::new("Shapes and Formatting")
29            .title_size(44)
30            .title_bold(true)
31            .title_color("003366")
32            .add_bullet("Text formatting (bold, colors, sizes)")
33            .add_bullet("Shape creation and positioning")
34            .add_bullet("Multiple slides and layouts"),
35    ];
36    
37    // Generate PPTX
38    let pptx_data = create_pptx_with_content(
39        "Alignment Test Presentation",
40        slides,
41    )?;
42    
43    // Write to file
44    let output_path = "examples/output/alignment_test_ppt_rs.pptx";
45    fs::write(output_path, pptx_data)?;
46    
47    println!("✓ Created presentation: {output_path}");
48    println!("  - Title: Alignment Test Presentation");
49    println!("  - Slides: 2");
50    println!("\nNext steps:");
51    println!("  1. Open the generated file in PowerPoint to verify");
52    println!("  2. Compare with a python-pptx reference if available");
53    
54    Ok(())
55}
examples/layout_demo.rs (line 13)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title Only
6        SlideContent::new("Welcome to Layout Demo")
7            .layout(SlideLayout::TitleOnly),
8
9        // Slide 2: Centered Title (good for cover slides)
10        SlideContent::new("Centered Title Slide")
11            .layout(SlideLayout::CenteredTitle)
12            .title_size(60)
13            .title_color("4F81BD"),
14
15        // Slide 3: Title and Content (standard layout)
16        SlideContent::new("Standard Layout")
17            .add_bullet("Point 1: Title at top")
18            .add_bullet("Point 2: Content below")
19            .add_bullet("Point 3: Most common layout")
20            .layout(SlideLayout::TitleAndContent),
21
22        // Slide 4: Title and Big Content
23        SlideContent::new("Big Content Area")
24            .add_bullet("More space for content")
25            .add_bullet("Smaller title area")
26            .add_bullet("Good for detailed slides")
27            .add_bullet("Maximizes content space")
28            .layout(SlideLayout::TitleAndBigContent),
29
30        // Slide 5: Two Column Layout
31        SlideContent::new("Two Column Layout")
32            .add_bullet("Left column content")
33            .add_bullet("Organized side by side")
34            .add_bullet("Great for comparisons")
35            .layout(SlideLayout::TwoColumn),
36
37        // Slide 6: Blank Slide
38        SlideContent::new("")
39            .layout(SlideLayout::Blank),
40
41        // Slide 7: Summary with different formatting
42        SlideContent::new("Summary")
43            .title_size(48)
44            .title_bold(true)
45            .title_color("C0504D")
46            .add_bullet("Layout types implemented:")
47            .add_bullet("• TitleOnly - Just title")
48            .add_bullet("• CenteredTitle - Title centered")
49            .add_bullet("• TitleAndContent - Standard")
50            .add_bullet("• TitleAndBigContent - Large content")
51            .add_bullet("• TwoColumn - Side by side")
52            .add_bullet("• Blank - Empty slide")
53            .content_size(20)
54            .layout(SlideLayout::TitleAndContent),
55    ];
56
57    let pptx_data = create_pptx_with_content("Layout Demo Presentation", slides)?;
58    std::fs::write("layout_demo.pptx", pptx_data)?;
59    println!("✓ Created layout_demo.pptx with 7 slides demonstrating different layouts");
60
61    Ok(())
62}
examples/edit_presentation.rs (line 28)
14fn main() -> Result<(), Box<dyn std::error::Error>> {
15    println!("╔════════════════════════════════════════════════════════════╗");
16    println!("║         PPTX Editing Demo                                  ║");
17    println!("╚════════════════════════════════════════════════════════════╝\n");
18
19    // =========================================================================
20    // Step 1: Create an initial presentation
21    // =========================================================================
22    println!("📝 Step 1: Creating initial presentation...");
23    
24    let initial_slides = vec![
25        SlideContent::new("Original Presentation")
26            .layout(SlideLayout::CenteredTitle)
27            .title_bold(true)
28            .title_color("1F497D"),
29        
30        SlideContent::new("Slide 1: Introduction")
31            .add_bullet("This is the original content")
32            .add_bullet("Created programmatically"),
33        
34        SlideContent::new("Slide 2: Features")
35            .add_bullet("Feature A")
36            .add_bullet("Feature B")
37            .add_bullet("Feature C"),
38    ];
39    
40    let pptx_data = create_pptx_with_content("Original Presentation", initial_slides)?;
41    fs::write("original.pptx", &pptx_data)?;
42    println!("   ✓ Created original.pptx with 3 slides\n");
43
44    // =========================================================================
45    // Step 2: Open and inspect the presentation
46    // =========================================================================
47    println!("📖 Step 2: Opening presentation for editing...");
48    
49    let mut editor = PresentationEditor::open("original.pptx")?;
50    println!("   ✓ Opened original.pptx");
51    println!("   ├── Slide count: {}", editor.slide_count());
52    
53    // Read first slide
54    let slide0 = editor.get_slide(0)?;
55    println!("   └── First slide title: {:?}\n", slide0.title);
56
57    // =========================================================================
58    // Step 3: Add new slides
59    // =========================================================================
60    println!("➕ Step 3: Adding new slides...");
61    
62    // Add a new slide at the end
63    let new_slide1 = SlideContent::new("New Slide: Added via Editor")
64        .add_bullet("This slide was added programmatically")
65        .add_bullet("Using PresentationEditor")
66        .add_bullet("After the presentation was created")
67        .title_color("9BBB59");
68    
69    let idx1 = editor.add_slide(new_slide1)?;
70    println!("   ✓ Added slide at index {}", idx1);
71    
72    // Add another slide
73    let new_slide2 = SlideContent::new("Another New Slide")
74        .layout(SlideLayout::TwoColumn)
75        .add_bullet("Left column item 1")
76        .add_bullet("Left column item 2")
77        .add_bullet("Right column item 1")
78        .add_bullet("Right column item 2");
79    
80    let idx2 = editor.add_slide(new_slide2)?;
81    println!("   ✓ Added slide at index {}", idx2);
82    println!("   └── Total slides now: {}\n", editor.slide_count());
83
84    // =========================================================================
85    // Step 4: Update existing slide
86    // =========================================================================
87    println!("✏️  Step 4: Updating existing slide...");
88    
89    let updated_slide = SlideContent::new("Slide 2: Updated Features")
90        .add_bullet("Feature A - Enhanced!")
91        .add_bullet("Feature B - Improved!")
92        .add_bullet("Feature C - Optimized!")
93        .add_bullet("Feature D - NEW!")
94        .title_color("C0504D")
95        .content_bold(true);
96    
97    editor.update_slide(2, updated_slide)?;
98    println!("   ✓ Updated slide at index 2\n");
99
100    // =========================================================================
101    // Step 5: Save modified presentation
102    // =========================================================================
103    println!("💾 Step 5: Saving modified presentation...");
104    
105    editor.save("modified.pptx")?;
106    println!("   ✓ Saved as modified.pptx\n");
107
108    // =========================================================================
109    // Step 6: Verify the changes
110    // =========================================================================
111    println!("🔍 Step 6: Verifying changes...");
112    
113    let reader = PresentationReader::open("modified.pptx")?;
114    println!("   Modified presentation:");
115    println!("   ├── Slide count: {}", reader.slide_count());
116    
117    for i in 0..reader.slide_count() {
118        let slide = reader.get_slide(i)?;
119        let title = slide.title.as_deref().unwrap_or("(no title)");
120        let bullets = slide.body_text.len();
121        println!("   {}── Slide {}: \"{}\" ({} bullets)", 
122                 if i == reader.slide_count() - 1 { "└" } else { "├" },
123                 i + 1, 
124                 title,
125                 bullets);
126    }
127
128    // =========================================================================
129    // Step 7: Demonstrate slide removal
130    // =========================================================================
131    println!("\n🗑️  Step 7: Demonstrating slide removal...");
132    
133    let mut editor2 = PresentationEditor::open("modified.pptx")?;
134    println!("   Before removal: {} slides", editor2.slide_count());
135    
136    // Remove the last slide
137    editor2.remove_slide(editor2.slide_count() - 1)?;
138    println!("   ✓ Removed last slide");
139    println!("   After removal: {} slides", editor2.slide_count());
140    
141    editor2.save("trimmed.pptx")?;
142    println!("   ✓ Saved as trimmed.pptx");
143
144    // Cleanup
145    fs::remove_file("original.pptx").ok();
146    fs::remove_file("modified.pptx").ok();
147    fs::remove_file("trimmed.pptx").ok();
148
149    // =========================================================================
150    // Summary
151    // =========================================================================
152    println!("\n╔════════════════════════════════════════════════════════════╗");
153    println!("║                    Demo Complete                           ║");
154    println!("╠════════════════════════════════════════════════════════════╣");
155    println!("║  Capabilities Demonstrated:                                ║");
156    println!("║  ✓ PresentationEditor::open() - Open for editing           ║");
157    println!("║  ✓ editor.add_slide() - Add new slides                     ║");
158    println!("║  ✓ editor.update_slide() - Modify existing slides          ║");
159    println!("║  ✓ editor.remove_slide() - Remove slides                   ║");
160    println!("║  ✓ editor.save() - Save modified presentation              ║");
161    println!("║  ✓ editor.get_slide() - Read slide content                 ║");
162    println!("╚════════════════════════════════════════════════════════════╝");
163
164    Ok(())
165}
examples/read_presentation.rs (line 27)
13fn main() -> Result<(), Box<dyn std::error::Error>> {
14    println!("╔════════════════════════════════════════════════════════════╗");
15    println!("║         PPTX Reading & Parsing Demo                        ║");
16    println!("╚════════════════════════════════════════════════════════════╝\n");
17
18    // =========================================================================
19    // Step 1: Create a sample PPTX to read
20    // =========================================================================
21    println!("📝 Step 1: Creating sample presentation...");
22    
23    let slides = vec![
24        SlideContent::new("Welcome to PPTX-RS")
25            .layout(SlideLayout::CenteredTitle)
26            .title_bold(true)
27            .title_color("1F497D"),
28        
29        SlideContent::new("Features Overview")
30            .add_bullet("Create presentations programmatically")
31            .add_bullet("Read existing PPTX files")
32            .add_bullet("Extract text and metadata")
33            .add_bullet("Parse shapes and tables"),
34        
35        SlideContent::new("Technical Details")
36            .layout(SlideLayout::TwoColumn)
37            .add_bullet("XML parsing with xml-rs")
38            .add_bullet("ZIP handling with zip crate")
39            .add_bullet("ECMA-376 compliant")
40            .add_bullet("Rust 2024 edition")
41            .add_bullet("Cross-platform")
42            .add_bullet("No external dependencies"),
43        
44        SlideContent::new("Summary")
45            .add_bullet("Full read/write support")
46            .add_bullet("Comprehensive API")
47            .add_bullet("Well tested"),
48    ];
49    
50    let pptx_data = create_pptx_with_content("PPTX-RS Demo", slides)?;
51    fs::write("sample_presentation.pptx", &pptx_data)?;
52    println!("   ✓ Created sample_presentation.pptx ({} bytes)\n", pptx_data.len());
53
54    // =========================================================================
55    // Step 2: Open and read the presentation
56    // =========================================================================
57    println!("📖 Step 2: Opening presentation...");
58    
59    let reader = PresentationReader::open("sample_presentation.pptx")?;
60    let info = reader.info();
61    
62    println!("   Presentation Info:");
63    println!("   ├── Title: {}", info.title.as_deref().unwrap_or("(none)"));
64    println!("   ├── Creator: {}", info.creator.as_deref().unwrap_or("(none)"));
65    println!("   ├── Slides: {}", info.slide_count);
66    println!("   └── Revision: {}\n", info.revision.unwrap_or(0));
67
68    // =========================================================================
69    // Step 3: Parse each slide
70    // =========================================================================
71    println!("📑 Step 3: Parsing slides...");
72    
73    for i in 0..reader.slide_count() {
74        let slide = reader.get_slide(i)?;
75        
76        println!("\n   Slide {}:", i + 1);
77        println!("   ├── Title: {}", slide.title.as_deref().unwrap_or("(none)"));
78        println!("   ├── Shapes: {}", slide.shapes.len());
79        println!("   ├── Tables: {}", slide.tables.len());
80        
81        if !slide.body_text.is_empty() {
82            println!("   └── Body text:");
83            for (j, text) in slide.body_text.iter().enumerate() {
84                let prefix = if j == slide.body_text.len() - 1 { "       └──" } else { "       ├──" };
85                println!("{}  {}", prefix, text);
86            }
87        } else {
88            println!("   └── Body text: (none)");
89        }
90    }
91
92    // =========================================================================
93    // Step 4: Extract all text
94    // =========================================================================
95    println!("\n📋 Step 4: Extracting all text...");
96    
97    let all_text = reader.extract_all_text()?;
98    println!("   Found {} text items:", all_text.len());
99    for (i, text) in all_text.iter().take(10).enumerate() {
100        println!("   {}. {}", i + 1, text);
101    }
102    if all_text.len() > 10 {
103        println!("   ... and {} more", all_text.len() - 10);
104    }
105
106    // =========================================================================
107    // Step 5: Direct XML parsing (advanced)
108    // =========================================================================
109    println!("\n🔧 Step 5: Direct XML parsing (advanced)...");
110    
111    // You can also parse slide XML directly
112    let sample_xml = r#"<?xml version="1.0" encoding="UTF-8"?>
113    <p:sld xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" 
114           xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">
115        <p:cSld>
116            <p:spTree>
117                <p:sp>
118                    <p:nvSpPr>
119                        <p:cNvPr id="2" name="Title"/>
120                        <p:nvPr><p:ph type="title"/></p:nvPr>
121                    </p:nvSpPr>
122                    <p:txBody>
123                        <a:p>
124                            <a:r>
125                                <a:rPr b="1" sz="4400"/>
126                                <a:t>Direct Parse Example</a:t>
127                            </a:r>
128                        </a:p>
129                    </p:txBody>
130                </p:sp>
131            </p:spTree>
132        </p:cSld>
133    </p:sld>"#;
134    
135    let parsed = SlideParser::parse(sample_xml)?;
136    println!("   Parsed XML directly:");
137    println!("   ├── Title: {}", parsed.title.as_deref().unwrap_or("(none)"));
138    println!("   └── Shapes: {}", parsed.shapes.len());
139    
140    if let Some(shape) = parsed.shapes.first() {
141        if let Some(para) = shape.paragraphs.first() {
142            if let Some(run) = para.runs.first() {
143                println!("\n   Text formatting detected:");
144                println!("   ├── Bold: {}", run.bold);
145                println!("   ├── Font size: {:?}", run.font_size);
146                println!("   └── Text: {}", run.text);
147            }
148        }
149    }
150
151    // Cleanup
152    fs::remove_file("sample_presentation.pptx").ok();
153
154    // =========================================================================
155    // Summary
156    // =========================================================================
157    println!("\n╔════════════════════════════════════════════════════════════╗");
158    println!("║                    Demo Complete                           ║");
159    println!("╠════════════════════════════════════════════════════════════╣");
160    println!("║  Capabilities Demonstrated:                                ║");
161    println!("║  ✓ PresentationReader::open() - Open PPTX files            ║");
162    println!("║  ✓ reader.info() - Get presentation metadata               ║");
163    println!("║  ✓ reader.get_slide(i) - Parse individual slides           ║");
164    println!("║  ✓ reader.extract_all_text() - Extract all text            ║");
165    println!("║  ✓ SlideParser::parse() - Direct XML parsing               ║");
166    println!("╚════════════════════════════════════════════════════════════╝");
167
168    Ok(())
169}
Source

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

Examples found in repository?
examples/text_styling_complete.rs (line 84)
77fn create_colored_text_example() -> Result<(), Box<dyn std::error::Error>> {
78    let slides = vec![
79        SlideContent::new("Red Title")
80            .title_color("FF0000")
81            .add_bullet("Red title text")
82            .add_bullet("Regular content"),
83        SlideContent::new("Blue Content")
84            .content_color("0000FF")
85            .add_bullet("Blue bullet point 1")
86            .add_bullet("Blue bullet point 2")
87            .add_bullet("Blue bullet point 3"),
88        SlideContent::new("Green Title & Content")
89            .title_color("00AA00")
90            .content_color("00AA00")
91            .add_bullet("Green title and content")
92            .add_bullet("All text is green"),
93        SlideContent::new("Purple Accent")
94            .title_color("9933FF")
95            .add_bullet("Purple title")
96            .add_bullet("Regular content"),
97    ];
98
99    let pptx_data = create_pptx_with_content("Colored Text", slides)?;
100    fs::write("examples/output/colored_text.pptx", pptx_data)?;
101    Ok(())
102}
103
104fn create_combined_styling_example() -> Result<(), Box<dyn std::error::Error>> {
105    let slides = vec![
106        SlideContent::new("Bold & Italic & Red")
107            .title_bold(true)
108            .title_italic(true)
109            .title_color("FF0000")
110            .title_size(52)
111            .add_bullet("Regular content"),
112        SlideContent::new("Underlined Blue Content")
113            .content_underline(true)
114            .content_color("0000FF")
115            .content_bold(true)
116            .add_bullet("Bold, underlined, blue bullet")
117            .add_bullet("Multiple effects applied"),
118        SlideContent::new("Mixed Effects")
119            .title_italic(true)
120            .title_color("FF6600")
121            .content_bold(true)
122            .content_underline(true)
123            .content_color("0066FF")
124            .add_bullet("Title: italic, orange")
125            .add_bullet("Content: bold, underlined, blue"),
126        SlideContent::new("Professional Look")
127            .title_bold(true)
128            .title_size(48)
129            .title_color("003366")
130            .content_size(24)
131            .add_bullet("Clean, professional styling")
132            .add_bullet("Dark blue title with bold")
133            .add_bullet("Larger content text"),
134    ];
135
136    let pptx_data = create_pptx_with_content("Combined Styling", slides)?;
137    fs::write("examples/output/combined_styling.pptx", pptx_data)?;
138    Ok(())
139}
140
141fn create_professional_example() -> Result<(), Box<dyn std::error::Error>> {
142    let slides = vec![
143        SlideContent::new("Company Presentation")
144            .title_bold(true)
145            .title_size(56)
146            .title_color("003366")
147            .content_size(32)
148            .add_bullet("2025 Annual Review"),
149        SlideContent::new("Key Highlights")
150            .title_bold(true)
151            .title_color("003366")
152            .content_bold(true)
153            .content_color("0066CC")
154            .add_bullet("Revenue growth: +25%")
155            .add_bullet("Market expansion: 3 new regions")
156            .add_bullet("Team growth: +50 employees"),
157        SlideContent::new("Strategic Initiatives")
158            .title_italic(true)
159            .title_color("FF6600")
160            .content_underline(true)
161            .add_bullet("Digital transformation")
162            .add_bullet("Customer experience improvement")
163            .add_bullet("Sustainability focus"),
164        SlideContent::new("Q1 2025 Goals")
165            .title_bold(true)
166            .title_underline(true)
167            .title_color("003366")
168            .content_bold(true)
169            .add_bullet("Launch new product line")
170            .add_bullet("Expand to 5 new markets")
171            .add_bullet("Achieve 30% revenue growth"),
172        SlideContent::new("Thank You")
173            .title_bold(true)
174            .title_size(60)
175            .title_color("003366")
176            .content_italic(true)
177            .content_size(28)
178            .add_bullet("Questions & Discussion"),
179    ];
180
181    let pptx_data = create_pptx_with_content("Professional Presentation", slides)?;
182    fs::write("examples/output/professional.pptx", pptx_data)?;
183    Ok(())
184}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 122)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

pub fn with_table(self) -> Self

Source

pub fn with_chart(self) -> Self

Examples found in repository?
examples/comprehensive_demo.rs (line 224)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

pub fn with_image(self) -> Self

Source

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

Examples found in repository?
examples/test_notes.rs (line 11)
6fn main() -> Result<(), Box<dyn std::error::Error>> {
7    println!("Creating test presentation with speaker notes...");
8    
9    let slides = vec![
10        SlideContent::new("Slide 1 - With Notes")
11            .layout(SlideLayout::CenteredTitle)
12            .title_size(54)
13            .title_bold(true)
14            .notes("This is a speaker note for slide 1. It should appear in presenter view."),
15        
16        SlideContent::new("Slide 2 - Also With Notes")
17            .add_bullet("Bullet point 1")
18            .add_bullet("Bullet point 2")
19            .add_bullet("Bullet point 3")
20            .notes("Notes for slide 2 with bullet points."),
21        
22        SlideContent::new("Slide 3 - No Notes")
23            .add_bullet("This slide has no notes"),
24        
25        SlideContent::new("Slide 4 - More Notes")
26            .layout(SlideLayout::TwoColumn)
27            .add_bullet("Left 1")
28            .add_bullet("Left 2")
29            .add_bullet("Right 1")
30            .add_bullet("Right 2")
31            .notes("Two column layout with speaker notes."),
32    ];
33    
34    let pptx_data = create_pptx_with_content("Test Notes", slides)?;
35    fs::write("test_notes.pptx", &pptx_data)?;
36    println!("Created test_notes.pptx ({} bytes)", pptx_data.len());
37    println!("\nOpen in PowerPoint and check presenter view for notes!");
38    
39    Ok(())
40}
More examples
Hide additional examples
examples/layout_demo.rs (line 7)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title Only
6        SlideContent::new("Welcome to Layout Demo")
7            .layout(SlideLayout::TitleOnly),
8
9        // Slide 2: Centered Title (good for cover slides)
10        SlideContent::new("Centered Title Slide")
11            .layout(SlideLayout::CenteredTitle)
12            .title_size(60)
13            .title_color("4F81BD"),
14
15        // Slide 3: Title and Content (standard layout)
16        SlideContent::new("Standard Layout")
17            .add_bullet("Point 1: Title at top")
18            .add_bullet("Point 2: Content below")
19            .add_bullet("Point 3: Most common layout")
20            .layout(SlideLayout::TitleAndContent),
21
22        // Slide 4: Title and Big Content
23        SlideContent::new("Big Content Area")
24            .add_bullet("More space for content")
25            .add_bullet("Smaller title area")
26            .add_bullet("Good for detailed slides")
27            .add_bullet("Maximizes content space")
28            .layout(SlideLayout::TitleAndBigContent),
29
30        // Slide 5: Two Column Layout
31        SlideContent::new("Two Column Layout")
32            .add_bullet("Left column content")
33            .add_bullet("Organized side by side")
34            .add_bullet("Great for comparisons")
35            .layout(SlideLayout::TwoColumn),
36
37        // Slide 6: Blank Slide
38        SlideContent::new("")
39            .layout(SlideLayout::Blank),
40
41        // Slide 7: Summary with different formatting
42        SlideContent::new("Summary")
43            .title_size(48)
44            .title_bold(true)
45            .title_color("C0504D")
46            .add_bullet("Layout types implemented:")
47            .add_bullet("• TitleOnly - Just title")
48            .add_bullet("• CenteredTitle - Title centered")
49            .add_bullet("• TitleAndContent - Standard")
50            .add_bullet("• TitleAndBigContent - Large content")
51            .add_bullet("• TwoColumn - Side by side")
52            .add_bullet("• Blank - Empty slide")
53            .content_size(20)
54            .layout(SlideLayout::TitleAndContent),
55    ];
56
57    let pptx_data = create_pptx_with_content("Layout Demo Presentation", slides)?;
58    std::fs::write("layout_demo.pptx", pptx_data)?;
59    println!("✓ Created layout_demo.pptx with 7 slides demonstrating different layouts");
60
61    Ok(())
62}
examples/new_elements_demo.rs (line 33)
21fn main() -> Result<(), Box<dyn std::error::Error>> {
22    println!("=== New PPT Elements Demo ===\n");
23
24    // Create slides demonstrating new features
25    let slides = vec![
26        // Slide 1: Title slide
27        SlideContent::new("New PPT Elements in ppt-rs")
28            .add_bullet("18 new chart types")
29            .add_bullet("Connectors between shapes")
30            .add_bullet("Hyperlinks (URL, slide, email)")
31            .add_bullet("Gradient fills")
32            .add_bullet("Video/Audio embedding")
33            .layout(SlideLayout::TitleAndContent),
34
35        // Slide 2: New Chart Types
36        SlideContent::new("New Chart Types")
37            .add_bullet("Area charts (standard, stacked, 100% stacked)")
38            .add_bullet("Scatter charts (markers, lines, smooth)")
39            .add_bullet("Doughnut charts")
40            .add_bullet("Radar charts (standard, filled)")
41            .add_bullet("Bubble charts")
42            .add_bullet("Stock charts (HLC, OHLC)")
43            .add_bullet("Combo charts (bar + line)")
44            .layout(SlideLayout::TitleAndContent),
45
46        // Slide 3: Connector Types
47        SlideContent::new("Connector Types")
48            .add_bullet("Straight connectors")
49            .add_bullet("Elbow (bent) connectors")
50            .add_bullet("Curved connectors")
51            .add_bullet("Arrow heads (Triangle, Stealth, Diamond, Oval)")
52            .add_bullet("Connection sites (Top, Bottom, Left, Right, Corners)")
53            .layout(SlideLayout::TitleAndContent),
54
55        // Slide 4: Hyperlink Types
56        SlideContent::new("Hyperlink Support")
57            .add_bullet("URL links (external websites)")
58            .add_bullet("Slide links (navigate within presentation)")
59            .add_bullet("Email links (mailto:)")
60            .add_bullet("File links (local files)")
61            .add_bullet("Navigation (First, Last, Next, Previous slide)")
62            .layout(SlideLayout::TitleAndContent),
63
64        // Slide 5: Gradient Fills
65        SlideContent::new("Gradient Fill Support")
66            .add_bullet("Linear gradients (horizontal, vertical, diagonal)")
67            .add_bullet("Radial gradients")
68            .add_bullet("Rectangular gradients")
69            .add_bullet("Path gradients")
70            .add_bullet("Preset gradients (Blue, Green, Rainbow, etc.)")
71            .add_bullet("Custom gradient stops with transparency")
72            .layout(SlideLayout::TitleAndContent),
73
74        // Slide 6: Media Support
75        SlideContent::new("Video & Audio Support")
76            .add_bullet("Video formats: MP4, WMV, AVI, MOV, MKV, WebM")
77            .add_bullet("Audio formats: MP3, WAV, WMA, M4A, OGG, FLAC")
78            .add_bullet("Playback options: auto-play, loop, mute")
79            .add_bullet("Volume control")
80            .add_bullet("Start/end time trimming")
81            .layout(SlideLayout::TitleAndContent),
82    ];
83
84    // Generate the PPTX
85    let pptx_data = create_pptx_with_content("New Elements Demo", slides)?;
86
87    // Save to file
88    let output_path = "examples/output/new_elements_demo.pptx";
89    std::fs::create_dir_all("examples/output")?;
90    std::fs::write(output_path, &pptx_data)?;
91
92    println!("✓ Created presentation: {}", output_path);
93    println!("✓ File size: {} bytes", pptx_data.len());
94
95    // Demonstrate API usage
96    println!("\n=== API Examples ===\n");
97
98    // Chart types
99    println!("Chart Types:");
100    let chart_types = [
101        ChartType::Bar,
102        ChartType::BarHorizontal,
103        ChartType::BarStacked,
104        ChartType::Line,
105        ChartType::LineMarkers,
106        ChartType::Pie,
107        ChartType::Doughnut,
108        ChartType::Area,
109        ChartType::AreaStacked,
110        ChartType::Scatter,
111        ChartType::ScatterSmooth,
112        ChartType::Bubble,
113        ChartType::Radar,
114        ChartType::RadarFilled,
115        ChartType::StockHLC,
116        ChartType::Combo,
117    ];
118    for ct in &chart_types {
119        println!("  - {:?} -> {}", ct, ct.xml_element());
120    }
121
122    // Connector example
123    println!("\nConnector Example:");
124    let connector = Connector::elbow(
125        inches_to_emu(1.0), inches_to_emu(1.0),
126        inches_to_emu(5.0), inches_to_emu(3.0),
127    )
128    .with_color("0066CC")
129    .with_end_arrow(ArrowType::Triangle)
130    .connect_start(1, ConnectionSite::Right)
131    .connect_end(2, ConnectionSite::Left);
132    println!("  Type: {:?}", connector.connector_type);
133    println!("  End Arrow: {:?}", connector.end_arrow);
134
135    // Hyperlink example
136    println!("\nHyperlink Examples:");
137    let url_link = Hyperlink::url("https://example.com").with_tooltip("Visit Example");
138    let slide_link = Hyperlink::slide(3);
139    let email_link = Hyperlink::email("test@example.com");
140    println!("  URL: {:?}", url_link.action);
141    println!("  Slide: {:?}", slide_link.action);
142    println!("  Email: {:?}", email_link.action);
143
144    // Gradient example
145    println!("\nGradient Examples:");
146    let blue_gradient = PresetGradients::blue();
147    let rainbow = PresetGradients::rainbow();
148    let custom = GradientFill::linear(GradientDirection::DiagonalDown)
149        .add_stop(ppt_rs::GradientStop::start("FF0000"))
150        .add_stop(ppt_rs::GradientStop::end("0000FF"));
151    println!("  Blue gradient: {} stops", blue_gradient.stops.len());
152    println!("  Rainbow gradient: {} stops", rainbow.stops.len());
153    println!("  Custom gradient: {} stops", custom.stops.len());
154
155    // Video example
156    println!("\nVideo Example:");
157    if let Some(video) = Video::from_file("video.mp4", 0, 0, inches_to_emu(6.0), inches_to_emu(4.0)) {
158        let video = video.with_options(VideoOptions::auto_play().with_loop(true));
159        println!("  Format: {:?}", video.format);
160        println!("  Auto-play: {}", video.options.auto_play);
161        println!("  Loop: {}", video.options.loop_playback);
162    }
163
164    // Audio example
165    println!("\nAudio Example:");
166    if let Some(audio) = Audio::from_file("audio.mp3", 0, 0, inches_to_emu(1.0), inches_to_emu(1.0)) {
167        let audio = audio.with_options(AudioOptions::auto_play().with_play_across_slides(true));
168        println!("  Format: {:?}", audio.format);
169        println!("  Auto-play: {}", audio.options.auto_play);
170        println!("  Play across slides: {}", audio.options.play_across_slides);
171    }
172
173    println!("\n=== Demo Complete ===");
174
175    Ok(())
176}
examples/edit_presentation.rs (line 26)
14fn main() -> Result<(), Box<dyn std::error::Error>> {
15    println!("╔════════════════════════════════════════════════════════════╗");
16    println!("║         PPTX Editing Demo                                  ║");
17    println!("╚════════════════════════════════════════════════════════════╝\n");
18
19    // =========================================================================
20    // Step 1: Create an initial presentation
21    // =========================================================================
22    println!("📝 Step 1: Creating initial presentation...");
23    
24    let initial_slides = vec![
25        SlideContent::new("Original Presentation")
26            .layout(SlideLayout::CenteredTitle)
27            .title_bold(true)
28            .title_color("1F497D"),
29        
30        SlideContent::new("Slide 1: Introduction")
31            .add_bullet("This is the original content")
32            .add_bullet("Created programmatically"),
33        
34        SlideContent::new("Slide 2: Features")
35            .add_bullet("Feature A")
36            .add_bullet("Feature B")
37            .add_bullet("Feature C"),
38    ];
39    
40    let pptx_data = create_pptx_with_content("Original Presentation", initial_slides)?;
41    fs::write("original.pptx", &pptx_data)?;
42    println!("   ✓ Created original.pptx with 3 slides\n");
43
44    // =========================================================================
45    // Step 2: Open and inspect the presentation
46    // =========================================================================
47    println!("📖 Step 2: Opening presentation for editing...");
48    
49    let mut editor = PresentationEditor::open("original.pptx")?;
50    println!("   ✓ Opened original.pptx");
51    println!("   ├── Slide count: {}", editor.slide_count());
52    
53    // Read first slide
54    let slide0 = editor.get_slide(0)?;
55    println!("   └── First slide title: {:?}\n", slide0.title);
56
57    // =========================================================================
58    // Step 3: Add new slides
59    // =========================================================================
60    println!("➕ Step 3: Adding new slides...");
61    
62    // Add a new slide at the end
63    let new_slide1 = SlideContent::new("New Slide: Added via Editor")
64        .add_bullet("This slide was added programmatically")
65        .add_bullet("Using PresentationEditor")
66        .add_bullet("After the presentation was created")
67        .title_color("9BBB59");
68    
69    let idx1 = editor.add_slide(new_slide1)?;
70    println!("   ✓ Added slide at index {}", idx1);
71    
72    // Add another slide
73    let new_slide2 = SlideContent::new("Another New Slide")
74        .layout(SlideLayout::TwoColumn)
75        .add_bullet("Left column item 1")
76        .add_bullet("Left column item 2")
77        .add_bullet("Right column item 1")
78        .add_bullet("Right column item 2");
79    
80    let idx2 = editor.add_slide(new_slide2)?;
81    println!("   ✓ Added slide at index {}", idx2);
82    println!("   └── Total slides now: {}\n", editor.slide_count());
83
84    // =========================================================================
85    // Step 4: Update existing slide
86    // =========================================================================
87    println!("✏️  Step 4: Updating existing slide...");
88    
89    let updated_slide = SlideContent::new("Slide 2: Updated Features")
90        .add_bullet("Feature A - Enhanced!")
91        .add_bullet("Feature B - Improved!")
92        .add_bullet("Feature C - Optimized!")
93        .add_bullet("Feature D - NEW!")
94        .title_color("C0504D")
95        .content_bold(true);
96    
97    editor.update_slide(2, updated_slide)?;
98    println!("   ✓ Updated slide at index 2\n");
99
100    // =========================================================================
101    // Step 5: Save modified presentation
102    // =========================================================================
103    println!("💾 Step 5: Saving modified presentation...");
104    
105    editor.save("modified.pptx")?;
106    println!("   ✓ Saved as modified.pptx\n");
107
108    // =========================================================================
109    // Step 6: Verify the changes
110    // =========================================================================
111    println!("🔍 Step 6: Verifying changes...");
112    
113    let reader = PresentationReader::open("modified.pptx")?;
114    println!("   Modified presentation:");
115    println!("   ├── Slide count: {}", reader.slide_count());
116    
117    for i in 0..reader.slide_count() {
118        let slide = reader.get_slide(i)?;
119        let title = slide.title.as_deref().unwrap_or("(no title)");
120        let bullets = slide.body_text.len();
121        println!("   {}── Slide {}: \"{}\" ({} bullets)", 
122                 if i == reader.slide_count() - 1 { "└" } else { "├" },
123                 i + 1, 
124                 title,
125                 bullets);
126    }
127
128    // =========================================================================
129    // Step 7: Demonstrate slide removal
130    // =========================================================================
131    println!("\n🗑️  Step 7: Demonstrating slide removal...");
132    
133    let mut editor2 = PresentationEditor::open("modified.pptx")?;
134    println!("   Before removal: {} slides", editor2.slide_count());
135    
136    // Remove the last slide
137    editor2.remove_slide(editor2.slide_count() - 1)?;
138    println!("   ✓ Removed last slide");
139    println!("   After removal: {} slides", editor2.slide_count());
140    
141    editor2.save("trimmed.pptx")?;
142    println!("   ✓ Saved as trimmed.pptx");
143
144    // Cleanup
145    fs::remove_file("original.pptx").ok();
146    fs::remove_file("modified.pptx").ok();
147    fs::remove_file("trimmed.pptx").ok();
148
149    // =========================================================================
150    // Summary
151    // =========================================================================
152    println!("\n╔════════════════════════════════════════════════════════════╗");
153    println!("║                    Demo Complete                           ║");
154    println!("╠════════════════════════════════════════════════════════════╣");
155    println!("║  Capabilities Demonstrated:                                ║");
156    println!("║  ✓ PresentationEditor::open() - Open for editing           ║");
157    println!("║  ✓ editor.add_slide() - Add new slides                     ║");
158    println!("║  ✓ editor.update_slide() - Modify existing slides          ║");
159    println!("║  ✓ editor.remove_slide() - Remove slides                   ║");
160    println!("║  ✓ editor.save() - Save modified presentation              ║");
161    println!("║  ✓ editor.get_slide() - Read slide content                 ║");
162    println!("╚════════════════════════════════════════════════════════════╝");
163
164    Ok(())
165}
examples/read_presentation.rs (line 25)
13fn main() -> Result<(), Box<dyn std::error::Error>> {
14    println!("╔════════════════════════════════════════════════════════════╗");
15    println!("║         PPTX Reading & Parsing Demo                        ║");
16    println!("╚════════════════════════════════════════════════════════════╝\n");
17
18    // =========================================================================
19    // Step 1: Create a sample PPTX to read
20    // =========================================================================
21    println!("📝 Step 1: Creating sample presentation...");
22    
23    let slides = vec![
24        SlideContent::new("Welcome to PPTX-RS")
25            .layout(SlideLayout::CenteredTitle)
26            .title_bold(true)
27            .title_color("1F497D"),
28        
29        SlideContent::new("Features Overview")
30            .add_bullet("Create presentations programmatically")
31            .add_bullet("Read existing PPTX files")
32            .add_bullet("Extract text and metadata")
33            .add_bullet("Parse shapes and tables"),
34        
35        SlideContent::new("Technical Details")
36            .layout(SlideLayout::TwoColumn)
37            .add_bullet("XML parsing with xml-rs")
38            .add_bullet("ZIP handling with zip crate")
39            .add_bullet("ECMA-376 compliant")
40            .add_bullet("Rust 2024 edition")
41            .add_bullet("Cross-platform")
42            .add_bullet("No external dependencies"),
43        
44        SlideContent::new("Summary")
45            .add_bullet("Full read/write support")
46            .add_bullet("Comprehensive API")
47            .add_bullet("Well tested"),
48    ];
49    
50    let pptx_data = create_pptx_with_content("PPTX-RS Demo", slides)?;
51    fs::write("sample_presentation.pptx", &pptx_data)?;
52    println!("   ✓ Created sample_presentation.pptx ({} bytes)\n", pptx_data.len());
53
54    // =========================================================================
55    // Step 2: Open and read the presentation
56    // =========================================================================
57    println!("📖 Step 2: Opening presentation...");
58    
59    let reader = PresentationReader::open("sample_presentation.pptx")?;
60    let info = reader.info();
61    
62    println!("   Presentation Info:");
63    println!("   ├── Title: {}", info.title.as_deref().unwrap_or("(none)"));
64    println!("   ├── Creator: {}", info.creator.as_deref().unwrap_or("(none)"));
65    println!("   ├── Slides: {}", info.slide_count);
66    println!("   └── Revision: {}\n", info.revision.unwrap_or(0));
67
68    // =========================================================================
69    // Step 3: Parse each slide
70    // =========================================================================
71    println!("📑 Step 3: Parsing slides...");
72    
73    for i in 0..reader.slide_count() {
74        let slide = reader.get_slide(i)?;
75        
76        println!("\n   Slide {}:", i + 1);
77        println!("   ├── Title: {}", slide.title.as_deref().unwrap_or("(none)"));
78        println!("   ├── Shapes: {}", slide.shapes.len());
79        println!("   ├── Tables: {}", slide.tables.len());
80        
81        if !slide.body_text.is_empty() {
82            println!("   └── Body text:");
83            for (j, text) in slide.body_text.iter().enumerate() {
84                let prefix = if j == slide.body_text.len() - 1 { "       └──" } else { "       ├──" };
85                println!("{}  {}", prefix, text);
86            }
87        } else {
88            println!("   └── Body text: (none)");
89        }
90    }
91
92    // =========================================================================
93    // Step 4: Extract all text
94    // =========================================================================
95    println!("\n📋 Step 4: Extracting all text...");
96    
97    let all_text = reader.extract_all_text()?;
98    println!("   Found {} text items:", all_text.len());
99    for (i, text) in all_text.iter().take(10).enumerate() {
100        println!("   {}. {}", i + 1, text);
101    }
102    if all_text.len() > 10 {
103        println!("   ... and {} more", all_text.len() - 10);
104    }
105
106    // =========================================================================
107    // Step 5: Direct XML parsing (advanced)
108    // =========================================================================
109    println!("\n🔧 Step 5: Direct XML parsing (advanced)...");
110    
111    // You can also parse slide XML directly
112    let sample_xml = r#"<?xml version="1.0" encoding="UTF-8"?>
113    <p:sld xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" 
114           xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">
115        <p:cSld>
116            <p:spTree>
117                <p:sp>
118                    <p:nvSpPr>
119                        <p:cNvPr id="2" name="Title"/>
120                        <p:nvPr><p:ph type="title"/></p:nvPr>
121                    </p:nvSpPr>
122                    <p:txBody>
123                        <a:p>
124                            <a:r>
125                                <a:rPr b="1" sz="4400"/>
126                                <a:t>Direct Parse Example</a:t>
127                            </a:r>
128                        </a:p>
129                    </p:txBody>
130                </p:sp>
131            </p:spTree>
132        </p:cSld>
133    </p:sld>"#;
134    
135    let parsed = SlideParser::parse(sample_xml)?;
136    println!("   Parsed XML directly:");
137    println!("   ├── Title: {}", parsed.title.as_deref().unwrap_or("(none)"));
138    println!("   └── Shapes: {}", parsed.shapes.len());
139    
140    if let Some(shape) = parsed.shapes.first() {
141        if let Some(para) = shape.paragraphs.first() {
142            if let Some(run) = para.runs.first() {
143                println!("\n   Text formatting detected:");
144                println!("   ├── Bold: {}", run.bold);
145                println!("   ├── Font size: {:?}", run.font_size);
146                println!("   └── Text: {}", run.text);
147            }
148        }
149    }
150
151    // Cleanup
152    fs::remove_file("sample_presentation.pptx").ok();
153
154    // =========================================================================
155    // Summary
156    // =========================================================================
157    println!("\n╔════════════════════════════════════════════════════════════╗");
158    println!("║                    Demo Complete                           ║");
159    println!("╠════════════════════════════════════════════════════════════╣");
160    println!("║  Capabilities Demonstrated:                                ║");
161    println!("║  ✓ PresentationReader::open() - Open PPTX files            ║");
162    println!("║  ✓ reader.info() - Get presentation metadata               ║");
163    println!("║  ✓ reader.get_slide(i) - Parse individual slides           ║");
164    println!("║  ✓ reader.extract_all_text() - Extract all text            ║");
165    println!("║  ✓ SlideParser::parse() - Direct XML parsing               ║");
166    println!("╚════════════════════════════════════════════════════════════╝");
167
168    Ok(())
169}
examples/dimension_demo.rs (line 33)
21fn main() -> Result<(), Box<dyn std::error::Error>> {
22    println!("╔══════════════════════════════════════════════════════════════╗");
23    println!("║       Dimension API Demo — Flexible Positioning & Sizing     ║");
24    println!("╚══════════════════════════════════════════════════════════════╝\n");
25
26    let mut slides = Vec::new();
27
28    // =========================================================================
29    // SLIDE 1: Title
30    // =========================================================================
31    slides.push(
32        SlideContent::new("Dimension API — Flexible Positioning & Sizing")
33            .layout(SlideLayout::CenteredTitle)
34            .title_size(44)
35            .title_bold(true)
36            .title_color("1F497D")
37    );
38
39    // =========================================================================
40    // SLIDE 2: All Unit Types Side-by-Side
41    // =========================================================================
42    println!("📏 Slide 2: All Unit Types");
43
44    // Each shape is 1 inch wide, positioned using a different unit type
45    let emu_shape = Shape::from_dimensions(ShapeType::Rectangle,
46        Dimension::Emu(457200), Dimension::Inches(1.5),
47        Dimension::Emu(1371600), Dimension::Inches(0.8),
48    ).with_fill(ShapeFill::new("1565C0")).with_text("EMU");
49
50    let inch_shape = Shape::from_dimensions(ShapeType::Rectangle,
51        Dimension::Inches(2.0), Dimension::Inches(1.5),
52        Dimension::Inches(1.5), Dimension::Inches(0.8),
53    ).with_fill(ShapeFill::new("2E7D32")).with_text("Inches");
54
55    let cm_shape = Shape::from_dimensions(ShapeType::Rectangle,
56        Dimension::Cm(9.0), Dimension::Inches(1.5),
57        Dimension::Cm(3.81), Dimension::Inches(0.8),
58    ).with_fill(ShapeFill::new("C62828")).with_text("Cm");
59
60    let pt_shape = Shape::from_dimensions(ShapeType::Rectangle,
61        Dimension::Pt(324.0), Dimension::Inches(1.5),
62        Dimension::Pt(108.0), Dimension::Inches(0.8),
63    ).with_fill(ShapeFill::new("7B1FA2")).with_text("Pt");
64
65    let ratio_shape = Shape::from_dimensions(ShapeType::Rectangle,
66        Dimension::Ratio(0.52), Dimension::Inches(1.5),
67        Dimension::Ratio(0.15), Dimension::Inches(0.8),
68    ).with_fill(ShapeFill::new("EF6C00")).with_text("Ratio");
69
70    let pct_shape = Shape::from_dimensions(ShapeType::Rectangle,
71        Dimension::percent(69.0), Dimension::Inches(1.5),
72        Dimension::percent(15.0), Dimension::Inches(0.8),
73    ).with_fill(ShapeFill::new("00838F")).with_text("Percent");
74
75    // Labels row
76    let label = Shape::from_dimensions(ShapeType::Rectangle,
77        Dimension::Inches(0.5), Dimension::Inches(0.8),
78        Dimension::Inches(9.0), Dimension::Inches(0.5),
79    ).with_text("Each shape below uses a different unit type for X position:");
80
81    slides.push(
82        SlideContent::new("All Dimension Unit Types")
83            .layout(SlideLayout::TitleOnly)
84            .title_color("1F497D").title_bold(true)
85            .add_shape(label)
86            .add_shape(emu_shape)
87            .add_shape(inch_shape)
88            .add_shape(cm_shape)
89            .add_shape(pt_shape)
90            .add_shape(ratio_shape)
91            .add_shape(pct_shape)
92    );
93
94    // =========================================================================
95    // SLIDE 3: Ratio-Based Grid Layout
96    // =========================================================================
97    println!("📐 Slide 3: Ratio-Based Grid (auto-adapts to slide size)");
98
99    let margin = 0.03;  // 3% margin
100    let gap = 0.02;     // 2% gap
101    let cell_w = (1.0 - 2.0 * margin - 2.0 * gap) / 3.0;
102    let cell_h = (0.7 - 2.0 * gap) / 3.0;  // 70% of slide height for grid
103    let y_start = 0.22; // below title
104
105    let colors = [
106        "1565C0", "2E7D32", "C62828",
107        "7B1FA2", "EF6C00", "00838F",
108        "AD1457", "4E342E", "37474F",
109    ];
110    let labels = [
111        "Top-Left", "Top-Center", "Top-Right",
112        "Mid-Left", "Mid-Center", "Mid-Right",
113        "Bot-Left", "Bot-Center", "Bot-Right",
114    ];
115
116    let mut grid_slide = SlideContent::new("Ratio-Based 3x3 Grid Layout")
117        .layout(SlideLayout::TitleOnly)
118        .title_color("1F497D").title_bold(true);
119
120    for row in 0..3 {
121        for col in 0..3 {
122            let idx = row * 3 + col;
123            let x = margin + col as f64 * (cell_w + gap);
124            let y = y_start + row as f64 * (cell_h + gap);
125            let shape = Shape::from_dimensions(ShapeType::RoundedRectangle,
126                Dimension::Ratio(x), Dimension::Ratio(y),
127                Dimension::Ratio(cell_w), Dimension::Ratio(cell_h),
128            ).with_fill(ShapeFill::new(colors[idx])).with_text(labels[idx]);
129            grid_slide = grid_slide.add_shape(shape);
130        }
131    }
132
133    slides.push(grid_slide);
134
135    // =========================================================================
136    // SLIDE 4: Mixed-Unit Positioning
137    // =========================================================================
138    println!("🔀 Slide 4: Mixed-Unit Positioning");
139
140    // Title area: inches for position, ratio for width
141    let title_box = Shape::from_dimensions(ShapeType::RoundedRectangle,
142        Dimension::Inches(0.5), Dimension::Inches(1.5),
143        Dimension::Ratio(0.9), Dimension::Cm(2.0),
144    ).with_fill(ShapeFill::new("1F497D")).with_text("Inches X + Ratio Width + Cm Height");
145
146    // Content area: cm for position, pt for size
147    let content_box = Shape::from_dimensions(ShapeType::Rectangle,
148        Dimension::Cm(2.0), Dimension::Cm(6.0),
149        Dimension::Pt(432.0), Dimension::Pt(108.0),  // 6in x 1.5in
150    ).with_fill(ShapeFill::new("2E7D32")).with_text("Cm position + Pt size");
151
152    // Footer area: percent for everything
153    let footer_box = Shape::from_dimensions(ShapeType::Rectangle,
154        Dimension::percent(5.0), Dimension::percent(75.0),
155        Dimension::percent(90.0), Dimension::percent(10.0),
156    ).with_fill(ShapeFill::new("C62828")).with_text("100% percent-based");
157
158    // Sidebar: EMU for position, inches for size
159    let sidebar = Shape::from_dimensions(ShapeType::Rectangle,
160        Dimension::Emu(8000000), Dimension::Inches(1.5),
161        Dimension::Inches(1.0), Dimension::Ratio(0.6),
162    ).with_fill(ShapeFill::new("7B1FA2")).with_text("EMU + Inches + Ratio");
163
164    slides.push(
165        SlideContent::new("Mixed-Unit Positioning")
166            .layout(SlideLayout::TitleOnly)
167            .title_color("1F497D").title_bold(true)
168            .add_shape(title_box)
169            .add_shape(content_box)
170            .add_shape(footer_box)
171            .add_shape(sidebar)
172    );
173
174    // =========================================================================
175    // SLIDE 5: Fluent .at() and .with_dimensions() Chaining
176    // =========================================================================
177    println!("🔗 Slide 5: Fluent Chaining API");
178
179    // Build shapes step by step with chaining
180    let shape1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
181        .at(Dimension::percent(10.0), Dimension::percent(25.0))
182        .with_dimensions(Dimension::Inches(2.5), Dimension::Inches(2.5))
183        .with_fill(ShapeFill::new("1565C0"))
184        .with_text(".at() + .with_dimensions()");
185
186    let shape2 = Shape::new(ShapeType::RoundedRectangle, 0, 0, 0, 0)
187        .at(Dimension::Inches(4.0), Dimension::Cm(5.0))
188        .with_dimensions(Dimension::Ratio(0.3), Dimension::Inches(2.0))
189        .with_fill(ShapeFill::new("2E7D32"))
190        .with_line(ShapeLine::new("1B5E20", 25400))
191        .with_text("Chained with fill + line");
192
193    let shape3 = Shape::new(ShapeType::Star5, 0, 0, 0, 0)
194        .at(Dimension::percent(70.0), Dimension::percent(55.0))
195        .with_dimensions(Dimension::Inches(2.0), Dimension::Inches(2.0))
196        .with_fill(ShapeFill::new("FFC107"))
197        .with_rotation(15)
198        .with_text("+ rotation");
199
200    slides.push(
201        SlideContent::new("Fluent .at() and .with_dimensions() Chaining")
202            .layout(SlideLayout::TitleOnly)
203            .title_color("1F497D").title_bold(true)
204            .add_shape(shape1)
205            .add_shape(shape2)
206            .add_shape(shape3)
207    );
208
209    // =========================================================================
210    // SLIDE 6: Prelude Shape Builders
211    // =========================================================================
212    println!("🧰 Slide 6: Prelude Shape Builders");
213
214    // shapes::dim() — generic Dimension-based builder
215    let dim_shape = shapes::dim(ShapeType::Diamond,
216        Dimension::percent(5.0), Dimension::percent(25.0),
217        Dimension::percent(25.0), Dimension::percent(35.0),
218    ).with_fill(ShapeFill::new("7B1FA2")).with_text("shapes::dim()");
219
220    // shapes::rect_ratio() — ratio-based rectangle
221    let ratio_rect = shapes::rect_ratio(0.35, 0.25, 0.28, 0.35)
222        .with_fill(ShapeFill::new("EF6C00")).with_text("shapes::rect_ratio()");
223
224    // shapes::text_box_ratio() — ratio-based text box
225    let ratio_text = shapes::text_box_ratio(0.68, 0.25, 0.28, 0.35, "shapes::text_box_ratio()")
226        .with_fill(ShapeFill::new("00838F"));
227
228    // Traditional shapes::rect() still works (inches)
229    let inch_rect = shapes::rect(1.0, 5.0, 3.0, 1.0)
230        .with_fill(ShapeFill::new("A5A5A5")).with_text("shapes::rect() (inches)");
231
232    slides.push(
233        SlideContent::new("Prelude Shape Builders")
234            .layout(SlideLayout::TitleOnly)
235            .title_color("1F497D").title_bold(true)
236            .add_shape(dim_shape)
237            .add_shape(ratio_rect)
238            .add_shape(ratio_text)
239            .add_shape(inch_rect)
240    );
241
242    // =========================================================================
243    // SLIDE 7: FlexPosition & FlexSize Structs
244    // =========================================================================
245    println!("📦 Slide 7: FlexPosition & FlexSize");
246
247    // Demonstrate FlexPosition and FlexSize for reusable layout definitions
248    let header_pos = FlexPosition::new(Dimension::percent(5.0), Dimension::percent(20.0));
249    let header_size = FlexSize::new(Dimension::percent(90.0), Dimension::percent(12.0));
250    let (hx, hy) = header_pos.to_emu();
251    let (hw, hh) = header_size.to_emu();
252    let header = Shape::new(ShapeType::RoundedRectangle, hx, hy, hw, hh)
253        .with_fill(ShapeFill::new("1F497D"))
254        .with_text("FlexPosition + FlexSize → header");
255
256    let body_pos = FlexPosition::new(Dimension::percent(5.0), Dimension::percent(35.0));
257    let body_size = FlexSize::new(Dimension::percent(60.0), Dimension::percent(50.0));
258    let (bx, by) = body_pos.to_emu();
259    let (bw, bh) = body_size.to_emu();
260    let body = Shape::new(ShapeType::Rectangle, bx, by, bw, bh)
261        .with_fill(ShapeFill::new("E8EAF6"))
262        .with_line(ShapeLine::new("3F51B5", 12700))
263        .with_text("Body area (60% x 50%)");
264
265    let sidebar_pos = FlexPosition::new(Dimension::percent(68.0), Dimension::percent(35.0));
266    let sidebar_size = FlexSize::new(Dimension::percent(27.0), Dimension::percent(50.0));
267    let (sx, sy) = sidebar_pos.to_emu();
268    let (sw, sh) = sidebar_size.to_emu();
269    let sidebar_shape = Shape::new(ShapeType::Rectangle, sx, sy, sw, sh)
270        .with_fill(ShapeFill::new("FFF3E0"))
271        .with_line(ShapeLine::new("EF6C00", 12700))
272        .with_text("Sidebar (27% x 50%)");
273
274    slides.push(
275        SlideContent::new("FlexPosition & FlexSize — Reusable Layouts")
276            .layout(SlideLayout::TitleOnly)
277            .title_color("1F497D").title_bold(true)
278            .add_shape(header)
279            .add_shape(body)
280            .add_shape(sidebar_shape)
281    );
282
283    // =========================================================================
284    // SLIDE 8: Real-World Dashboard with Dimension API
285    // =========================================================================
286    println!("📊 Slide 8: Real-World Dashboard");
287
288    // 4 evenly-spaced KPI cards using percent
289    let kpi_colors = ["1565C0", "2E7D32", "EF6C00", "7B1FA2"];
290    let kpi_labels = [
291        "Revenue\n$2.14M\n+15%",
292        "Users\n12,450\n+22%",
293        "NPS\n72\n+8 pts",
294        "Uptime\n99.9%\n+0.1%",
295    ];
296
297    let mut dashboard = SlideContent::new("KPI Dashboard — Dimension API")
298        .layout(SlideLayout::TitleOnly)
299        .title_color("1F497D").title_bold(true);
300
301    for i in 0..4 {
302        let x_pct = 3.0 + i as f64 * 24.5;
303        let card = Shape::from_dimensions(ShapeType::RoundedRectangle,
304            Dimension::percent(x_pct), Dimension::percent(22.0),
305            Dimension::percent(22.0), Dimension::percent(30.0),
306        ).with_fill(ShapeFill::new(kpi_colors[i])).with_text(kpi_labels[i]);
307        dashboard = dashboard.add_shape(card);
308    }
309
310    // Bottom chart placeholder
311    let chart_area = Shape::from_dimensions(ShapeType::Rectangle,
312        Dimension::percent(3.0), Dimension::percent(58.0),
313        Dimension::percent(94.0), Dimension::percent(35.0),
314    ).with_fill(ShapeFill::new("ECEFF1"))
315     .with_line(ShapeLine::new("B0BEC5", 12700))
316     .with_text("Chart Area (94% x 35%)");
317    dashboard = dashboard.add_shape(chart_area);
318
319    slides.push(dashboard);
320
321    // =========================================================================
322    // SLIDE 9: Unit Equivalence Reference
323    // =========================================================================
324    println!("📖 Slide 9: Unit Equivalence Reference");
325
326    slides.push(
327        SlideContent::new("Dimension Unit Reference")
328            .layout(SlideLayout::TitleAndContent)
329            .title_color("1F497D").title_bold(true)
330            .add_bullet(&format!("1 inch = {} EMU = Dimension::Inches(1.0)", 914400))
331            .add_bullet(&format!("1 cm   = {} EMU = Dimension::Cm(1.0)", 360000))
332            .add_bullet(&format!("1 pt   = {} EMU = Dimension::Pt(1.0)", 12700))
333            .add_bullet(&format!("Slide width  = {} EMU = 10 inches", SLIDE_WIDTH_EMU))
334            .add_bullet(&format!("Slide height = {} EMU = 7.5 inches", SLIDE_HEIGHT_EMU))
335            .add_bullet("Ratio(0.1) on X = 10% of slide width = 1 inch")
336            .add_bullet("Ratio(0.5) on Y = 50% of slide height = 3.75 inches")
337            .add_bullet("percent(50.0) = Ratio(0.5)")
338            .content_size(22)
339    );
340
341    // =========================================================================
342    // Generate PPTX
343    // =========================================================================
344    fs::create_dir_all("examples/output")?;
345    let num_slides = slides.len();
346    let pptx_data = create_pptx_with_content("Dimension API Demo", slides)?;
347    fs::write("examples/output/dimension_demo.pptx", &pptx_data)?;
348
349    println!("\n╔══════════════════════════════════════════════════════════════╗");
350    println!("║                 Dimension API Demo Complete                   ║");
351    println!("╠══════════════════════════════════════════════════════════════╣");
352    println!("║  Output: examples/output/dimension_demo.pptx                 ║");
353    println!("║  Slides: {}                                                   ║", num_slides);
354    println!("║  Size:   {} KB                                               ║", pptx_data.len() / 1024);
355    println!("╠══════════════════════════════════════════════════════════════╣");
356    println!("║  Showcased:                                                  ║");
357    println!("║    ✓ All 6 unit types: EMU, Inches, Cm, Pt, Ratio, Percent   ║");
358    println!("║    ✓ Shape::from_dimensions() constructor                    ║");
359    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
360    println!("║    ✓ Mixed-unit positioning                                  ║");
361    println!("║    ✓ Prelude helpers: dim(), rect_ratio(), text_box_ratio()  ║");
362    println!("║    ✓ FlexPosition & FlexSize structs                         ║");
363    println!("║    ✓ Ratio-based grid layout (auto-adapts)                   ║");
364    println!("║    ✓ Real-world KPI dashboard                                ║");
365    println!("╚══════════════════════════════════════════════════════════════╝");
366
367    Ok(())
368}
Source

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

Examples found in repository?
examples/table_generation.rs (line 73)
56fn create_simple_table_example() -> Result<(), Box<dyn std::error::Error>> {
57    let table = Table::from_data(
58        vec![
59            vec!["Name", "Age"],
60            vec!["Alice", "30"],
61            vec!["Bob", "25"],
62        ],
63        vec![2000000, 2000000],
64        500000,
65        1500000,
66    );
67
68    let slides = vec![
69        SlideContent::new("Simple 2x2 Table")
70            .add_bullet("Table with basic structure")
71            .add_bullet("Headers and data rows"),
72        SlideContent::new("Table Data")
73            .table(table),
74    ];
75
76    let pptx_data = create_pptx_with_content("Simple Table", slides)?;
77    fs::write("examples/output/simple_table.pptx", pptx_data)?;
78    Ok(())
79}
80
81fn create_styled_table_example() -> Result<(), Box<dyn std::error::Error>> {
82    let header_cells = vec![
83        TableCell::new("Name").bold().background_color("003366"),
84        TableCell::new("Age").bold().background_color("003366"),
85        TableCell::new("City").bold().background_color("003366"),
86    ];
87    let header_row = TableRow::new(header_cells);
88
89    let data_rows = vec![
90        TableRow::new(vec![
91            TableCell::new("Alice"),
92            TableCell::new("30"),
93            TableCell::new("NYC"),
94        ]),
95        TableRow::new(vec![
96            TableCell::new("Bob"),
97            TableCell::new("28"),
98            TableCell::new("LA"),
99        ]),
100        TableRow::new(vec![
101            TableCell::new("Carol"),
102            TableCell::new("35"),
103            TableCell::new("Chicago"),
104        ]),
105    ];
106
107    let table = Table::new(
108        vec![vec![header_row], data_rows].concat(),
109        vec![1500000, 1500000, 1500000],
110        500000,
111        1500000,
112    );
113
114    let slides = vec![
115        SlideContent::new("Styled Table")
116            .title_bold(true)
117            .title_color("003366")
118            .add_bullet("Table with formatting"),
119        SlideContent::new("People Data")
120            .table(table),
121    ];
122
123    let pptx_data = create_pptx_with_content("Styled Table", slides)?;
124    fs::write("examples/output/styled_table.pptx", pptx_data)?;
125    Ok(())
126}
127
128fn create_data_table_example() -> Result<(), Box<dyn std::error::Error>> {
129    let header_cells = vec![
130        TableCell::new("Product").bold().background_color("1F497D"),
131        TableCell::new("Revenue").bold().background_color("1F497D"),
132        TableCell::new("Growth").bold().background_color("1F497D"),
133    ];
134    let header_row = TableRow::new(header_cells);
135
136    let data_rows = vec![
137        TableRow::new(vec![
138            TableCell::new("Product A"),
139            TableCell::new("$100K"),
140            TableCell::new("+15%"),
141        ]),
142        TableRow::new(vec![
143            TableCell::new("Product B"),
144            TableCell::new("$150K"),
145            TableCell::new("+22%"),
146        ]),
147        TableRow::new(vec![
148            TableCell::new("Product C"),
149            TableCell::new("$200K"),
150            TableCell::new("+18%"),
151        ]),
152    ];
153
154    let table = Table::new(
155        vec![vec![header_row], data_rows].concat(),
156        vec![2000000, 2000000, 1500000],
157        457200,
158        1400000,
159    );
160
161    let slides = vec![
162        SlideContent::new("Sales Data Table")
163            .title_bold(true)
164            .title_size(48)
165            .add_bullet("Quarterly sales figures"),
166        SlideContent::new("Q1 2025 Sales")
167            .table(table),
168        SlideContent::new("Summary")
169            .content_bold(true)
170            .add_bullet("Total Revenue: $450K")
171            .add_bullet("Average Growth: +18.3%")
172            .add_bullet("Best Performer: Product C"),
173    ];
174
175    let pptx_data = create_pptx_with_content("Sales Data", slides)?;
176    fs::write("examples/output/data_table.pptx", pptx_data)?;
177    Ok(())
178}
179
180fn create_multiple_tables_example() -> Result<(), Box<dyn std::error::Error>> {
181    // Table 1: Employees
182    let emp_header = TableRow::new(vec![
183        TableCell::new("ID").bold().background_color("4F81BD"),
184        TableCell::new("Name").bold().background_color("4F81BD"),
185        TableCell::new("Department").bold().background_color("4F81BD"),
186    ]);
187    let emp_rows = vec![
188        TableRow::new(vec![
189            TableCell::new("001"),
190            TableCell::new("Alice"),
191            TableCell::new("Engineering"),
192        ]),
193        TableRow::new(vec![
194            TableCell::new("002"),
195            TableCell::new("Bob"),
196            TableCell::new("Sales"),
197        ]),
198        TableRow::new(vec![
199            TableCell::new("003"),
200            TableCell::new("Carol"),
201            TableCell::new("Marketing"),
202        ]),
203    ];
204    let emp_table = Table::new(
205        vec![vec![emp_header], emp_rows].concat(),
206        vec![1000000, 2000000, 2000000],
207        500000,
208        1500000,
209    );
210
211    // Table 2: Projects
212    let proj_header = TableRow::new(vec![
213        TableCell::new("Project").bold().background_color("003366"),
214        TableCell::new("Status").bold().background_color("003366"),
215        TableCell::new("Owner").bold().background_color("003366"),
216    ]);
217    let proj_rows = vec![
218        TableRow::new(vec![
219            TableCell::new("Project A"),
220            TableCell::new("In Progress"),
221            TableCell::new("Alice"),
222        ]),
223        TableRow::new(vec![
224            TableCell::new("Project B"),
225            TableCell::new("Completed"),
226            TableCell::new("Bob"),
227        ]),
228        TableRow::new(vec![
229            TableCell::new("Project C"),
230            TableCell::new("Planning"),
231            TableCell::new("Carol"),
232        ]),
233    ];
234    let proj_table = Table::new(
235        vec![vec![proj_header], proj_rows].concat(),
236        vec![2000000, 2000000, 1500000],
237        500000,
238        1500000,
239    );
240
241    let slides = vec![
242        SlideContent::new("Multiple Tables")
243            .title_bold(true)
244            .add_bullet("Slide with multiple tables"),
245        SlideContent::new("Table 1: Employees")
246            .table(emp_table),
247        SlideContent::new("Table 2: Projects")
248            .table(proj_table),
249        SlideContent::new("Summary")
250            .add_bullet("Total Employees: 3")
251            .add_bullet("Active Projects: 3")
252            .add_bullet("Completion Rate: 33%"),
253    ];
254
255    let pptx_data = create_pptx_with_content("Multiple Tables", slides)?;
256    fs::write("examples/output/multiple_tables.pptx", pptx_data)?;
257    Ok(())
258}
More examples
Hide additional examples
examples/table_demo.rs (line 11)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title
6        SlideContent::new("Table Examples")
7            .add_bullet("Demonstrating table rendering in PPTX"),
8
9        // Slide 2: Simple 2x3 table
10        SlideContent::new("Employee Data")
11            .table(create_employee_table()),
12
13        // Slide 3: Styled table with colors
14        SlideContent::new("Sales Summary")
15            .table(create_sales_table()),
16
17        // Slide 4: Data table
18        SlideContent::new("Quarterly Results")
19            .table(create_quarterly_table()),
20    ];
21
22    let pptx_data = create_pptx_with_content("Table Demo", slides)?;
23    std::fs::write("table_demo.pptx", pptx_data)?;
24    println!("✓ Created table_demo.pptx with 4 slides containing tables");
25
26    Ok(())
27}
examples/table_text_formatting.rs (line 11)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let slides = vec![
5        // Slide 1: Title
6        SlideContent::new("Table Text Formatting Examples")
7            .add_bullet("Demonstrating rich text content in table cells"),
8
9        // Slide 2: Text formatting examples
10        SlideContent::new("Text Formatting in Tables")
11            .table(create_text_formatting_table()),
12
13        // Slide 3: Color examples
14        SlideContent::new("Text and Background Colors")
15            .table(create_color_table()),
16
17        // Slide 4: Font examples
18        SlideContent::new("Font Size and Family")
19            .table(create_font_table()),
20
21        // Slide 5: Combined formatting
22        SlideContent::new("Combined Formatting")
23            .table(create_combined_table()),
24    ];
25
26    let pptx_data = create_pptx_with_content("Table Text Formatting", slides)?;
27    std::fs::write("examples/output/table_text_formatting.pptx", pptx_data)?;
28    println!("✓ Created table_text_formatting.pptx with rich text formatting examples");
29
30    Ok(())
31}
examples/comprehensive_demo.rs (line 196)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
Source

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

Add a shape to the slide

Examples found in repository?
examples/dimension_demo.rs (line 85)
21fn main() -> Result<(), Box<dyn std::error::Error>> {
22    println!("╔══════════════════════════════════════════════════════════════╗");
23    println!("║       Dimension API Demo — Flexible Positioning & Sizing     ║");
24    println!("╚══════════════════════════════════════════════════════════════╝\n");
25
26    let mut slides = Vec::new();
27
28    // =========================================================================
29    // SLIDE 1: Title
30    // =========================================================================
31    slides.push(
32        SlideContent::new("Dimension API — Flexible Positioning & Sizing")
33            .layout(SlideLayout::CenteredTitle)
34            .title_size(44)
35            .title_bold(true)
36            .title_color("1F497D")
37    );
38
39    // =========================================================================
40    // SLIDE 2: All Unit Types Side-by-Side
41    // =========================================================================
42    println!("📏 Slide 2: All Unit Types");
43
44    // Each shape is 1 inch wide, positioned using a different unit type
45    let emu_shape = Shape::from_dimensions(ShapeType::Rectangle,
46        Dimension::Emu(457200), Dimension::Inches(1.5),
47        Dimension::Emu(1371600), Dimension::Inches(0.8),
48    ).with_fill(ShapeFill::new("1565C0")).with_text("EMU");
49
50    let inch_shape = Shape::from_dimensions(ShapeType::Rectangle,
51        Dimension::Inches(2.0), Dimension::Inches(1.5),
52        Dimension::Inches(1.5), Dimension::Inches(0.8),
53    ).with_fill(ShapeFill::new("2E7D32")).with_text("Inches");
54
55    let cm_shape = Shape::from_dimensions(ShapeType::Rectangle,
56        Dimension::Cm(9.0), Dimension::Inches(1.5),
57        Dimension::Cm(3.81), Dimension::Inches(0.8),
58    ).with_fill(ShapeFill::new("C62828")).with_text("Cm");
59
60    let pt_shape = Shape::from_dimensions(ShapeType::Rectangle,
61        Dimension::Pt(324.0), Dimension::Inches(1.5),
62        Dimension::Pt(108.0), Dimension::Inches(0.8),
63    ).with_fill(ShapeFill::new("7B1FA2")).with_text("Pt");
64
65    let ratio_shape = Shape::from_dimensions(ShapeType::Rectangle,
66        Dimension::Ratio(0.52), Dimension::Inches(1.5),
67        Dimension::Ratio(0.15), Dimension::Inches(0.8),
68    ).with_fill(ShapeFill::new("EF6C00")).with_text("Ratio");
69
70    let pct_shape = Shape::from_dimensions(ShapeType::Rectangle,
71        Dimension::percent(69.0), Dimension::Inches(1.5),
72        Dimension::percent(15.0), Dimension::Inches(0.8),
73    ).with_fill(ShapeFill::new("00838F")).with_text("Percent");
74
75    // Labels row
76    let label = Shape::from_dimensions(ShapeType::Rectangle,
77        Dimension::Inches(0.5), Dimension::Inches(0.8),
78        Dimension::Inches(9.0), Dimension::Inches(0.5),
79    ).with_text("Each shape below uses a different unit type for X position:");
80
81    slides.push(
82        SlideContent::new("All Dimension Unit Types")
83            .layout(SlideLayout::TitleOnly)
84            .title_color("1F497D").title_bold(true)
85            .add_shape(label)
86            .add_shape(emu_shape)
87            .add_shape(inch_shape)
88            .add_shape(cm_shape)
89            .add_shape(pt_shape)
90            .add_shape(ratio_shape)
91            .add_shape(pct_shape)
92    );
93
94    // =========================================================================
95    // SLIDE 3: Ratio-Based Grid Layout
96    // =========================================================================
97    println!("📐 Slide 3: Ratio-Based Grid (auto-adapts to slide size)");
98
99    let margin = 0.03;  // 3% margin
100    let gap = 0.02;     // 2% gap
101    let cell_w = (1.0 - 2.0 * margin - 2.0 * gap) / 3.0;
102    let cell_h = (0.7 - 2.0 * gap) / 3.0;  // 70% of slide height for grid
103    let y_start = 0.22; // below title
104
105    let colors = [
106        "1565C0", "2E7D32", "C62828",
107        "7B1FA2", "EF6C00", "00838F",
108        "AD1457", "4E342E", "37474F",
109    ];
110    let labels = [
111        "Top-Left", "Top-Center", "Top-Right",
112        "Mid-Left", "Mid-Center", "Mid-Right",
113        "Bot-Left", "Bot-Center", "Bot-Right",
114    ];
115
116    let mut grid_slide = SlideContent::new("Ratio-Based 3x3 Grid Layout")
117        .layout(SlideLayout::TitleOnly)
118        .title_color("1F497D").title_bold(true);
119
120    for row in 0..3 {
121        for col in 0..3 {
122            let idx = row * 3 + col;
123            let x = margin + col as f64 * (cell_w + gap);
124            let y = y_start + row as f64 * (cell_h + gap);
125            let shape = Shape::from_dimensions(ShapeType::RoundedRectangle,
126                Dimension::Ratio(x), Dimension::Ratio(y),
127                Dimension::Ratio(cell_w), Dimension::Ratio(cell_h),
128            ).with_fill(ShapeFill::new(colors[idx])).with_text(labels[idx]);
129            grid_slide = grid_slide.add_shape(shape);
130        }
131    }
132
133    slides.push(grid_slide);
134
135    // =========================================================================
136    // SLIDE 4: Mixed-Unit Positioning
137    // =========================================================================
138    println!("🔀 Slide 4: Mixed-Unit Positioning");
139
140    // Title area: inches for position, ratio for width
141    let title_box = Shape::from_dimensions(ShapeType::RoundedRectangle,
142        Dimension::Inches(0.5), Dimension::Inches(1.5),
143        Dimension::Ratio(0.9), Dimension::Cm(2.0),
144    ).with_fill(ShapeFill::new("1F497D")).with_text("Inches X + Ratio Width + Cm Height");
145
146    // Content area: cm for position, pt for size
147    let content_box = Shape::from_dimensions(ShapeType::Rectangle,
148        Dimension::Cm(2.0), Dimension::Cm(6.0),
149        Dimension::Pt(432.0), Dimension::Pt(108.0),  // 6in x 1.5in
150    ).with_fill(ShapeFill::new("2E7D32")).with_text("Cm position + Pt size");
151
152    // Footer area: percent for everything
153    let footer_box = Shape::from_dimensions(ShapeType::Rectangle,
154        Dimension::percent(5.0), Dimension::percent(75.0),
155        Dimension::percent(90.0), Dimension::percent(10.0),
156    ).with_fill(ShapeFill::new("C62828")).with_text("100% percent-based");
157
158    // Sidebar: EMU for position, inches for size
159    let sidebar = Shape::from_dimensions(ShapeType::Rectangle,
160        Dimension::Emu(8000000), Dimension::Inches(1.5),
161        Dimension::Inches(1.0), Dimension::Ratio(0.6),
162    ).with_fill(ShapeFill::new("7B1FA2")).with_text("EMU + Inches + Ratio");
163
164    slides.push(
165        SlideContent::new("Mixed-Unit Positioning")
166            .layout(SlideLayout::TitleOnly)
167            .title_color("1F497D").title_bold(true)
168            .add_shape(title_box)
169            .add_shape(content_box)
170            .add_shape(footer_box)
171            .add_shape(sidebar)
172    );
173
174    // =========================================================================
175    // SLIDE 5: Fluent .at() and .with_dimensions() Chaining
176    // =========================================================================
177    println!("🔗 Slide 5: Fluent Chaining API");
178
179    // Build shapes step by step with chaining
180    let shape1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
181        .at(Dimension::percent(10.0), Dimension::percent(25.0))
182        .with_dimensions(Dimension::Inches(2.5), Dimension::Inches(2.5))
183        .with_fill(ShapeFill::new("1565C0"))
184        .with_text(".at() + .with_dimensions()");
185
186    let shape2 = Shape::new(ShapeType::RoundedRectangle, 0, 0, 0, 0)
187        .at(Dimension::Inches(4.0), Dimension::Cm(5.0))
188        .with_dimensions(Dimension::Ratio(0.3), Dimension::Inches(2.0))
189        .with_fill(ShapeFill::new("2E7D32"))
190        .with_line(ShapeLine::new("1B5E20", 25400))
191        .with_text("Chained with fill + line");
192
193    let shape3 = Shape::new(ShapeType::Star5, 0, 0, 0, 0)
194        .at(Dimension::percent(70.0), Dimension::percent(55.0))
195        .with_dimensions(Dimension::Inches(2.0), Dimension::Inches(2.0))
196        .with_fill(ShapeFill::new("FFC107"))
197        .with_rotation(15)
198        .with_text("+ rotation");
199
200    slides.push(
201        SlideContent::new("Fluent .at() and .with_dimensions() Chaining")
202            .layout(SlideLayout::TitleOnly)
203            .title_color("1F497D").title_bold(true)
204            .add_shape(shape1)
205            .add_shape(shape2)
206            .add_shape(shape3)
207    );
208
209    // =========================================================================
210    // SLIDE 6: Prelude Shape Builders
211    // =========================================================================
212    println!("🧰 Slide 6: Prelude Shape Builders");
213
214    // shapes::dim() — generic Dimension-based builder
215    let dim_shape = shapes::dim(ShapeType::Diamond,
216        Dimension::percent(5.0), Dimension::percent(25.0),
217        Dimension::percent(25.0), Dimension::percent(35.0),
218    ).with_fill(ShapeFill::new("7B1FA2")).with_text("shapes::dim()");
219
220    // shapes::rect_ratio() — ratio-based rectangle
221    let ratio_rect = shapes::rect_ratio(0.35, 0.25, 0.28, 0.35)
222        .with_fill(ShapeFill::new("EF6C00")).with_text("shapes::rect_ratio()");
223
224    // shapes::text_box_ratio() — ratio-based text box
225    let ratio_text = shapes::text_box_ratio(0.68, 0.25, 0.28, 0.35, "shapes::text_box_ratio()")
226        .with_fill(ShapeFill::new("00838F"));
227
228    // Traditional shapes::rect() still works (inches)
229    let inch_rect = shapes::rect(1.0, 5.0, 3.0, 1.0)
230        .with_fill(ShapeFill::new("A5A5A5")).with_text("shapes::rect() (inches)");
231
232    slides.push(
233        SlideContent::new("Prelude Shape Builders")
234            .layout(SlideLayout::TitleOnly)
235            .title_color("1F497D").title_bold(true)
236            .add_shape(dim_shape)
237            .add_shape(ratio_rect)
238            .add_shape(ratio_text)
239            .add_shape(inch_rect)
240    );
241
242    // =========================================================================
243    // SLIDE 7: FlexPosition & FlexSize Structs
244    // =========================================================================
245    println!("📦 Slide 7: FlexPosition & FlexSize");
246
247    // Demonstrate FlexPosition and FlexSize for reusable layout definitions
248    let header_pos = FlexPosition::new(Dimension::percent(5.0), Dimension::percent(20.0));
249    let header_size = FlexSize::new(Dimension::percent(90.0), Dimension::percent(12.0));
250    let (hx, hy) = header_pos.to_emu();
251    let (hw, hh) = header_size.to_emu();
252    let header = Shape::new(ShapeType::RoundedRectangle, hx, hy, hw, hh)
253        .with_fill(ShapeFill::new("1F497D"))
254        .with_text("FlexPosition + FlexSize → header");
255
256    let body_pos = FlexPosition::new(Dimension::percent(5.0), Dimension::percent(35.0));
257    let body_size = FlexSize::new(Dimension::percent(60.0), Dimension::percent(50.0));
258    let (bx, by) = body_pos.to_emu();
259    let (bw, bh) = body_size.to_emu();
260    let body = Shape::new(ShapeType::Rectangle, bx, by, bw, bh)
261        .with_fill(ShapeFill::new("E8EAF6"))
262        .with_line(ShapeLine::new("3F51B5", 12700))
263        .with_text("Body area (60% x 50%)");
264
265    let sidebar_pos = FlexPosition::new(Dimension::percent(68.0), Dimension::percent(35.0));
266    let sidebar_size = FlexSize::new(Dimension::percent(27.0), Dimension::percent(50.0));
267    let (sx, sy) = sidebar_pos.to_emu();
268    let (sw, sh) = sidebar_size.to_emu();
269    let sidebar_shape = Shape::new(ShapeType::Rectangle, sx, sy, sw, sh)
270        .with_fill(ShapeFill::new("FFF3E0"))
271        .with_line(ShapeLine::new("EF6C00", 12700))
272        .with_text("Sidebar (27% x 50%)");
273
274    slides.push(
275        SlideContent::new("FlexPosition & FlexSize — Reusable Layouts")
276            .layout(SlideLayout::TitleOnly)
277            .title_color("1F497D").title_bold(true)
278            .add_shape(header)
279            .add_shape(body)
280            .add_shape(sidebar_shape)
281    );
282
283    // =========================================================================
284    // SLIDE 8: Real-World Dashboard with Dimension API
285    // =========================================================================
286    println!("📊 Slide 8: Real-World Dashboard");
287
288    // 4 evenly-spaced KPI cards using percent
289    let kpi_colors = ["1565C0", "2E7D32", "EF6C00", "7B1FA2"];
290    let kpi_labels = [
291        "Revenue\n$2.14M\n+15%",
292        "Users\n12,450\n+22%",
293        "NPS\n72\n+8 pts",
294        "Uptime\n99.9%\n+0.1%",
295    ];
296
297    let mut dashboard = SlideContent::new("KPI Dashboard — Dimension API")
298        .layout(SlideLayout::TitleOnly)
299        .title_color("1F497D").title_bold(true);
300
301    for i in 0..4 {
302        let x_pct = 3.0 + i as f64 * 24.5;
303        let card = Shape::from_dimensions(ShapeType::RoundedRectangle,
304            Dimension::percent(x_pct), Dimension::percent(22.0),
305            Dimension::percent(22.0), Dimension::percent(30.0),
306        ).with_fill(ShapeFill::new(kpi_colors[i])).with_text(kpi_labels[i]);
307        dashboard = dashboard.add_shape(card);
308    }
309
310    // Bottom chart placeholder
311    let chart_area = Shape::from_dimensions(ShapeType::Rectangle,
312        Dimension::percent(3.0), Dimension::percent(58.0),
313        Dimension::percent(94.0), Dimension::percent(35.0),
314    ).with_fill(ShapeFill::new("ECEFF1"))
315     .with_line(ShapeLine::new("B0BEC5", 12700))
316     .with_text("Chart Area (94% x 35%)");
317    dashboard = dashboard.add_shape(chart_area);
318
319    slides.push(dashboard);
320
321    // =========================================================================
322    // SLIDE 9: Unit Equivalence Reference
323    // =========================================================================
324    println!("📖 Slide 9: Unit Equivalence Reference");
325
326    slides.push(
327        SlideContent::new("Dimension Unit Reference")
328            .layout(SlideLayout::TitleAndContent)
329            .title_color("1F497D").title_bold(true)
330            .add_bullet(&format!("1 inch = {} EMU = Dimension::Inches(1.0)", 914400))
331            .add_bullet(&format!("1 cm   = {} EMU = Dimension::Cm(1.0)", 360000))
332            .add_bullet(&format!("1 pt   = {} EMU = Dimension::Pt(1.0)", 12700))
333            .add_bullet(&format!("Slide width  = {} EMU = 10 inches", SLIDE_WIDTH_EMU))
334            .add_bullet(&format!("Slide height = {} EMU = 7.5 inches", SLIDE_HEIGHT_EMU))
335            .add_bullet("Ratio(0.1) on X = 10% of slide width = 1 inch")
336            .add_bullet("Ratio(0.5) on Y = 50% of slide height = 3.75 inches")
337            .add_bullet("percent(50.0) = Ratio(0.5)")
338            .content_size(22)
339    );
340
341    // =========================================================================
342    // Generate PPTX
343    // =========================================================================
344    fs::create_dir_all("examples/output")?;
345    let num_slides = slides.len();
346    let pptx_data = create_pptx_with_content("Dimension API Demo", slides)?;
347    fs::write("examples/output/dimension_demo.pptx", &pptx_data)?;
348
349    println!("\n╔══════════════════════════════════════════════════════════════╗");
350    println!("║                 Dimension API Demo Complete                   ║");
351    println!("╠══════════════════════════════════════════════════════════════╣");
352    println!("║  Output: examples/output/dimension_demo.pptx                 ║");
353    println!("║  Slides: {}                                                   ║", num_slides);
354    println!("║  Size:   {} KB                                               ║", pptx_data.len() / 1024);
355    println!("╠══════════════════════════════════════════════════════════════╣");
356    println!("║  Showcased:                                                  ║");
357    println!("║    ✓ All 6 unit types: EMU, Inches, Cm, Pt, Ratio, Percent   ║");
358    println!("║    ✓ Shape::from_dimensions() constructor                    ║");
359    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
360    println!("║    ✓ Mixed-unit positioning                                  ║");
361    println!("║    ✓ Prelude helpers: dim(), rect_ratio(), text_box_ratio()  ║");
362    println!("║    ✓ FlexPosition & FlexSize structs                         ║");
363    println!("║    ✓ Ratio-based grid layout (auto-adapts)                   ║");
364    println!("║    ✓ Real-world KPI dashboard                                ║");
365    println!("╚══════════════════════════════════════════════════════════════╝");
366
367    Ok(())
368}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 259)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
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

Examples found in repository?
examples/new_features_demo.rs (line 112)
13fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
14    // Create output directory
15    std::fs::create_dir_all("examples/output")?;
16
17    // 1. Bullet Styles Demo
18    println!("Creating bullet styles demo...");
19    
20    // Numbered list slide
21    let numbered_slide = SlideContent::new("Numbered List")
22        .with_bullet_style(BulletStyle::Number)
23        .add_bullet("First step")
24        .add_bullet("Second step")
25        .add_bullet("Third step")
26        .add_bullet("Fourth step");
27    
28    // Lettered list slide
29    let lettered_slide = SlideContent::new("Lettered List")
30        .add_lettered("Option A")
31        .add_lettered("Option B")
32        .add_lettered("Option C");
33    
34    // Roman numerals slide
35    let roman_slide = SlideContent::new("Roman Numerals")
36        .with_bullet_style(BulletStyle::RomanUpper)
37        .add_bullet("Chapter I")
38        .add_bullet("Chapter II")
39        .add_bullet("Chapter III");
40    
41    // Mixed bullets with sub-bullets
42    let mixed_slide = SlideContent::new("Mixed Bullets")
43        .add_bullet("Main point")
44        .add_sub_bullet("Supporting detail 1")
45        .add_sub_bullet("Supporting detail 2")
46        .add_bullet("Another main point")
47        .add_sub_bullet("More details");
48    
49    // Custom bullet slide
50    let custom_slide = SlideContent::new("Custom Bullets")
51        .add_styled_bullet("Star bullet", BulletStyle::Custom('★'))
52        .add_styled_bullet("Arrow bullet", BulletStyle::Custom('→'))
53        .add_styled_bullet("Check bullet", BulletStyle::Custom('✓'))
54        .add_styled_bullet("Diamond bullet", BulletStyle::Custom('◆'));
55    
56    let bullet_demo = pptx!("Bullet Styles Demo")
57        .title_slide("Bullet Styles - Demonstrating various list formats")
58        .content_slide(numbered_slide)
59        .content_slide(lettered_slide)
60        .content_slide(roman_slide)
61        .content_slide(mixed_slide)
62        .content_slide(custom_slide)
63        .build()?;
64    
65    std::fs::write("examples/output/bullet_styles.pptx", bullet_demo)?;
66    println!("  ✓ Created examples/output/bullet_styles.pptx");
67
68    // 2. Text Formatting Demo
69    println!("Creating text formatting demo...");
70    
71    let text_demo = pptx!("Text Formatting Demo")
72        .title_slide("Text Formatting - Strikethrough, highlight, subscript, superscript")
73        .slide("Text Styles", &[
74            "Normal text for comparison",
75            "This demonstrates various formatting options",
76            "Use TextFormat for rich text styling",
77        ])
78        .slide("Font Size Presets", &[
79            &format!("TITLE: {}pt - For main titles", font_sizes::TITLE),
80            &format!("SUBTITLE: {}pt - For subtitles", font_sizes::SUBTITLE),
81            &format!("HEADING: {}pt - For section headers", font_sizes::HEADING),
82            &format!("BODY: {}pt - For regular content", font_sizes::BODY),
83            &format!("SMALL: {}pt - For smaller text", font_sizes::SMALL),
84            &format!("CAPTION: {}pt - For captions", font_sizes::CAPTION),
85        ])
86        .slide("Text Effects", &[
87            "Strikethrough: For deleted text",
88            "Highlight: For emphasized text",
89            "Subscript: H₂O style formatting",
90            "Superscript: x² style formatting",
91        ])
92        .build()?;
93    
94    std::fs::write("examples/output/text_formatting.pptx", text_demo)?;
95    println!("  ✓ Created examples/output/text_formatting.pptx");
96
97    // 3. Image from Base64 Demo
98    println!("Creating image demo...");
99    
100    // 1x1 red PNG pixel in base64
101    let red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
102    
103    // Create image from base64
104    let img = ImageBuilder::from_base64(red_pixel_base64, inches(2.0), inches(2.0), "PNG")
105        .position(inches(4.0), inches(3.0))
106        .build();
107    
108    let image_slide = SlideContent::new("Image from Base64")
109        .add_bullet("Images can be loaded from base64 encoded data")
110        .add_bullet("Useful for embedding images without file access")
111        .add_bullet("Supports PNG, JPEG, GIF formats")
112        .add_image(img);
113    
114    let image_demo = pptx!("Image Features Demo")
115        .title_slide("Image Features - Loading images from various sources")
116        .content_slide(image_slide)
117        .slide("Image Sources", &[
118            "Image::new(filename) - From file path",
119            "Image::from_base64(data) - From base64 string",
120            "Image::from_bytes(data) - From raw bytes",
121            "ImageBuilder for fluent API",
122        ])
123        .build()?;
124    
125    std::fs::write("examples/output/image_features.pptx", image_demo)?;
126    println!("  ✓ Created examples/output/image_features.pptx");
127
128    // 4. Theme Colors Demo
129    println!("Creating themes demo...");
130    
131    let all_themes = themes::all();
132    let theme_info: Vec<String> = all_themes.iter().map(|t| {
133        format!("{}: Primary={}, Accent={}", t.name, t.primary, t.accent)
134    }).collect();
135    
136    let themes_demo = pptx!("Theme Colors Demo")
137        .title_slide("Theme Colors - Predefined color palettes")
138        .slide("Available Themes", &theme_info.iter().map(|s| s.as_str()).collect::<Vec<_>>())
139        .slide("Color Constants", &[
140            &format!("Material Red: {}", colors::MATERIAL_RED),
141            &format!("Material Blue: {}", colors::MATERIAL_BLUE),
142            &format!("Material Green: {}", colors::MATERIAL_GREEN),
143            &format!("Carbon Blue 60: {}", colors::CARBON_BLUE_60),
144            &format!("Carbon Gray 100: {}", colors::CARBON_GRAY_100),
145        ])
146        .build()?;
147    
148    std::fs::write("examples/output/themes_demo.pptx", themes_demo)?;
149    println!("  ✓ Created examples/output/themes_demo.pptx");
150
151    // 5. Complete Feature Showcase
152    println!("Creating complete feature showcase...");
153    
154    let showcase = pptx!("ppt-rs v0.2.1 Features")
155        .title_slide("New Features in ppt-rs v0.2.1")
156        .slide("Bullet Formatting", &[
157            "BulletStyle::Number - 1, 2, 3...",
158            "BulletStyle::LetterLower/Upper - a, b, c / A, B, C",
159            "BulletStyle::RomanLower/Upper - i, ii, iii / I, II, III",
160            "BulletStyle::Custom(char) - Any custom character",
161            "Sub-bullets with indentation",
162        ])
163        .slide("Text Enhancements", &[
164            "TextFormat::strikethrough() - Strike through text",
165            "TextFormat::highlight(color) - Background highlight",
166            "TextFormat::subscript() - H₂O style",
167            "TextFormat::superscript() - x² style",
168            "font_sizes module with presets",
169        ])
170        .slide("Image Loading", &[
171            "Image::from_base64() - Base64 encoded images",
172            "Image::from_bytes() - Raw byte arrays",
173            "ImageSource enum for flexible handling",
174            "Built-in base64 decoder",
175        ])
176        .slide("Templates", &[
177            "templates::business_proposal()",
178            "templates::status_report()",
179            "templates::training_material()",
180            "templates::technical_doc()",
181            "templates::simple()",
182        ])
183        .slide("Themes & Colors", &[
184            "themes::CORPORATE, MODERN, VIBRANT, DARK",
185            "themes::NATURE, TECH, CARBON",
186            "colors module with Material Design colors",
187            "colors module with IBM Carbon colors",
188        ])
189        .build()?;
190    
191    std::fs::write("examples/output/feature_showcase.pptx", showcase)?;
192    println!("  ✓ Created examples/output/feature_showcase.pptx");
193
194    println!("\n✅ All demos created successfully!");
195    println!("   Check examples/output/ for the generated files.");
196    
197    Ok(())
198}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 432)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
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

Examples found in repository?
examples/test_notes.rs (line 14)
6fn main() -> Result<(), Box<dyn std::error::Error>> {
7    println!("Creating test presentation with speaker notes...");
8    
9    let slides = vec![
10        SlideContent::new("Slide 1 - With Notes")
11            .layout(SlideLayout::CenteredTitle)
12            .title_size(54)
13            .title_bold(true)
14            .notes("This is a speaker note for slide 1. It should appear in presenter view."),
15        
16        SlideContent::new("Slide 2 - Also With Notes")
17            .add_bullet("Bullet point 1")
18            .add_bullet("Bullet point 2")
19            .add_bullet("Bullet point 3")
20            .notes("Notes for slide 2 with bullet points."),
21        
22        SlideContent::new("Slide 3 - No Notes")
23            .add_bullet("This slide has no notes"),
24        
25        SlideContent::new("Slide 4 - More Notes")
26            .layout(SlideLayout::TwoColumn)
27            .add_bullet("Left 1")
28            .add_bullet("Left 2")
29            .add_bullet("Right 1")
30            .add_bullet("Right 2")
31            .notes("Two column layout with speaker notes."),
32    ];
33    
34    let pptx_data = create_pptx_with_content("Test Notes", slides)?;
35    fs::write("test_notes.pptx", &pptx_data)?;
36    println!("Created test_notes.pptx ({} bytes)", pptx_data.len());
37    println!("\nOpen in PowerPoint and check presenter view for notes!");
38    
39    Ok(())
40}
More examples
Hide additional examples
examples/comprehensive_demo.rs (line 855)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
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

Examples found in repository?
examples/comprehensive_demo.rs (line 411)
69fn main() -> Result<(), Box<dyn std::error::Error>> {
70    println!("╔══════════════════════════════════════════════════════════════╗");
71    println!("║       PPTX-RS Element Showcase - Complete Coverage           ║");
72    println!("╚══════════════════════════════════════════════════════════════╝\n");
73
74    let mut slides = Vec::new();
75
76    // =========================================================================
77    // SLIDE 1: CenteredTitle Layout + Title Formatting
78    // =========================================================================
79    println!("📐 Slide 1: CenteredTitle Layout + Title Formatting");
80    slides.push(
81        SlideContent::new("PPTX-RS Element Showcase")
82            .layout(SlideLayout::CenteredTitle)
83            .title_size(54)
84            .title_bold(true)
85            .title_color("1F497D")
86    );
87
88    // =========================================================================
89    // SLIDE 2: TitleOnly Layout
90    // =========================================================================
91    println!("📐 Slide 2: TitleOnly Layout");
92    slides.push(
93        SlideContent::new("Section: Slide Layouts")
94            .layout(SlideLayout::TitleOnly)
95            .title_size(48)
96            .title_bold(true)
97            .title_color("C0504D")
98    );
99
100    // =========================================================================
101    // SLIDE 3: TitleAndContent Layout + All Text Formatting
102    // =========================================================================
103    println!("📝 Slide 3: TitleAndContent + Text Formatting");
104    slides.push(
105        SlideContent::new("Text Formatting Options")
106            .layout(SlideLayout::TitleAndContent)
107            .title_color("1F497D")
108            .title_bold(true)
109            .title_italic(true)
110            .title_underline(true)
111            .title_size(44)
112            .add_bullet("Normal text (default)")
113            .add_bullet("Bold content text")
114            .add_bullet("Italic content text")
115            .add_bullet("Underlined content")
116            .add_bullet("Custom font size (28pt)")
117            .add_bullet("Custom color (#4F81BD)")
118            .content_bold(true)
119            .content_italic(true)
120            .content_underline(true)
121            .content_size(28)
122            .content_color("4F81BD")
123    );
124
125    // =========================================================================
126    // SLIDE 4: TitleAndBigContent Layout
127    // =========================================================================
128    println!("📐 Slide 4: TitleAndBigContent Layout");
129    slides.push(
130        SlideContent::new("Key Highlights")
131            .layout(SlideLayout::TitleAndBigContent)
132            .title_color("1F497D")
133            .add_bullet("Large content area for emphasis")
134            .add_bullet("Perfect for key messages")
135            .add_bullet("Smaller title, bigger content")
136            .content_bold(true)
137            .content_size(32)
138    );
139
140    // =========================================================================
141    // SLIDE 5: TwoColumn Layout
142    // =========================================================================
143    println!("📐 Slide 5: TwoColumn Layout");
144    slides.push(
145        SlideContent::new("Two Column Comparison")
146            .layout(SlideLayout::TwoColumn)
147            .title_color("1F497D")
148            .add_bullet("Left Column Item 1")
149            .add_bullet("Left Column Item 2")
150            .add_bullet("Left Column Item 3")
151            .add_bullet("Right Column Item 1")
152            .add_bullet("Right Column Item 2")
153            .add_bullet("Right Column Item 3")
154            .content_size(24)
155    );
156
157    // =========================================================================
158    // SLIDE 6: Blank Layout
159    // =========================================================================
160    println!("📐 Slide 6: Blank Layout");
161    slides.push(
162        SlideContent::new("")
163            .layout(SlideLayout::Blank)
164    );
165
166    // =========================================================================
167    // SLIDE 7: Table with All Cell Styling Options
168    // =========================================================================
169    println!("📊 Slide 7: Table with Cell Styling");
170    let styled_table = TableBuilder::new(vec![1500000, 1500000, 1500000])
171        .add_row(TableRow::new(vec![
172            TableCell::new("Header 1").bold().background_color("1F497D"),
173            TableCell::new("Header 2").bold().background_color("4F81BD"),
174            TableCell::new("Header 3").bold().background_color("8064A2"),
175        ]))
176        .add_row(TableRow::new(vec![
177            TableCell::new("Bold Cell").bold(),
178            TableCell::new("Normal Cell"),
179            TableCell::new("Colored").background_color("9BBB59"),
180        ]))
181        .add_row(TableRow::new(vec![
182            TableCell::new("Red BG").background_color("C0504D"),
183            TableCell::new("Green BG").background_color("9BBB59"),
184            TableCell::new("Blue BG").background_color("4F81BD"),
185        ]))
186        .add_row(TableRow::new(vec![
187            TableCell::new("Row 3 Col 1"),
188            TableCell::new("Row 3 Col 2"),
189            TableCell::new("Row 3 Col 3").bold().background_color("F79646"),
190        ]))
191        .position(500000, 1800000)
192        .build();
193    
194    slides.push(
195        SlideContent::new("Table with Cell Styling")
196            .table(styled_table)
197            .title_color("1F497D")
198    );
199
200    // =========================================================================
201    // SLIDE 8: Charts (Bar, Line, Pie)
202    // =========================================================================
203    println!("📈 Slide 8: Chart Types");
204    
205    // Create chart data structures (for demonstration)
206    let _bar_chart = ChartBuilder::new("Sales by Region", ChartType::Bar)
207        .categories(vec!["North", "South", "East", "West"])
208        .add_series(ChartSeries::new("2023", vec![100.0, 80.0, 120.0, 90.0]))
209        .add_series(ChartSeries::new("2024", vec![120.0, 95.0, 140.0, 110.0]))
210        .build();
211    
212    let _line_chart = ChartBuilder::new("Monthly Trend", ChartType::Line)
213        .categories(vec!["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
214        .add_series(ChartSeries::new("Revenue", vec![10.0, 12.0, 15.0, 14.0, 18.0, 22.0]))
215        .build();
216    
217    let _pie_chart = ChartBuilder::new("Market Share", ChartType::Pie)
218        .categories(vec!["Product A", "Product B", "Product C", "Others"])
219        .add_series(ChartSeries::new("Share", vec![40.0, 30.0, 20.0, 10.0]))
220        .build();
221    
222    slides.push(
223        SlideContent::new("Chart Types: Bar, Line, Pie")
224            .with_chart()
225            .title_color("1F497D")
226            .add_bullet("Bar Chart: Compare categories")
227            .add_bullet("Line Chart: Show trends over time")
228            .add_bullet("Pie Chart: Show proportions")
229            .content_size(24)
230    );
231
232    // =========================================================================
233    // SLIDE 9: Shapes with Different Fills
234    // =========================================================================
235    println!("🔷 Slide 9: Shapes with Fills");
236    
237    let rect = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2000000, 1000000)
238        .with_fill(ShapeFill::new("4F81BD"))
239        .with_text("Rectangle");
240    
241    let ellipse = Shape::new(ShapeType::Ellipse, 3000000, 1600000, 2000000, 1000000)
242        .with_fill(ShapeFill::new("9BBB59"))
243        .with_text("Ellipse");
244    
245    let rounded = Shape::new(ShapeType::RoundedRectangle, 5500000, 1600000, 2000000, 1000000)
246        .with_fill(ShapeFill::new("C0504D"))
247        .with_text("Rounded");
248    
249    let triangle = Shape::new(ShapeType::Triangle, 1500000, 3000000, 1500000, 1200000)
250        .with_fill(ShapeFill::new("8064A2"))
251        .with_text("Triangle");
252    
253    let diamond = Shape::new(ShapeType::Diamond, 4000000, 3000000, 1500000, 1200000)
254        .with_fill(ShapeFill::new("F79646"))
255        .with_text("Diamond");
256    
257    slides.push(
258        SlideContent::new("Shape Types with Color Fills")
259            .add_shape(rect)
260            .add_shape(ellipse)
261            .add_shape(rounded)
262            .add_shape(triangle)
263            .add_shape(diamond)
264            .title_color("1F497D")
265    );
266
267    // =========================================================================
268    // SLIDE 10: Gradient Fills (NEW)
269    // =========================================================================
270    println!("🌈 Slide 10: Gradient Fills");
271    
272    // Horizontal gradient
273    let gradient_h = Shape::new(ShapeType::Rectangle, 500000, 1600000, 2500000, 1200000)
274        .with_gradient(GradientFill::linear("1565C0", "42A5F5", GradientDirection::Horizontal))
275        .with_text("Horizontal");
276    
277    // Vertical gradient
278    let gradient_v = Shape::new(ShapeType::Rectangle, 3200000, 1600000, 2500000, 1200000)
279        .with_gradient(GradientFill::linear("2E7D32", "81C784", GradientDirection::Vertical))
280        .with_text("Vertical");
281    
282    // Diagonal gradient
283    let gradient_d = Shape::new(ShapeType::RoundedRectangle, 5900000, 1600000, 2500000, 1200000)
284        .with_gradient(GradientFill::linear("C62828", "EF9A9A", GradientDirection::DiagonalDown))
285        .with_text("Diagonal");
286    
287    // Three-color gradient
288    let gradient_3 = Shape::new(ShapeType::Ellipse, 1800000, 3200000, 2500000, 1200000)
289        .with_gradient(GradientFill::three_color("FF6F00", "FFC107", "FFEB3B", GradientDirection::Horizontal))
290        .with_text("3-Color");
291    
292    // Custom angle gradient
293    let gradient_angle = Shape::new(ShapeType::RoundedRectangle, 4800000, 3200000, 2500000, 1200000)
294        .with_gradient(GradientFill::linear("7B1FA2", "E1BEE7", GradientDirection::Angle(135)))
295        .with_text("135° Angle");
296    
297    slides.push(
298        SlideContent::new("Gradient Fills - Multiple Directions")
299            .add_shape(gradient_h)
300            .add_shape(gradient_v)
301            .add_shape(gradient_d)
302            .add_shape(gradient_3)
303            .add_shape(gradient_angle)
304            .title_color("1F497D")
305    );
306
307    // =========================================================================
308    // SLIDE 11: Transparency (NEW)
309    // =========================================================================
310    println!("👻 Slide 11: Transparency Effects");
311    
312    // Base shape (fully opaque)
313    let base = Shape::new(ShapeType::Rectangle, 1000000, 1800000, 3000000, 2000000)
314        .with_fill(ShapeFill::new("1565C0"))
315        .with_text("Base (100%)");
316    
317    // 25% transparent overlay
318    let trans_25 = Shape::new(ShapeType::Rectangle, 2000000, 2200000, 2500000, 1500000)
319        .with_fill(ShapeFill::new("F44336").with_transparency(25))
320        .with_line(ShapeLine::new("B71C1C", 25400))
321        .with_text("25% Transparent");
322    
323    // 50% transparent overlay
324    let trans_50 = Shape::new(ShapeType::Ellipse, 4500000, 1800000, 2500000, 2000000)
325        .with_fill(ShapeFill::new("4CAF50").with_transparency(50))
326        .with_line(ShapeLine::new("1B5E20", 25400))
327        .with_text("50% Transparent");
328    
329    // 75% transparent overlay
330    let trans_75 = Shape::new(ShapeType::RoundedRectangle, 5500000, 2500000, 2500000, 1500000)
331        .with_fill(ShapeFill::new("FF9800").with_transparency(75))
332        .with_line(ShapeLine::new("E65100", 25400))
333        .with_text("75% Transparent");
334    
335    slides.push(
336        SlideContent::new("Transparency Effects - Overlapping Shapes")
337            .add_shape(base)
338            .add_shape(trans_25)
339            .add_shape(trans_50)
340            .add_shape(trans_75)
341            .title_color("1F497D")
342    );
343
344    // =========================================================================
345    // SLIDE 12: Styled Connectors (NEW)
346    // =========================================================================
347    println!("🔗 Slide 12: Styled Connectors");
348    
349    // Create shapes to connect
350    let box1 = Shape::new(ShapeType::RoundedRectangle, 500000, 1800000, 1800000, 800000)
351        .with_id(100)
352        .with_fill(ShapeFill::new("1565C0"))
353        .with_text("Start");
354    
355    let box2 = Shape::new(ShapeType::RoundedRectangle, 3500000, 1800000, 1800000, 800000)
356        .with_id(101)
357        .with_fill(ShapeFill::new("2E7D32"))
358        .with_text("Process");
359    
360    let box3 = Shape::new(ShapeType::RoundedRectangle, 6500000, 1800000, 1800000, 800000)
361        .with_id(102)
362        .with_fill(ShapeFill::new("C62828"))
363        .with_text("End");
364    
365    // Straight connector with arrow
366    let conn1 = Connector::straight(2300000, 2200000, 3500000, 2200000)
367        .with_line(ConnectorLine::new("1565C0", 25400))
368        .with_end_arrow(ArrowType::Triangle)
369        .with_arrow_size(ArrowSize::Large);
370    
371    // Elbow connector with stealth arrow
372    let conn2 = Connector::elbow(5300000, 2200000, 6500000, 2200000)
373        .with_line(ConnectorLine::new("2E7D32", 38100).with_dash(LineDash::Dash))
374        .with_end_arrow(ArrowType::Stealth)
375        .with_arrow_size(ArrowSize::Medium);
376    
377    // Curved connector examples
378    let box4 = Shape::new(ShapeType::Ellipse, 1000000, 3200000, 1500000, 800000)
379        .with_id(103)
380        .with_fill(ShapeFill::new("7B1FA2"))
381        .with_text("A");
382    
383    let box5 = Shape::new(ShapeType::Ellipse, 4000000, 3200000, 1500000, 800000)
384        .with_id(104)
385        .with_fill(ShapeFill::new("00838F"))
386        .with_text("B");
387    
388    let box6 = Shape::new(ShapeType::Ellipse, 7000000, 3200000, 1500000, 800000)
389        .with_id(105)
390        .with_fill(ShapeFill::new("EF6C00"))
391        .with_text("C");
392    
393    // Curved connector with diamond arrow
394    let conn3 = Connector::curved(2500000, 3600000, 4000000, 3600000)
395        .with_line(ConnectorLine::new("7B1FA2", 19050).with_dash(LineDash::DashDot))
396        .with_arrows(ArrowType::Oval, ArrowType::Diamond);
397    
398    // Dotted connector
399    let conn4 = Connector::straight(5500000, 3600000, 7000000, 3600000)
400        .with_line(ConnectorLine::new("00838F", 12700).with_dash(LineDash::Dot))
401        .with_end_arrow(ArrowType::Open);
402    
403    slides.push(
404        SlideContent::new("Styled Connectors - Types, Arrows, Dashes")
405            .add_shape(box1)
406            .add_shape(box2)
407            .add_shape(box3)
408            .add_shape(box4)
409            .add_shape(box5)
410            .add_shape(box6)
411            .add_connector(conn1)
412            .add_connector(conn2)
413            .add_connector(conn3)
414            .add_connector(conn4)
415            .title_color("1F497D")
416    );
417
418    // =========================================================================
419    // SLIDE 13: Images
420    // =========================================================================
421    println!("🖼️  Slide 13: Image Placeholders");
422    
423    let img1 = Image::new("logo.png", 2500000, 1800000, "png")
424        .position(500000, 1600000);
425    let img2 = Image::new("photo.jpg", 2500000, 1800000, "jpg")
426        .position(3500000, 1600000);
427    let img3 = Image::new("diagram.png", 2000000, 1800000, "png")
428        .position(6500000, 1600000);
429    
430    slides.push(
431        SlideContent::new("Image Placeholders")
432            .add_image(img1)
433            .add_image(img2)
434            .add_image(img3)
435            .title_color("1F497D")
436    );
437
438    // =========================================================================
439    // SLIDE 11: Advanced Table with Borders & Alignment (NEW)
440    // =========================================================================
441    println!("📊 Slide 11: Advanced Table (borders, alignment, merged cells)");
442    
443    // Build advanced table using generator's TableBuilder with alignment
444    let advanced_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
445        .add_row(TableRow::new(vec![
446            TableCell::new("Q1 2024 Financial Report").bold().background_color("1F4E79").text_color("FFFFFF").align_center().font_size(14),
447            TableCell::new("").background_color("1F4E79"),
448            TableCell::new("").background_color("1F4E79"),
449            TableCell::new("").background_color("1F4E79"),
450        ]))
451        .add_row(TableRow::new(vec![
452            TableCell::new("Category").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
453            TableCell::new("Revenue").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
454            TableCell::new("Expenses").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
455            TableCell::new("Profit").bold().background_color("2E75B6").text_color("FFFFFF").align_center(),
456        ]))
457        .add_row(TableRow::new(vec![
458            TableCell::new("Product Sales").text_color("000000").align_left(),
459            TableCell::new("$1,250,000").text_color("2E7D32").align_right(),
460            TableCell::new("$450,000").text_color("C62828").align_right(),
461            TableCell::new("$800,000").bold().text_color("2E7D32").align_right(),
462        ]))
463        .add_row(TableRow::new(vec![
464            TableCell::new("Services").text_color("000000").align_left(),
465            TableCell::new("$890,000").text_color("2E7D32").align_right(),
466            TableCell::new("$320,000").text_color("C62828").align_right(),
467            TableCell::new("$570,000").bold().text_color("2E7D32").align_right(),
468        ]))
469        .add_row(TableRow::new(vec![
470            TableCell::new("Total").bold().background_color("E7E6E6").text_color("000000").align_left(),
471            TableCell::new("$2,140,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
472            TableCell::new("$770,000").bold().background_color("E7E6E6").text_color("000000").align_right(),
473            TableCell::new("$1,370,000").bold().background_color("C6EFCE").text_color("006100").align_right(),
474        ]))
475        .position(300000, 1600000)
476        .build();
477    
478    slides.push(
479        SlideContent::new("Financial Report - Advanced Table")
480            .table(advanced_table)
481            .title_color("1F4E79")
482            .title_bold(true)
483    );
484
485    // =========================================================================
486    // SLIDE 12: Comparison Matrix Table (NEW)
487    // =========================================================================
488    println!("📊 Slide 12: Comparison Matrix Table");
489    
490    let comparison_table = TableBuilder::new(vec![2000000, 1500000, 1500000, 1500000])
491        .add_row(TableRow::new(vec![
492            TableCell::new("Feature").bold().background_color("4472C4").text_color("FFFFFF"),
493            TableCell::new("Basic").bold().background_color("4472C4").text_color("FFFFFF"),
494            TableCell::new("Pro").bold().background_color("4472C4").text_color("FFFFFF"),
495            TableCell::new("Enterprise").bold().background_color("4472C4").text_color("FFFFFF"),
496        ]))
497        .add_row(TableRow::new(vec![
498            TableCell::new("Storage").text_color("000000"),
499            TableCell::new("5 GB").text_color("000000"),
500            TableCell::new("50 GB").text_color("000000"),
501            TableCell::new("Unlimited").bold().text_color("2E7D32"),
502        ]))
503        .add_row(TableRow::new(vec![
504            TableCell::new("Users").text_color("000000"),
505            TableCell::new("1").text_color("000000"),
506            TableCell::new("10").text_color("000000"),
507            TableCell::new("Unlimited").bold().text_color("2E7D32"),
508        ]))
509        .add_row(TableRow::new(vec![
510            TableCell::new("Support").text_color("000000"),
511            TableCell::new("Email").text_color("000000"),
512            TableCell::new("24/7 Chat").text_color("000000"),
513            TableCell::new("Dedicated").bold().text_color("2E7D32"),
514        ]))
515        .add_row(TableRow::new(vec![
516            TableCell::new("API Access").text_color("000000"),
517            TableCell::new("No").text_color("C62828"),
518            TableCell::new("Yes").text_color("2E7D32"),
519            TableCell::new("Yes + Priority").bold().text_color("2E7D32"),
520        ]))
521        .add_row(TableRow::new(vec![
522            TableCell::new("Price/month").bold().background_color("F2F2F2").text_color("000000"),
523            TableCell::new("$9").bold().background_color("F2F2F2").text_color("000000"),
524            TableCell::new("$29").bold().background_color("F2F2F2").text_color("000000"),
525            TableCell::new("$99").bold().background_color("F2F2F2").text_color("000000"),
526        ]))
527        .position(500000, 1600000)
528        .build();
529    
530    slides.push(
531        SlideContent::new("Pricing Comparison Matrix")
532            .table(comparison_table)
533            .title_color("4472C4")
534            .title_bold(true)
535    );
536
537    // =========================================================================
538    // SLIDE 13: Process Flow with Shapes (NEW - SmartArt-like)
539    // =========================================================================
540    println!("🔷 Slide 13: Process Flow (SmartArt-style)");
541    
542    // Create process flow using shapes
543    let step1 = Shape::new(ShapeType::RoundedRectangle, 300000, 2000000, 1400000, 800000)
544        .with_fill(ShapeFill::new("4472C4"))
545        .with_text("1. Research");
546    let arrow1 = Shape::new(ShapeType::RightArrow, 1800000, 2200000, 400000, 400000)
547        .with_fill(ShapeFill::new("A5A5A5"));
548    let step2 = Shape::new(ShapeType::RoundedRectangle, 2300000, 2000000, 1400000, 800000)
549        .with_fill(ShapeFill::new("ED7D31"))
550        .with_text("2. Design");
551    let arrow2 = Shape::new(ShapeType::RightArrow, 3800000, 2200000, 400000, 400000)
552        .with_fill(ShapeFill::new("A5A5A5"));
553    let step3 = Shape::new(ShapeType::RoundedRectangle, 4300000, 2000000, 1400000, 800000)
554        .with_fill(ShapeFill::new("70AD47"))
555        .with_text("3. Develop");
556    let arrow3 = Shape::new(ShapeType::RightArrow, 5800000, 2200000, 400000, 400000)
557        .with_fill(ShapeFill::new("A5A5A5"));
558    let step4 = Shape::new(ShapeType::RoundedRectangle, 6300000, 2000000, 1400000, 800000)
559        .with_fill(ShapeFill::new("5B9BD5"))
560        .with_text("4. Deploy");
561    
562    slides.push(
563        SlideContent::new("Development Process Flow")
564            .add_shape(step1)
565            .add_shape(arrow1)
566            .add_shape(step2)
567            .add_shape(arrow2)
568            .add_shape(step3)
569            .add_shape(arrow3)
570            .add_shape(step4)
571            .title_color("1F497D")
572            .title_bold(true)
573    );
574
575    // =========================================================================
576    // SLIDE 14: Organization Chart with Shapes (NEW)
577    // =========================================================================
578    println!("🔷 Slide 14: Organization Chart");
579    
580    // CEO at top
581    let ceo = Shape::new(ShapeType::RoundedRectangle, 3500000, 1400000, 2000000, 600000)
582        .with_fill(ShapeFill::new("1F4E79"))
583        .with_text("CEO");
584    
585    // Vertical line from CEO
586    let line1 = Shape::new(ShapeType::Rectangle, 4450000, 2000000, 100000, 400000)
587        .with_fill(ShapeFill::new("A5A5A5"));
588    
589    // Horizontal connector
590    let hline = Shape::new(ShapeType::Rectangle, 1950000, 2400000, 5100000, 50000)
591        .with_fill(ShapeFill::new("A5A5A5"));
592    
593    // CTO, CFO, COO
594    let cto = Shape::new(ShapeType::RoundedRectangle, 1000000, 2600000, 1800000, 500000)
595        .with_fill(ShapeFill::new("2E75B6"))
596        .with_text("CTO");
597    let cfo = Shape::new(ShapeType::RoundedRectangle, 3600000, 2600000, 1800000, 500000)
598        .with_fill(ShapeFill::new("2E75B6"))
599        .with_text("CFO");
600    let coo = Shape::new(ShapeType::RoundedRectangle, 6200000, 2600000, 1800000, 500000)
601        .with_fill(ShapeFill::new("2E75B6"))
602        .with_text("COO");
603    
604    // Vertical lines to departments
605    let vline1 = Shape::new(ShapeType::Rectangle, 1850000, 2450000, 50000, 150000)
606        .with_fill(ShapeFill::new("A5A5A5"));
607    let vline2 = Shape::new(ShapeType::Rectangle, 4450000, 2450000, 50000, 150000)
608        .with_fill(ShapeFill::new("A5A5A5"));
609    let vline3 = Shape::new(ShapeType::Rectangle, 7050000, 2450000, 50000, 150000)
610        .with_fill(ShapeFill::new("A5A5A5"));
611    
612    // Teams under CTO
613    let eng = Shape::new(ShapeType::Rectangle, 500000, 3300000, 1200000, 400000)
614        .with_fill(ShapeFill::new("BDD7EE"))
615        .with_text("Engineering");
616    let product = Shape::new(ShapeType::Rectangle, 1800000, 3300000, 1200000, 400000)
617        .with_fill(ShapeFill::new("BDD7EE"))
618        .with_text("Product");
619    
620    slides.push(
621        SlideContent::new("Organization Structure")
622            .add_shape(ceo)
623            .add_shape(line1)
624            .add_shape(hline)
625            .add_shape(cto)
626            .add_shape(cfo)
627            .add_shape(coo)
628            .add_shape(vline1)
629            .add_shape(vline2)
630            .add_shape(vline3)
631            .add_shape(eng)
632            .add_shape(product)
633            .title_color("1F4E79")
634            .title_bold(true)
635    );
636
637    // =========================================================================
638    // SLIDE 15: PDCA Cycle Diagram (NEW)
639    // =========================================================================
640    println!("🔷 Slide 15: PDCA Cycle Diagram");
641    
642    // Four quadrants for PDCA
643    let plan = Shape::new(ShapeType::RoundedRectangle, 1500000, 1600000, 2500000, 1500000)
644        .with_fill(ShapeFill::new("4472C4"))
645        .with_text("PLAN\n\nDefine goals\nand strategy");
646    let do_box = Shape::new(ShapeType::RoundedRectangle, 4500000, 1600000, 2500000, 1500000)
647        .with_fill(ShapeFill::new("ED7D31"))
648        .with_text("DO\n\nImplement\nthe plan");
649    let check = Shape::new(ShapeType::RoundedRectangle, 4500000, 3300000, 2500000, 1500000)
650        .with_fill(ShapeFill::new("70AD47"))
651        .with_text("CHECK\n\nMeasure\nresults");
652    let act = Shape::new(ShapeType::RoundedRectangle, 1500000, 3300000, 2500000, 1500000)
653        .with_fill(ShapeFill::new("FFC000"))
654        .with_text("ACT\n\nAdjust and\nimprove");
655    
656    // Arrows between quadrants
657    let arr1 = Shape::new(ShapeType::RightArrow, 4100000, 2100000, 300000, 300000)
658        .with_fill(ShapeFill::new("A5A5A5"));
659    let arr2 = Shape::new(ShapeType::DownArrow, 5600000, 3200000, 300000, 200000)
660        .with_fill(ShapeFill::new("A5A5A5"));
661    let arr3 = Shape::new(ShapeType::LeftArrow, 4100000, 3800000, 300000, 300000)
662        .with_fill(ShapeFill::new("A5A5A5"));
663    let arr4 = Shape::new(ShapeType::UpArrow, 2600000, 3200000, 300000, 200000)
664        .with_fill(ShapeFill::new("A5A5A5"));
665    
666    slides.push(
667        SlideContent::new("PDCA Continuous Improvement Cycle")
668            .add_shape(plan)
669            .add_shape(do_box)
670            .add_shape(check)
671            .add_shape(act)
672            .add_shape(arr1)
673            .add_shape(arr2)
674            .add_shape(arr3)
675            .add_shape(arr4)
676            .title_color("1F497D")
677            .title_bold(true)
678    );
679
680    // =========================================================================
681    // SLIDE 16: Pyramid Diagram (Maslow's Hierarchy) (NEW)
682    // =========================================================================
683    println!("🔷 Slide 16: Pyramid Diagram");
684    
685    // Build pyramid from bottom to top
686    let level5 = Shape::new(ShapeType::Trapezoid, 500000, 4000000, 8000000, 600000)
687        .with_fill(ShapeFill::new("C00000"))
688        .with_text("Physiological Needs - Food, Water, Shelter");
689    let level4 = Shape::new(ShapeType::Trapezoid, 1000000, 3400000, 7000000, 600000)
690        .with_fill(ShapeFill::new("ED7D31"))
691        .with_text("Safety Needs - Security, Stability");
692    let level3 = Shape::new(ShapeType::Trapezoid, 1500000, 2800000, 6000000, 600000)
693        .with_fill(ShapeFill::new("FFC000"))
694        .with_text("Love & Belonging - Relationships");
695    let level2 = Shape::new(ShapeType::Trapezoid, 2000000, 2200000, 5000000, 600000)
696        .with_fill(ShapeFill::new("70AD47"))
697        .with_text("Esteem - Achievement, Respect");
698    let level1 = Shape::new(ShapeType::Triangle, 2500000, 1500000, 4000000, 700000)
699        .with_fill(ShapeFill::new("4472C4"))
700        .with_text("Self-Actualization");
701    
702    slides.push(
703        SlideContent::new("Maslow's Hierarchy of Needs")
704            .add_shape(level5)
705            .add_shape(level4)
706            .add_shape(level3)
707            .add_shape(level2)
708            .add_shape(level1)
709            .title_color("1F497D")
710            .title_bold(true)
711    );
712
713    // =========================================================================
714    // SLIDE 17: Venn Diagram (NEW)
715    // =========================================================================
716    println!("🔷 Slide 17: Venn Diagram");
717    
718    // Three overlapping circles
719    let circle1 = Shape::new(ShapeType::Ellipse, 1500000, 1800000, 3000000, 3000000)
720        .with_fill(ShapeFill::new("4472C4"))
721        .with_text("Skills");
722    let circle2 = Shape::new(ShapeType::Ellipse, 3500000, 1800000, 3000000, 3000000)
723        .with_fill(ShapeFill::new("ED7D31"))
724        .with_text("Passion");
725    let circle3 = Shape::new(ShapeType::Ellipse, 2500000, 3200000, 3000000, 3000000)
726        .with_fill(ShapeFill::new("70AD47"))
727        .with_text("Market Need");
728    
729    // Center label
730    let center = Shape::new(ShapeType::Ellipse, 3200000, 2800000, 1600000, 800000)
731        .with_fill(ShapeFill::new("FFFFFF"))
732        .with_text("IKIGAI");
733    
734    slides.push(
735        SlideContent::new("Finding Your Ikigai - Venn Diagram")
736            .add_shape(circle1)
737            .add_shape(circle2)
738            .add_shape(circle3)
739            .add_shape(center)
740            .title_color("1F497D")
741            .title_bold(true)
742    );
743
744    // =========================================================================
745    // SLIDE 18: Timeline/Roadmap (NEW)
746    // =========================================================================
747    println!("📊 Slide 18: Project Timeline");
748    
749    let timeline_table = TableBuilder::new(vec![1500000, 1500000, 1500000, 1500000, 1500000])
750        .add_row(TableRow::new(vec![
751            TableCell::new("Q1 2024").bold().background_color("4472C4").text_color("FFFFFF"),
752            TableCell::new("Q2 2024").bold().background_color("4472C4").text_color("FFFFFF"),
753            TableCell::new("Q3 2024").bold().background_color("4472C4").text_color("FFFFFF"),
754            TableCell::new("Q4 2024").bold().background_color("4472C4").text_color("FFFFFF"),
755            TableCell::new("Q1 2025").bold().background_color("4472C4").text_color("FFFFFF"),
756        ]))
757        .add_row(TableRow::new(vec![
758            TableCell::new("Research\n& Planning").background_color("BDD7EE").text_color("1F497D"),
759            TableCell::new("Design\nPhase").background_color("BDD7EE").text_color("1F497D"),
760            TableCell::new("Development\nSprint 1-3").background_color("C6EFCE").text_color("006100"),
761            TableCell::new("Testing\n& QA").background_color("FCE4D6").text_color("C65911"),
762            TableCell::new("Launch\n& Support").background_color("E2EFDA").text_color("375623"),
763        ]))
764        .add_row(TableRow::new(vec![
765            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
766            TableCell::new("✓ Complete").bold().text_color("2E7D32"),
767            TableCell::new("In Progress").text_color("ED7D31"),
768            TableCell::new("Planned").text_color("7F7F7F"),
769            TableCell::new("Planned").text_color("7F7F7F"),
770        ]))
771        .position(300000, 2000000)
772        .build();
773    
774    slides.push(
775        SlideContent::new("Project Roadmap 2024-2025")
776            .table(timeline_table)
777            .title_color("1F497D")
778            .title_bold(true)
779    );
780
781    // =========================================================================
782    // SLIDE 19: Dashboard Summary (NEW - using Dimension API)
783    // =========================================================================
784    println!("🔷 Slide 19: Dashboard with KPIs (Dimension API)");
785    
786    // KPI boxes using ratio-based positioning — automatically adapts to any slide size
787    let kpi1 = Shape::from_dimensions(ShapeType::RoundedRectangle,
788        Dimension::percent(3.0), Dimension::percent(23.0),
789        Dimension::percent(22.0), Dimension::percent(18.0),
790    ).with_fill(ShapeFill::new("4472C4")).with_text("Revenue\n\n$2.14M\n+15% YoY");
791
792    let kpi2 = Shape::from_dimensions(ShapeType::RoundedRectangle,
793        Dimension::percent(27.0), Dimension::percent(23.0),
794        Dimension::percent(22.0), Dimension::percent(18.0),
795    ).with_fill(ShapeFill::new("70AD47")).with_text("Customers\n\n12,450\n+22% YoY");
796
797    let kpi3 = Shape::from_dimensions(ShapeType::RoundedRectangle,
798        Dimension::percent(51.0), Dimension::percent(23.0),
799        Dimension::percent(22.0), Dimension::percent(18.0),
800    ).with_fill(ShapeFill::new("ED7D31")).with_text("NPS Score\n\n72\n+8 pts");
801
802    let kpi4 = Shape::from_dimensions(ShapeType::RoundedRectangle,
803        Dimension::percent(75.0), Dimension::percent(23.0),
804        Dimension::percent(22.0), Dimension::percent(18.0),
805    ).with_fill(ShapeFill::new("5B9BD5")).with_text("Retention\n\n94%\n+3% YoY");
806    
807    // Status indicators using mixed units: percent for X, inches for size
808    let status1 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
809        .at(Dimension::percent(14.0), Dimension::percent(42.0))
810        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
811        .with_fill(ShapeFill::new("70AD47"));
812    let status2 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
813        .at(Dimension::percent(38.0), Dimension::percent(42.0))
814        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
815        .with_fill(ShapeFill::new("70AD47"));
816    let status3 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
817        .at(Dimension::percent(62.0), Dimension::percent(42.0))
818        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
819        .with_fill(ShapeFill::new("FFC000"));
820    let status4 = Shape::new(ShapeType::Ellipse, 0, 0, 0, 0)
821        .at(Dimension::percent(86.0), Dimension::percent(42.0))
822        .with_dimensions(Dimension::Inches(0.3), Dimension::Inches(0.3))
823        .with_fill(ShapeFill::new("70AD47"));
824    
825    slides.push(
826        SlideContent::new("Executive Dashboard - Q1 2024")
827            .add_shape(kpi1)
828            .add_shape(kpi2)
829            .add_shape(kpi3)
830            .add_shape(kpi4)
831            .add_shape(status1)
832            .add_shape(status2)
833            .add_shape(status3)
834            .add_shape(status4)
835            .title_color("1F497D")
836            .title_bold(true)
837    );
838
839    // =========================================================================
840    // SLIDE 20: Summary Slide (NEW)
841    // =========================================================================
842    println!("📝 Slide 20: Summary with Speaker Notes");
843    
844    slides.push(
845        SlideContent::new("Summary & Next Steps")
846            .layout(SlideLayout::TitleAndContent)
847            .title_color("1F497D")
848            .title_bold(true)
849            .add_bullet("Completed: Research, Design, Initial Development")
850            .add_bullet("In Progress: Sprint 3 Development")
851            .add_bullet("Next: QA Testing Phase (Q4 2024)")
852            .add_bullet("Launch Target: Q1 2025")
853            .add_bullet("Key Risks: Resource constraints, Timeline pressure")
854            .content_size(24)
855            .notes("Speaker Notes:\n\n1. Emphasize the progress made\n2. Highlight key achievements\n3. Address any concerns about timeline\n4. Open for Q&A")
856    );
857
858    // =========================================================================
859    // SLIDE 21: Bullet Styles (NEW v0.2.1)
860    // =========================================================================
861    println!("🔢 Slide 21: Bullet Styles (NEW)");
862    
863    // Numbered list
864    slides.push(
865        SlideContent::new("Bullet Styles - Numbered List")
866            .layout(SlideLayout::TitleAndContent)
867            .title_color("1F497D")
868            .title_bold(true)
869            .with_bullet_style(BulletStyle::Number)
870            .add_bullet("First numbered item")
871            .add_bullet("Second numbered item")
872            .add_bullet("Third numbered item")
873            .add_bullet("Fourth numbered item")
874            .content_size(28)
875    );
876
877    // =========================================================================
878    // SLIDE 22: Lettered Lists (NEW v0.2.1)
879    // =========================================================================
880    println!("🔤 Slide 22: Lettered Lists (NEW)");
881    
882    slides.push(
883        SlideContent::new("Bullet Styles - Lettered Lists")
884            .layout(SlideLayout::TitleAndContent)
885            .title_color("1F497D")
886            .title_bold(true)
887            .add_lettered("Option A - First choice")
888            .add_lettered("Option B - Second choice")
889            .add_lettered("Option C - Third choice")
890            .add_lettered("Option D - Fourth choice")
891            .content_size(28)
892    );
893
894    // =========================================================================
895    // SLIDE 23: Roman Numerals (NEW v0.2.1)
896    // =========================================================================
897    println!("🏛️ Slide 23: Roman Numerals (NEW)");
898    
899    slides.push(
900        SlideContent::new("Bullet Styles - Roman Numerals")
901            .layout(SlideLayout::TitleAndContent)
902            .title_color("1F497D")
903            .title_bold(true)
904            .with_bullet_style(BulletStyle::RomanUpper)
905            .add_bullet("Chapter I - Introduction")
906            .add_bullet("Chapter II - Background")
907            .add_bullet("Chapter III - Methodology")
908            .add_bullet("Chapter IV - Results")
909            .add_bullet("Chapter V - Conclusion")
910            .content_size(28)
911    );
912
913    // =========================================================================
914    // SLIDE 24: Custom Bullets (NEW v0.2.1)
915    // =========================================================================
916    println!("⭐ Slide 24: Custom Bullets (NEW)");
917    
918    slides.push(
919        SlideContent::new("Bullet Styles - Custom Characters")
920            .layout(SlideLayout::TitleAndContent)
921            .title_color("1F497D")
922            .title_bold(true)
923            .add_styled_bullet("Star bullet point", BulletStyle::Custom('★'))
924            .add_styled_bullet("Arrow bullet point", BulletStyle::Custom('→'))
925            .add_styled_bullet("Check bullet point", BulletStyle::Custom('✓'))
926            .add_styled_bullet("Diamond bullet point", BulletStyle::Custom('◆'))
927            .add_styled_bullet("Heart bullet point", BulletStyle::Custom('♥'))
928            .content_size(28)
929    );
930
931    // =========================================================================
932    // SLIDE 25: Sub-bullets / Hierarchy (NEW v0.2.1)
933    // =========================================================================
934    println!("📊 Slide 25: Sub-bullets Hierarchy (NEW)");
935    
936    slides.push(
937        SlideContent::new("Bullet Styles - Hierarchical Lists")
938            .layout(SlideLayout::TitleAndContent)
939            .title_color("1F497D")
940            .title_bold(true)
941            .add_bullet("Main Topic 1")
942            .add_sub_bullet("Supporting detail A")
943            .add_sub_bullet("Supporting detail B")
944            .add_bullet("Main Topic 2")
945            .add_sub_bullet("Supporting detail C")
946            .add_sub_bullet("Supporting detail D")
947            .add_bullet("Main Topic 3")
948            .content_size(24)
949    );
950
951    // =========================================================================
952    // SLIDE 26: Text Enhancements (NEW v0.2.1)
953    // =========================================================================
954    println!("✏️ Slide 26: Text Enhancements (NEW)");
955    
956    // Use BulletPoint with formatting
957    let strikethrough_bullet = BulletPoint::new("Strikethrough: This text is crossed out").strikethrough();
958    let highlight_bullet = BulletPoint::new("Highlight: Yellow background for emphasis").highlight("FFFF00");
959    let subscript_bullet = BulletPoint::new("Subscript: H₂O - for chemical formulas").subscript();
960    let superscript_bullet = BulletPoint::new("Superscript: x² - for math expressions").superscript();
961    let bold_colored = BulletPoint::new("Combined: Bold + Red color").bold().color("FF0000");
962    
963    let mut text_enhancements_slide = SlideContent::new("Text Enhancements - New Formatting")
964        .layout(SlideLayout::TitleAndContent)
965        .title_color("1F497D")
966        .title_bold(true)
967        .content_size(24);
968    text_enhancements_slide.bullets.push(strikethrough_bullet);
969    text_enhancements_slide.bullets.push(highlight_bullet);
970    text_enhancements_slide.bullets.push(subscript_bullet);
971    text_enhancements_slide.bullets.push(superscript_bullet);
972    text_enhancements_slide.bullets.push(bold_colored);
973    
974    slides.push(text_enhancements_slide);
975
976    // =========================================================================
977    // SLIDE 27: Font Size Presets (NEW v0.2.1)
978    // =========================================================================
979    println!("🔤 Slide 27: Font Size Presets (NEW)");
980    
981    // Demonstrate different font sizes per bullet
982    let large_bullet = BulletPoint::new(&format!("LARGE: {}pt - Extra large text", font_sizes::LARGE)).font_size(font_sizes::LARGE);
983    let heading_bullet = BulletPoint::new(&format!("HEADING: {}pt - Section headers", font_sizes::HEADING)).font_size(font_sizes::HEADING);
984    let body_bullet = BulletPoint::new(&format!("BODY: {}pt - Regular content", font_sizes::BODY)).font_size(font_sizes::BODY);
985    let small_bullet = BulletPoint::new(&format!("SMALL: {}pt - Smaller text", font_sizes::SMALL)).font_size(font_sizes::SMALL);
986    let caption_bullet = BulletPoint::new(&format!("CAPTION: {}pt - Captions and notes", font_sizes::CAPTION)).font_size(font_sizes::CAPTION);
987    
988    let mut font_size_slide = SlideContent::new("Font Size Presets - Each line different size")
989        .layout(SlideLayout::TitleAndContent)
990        .title_color("1F497D")
991        .title_bold(true)
992        .title_size(font_sizes::TITLE);
993    font_size_slide.bullets.push(large_bullet);
994    font_size_slide.bullets.push(heading_bullet);
995    font_size_slide.bullets.push(body_bullet);
996    font_size_slide.bullets.push(small_bullet);
997    font_size_slide.bullets.push(caption_bullet);
998    
999    slides.push(font_size_slide);
1000
1001    // =========================================================================
1002    // SLIDE 28: Theme Colors (NEW v0.2.1)
1003    // =========================================================================
1004    println!("🎨 Slide 28: Theme Colors (NEW)");
1005    
1006    // Create shapes with theme colors
1007    let corporate_shape = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1800000, 800000)
1008        .with_fill(ShapeFill::new(themes::CORPORATE.primary))
1009        .with_text("Corporate");
1010    
1011    let modern_shape = Shape::new(ShapeType::Rectangle, 2500000, 1600000, 1800000, 800000)
1012        .with_fill(ShapeFill::new(themes::MODERN.primary))
1013        .with_text("Modern");
1014    
1015    let vibrant_shape = Shape::new(ShapeType::Rectangle, 4500000, 1600000, 1800000, 800000)
1016        .with_fill(ShapeFill::new(themes::VIBRANT.primary))
1017        .with_text("Vibrant");
1018    
1019    let dark_shape = Shape::new(ShapeType::Rectangle, 6500000, 1600000, 1800000, 800000)
1020        .with_fill(ShapeFill::new(themes::DARK.primary))
1021        .with_text("Dark");
1022    
1023    let nature_shape = Shape::new(ShapeType::Rectangle, 500000, 2700000, 1800000, 800000)
1024        .with_fill(ShapeFill::new(themes::NATURE.primary))
1025        .with_text("Nature");
1026    
1027    let tech_shape = Shape::new(ShapeType::Rectangle, 2500000, 2700000, 1800000, 800000)
1028        .with_fill(ShapeFill::new(themes::TECH.primary))
1029        .with_text("Tech");
1030    
1031    let carbon_shape = Shape::new(ShapeType::Rectangle, 4500000, 2700000, 1800000, 800000)
1032        .with_fill(ShapeFill::new(themes::CARBON.primary))
1033        .with_text("Carbon");
1034    
1035    slides.push(
1036        SlideContent::new("Theme Color Palettes")
1037            .layout(SlideLayout::TitleAndContent)
1038            .title_color("1F497D")
1039            .title_bold(true)
1040            .add_shape(corporate_shape)
1041            .add_shape(modern_shape)
1042            .add_shape(vibrant_shape)
1043            .add_shape(dark_shape)
1044            .add_shape(nature_shape)
1045            .add_shape(tech_shape)
1046            .add_shape(carbon_shape)
1047    );
1048
1049    // =========================================================================
1050    // SLIDE 29: Material & Carbon Design Colors (NEW v0.2.1)
1051    // =========================================================================
1052    println!("🌈 Slide 29: Material & Carbon Colors (NEW)");
1053    
1054    // Material Design colors
1055    let material_red = Shape::new(ShapeType::Rectangle, 500000, 1600000, 1200000, 600000)
1056        .with_fill(ShapeFill::new(colors::MATERIAL_RED))
1057        .with_text("M-Red");
1058    
1059    let material_blue = Shape::new(ShapeType::Rectangle, 1900000, 1600000, 1200000, 600000)
1060        .with_fill(ShapeFill::new(colors::MATERIAL_BLUE))
1061        .with_text("M-Blue");
1062    
1063    let material_green = Shape::new(ShapeType::Rectangle, 3300000, 1600000, 1200000, 600000)
1064        .with_fill(ShapeFill::new(colors::MATERIAL_GREEN))
1065        .with_text("M-Green");
1066    
1067    let material_orange = Shape::new(ShapeType::Rectangle, 4700000, 1600000, 1200000, 600000)
1068        .with_fill(ShapeFill::new(colors::MATERIAL_ORANGE))
1069        .with_text("M-Orange");
1070    
1071    let material_purple = Shape::new(ShapeType::Rectangle, 6100000, 1600000, 1200000, 600000)
1072        .with_fill(ShapeFill::new(colors::MATERIAL_PURPLE))
1073        .with_text("M-Purple");
1074    
1075    // Carbon Design colors
1076    let carbon_blue = Shape::new(ShapeType::Rectangle, 500000, 2500000, 1200000, 600000)
1077        .with_fill(ShapeFill::new(colors::CARBON_BLUE_60))
1078        .with_text("C-Blue");
1079    
1080    let carbon_green = Shape::new(ShapeType::Rectangle, 1900000, 2500000, 1200000, 600000)
1081        .with_fill(ShapeFill::new(colors::CARBON_GREEN_50))
1082        .with_text("C-Green");
1083    
1084    let carbon_red = Shape::new(ShapeType::Rectangle, 3300000, 2500000, 1200000, 600000)
1085        .with_fill(ShapeFill::new(colors::CARBON_RED_60))
1086        .with_text("C-Red");
1087    
1088    let carbon_purple = Shape::new(ShapeType::Rectangle, 4700000, 2500000, 1200000, 600000)
1089        .with_fill(ShapeFill::new(colors::CARBON_PURPLE_60))
1090        .with_text("C-Purple");
1091    
1092    let carbon_gray = Shape::new(ShapeType::Rectangle, 6100000, 2500000, 1200000, 600000)
1093        .with_fill(ShapeFill::new(colors::CARBON_GRAY_100))
1094        .with_text("C-Gray");
1095    
1096    slides.push(
1097        SlideContent::new("Material & Carbon Design Colors")
1098            .layout(SlideLayout::TitleAndContent)
1099            .title_color("1F497D")
1100            .title_bold(true)
1101            .add_shape(material_red)
1102            .add_shape(material_blue)
1103            .add_shape(material_green)
1104            .add_shape(material_orange)
1105            .add_shape(material_purple)
1106            .add_shape(carbon_blue)
1107            .add_shape(carbon_green)
1108            .add_shape(carbon_red)
1109            .add_shape(carbon_purple)
1110            .add_shape(carbon_gray)
1111    );
1112
1113    // =========================================================================
1114    // SLIDE 30: Image from Base64 (NEW v0.2.1)
1115    // =========================================================================
1116    println!("🖼️ Slide 30: Image from Base64 (NEW)");
1117    
1118    // 1x1 red PNG pixel in base64
1119    let _red_pixel_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==";
1120    
1121    // Create image from base64 (demonstrating the API)
1122    let _base64_image = ImageBuilder::from_base64(_red_pixel_base64, 914400, 914400, "PNG")
1123        .position(4000000, 2500000)
1124        .build();
1125    
1126    slides.push(
1127        SlideContent::new("Image Loading - New Methods")
1128            .layout(SlideLayout::TitleAndContent)
1129            .title_color("1F497D")
1130            .title_bold(true)
1131            .add_bullet("Image::new(path) - Load from file path")
1132            .add_bullet("Image::from_base64(data) - Load from base64 string")
1133            .add_bullet("Image::from_bytes(data) - Load from raw bytes")
1134            .add_bullet("ImageBuilder for fluent API configuration")
1135            .add_bullet("Built-in base64 decoder (no external deps)")
1136            .content_size(24)
1137    );
1138
1139    // =========================================================================
1140    // SLIDE 31: Feature Summary (NEW v0.2.1)
1141    // =========================================================================
1142    println!("📋 Slide 31: v0.2.1 Feature Summary (NEW)");
1143    
1144    slides.push(
1145        SlideContent::new("New Features in v0.2.1")
1146            .layout(SlideLayout::TitleAndContent)
1147            .title_color("1F497D")
1148            .title_bold(true)
1149            .add_numbered("BulletStyle: Number, Letter, Roman, Custom")
1150            .add_numbered("TextFormat: Strikethrough, Highlight")
1151            .add_numbered("TextFormat: Subscript, Superscript")
1152            .add_numbered("Font size presets in prelude")
1153            .add_numbered("Image::from_base64 and from_bytes")
1154            .add_numbered("Theme color palettes (7 themes)")
1155            .add_numbered("Material & Carbon Design colors")
1156            .content_size(24)
1157    );
1158
1159    // =========================================================================
1160    // SLIDE 32: Slide Show Settings - Comparison Table (REAL: embedded in presProps.xml)
1161    // =========================================================================
1162    println!("🎬 Slide 34: Slide Show Settings (Visual)");
1163
1164    let show_speaker = SlideShowSettings::new().pen_color(PenColor::red());
1165    let show_kiosk = SlideShowSettings::kiosk();
1166    let _show_range = SlideShowSettings::new()
1167        .show_type(ShowType::Browsed)
1168        .slide_range(SlideRange::Range { start: 1, end: 10 })
1169        .without_animation(true);
1170    let _speaker_xml = show_speaker.to_xml();
1171    let _kiosk_xml = show_kiosk.to_xml();
1172
1173    let show_table = TableBuilder::new(vec![2000000, 2000000, 2000000, 2000000])
1174        .add_row(TableRow::new(vec![
1175            TableCell::new("Setting").bold().background_color("1F4E79").text_color("FFFFFF"),
1176            TableCell::new("Speaker").bold().background_color("4472C4").text_color("FFFFFF"),
1177            TableCell::new("Kiosk").bold().background_color("ED7D31").text_color("FFFFFF"),
1178            TableCell::new("Browsed").bold().background_color("70AD47").text_color("FFFFFF"),
1179        ]))
1180        .add_row(TableRow::new(vec![
1181            TableCell::new("Loop").bold().background_color("D6E4F0"),
1182            TableCell::new("No"), TableCell::new("Yes").bold().text_color("2E7D32"),
1183            TableCell::new("No"),
1184        ]))
1185        .add_row(TableRow::new(vec![
1186            TableCell::new("Narration").bold().background_color("D6E4F0"),
1187            TableCell::new("Yes"), TableCell::new("No").text_color("C62828"),
1188            TableCell::new("Yes"),
1189        ]))
1190        .add_row(TableRow::new(vec![
1191            TableCell::new("Animation").bold().background_color("D6E4F0"),
1192            TableCell::new("Yes"), TableCell::new("Yes"),
1193            TableCell::new("No").text_color("C62828"),
1194        ]))
1195        .add_row(TableRow::new(vec![
1196            TableCell::new("Timings").bold().background_color("D6E4F0"),
1197            TableCell::new("Yes"), TableCell::new("Auto"),
1198            TableCell::new("Yes"),
1199        ]))
1200        .add_row(TableRow::new(vec![
1201            TableCell::new("Slide Range").bold().background_color("D6E4F0"),
1202            TableCell::new("All"), TableCell::new("All"),
1203            TableCell::new("1-10"),
1204        ]))
1205        .add_row(TableRow::new(vec![
1206            TableCell::new("Pen Color").bold().background_color("D6E4F0"),
1207            TableCell::new("Red").text_color("FF0000"),
1208            TableCell::new("Red").text_color("FF0000"),
1209            TableCell::new("Red").text_color("FF0000"),
1210        ]))
1211        .position(300000, 1600000)
1212        .build();
1213
1214    // Mode icons
1215    let icon_speaker = Shape::new(ShapeType::RoundedRectangle, 300000, 4200000, 2500000, 600000)
1216        .with_fill(ShapeFill::new("4472C4"))
1217        .with_text("Speaker: Full control");
1218    let icon_kiosk = Shape::new(ShapeType::RoundedRectangle, 3100000, 4200000, 2500000, 600000)
1219        .with_fill(ShapeFill::new("ED7D31"))
1220        .with_text("Kiosk: Auto-loop");
1221    let icon_browsed = Shape::new(ShapeType::RoundedRectangle, 5900000, 4200000, 2500000, 600000)
1222        .with_fill(ShapeFill::new("70AD47"))
1223        .with_text("Browsed: Scrollbar");
1224
1225    slides.push(
1226        SlideContent::new("Slide Show Settings - Mode Comparison")
1227            .table(show_table)
1228            .add_shape(icon_speaker)
1229            .add_shape(icon_kiosk)
1230            .add_shape(icon_browsed)
1231            .title_color("1F497D")
1232            .title_bold(true)
1233    );
1234
1235    // =========================================================================
1236    // SLIDE 35: Print Settings - Visual Handout Grid
1237    // =========================================================================
1238    println!("🖨️  Slide 35: Print Settings & Handouts (Visual)");
1239
1240    let print = PrintSettings::new()
1241        .print_what(PrintWhat::Handouts)
1242        .color_mode(PrintColorMode::Grayscale)
1243        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1244        .frame_slides(true)
1245        .header("Q1 2025 Strategy Review")
1246        .footer("Confidential - Internal Use Only")
1247        .print_date(true)
1248        .print_page_numbers(true);
1249    let _prnpr_xml = print.to_prnpr_xml();
1250    let _handout_xml = print.to_handout_master_xml();
1251
1252    // Visual: 6-slide handout grid (2 cols x 3 rows)
1253    let hdr = Shape::new(ShapeType::Rectangle, 300000, 1500000, 4200000, 300000)
1254        .with_fill(ShapeFill::new("E7E6E6"))
1255        .with_text("Q1 2025 Strategy Review");
1256    // Row 1
1257    let s1 = Shape::new(ShapeType::Rectangle, 400000, 2000000, 1800000, 1100000)
1258        .with_line(ShapeLine::new("999999", 12700))
1259        .with_text("Slide 1");
1260    let s2 = Shape::new(ShapeType::Rectangle, 2500000, 2000000, 1800000, 1100000)
1261        .with_line(ShapeLine::new("999999", 12700))
1262        .with_text("Slide 2");
1263    // Row 2
1264    let s3 = Shape::new(ShapeType::Rectangle, 400000, 3200000, 1800000, 1100000)
1265        .with_line(ShapeLine::new("999999", 12700))
1266        .with_text("Slide 3");
1267    let s4 = Shape::new(ShapeType::Rectangle, 2500000, 3200000, 1800000, 1100000)
1268        .with_line(ShapeLine::new("999999", 12700))
1269        .with_text("Slide 4");
1270    // Row 3
1271    let s5 = Shape::new(ShapeType::Rectangle, 400000, 4400000, 1800000, 1100000)
1272        .with_line(ShapeLine::new("999999", 12700))
1273        .with_text("Slide 5");
1274    let s6 = Shape::new(ShapeType::Rectangle, 2500000, 4400000, 1800000, 1100000)
1275        .with_line(ShapeLine::new("999999", 12700))
1276        .with_text("Slide 6");
1277    let ftr = Shape::new(ShapeType::Rectangle, 300000, 5600000, 4200000, 300000)
1278        .with_fill(ShapeFill::new("E7E6E6"))
1279        .with_text("Confidential - Internal Use Only");
1280
1281    // Settings summary table on the right
1282    let print_table = TableBuilder::new(vec![1800000, 2000000])
1283        .add_row(TableRow::new(vec![
1284            TableCell::new("Print Settings").bold().background_color("1F4E79").text_color("FFFFFF"),
1285            TableCell::new("").background_color("1F4E79"),
1286        ]))
1287        .add_row(TableRow::new(vec![
1288            TableCell::new("Print What").bold().background_color("D6E4F0"),
1289            TableCell::new("Handouts"),
1290        ]))
1291        .add_row(TableRow::new(vec![
1292            TableCell::new("Color Mode").bold().background_color("D6E4F0"),
1293            TableCell::new("Grayscale"),
1294        ]))
1295        .add_row(TableRow::new(vec![
1296            TableCell::new("Layout").bold().background_color("D6E4F0"),
1297            TableCell::new("6 slides/page"),
1298        ]))
1299        .add_row(TableRow::new(vec![
1300            TableCell::new("Frame Slides").bold().background_color("D6E4F0"),
1301            TableCell::new("Yes"),
1302        ]))
1303        .add_row(TableRow::new(vec![
1304            TableCell::new("Date").bold().background_color("D6E4F0"),
1305            TableCell::new("Yes"),
1306        ]))
1307        .add_row(TableRow::new(vec![
1308            TableCell::new("Page Numbers").bold().background_color("D6E4F0"),
1309            TableCell::new("Yes"),
1310        ]))
1311        .position(5000000, 1800000)
1312        .build();
1313
1314    slides.push(
1315        SlideContent::new("Print Handout - 6 Slides Per Page")
1316            .table(print_table)
1317            .add_shape(hdr)
1318            .add_shape(s1).add_shape(s2)
1319            .add_shape(s3).add_shape(s4)
1320            .add_shape(s5).add_shape(s6)
1321            .add_shape(ftr)
1322            .title_color("1F497D")
1323            .title_bold(true)
1324    );
1325
1326    // =========================================================================
1327    // SLIDE 36: Advanced Table Merging - Actual Merged Table
1328    // =========================================================================
1329    println!("📊 Slide 36: Advanced Table Merging (Visual)");
1330
1331    // Use TableMergeMap to compute states, then build a visual table
1332    let mut merge_map = TableMergeMap::new(5, 4);
1333    merge_map.merge_cells(0, 0, 1, 4).unwrap(); // Title row spans all 4 cols
1334    merge_map.merge_cells(1, 0, 2, 1).unwrap(); // "Products" spans 2 rows
1335    merge_map.merge_cells(3, 0, 2, 1).unwrap(); // "Services" spans 2 rows
1336
1337    // Show merge state labels
1338    let state_00 = merge_map.cell_state(0, 0); // Anchor gridSpan=4
1339    let state_01 = merge_map.cell_state(0, 1); // HMerge
1340    let state_10 = merge_map.cell_state(1, 0); // Anchor rowSpan=2
1341    let state_20 = merge_map.cell_state(2, 0); // VMerge
1342    println!("   ├── (0,0): {}", state_00.to_xml_attrs().trim());
1343    println!("   ├── (0,1): {}", state_01.to_xml_attrs().trim());
1344    println!("   ├── (1,0): {}", state_10.to_xml_attrs().trim());
1345    println!("   └── (2,0): {}", state_20.to_xml_attrs().trim());
1346
1347    // Build the table with REAL merge attributes (gridSpan, rowSpan, hMerge, vMerge)
1348    let merge_table = TableBuilder::new(vec![1500000, 2000000, 2000000, 2000000])
1349        .add_row(TableRow::new(vec![
1350            TableCell::new("Q1 2025 Revenue Report").bold().background_color("1F4E79").text_color("FFFFFF").grid_span(4),
1351            TableCell::new("").background_color("1F4E79").h_merge(),
1352            TableCell::new("").background_color("1F4E79").h_merge(),
1353            TableCell::new("").background_color("1F4E79").h_merge(),
1354        ]))
1355        .add_row(TableRow::new(vec![
1356            TableCell::new("Products").bold().background_color("BDD7EE").text_color("1F497D").row_span(2),
1357            TableCell::new("Hardware").background_color("E2EFDA"),
1358            TableCell::new("$450,000").text_color("2E7D32").align_right(),
1359            TableCell::new("+12%").bold().text_color("2E7D32").align_right(),
1360        ]))
1361        .add_row(TableRow::new(vec![
1362            TableCell::new("").background_color("BDD7EE").v_merge(),
1363            TableCell::new("Software").background_color("E2EFDA"),
1364            TableCell::new("$680,000").text_color("2E7D32").align_right(),
1365            TableCell::new("+25%").bold().text_color("2E7D32").align_right(),
1366        ]))
1367        .add_row(TableRow::new(vec![
1368            TableCell::new("Services").bold().background_color("FCE4D6").text_color("C65911").row_span(2),
1369            TableCell::new("Consulting").background_color("FFF2CC"),
1370            TableCell::new("$320,000").text_color("2E7D32").align_right(),
1371            TableCell::new("+8%").bold().text_color("2E7D32").align_right(),
1372        ]))
1373        .add_row(TableRow::new(vec![
1374            TableCell::new("").background_color("FCE4D6").v_merge(),
1375            TableCell::new("Support").background_color("FFF2CC"),
1376            TableCell::new("$190,000").text_color("2E7D32").align_right(),
1377            TableCell::new("+5%").bold().text_color("2E7D32").align_right(),
1378        ]))
1379        .position(300000, 1600000)
1380        .build();
1381
1382    // Legend shapes
1383    let legend_anchor = Shape::new(ShapeType::RoundedRectangle, 300000, 4400000, 2000000, 400000)
1384        .with_fill(ShapeFill::new("4472C4"))
1385        .with_text("Anchor (gridSpan/rowSpan)");
1386    let legend_hmerge = Shape::new(ShapeType::RoundedRectangle, 2500000, 4400000, 2000000, 400000)
1387        .with_fill(ShapeFill::new("ED7D31"))
1388        .with_text("hMerge (col covered)");
1389    let legend_vmerge = Shape::new(ShapeType::RoundedRectangle, 4700000, 4400000, 2000000, 400000)
1390        .with_fill(ShapeFill::new("70AD47"))
1391        .with_text("vMerge (row covered)");
1392    let legend_normal = Shape::new(ShapeType::RoundedRectangle, 6900000, 4400000, 2000000, 400000)
1393        .with_fill(ShapeFill::new("A5A5A5"))
1394        .with_text("Normal (no merge)");
1395
1396    slides.push(
1397        SlideContent::new("Advanced Table Merging - Merged Cells")
1398            .table(merge_table)
1399            .add_shape(legend_anchor)
1400            .add_shape(legend_hmerge)
1401            .add_shape(legend_vmerge)
1402            .add_shape(legend_normal)
1403            .title_color("1F497D")
1404            .title_bold(true)
1405    );
1406
1407    // =========================================================================
1408    // Build PresentationSettings with all advanced features
1409    // =========================================================================
1410    println!("\n⚙️  Building Presentation Settings...");
1411
1412    // Slide show settings (embedded in presProps.xml as <p:showPr>)
1413    let show_settings = SlideShowSettings::new()
1414        .show_type(ShowType::Speaker)
1415        .pen_color(PenColor::red())
1416        .use_timings(true);
1417    println!("   ├── Slide Show: Speaker mode, red pen, timings enabled");
1418    println!("   │   └── XML: {} bytes", show_settings.to_xml().len());
1419
1420    // Print settings (embedded in presProps.xml as <p:prnPr>)
1421    let print_settings = PrintSettings::new()
1422        .print_what(PrintWhat::Handouts)
1423        .color_mode(PrintColorMode::Grayscale)
1424        .handout_layout(GenHandoutLayout::SlidesPerPage6)
1425        .frame_slides(true)
1426        .header("Q1 2025 Strategy Review")
1427        .footer("Confidential - Internal Use Only")
1428        .print_date(true)
1429        .print_page_numbers(true);
1430    println!("   └── Print: Handouts, 6/page, grayscale, framed");
1431    println!("       └── XML: {} bytes", print_settings.to_prnpr_xml().len());
1432
1433    let pres_settings = PresentationSettings::new()
1434        .slide_show(show_settings)
1435        .print(print_settings);
1436    println!("   All settings configured → presProps.xml");
1437
1438    // =========================================================================
1439    // Generate PPTX with real integrated features
1440    // =========================================================================
1441    println!("\n📦 Generating PPTX with integrated features...");
1442    let pptx_data = create_pptx_with_settings(
1443        "PPTX-RS Element Showcase",
1444        slides.clone(),
1445        Some(pres_settings),
1446    )?;
1447    fs::write("comprehensive_demo.pptx", &pptx_data)?;
1448    println!("   ✓ Created comprehensive_demo.pptx ({} slides, {} bytes)", 
1449             slides.len(), pptx_data.len());
1450
1451    // =========================================================================
1452    // Package Analysis - Demonstrate Reading
1453    // =========================================================================
1454    println!("\n📖 Package Analysis (Read Capability):");
1455    
1456    let package = Package::open("comprehensive_demo.pptx")?;
1457    let paths = package.part_paths();
1458    
1459    let slide_count = paths.iter()
1460        .filter(|p| p.starts_with("ppt/slides/slide") && p.ends_with(".xml"))
1461        .count();
1462    
1463    println!("   ├── Total parts: {}", package.part_count());
1464    println!("   ├── Slides: {}", slide_count);
1465    println!("   └── Package opened and analyzed successfully");
1466
1467    // =========================================================================
1468    // NEW: Parts API Demonstration
1469    // =========================================================================
1470    println!("\n🧩 Parts API Demonstration:");
1471    
1472    // SlideLayoutPart - 11 layout types
1473    println!("   ┌── SlideLayoutPart (11 layout types):");
1474    let layouts = [
1475        LayoutType::Title,
1476        LayoutType::TitleAndContent,
1477        LayoutType::SectionHeader,
1478        LayoutType::TwoContent,
1479        LayoutType::Comparison,
1480        LayoutType::TitleOnly,
1481        LayoutType::Blank,
1482        LayoutType::ContentWithCaption,
1483        LayoutType::PictureWithCaption,
1484        LayoutType::TitleAndVerticalText,
1485        LayoutType::VerticalTitleAndText,
1486    ];
1487    for (i, layout_type) in layouts.iter().enumerate() {
1488        let layout = SlideLayoutPart::new(i + 1, *layout_type);
1489        if i < 3 {
1490            println!("   │   ├── {}: {} ({})", i + 1, layout_type.name(), layout.path());
1491        }
1492    }
1493    println!("   │   └── ... and {} more layout types", layouts.len() - 3);
1494    
1495    // SlideMasterPart
1496    println!("   ├── SlideMasterPart:");
1497    let mut master = SlideMasterPart::new(1);
1498    master.set_name("Custom Master");
1499    master.add_layout_rel_id("rId2");
1500    master.add_layout_rel_id("rId3");
1501    println!("   │   ├── Name: {}", master.name());
1502    println!("   │   ├── Path: {}", master.path());
1503    println!("   │   └── Layouts: {} linked", master.layout_rel_ids().len());
1504    
1505    // ThemePart - Colors and Fonts
1506    println!("   ├── ThemePart (colors & fonts):");
1507    let mut theme = ThemePart::new(1);
1508    theme.set_name("Corporate Theme");
1509    theme.set_major_font("Arial");
1510    theme.set_minor_font("Calibri");
1511    theme.set_color("accent1", "FF5733");
1512    theme.set_color("accent2", "33FF57");
1513    let theme_xml = theme.to_xml()?;
1514    println!("   │   ├── Name: {}", theme.name());
1515    println!("   │   ├── Major Font: Arial");
1516    println!("   │   ├── Minor Font: Calibri");
1517    println!("   │   └── XML size: {} bytes", theme_xml.len());
1518    
1519    // NotesSlidePart - Speaker notes
1520    println!("   ├── NotesSlidePart (speaker notes):");
1521    let notes = NotesSlidePart::with_text(1, "Remember to:\n- Introduce yourself\n- Explain the agenda\n- Ask for questions");
1522    let notes_xml = notes.to_xml()?;
1523    println!("   │   ├── Path: {}", notes.path());
1524    println!("   │   ├── Text: \"{}...\"", &notes.notes_text()[..20.min(notes.notes_text().len())]);
1525    println!("   │   └── XML size: {} bytes", notes_xml.len());
1526    
1527    // AppPropertiesPart - Application metadata
1528    println!("   ├── AppPropertiesPart (metadata):");
1529    let mut app_props = AppPropertiesPart::new();
1530    app_props.set_company("Acme Corporation");
1531    app_props.set_slides(slides.len() as u32);
1532    let app_xml = app_props.to_xml()?;
1533    println!("   │   ├── Company: Acme Corporation");
1534    println!("   │   ├── Slides: {}", slides.len());
1535    println!("   │   └── XML size: {} bytes", app_xml.len());
1536    
1537    // MediaPart - Video/Audio formats
1538    println!("   ├── MediaPart (10 media formats):");
1539    println!("   │   ├── Video: mp4, webm, avi, wmv, mov");
1540    println!("   │   ├── Audio: mp3, wav, wma, m4a, ogg");
1541    let sample_media = MediaPart::new(1, MediaFormat::Mp4, vec![0; 100]);
1542    println!("   │   └── Sample: {} ({})", sample_media.path(), sample_media.format().mime_type());
1543    
1544    // TablePart - Table with formatting
1545    println!("   ├── TablePart (cell formatting):");
1546    let table_part = TablePart::new()
1547        .add_row(TableRowPart::new(vec![
1548            TableCellPart::new("Header 1").bold().background("4472C4"),
1549            TableCellPart::new("Header 2").bold().background("4472C4"),
1550        ]))
1551        .add_row(TableRowPart::new(vec![
1552            TableCellPart::new("Data 1").color("333333"),
1553            TableCellPart::new("Data 2").italic(),
1554        ]))
1555        .position(EMU_PER_INCH, EMU_PER_INCH * 2)
1556        .size(EMU_PER_INCH * 6, EMU_PER_INCH * 2);
1557    let table_xml = table_part.to_slide_xml(10);
1558    println!("   │   ├── Rows: {}", table_part.rows.len());
1559    println!("   │   ├── Features: bold, italic, colors, backgrounds");
1560    println!("   │   └── XML size: {} bytes", table_xml.len());
1561    
1562    // ContentTypesPart
1563    println!("   └── ContentTypesPart:");
1564    let mut content_types = ContentTypesPart::new();
1565    content_types.add_presentation();
1566    content_types.add_slide(1);
1567    content_types.add_slide_layout(1);
1568    content_types.add_slide_master(1);
1569    content_types.add_theme(1);
1570    content_types.add_core_properties();
1571    content_types.add_app_properties();
1572    let ct_xml = content_types.to_xml()?;
1573    println!("       ├── Path: {}", content_types.path());
1574    println!("       └── XML size: {} bytes", ct_xml.len());
1575
1576    // =========================================================================
1577    // NEW: Elements API Demonstration
1578    // =========================================================================
1579    println!("\n🎨 Elements API Demonstration:");
1580    
1581    // Color types
1582    println!("   ┌── Color Types:");
1583    let rgb = RgbColor::new(255, 87, 51);
1584    let rgb_hex = RgbColor::from_hex("#4472C4").unwrap();
1585    let scheme = SchemeColor::Accent1;
1586    let color = Color::rgb(100, 149, 237);
1587    println!("   │   ├── RgbColor::new(255, 87, 51) → {}", rgb.to_hex());
1588    println!("   │   ├── RgbColor::from_hex(\"#4472C4\") → {}", rgb_hex.to_hex());
1589    println!("   │   ├── SchemeColor::Accent1 → {}", scheme.as_str());
1590    println!("   │   └── Color::rgb(100, 149, 237) → XML: {}", color.to_xml().chars().take(30).collect::<String>());
1591    
1592    // Position and Size
1593    println!("   ├── Position & Size (EMU units):");
1594    let pos = Position::from_inches(1.0, 2.0);
1595    let size = Size::from_inches(4.0, 3.0);
1596    println!("   │   ├── Position::from_inches(1.0, 2.0) → x={}, y={}", pos.x, pos.y);
1597    println!("   │   ├── Size::from_inches(4.0, 3.0) → w={}, h={}", size.width, size.height);
1598    println!("   │   └── EMU_PER_INCH = {}", EMU_PER_INCH);
1599    
1600    // Transform
1601    println!("   └── Transform (position + size + rotation):");
1602    let transform = Transform::from_inches(1.0, 1.5, 3.0, 2.0).with_rotation(45.0);
1603    let transform_xml = transform.to_xml();
1604    println!("       ├── Transform::from_inches(1.0, 1.5, 3.0, 2.0)");
1605    println!("       ├── .with_rotation(45.0)");
1606    println!("       └── XML: {}...", &transform_xml[..50.min(transform_xml.len())]);
1607
1608    // =========================================================================
1609    // NEW: Advanced Features Demonstration
1610    // =========================================================================
1611    println!("\n🚀 Advanced Features Demonstration:");
1612
1613    // -------------------------------------------------------------------------
1614    // Complex Table Examples
1615    // -------------------------------------------------------------------------
1616    println!("   ┌── Complex Table Examples:");
1617    
1618    // Example 1: Financial Report Table
1619    println!("   │   ┌── Financial Report Table (5x4 with formatting):");
1620    let financial_table = TablePart::new()
1621        .add_row(TableRowPart::new(vec![
1622            TableCellPart::new("Q1 2024 Financial Summary")
1623                .col_span(4)
1624                .bold()
1625                .center()
1626                .background("1F4E79")
1627                .color("FFFFFF")
1628                .font_size(14)
1629                .font("Arial Black"),
1630        ]))
1631        .add_row(TableRowPart::new(vec![
1632            TableCellPart::new("Category").bold().center().background("2E75B6").color("FFFFFF"),
1633            TableCellPart::new("Revenue").bold().center().background("2E75B6").color("FFFFFF"),
1634            TableCellPart::new("Expenses").bold().center().background("2E75B6").color("FFFFFF"),
1635            TableCellPart::new("Profit").bold().center().background("2E75B6").color("FFFFFF"),
1636        ]))
1637        .add_row(TableRowPart::new(vec![
1638            TableCellPart::new("Product Sales").align(HorizontalAlign::Left),
1639            TableCellPart::new("$1,250,000").align(HorizontalAlign::Right).color("2E7D32"),
1640            TableCellPart::new("$450,000").align(HorizontalAlign::Right).color("C62828"),
1641            TableCellPart::new("$800,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1642        ]))
1643        .add_row(TableRowPart::new(vec![
1644            TableCellPart::new("Services").align(HorizontalAlign::Left),
1645            TableCellPart::new("$890,000").align(HorizontalAlign::Right).color("2E7D32"),
1646            TableCellPart::new("$320,000").align(HorizontalAlign::Right).color("C62828"),
1647            TableCellPart::new("$570,000").align(HorizontalAlign::Right).bold().color("2E7D32"),
1648        ]))
1649        .add_row(TableRowPart::new(vec![
1650            TableCellPart::new("Total").bold().background("E7E6E6"),
1651            TableCellPart::new("$2,140,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1652            TableCellPart::new("$770,000").bold().align(HorizontalAlign::Right).background("E7E6E6"),
1653            TableCellPart::new("$1,370,000").bold().align(HorizontalAlign::Right).background("C6EFCE").color("006100"),
1654        ]))
1655        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1656        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 3);
1657    let fin_xml = financial_table.to_slide_xml(100);
1658    println!("   │   │   ├── Merged header spanning 4 columns");
1659    println!("   │   │   ├── Color-coded values (green=positive, red=negative)");
1660    println!("   │   │   ├── Custom fonts and sizes");
1661    println!("   │   │   └── XML: {} bytes", fin_xml.len());
1662
1663    // Example 2: Comparison Matrix
1664    println!("   │   ├── Comparison Matrix (features vs products):");
1665    let _matrix_table = TablePart::new()
1666        .add_row(TableRowPart::new(vec![
1667            TableCellPart::new("Feature").bold().center().background("4472C4").color("FFFFFF"),
1668            TableCellPart::new("Basic").bold().center().background("4472C4").color("FFFFFF"),
1669            TableCellPart::new("Pro").bold().center().background("4472C4").color("FFFFFF"),
1670            TableCellPart::new("Enterprise").bold().center().background("4472C4").color("FFFFFF"),
1671        ]))
1672        .add_row(TableRowPart::new(vec![
1673            TableCellPart::new("Storage").align(HorizontalAlign::Left),
1674            TableCellPart::new("5 GB").center(),
1675            TableCellPart::new("50 GB").center(),
1676            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1677        ]))
1678        .add_row(TableRowPart::new(vec![
1679            TableCellPart::new("Users").align(HorizontalAlign::Left),
1680            TableCellPart::new("1").center(),
1681            TableCellPart::new("10").center(),
1682            TableCellPart::new("Unlimited").center().bold().color("2E7D32"),
1683        ]))
1684        .add_row(TableRowPart::new(vec![
1685            TableCellPart::new("Support").align(HorizontalAlign::Left),
1686            TableCellPart::new("Email").center(),
1687            TableCellPart::new("24/7 Chat").center(),
1688            TableCellPart::new("Dedicated").center().bold().color("2E7D32"),
1689        ]))
1690        .add_row(TableRowPart::new(vec![
1691            TableCellPart::new("Price/mo").bold().background("F2F2F2"),
1692            TableCellPart::new("$9").center().bold().background("F2F2F2"),
1693            TableCellPart::new("$29").center().bold().background("F2F2F2"),
1694            TableCellPart::new("$99").center().bold().background("F2F2F2"),
1695        ]));
1696    println!("   │   │   └── 5x4 matrix with alternating styles");
1697
1698    // Example 3: Schedule/Timeline Table
1699    println!("   │   └── Schedule Table (with row spans):");
1700    let _schedule_table = TablePart::new()
1701        .add_row(TableRowPart::new(vec![
1702            TableCellPart::new("Time").bold().center().background("70AD47").color("FFFFFF"),
1703            TableCellPart::new("Monday").bold().center().background("70AD47").color("FFFFFF"),
1704            TableCellPart::new("Tuesday").bold().center().background("70AD47").color("FFFFFF"),
1705        ]))
1706        .add_row(TableRowPart::new(vec![
1707            TableCellPart::new("9:00 AM").center().background("E2EFDA"),
1708            TableCellPart::new("Team Standup").center().row_span(2).valign(VerticalAlign::Middle).background("BDD7EE"),
1709            TableCellPart::new("Code Review").center(),
1710        ]))
1711        .add_row(TableRowPart::new(vec![
1712            TableCellPart::new("10:00 AM").center().background("E2EFDA"),
1713            TableCellPart::merged(),
1714            TableCellPart::new("Sprint Planning").center().background("FCE4D6"),
1715        ]));
1716    println!("   │       └── Row spans for multi-hour events");
1717
1718    // -------------------------------------------------------------------------
1719    // Complex Animation Sequences
1720    // -------------------------------------------------------------------------
1721    println!("   ├── Complex Animation Sequences:");
1722    
1723    // Sequence 1: Title entrance with staggered content
1724    println!("   │   ┌── Staggered Entrance Sequence:");
1725    let title_anim = Animation::new(2, AnimationEffect::Fade)
1726        .trigger(AnimationTrigger::OnClick)
1727        .duration(500);
1728    let content1 = Animation::new(3, AnimationEffect::FlyIn)
1729        .trigger(AnimationTrigger::AfterPrevious)
1730        .direction(AnimationDirection::Left)
1731        .duration(400)
1732        .delay(200);
1733    let content2 = Animation::new(4, AnimationEffect::FlyIn)
1734        .trigger(AnimationTrigger::AfterPrevious)
1735        .direction(AnimationDirection::Left)
1736        .duration(400)
1737        .delay(100);
1738    let content3 = Animation::new(5, AnimationEffect::FlyIn)
1739        .trigger(AnimationTrigger::AfterPrevious)
1740        .direction(AnimationDirection::Left)
1741        .duration(400)
1742        .delay(100);
1743    let staggered = SlideAnimations::new()
1744        .add(title_anim)
1745        .add(content1)
1746        .add(content2)
1747        .add(content3)
1748        .transition(SlideTransition::new(TransitionEffect::Push).direction(AnimationDirection::Left).duration(750));
1749    let staggered_xml = staggered.to_timing_xml()?;
1750    println!("   │   │   ├── Title: Fade on click");
1751    println!("   │   │   ├── Content 1-3: FlyIn with 100ms stagger");
1752    println!("   │   │   ├── Transition: Push from left (750ms)");
1753    println!("   │   │   └── XML: {} bytes", staggered_xml.len());
1754
1755    // Sequence 2: Emphasis and exit
1756    println!("   │   ├── Emphasis + Exit Sequence:");
1757    let emphasis = Animation::new(6, AnimationEffect::Pulse)
1758        .trigger(AnimationTrigger::OnClick)
1759        .duration(1000)
1760        .repeat(3);
1761    let exit = Animation::new(6, AnimationEffect::FadeOut)
1762        .trigger(AnimationTrigger::AfterPrevious)
1763        .duration(500);
1764    let _emphasis_seq = SlideAnimations::new()
1765        .add(emphasis)
1766        .add(exit);
1767    println!("   │   │   ├── Pulse 3x on click, then fade out");
1768    println!("   │   │   └── Same shape, sequential effects");
1769
1770    // Sequence 3: Motion path
1771    println!("   │   └── Motion Path Animation:");
1772    let _motion = Animation::new(7, AnimationEffect::Lines)
1773        .trigger(AnimationTrigger::OnClick)
1774        .duration(2000);
1775    println!("   │       └── Custom path: Lines, Arcs, Turns, Loops");
1776
1777    // -------------------------------------------------------------------------
1778    // SmartArt Combinations
1779    // -------------------------------------------------------------------------
1780    println!("   ├── SmartArt Layout Examples:");
1781    
1782    // Process flow
1783    println!("   │   ┌── Process Flow (5 steps):");
1784    let process = SmartArtPart::new(1, SmartArtLayout::BasicProcess)
1785        .add_items(vec!["Research", "Design", "Develop", "Test", "Deploy"])
1786        .position(EMU_PER_INCH / 2, EMU_PER_INCH * 2)
1787        .size(EMU_PER_INCH * 8, EMU_PER_INCH * 2);
1788    println!("   │   │   └── {} nodes in horizontal flow", process.nodes().len());
1789
1790    // Organization chart
1791    println!("   │   ├── Organization Chart:");
1792    let org = SmartArtPart::new(2, SmartArtLayout::OrgChart)
1793        .add_items(vec!["CEO", "CTO", "CFO", "VP Engineering", "VP Sales"]);
1794    println!("   │   │   └── Hierarchical structure with {} positions", org.nodes().len());
1795
1796    // Cycle diagram
1797    println!("   │   ├── Cycle Diagram:");
1798    let cycle = SmartArtPart::new(3, SmartArtLayout::BasicCycle)
1799        .add_items(vec!["Plan", "Do", "Check", "Act"]);
1800    println!("   │   │   └── PDCA cycle with {} phases", cycle.nodes().len());
1801
1802    // Venn diagram
1803    println!("   │   ├── Venn Diagram:");
1804    let _venn = SmartArtPart::new(4, SmartArtLayout::BasicVenn)
1805        .add_items(vec!["Skills", "Passion", "Market Need"]);
1806    println!("   │   │   └── 3-circle Venn for Ikigai concept");
1807
1808    // Pyramid
1809    println!("   │   └── Pyramid:");
1810    let pyramid = SmartArtPart::new(5, SmartArtLayout::BasicPyramid)
1811        .add_items(vec!["Self-Actualization", "Esteem", "Love/Belonging", "Safety", "Physiological"]);
1812    println!("   │       └── Maslow's hierarchy with {} levels", pyramid.nodes().len());
1813
1814    // -------------------------------------------------------------------------
1815    // 3D Model Configurations
1816    // -------------------------------------------------------------------------
1817    println!("   ├── 3D Model Configurations:");
1818    
1819    // Product showcase
1820    println!("   │   ┌── Product Showcase:");
1821    let _product_3d = Model3DPart::new(1, Model3DFormat::Glb, vec![0; 100])
1822        .camera(CameraPreset::IsometricTopUp)
1823        .rotation(0.0, 45.0, 0.0)
1824        .zoom(1.2)
1825        .position(EMU_PER_INCH * 2, EMU_PER_INCH * 2)
1826        .size(EMU_PER_INCH * 4, EMU_PER_INCH * 4);
1827    println!("   │   │   ├── Camera: Isometric top-up view");
1828    println!("   │   │   ├── Rotation: 45° Y-axis for best angle");
1829    println!("   │   │   └── Zoom: 1.2x for detail");
1830
1831    // Architectural model
1832    println!("   │   ├── Architectural Model:");
1833    let _arch_3d = Model3DPart::new(2, Model3DFormat::Gltf, vec![0; 100])
1834        .camera(CameraPreset::Front)
1835        .rotation(15.0, -30.0, 0.0)
1836        .ambient_light("FFFFCC");
1837    println!("   │   │   ├── Camera: Front view with tilt");
1838    println!("   │   │   └── Ambient: Warm lighting (FFFFCC)");
1839
1840    // Technical diagram
1841    println!("   │   └── Technical Diagram:");
1842    let _tech_3d = Model3DPart::new(3, Model3DFormat::Obj, vec![0; 100])
1843        .camera(CameraPreset::IsometricOffAxis1Top)
1844        .rotation(0.0, 0.0, 0.0);
1845    println!("   │       └── Camera: Off-axis isometric for exploded view");
1846
1847    // -------------------------------------------------------------------------
1848    // Theme + Master + Layout Combination
1849    // -------------------------------------------------------------------------
1850    println!("   ├── Theme + Master + Layout Integration:");
1851    
1852    // Corporate theme
1853    let mut corp_theme = ThemePart::new(1);
1854    corp_theme.set_name("Corporate Blue");
1855    corp_theme.set_major_font("Segoe UI");
1856    corp_theme.set_minor_font("Segoe UI Light");
1857    corp_theme.set_color("dk1", "000000");
1858    corp_theme.set_color("lt1", "FFFFFF");
1859    corp_theme.set_color("dk2", "1F497D");
1860    corp_theme.set_color("lt2", "EEECE1");
1861    corp_theme.set_color("accent1", "4472C4");
1862    corp_theme.set_color("accent2", "ED7D31");
1863    corp_theme.set_color("accent3", "A5A5A5");
1864    corp_theme.set_color("accent4", "FFC000");
1865    corp_theme.set_color("accent5", "5B9BD5");
1866    corp_theme.set_color("accent6", "70AD47");
1867    let theme_xml = corp_theme.to_xml()?;
1868    println!("   │   ├── Theme: Corporate Blue");
1869    println!("   │   │   ├── Fonts: Segoe UI / Segoe UI Light");
1870    println!("   │   │   ├── 12 color slots defined");
1871    println!("   │   │   └── XML: {} bytes", theme_xml.len());
1872
1873    // Master with multiple layouts
1874    let mut corp_master = SlideMasterPart::new(1);
1875    corp_master.set_name("Corporate Master");
1876    corp_master.add_layout_rel_id("rId2"); // Title
1877    corp_master.add_layout_rel_id("rId3"); // Title + Content
1878    corp_master.add_layout_rel_id("rId4"); // Section Header
1879    corp_master.add_layout_rel_id("rId5"); // Two Content
1880    corp_master.add_layout_rel_id("rId6"); // Comparison
1881    corp_master.add_layout_rel_id("rId7"); // Title Only
1882    corp_master.add_layout_rel_id("rId8"); // Blank
1883    println!("   │   └── Master: {} with {} layouts linked", corp_master.name(), corp_master.layout_rel_ids().len());
1884
1885    // -------------------------------------------------------------------------
1886    // VBA + Custom XML Integration
1887    // -------------------------------------------------------------------------
1888    println!("   ├── VBA + Custom XML Integration:");
1889    
1890    // VBA with multiple modules
1891    let _vba_project = VbaProjectPart::new()
1892        .add_module(VbaModule::new("AutoRun", r#"
1893Sub Auto_Open()
1894    MsgBox "Welcome to the presentation!"
1895End Sub
1896
1897Sub NavigateToSlide(slideNum As Integer)
1898    SlideShowWindows(1).View.GotoSlide slideNum
1899End Sub
1900"#))
1901        .add_module(VbaModule::new("DataHelpers", r#"
1902Function GetCustomData(key As String) As String
1903    ' Read from Custom XML part
1904    GetCustomData = ActivePresentation.CustomXMLParts(1).SelectSingleNode("//" & key).Text
1905End Function
1906"#))
1907        .add_module(VbaModule::class("SlideController", r#"
1908Private currentSlide As Integer
1909
1910Public Sub NextSlide()
1911    currentSlide = currentSlide + 1
1912    NavigateToSlide currentSlide
1913End Sub
1914"#));
1915    println!("   │   ├── VBA Project:");
1916    println!("   │   │   ├── AutoRun: Auto_Open, NavigateToSlide");
1917    println!("   │   │   ├── DataHelpers: GetCustomData (reads Custom XML)");
1918    println!("   │   │   └── SlideController: Class for navigation");
1919
1920    // Custom XML with structured data
1921    let app_config = CustomXmlPart::new(1, "presentationConfig")
1922        .namespace("http://company.com/pptx/config")
1923        .property("version", "2.1.0")
1924        .property("author", "Demo User")
1925        .property("department", "Engineering")
1926        .property("confidentiality", "Internal")
1927        .property("lastModified", "2024-01-15T10:30:00Z");
1928    let config_xml = app_config.to_xml()?;
1929    println!("   │   └── Custom XML:");
1930    println!("   │       ├── Namespace: http://company.com/pptx/config");
1931    println!("   │       ├── Properties: version, author, department, etc.");
1932    println!("   │       └── XML: {} bytes", config_xml.len());
1933
1934    // -------------------------------------------------------------------------
1935    // Embedded Fonts with Variants
1936    // -------------------------------------------------------------------------
1937    println!("   ├── Embedded Font Collection:");
1938    let mut font_collection = EmbeddedFontCollection::new();
1939    font_collection.add("Corporate Sans", vec![0; 1000]);
1940    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Bold);
1941    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::Italic);
1942    font_collection.add_with_type("Corporate Sans", vec![0; 1000], FontEmbedType::BoldItalic);
1943    font_collection.add("Code Mono", vec![0; 800]);
1944    let fonts_xml = font_collection.to_xml();
1945    println!("   │   ├── Corporate Sans: Regular, Bold, Italic, BoldItalic");
1946    println!("   │   ├── Code Mono: Regular");
1947    println!("   │   ├── Total: {} font files", font_collection.len());
1948    println!("   │   └── XML: {} bytes", fonts_xml.len());
1949
1950    // -------------------------------------------------------------------------
1951    // Handout with Full Configuration
1952    // -------------------------------------------------------------------------
1953    println!("   └── Handout Master Configuration:");
1954    let handout = HandoutMasterPart::new()
1955        .layout(HandoutLayout::SlidesPerPage6)
1956        .header("Q1 2024 Strategy Review")
1957        .footer("Confidential - Internal Use Only");
1958    let handout_xml = handout.to_xml()?;
1959    println!("       ├── Layout: 6 slides per page");
1960    println!("       ├── Header: Q1 2024 Strategy Review");
1961    println!("       ├── Footer: Confidential - Internal Use Only");
1962    println!("       └── XML: {} bytes", handout_xml.len());
1963
1964    // =========================================================================
1965    // Summary
1966    // =========================================================================
1967    println!("\n╔══════════════════════════════════════════════════════════════╗");
1968    println!("║                    Element Coverage Summary                   ║");
1969    println!("╠══════════════════════════════════════════════════════════════╣");
1970    println!("║  LAYOUTS (6 types):                                          ║");
1971    println!("║    ✓ CenteredTitle    ✓ TitleOnly      ✓ TitleAndContent     ║");
1972    println!("║    ✓ TitleAndBigContent  ✓ TwoColumn   ✓ Blank               ║");
1973    println!("╠══════════════════════════════════════════════════════════════╣");
1974    println!("║  TEXT FORMATTING:                                            ║");
1975    println!("║    ✓ Bold            ✓ Italic         ✓ Underline            ║");
1976    println!("║    ✓ Font Size       ✓ Font Color     ✓ Title/Content styles ║");
1977    println!("╠══════════════════════════════════════════════════════════════╣");
1978    println!("║  TABLES:                                                     ║");
1979    println!("║    ✓ Multiple rows/columns  ✓ Bold cells  ✓ Background colors║");
1980    println!("║    ✓ Header styling         ✓ Position control               ║");
1981    println!("╠══════════════════════════════════════════════════════════════╣");
1982    println!("║  CHARTS:                                                     ║");
1983    println!("║    ✓ Bar Chart       ✓ Line Chart     ✓ Pie Chart            ║");
1984    println!("║    ✓ Multiple series ✓ Categories                            ║");
1985    println!("╠══════════════════════════════════════════════════════════════╣");
1986    println!("║  SHAPES:                                                     ║");
1987    println!("║    ✓ Rectangle       ✓ Ellipse        ✓ RoundedRectangle     ║");
1988    println!("║    ✓ Triangle        ✓ Diamond        ✓ Color fills          ║");
1989    println!("║    ✓ Gradient fills  ✓ Transparency   ✓ Text in shapes       ║");
1990    println!("╠══════════════════════════════════════════════════════════════╣");
1991    println!("║  CONNECTORS (NEW):                                           ║");
1992    println!("║    ✓ Straight        ✓ Elbow          ✓ Curved               ║");
1993    println!("║    ✓ Arrow types     ✓ Dash styles    ✓ Line colors/widths   ║");
1994    println!("╠══════════════════════════════════════════════════════════════╣");
1995    println!("║  IMAGES:                                                     ║");
1996    println!("║    ✓ Image placeholders  ✓ Position   ✓ Dimensions           ║");
1997    println!("╠══════════════════════════════════════════════════════════════╣");
1998    println!("║  PACKAGE:                                                    ║");
1999    println!("║    ✓ Create PPTX     ✓ Read PPTX      ✓ Analyze contents     ║");
2000    println!("╠══════════════════════════════════════════════════════════════╣");
2001    println!("║  PARTS API (NEW):                                            ║");
2002    println!("║    ✓ SlideLayoutPart (11 types)  ✓ SlideMasterPart           ║");
2003    println!("║    ✓ ThemePart (colors/fonts)    ✓ NotesSlidePart            ║");
2004    println!("║    ✓ AppPropertiesPart           ✓ MediaPart (10 formats)    ║");
2005    println!("║    ✓ TablePart (cell formatting) ✓ ContentTypesPart          ║");
2006    println!("╠══════════════════════════════════════════════════════════════╣");
2007    println!("║  ELEMENTS API:                                               ║");
2008    println!("║    ✓ RgbColor        ✓ SchemeColor    ✓ Color enum           ║");
2009    println!("║    ✓ Position        ✓ Size           ✓ Transform            ║");
2010    println!("║    ✓ EMU conversions (inches, cm, mm, pt)                    ║");
2011    println!("╠══════════════════════════════════════════════════════════════╣");
2012    println!("║  ADVANCED FEATURES (NEW):                                    ║");
2013    println!("║    ✓ Animation (50+ effects)  ✓ Transitions (27 types)       ║");
2014    println!("║    ✓ SmartArt (25 layouts)    ✓ 3D Models (GLB/GLTF/OBJ)     ║");
2015    println!("║    ✓ VBA Macros (.pptm)       ✓ Embedded Fonts               ║");
2016    println!("║    ✓ Custom XML               ✓ Handout Master               ║");
2017    println!("║    ✓ Table borders/alignment  ✓ Merged cells                 ║");
2018    println!("╠══════════════════════════════════════════════════════════════╣");
2019    println!("║  DIMENSION API (NEW):                                        ║");
2020    println!("║    ✓ EMU / Inches / Cm / Pt / Ratio / Percent units          ║");
2021    println!("║    ✓ from_dimensions() constructor                           ║");
2022    println!("║    ✓ Fluent .at() and .with_dimensions() chaining            ║");
2023    println!("║    ✓ Mixed-unit positioning (e.g. inches + percent)          ║");
2024    println!("╠══════════════════════════════════════════════════════════════╣");
2025    println!("║  Output: comprehensive_demo.pptx ({} slides, {} KB)         ║", 
2026             slides.len(), pptx_data.len() / 1024);
2027    println!("╚══════════════════════════════════════════════════════════════╝");
2028
2029    Ok(())
2030}
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 · 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> Instrument for T

Source§

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

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

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.

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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