Portion()
Contents
[
Hide
]ForEach::Portion(System::SharedPtr<Presentation>, ForEach::ForEachPortionCallback) method
Iterate each ForEach::Portion in the Presentation.
static void Aspose::Slides::LowCode::ForEach::Portion(System::SharedPtr<Presentation> pres, ForEach::ForEachPortionCallback forEachPortion)
Arguments
Parameter | Type | Description |
---|---|---|
pres | System::SharedPtr<Presentation> | Presentation to iterate portions |
forEachPortion | ForEach::ForEachPortionCallback | Callback that will be invoked for each portion |
Remarks
Portions will be iterated in all type of slides - ForEach::Slide, ForEach::MasterSlide and ForEach::LayoutSlide
auto pres = System::MakeObject<Presentation>(u"pres.pptx");
auto lambda = [](SharedPtr<Portion> portion, SharedPtr<Paragraph> para, SharedPtr<BaseSlide> slide, int32_t index)
{
System::Console::WriteLine(u"{0}, index: {1}", portion->get_Text(), index);
};
auto callback = std::function<void(SharedPtr<Portion> portion, SharedPtr<Paragraph> para, SharedPtr<BaseSlide> slide, int32_t index)>(lambda);
ForEach::Portion(pres, callback);
ForEach::Portion(System::SharedPtr<Presentation>, bool, ForEach::ForEachPortionCallback) method
Iterate each ForEach::Portion in the Presentation.
static void Aspose::Slides::LowCode::ForEach::Portion(System::SharedPtr<Presentation> pres, bool includeNotes, ForEach::ForEachPortionCallback forEachPortion)
Arguments
Parameter | Type | Description |
---|---|---|
pres | System::SharedPtr<Presentation> | Presentation to iterate portions |
includeNotes | bool | Flag that indicates whether NotesSlides should be included in processing. |
forEachPortion | ForEach::ForEachPortionCallback | Callback that will be invoked for each portion |
Remarks
Portions will be iterated in all type of slides - ForEach::Slide, ForEach::MasterSlide, ForEach::LayoutSlide and NotesSlide
auto pres = System::MakeObject<Presentation>(u"pres.pptx");
auto lambda = [](SharedPtr<Portion> portion, SharedPtr<Paragraph> para, SharedPtr<BaseSlide> slide, int32_t index)
{
System::Console::WriteLine(u"{0}, index: {1}", portion->get_Text(), index);
};
auto callback = std::function<void(SharedPtr<Portion> portion, SharedPtr<Paragraph> para, SharedPtr<BaseSlide> slide, int32_t index)>(lambda);
ForEach::Portion(pres, true, callback);
See Also
- Typedef SharedPtr
- Typedef ForEachPortionCallback
- Class Presentation
- Class ForEach
- Namespace Aspose::Slides::LowCode
- Library Aspose.Slides