Slide object. Provides access to shapes and slide-level properties.
| 174 | |
| 175 | |
| 176 | class Slide(_BaseSlide): |
| 177 | """Slide object. Provides access to shapes and slide-level properties.""" |
| 178 | |
| 179 | part: SlidePart # pyright: ignore[reportIncompatibleMethodOverride] |
| 180 | |
| 181 | @property |
| 182 | def follow_master_background(self): |
| 183 | """|True| if this slide inherits the slide master background. |
| 184 | |
| 185 | Assigning |False| causes background inheritance from the master to be |
| 186 | interrupted; if there is no custom background for this slide, |
| 187 | a default background is added. If a custom background already exists |
| 188 | for this slide, assigning |False| has no effect. |
| 189 | |
| 190 | Assigning |True| causes any custom background for this slide to be |
| 191 | deleted and inheritance from the master restored. |
| 192 | """ |
| 193 | return self._element.bg is None |
| 194 | |
| 195 | @property |
| 196 | def has_notes_slide(self) -> bool: |
| 197 | """`True` if this slide has a notes slide, `False` otherwise. |
| 198 | |
| 199 | A notes slide is created by :attr:`.notes_slide` when one doesn't exist; use this property |
| 200 | to test for a notes slide without the possible side effect of creating one. |
| 201 | """ |
| 202 | return self.part.has_notes_slide |
| 203 | |
| 204 | @property |
| 205 | def notes_slide(self) -> NotesSlide: |
| 206 | """The |NotesSlide| instance for this slide. |
| 207 | |
| 208 | If the slide does not have a notes slide, one is created. The same single instance is |
| 209 | returned on each call. |
| 210 | """ |
| 211 | return self.part.notes_slide |
| 212 | |
| 213 | @lazyproperty |
| 214 | def placeholders(self) -> SlidePlaceholders: |
| 215 | """Sequence of placeholder shapes in this slide.""" |
| 216 | return SlidePlaceholders(self._element.spTree, self) |
| 217 | |
| 218 | @lazyproperty |
| 219 | def shapes(self) -> SlideShapes: |
| 220 | """Sequence of shape objects appearing on this slide.""" |
| 221 | return SlideShapes(self._element.spTree, self) |
| 222 | |
| 223 | @property |
| 224 | def slide_id(self) -> int: |
| 225 | """Integer value that uniquely identifies this slide within this presentation. |
| 226 | |
| 227 | The slide id does not change if the position of this slide in the slide sequence is changed |
| 228 | by adding, rearranging, or deleting slides. |
| 229 | """ |
| 230 | return self.part.slide_id |
| 231 | |
| 232 | @property |
| 233 | def slide_layout(self) -> SlideLayout: |
no outgoing calls
searching dependent graphs…