Slide — Aspose.Slides FOSS for C++ API Reference

The Slide class represents a single slide in a presentation. It provides access to shapes, layout slide, notes, and comments.

Namespace: Aspose::Slides::Foss

#include <Aspose/Slides/Foss/slide.h>
class Slide

Header: include/Aspose/Slides/Foss/slide.h


Properties

PropertyAccessorDescription
shapes()ReadReturns a ShapeCollection& of shapes on this slide.
shapes() constReadReturns a const ShapeCollection& of shapes on this slide.
layout_slide()ReadReturns the ILayoutSlide associated with this slide.
notes_slide_manager()ReadReturns the INotesSlideManager for managing speaker notes.

Methods

get_slide_comments()

Returns the comments associated with this slide.

remove()

Remove this slide from the presentation.


Usage Examples

Access Slide Shapes

#include <Aspose/Slides/Foss/presentation.h>
using namespace Aspose::Slides::Foss;

Presentation prs("deck.pptx");
auto& slide = prs.slides()[0];
std::cout << "Shape count: " << slide.shapes().size() << std::endl;

Remove a Slide

Presentation prs("deck.pptx");
auto& slide = prs.slides()[1];
slide.remove();
prs.save("trimmed.pptx", SaveFormat::Pptx);

See Also