> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Other classes: Slides and shows

## `CustomShow`

Extension (VBA `NamedSlideShow`): a custom show, an ordered pick of the deck's slides.

Import from `@reductoai/pptx/officejs`.

### CustomShow properties

| Name | Type | Description |
| - | - | - |
| `id` | `string` | read-only |
| `name` | `string` | |
| `slideIds` | `string[]` | read-only VBA `SlideIDs`: the slide ids in show order. |
| `slides` | `Slide[]` | read-only |

### `CustomShow.delete()`

```ts theme={null}
delete(): void
```

### `CustomShow.setSlides()`

```ts theme={null}
setSlides(slides: readonly SlideRef[]): void
```

Replaces the show's slides; a slide may appear more than once.

## `CustomShowCollection`

Extension (VBA `SlideShowSettings.NamedSlideShows`): the deck's custom shows; `getItem` takes an id.

Import from `@reductoai/pptx/officejs`.

### CustomShowCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `T[]` | read-only |

### `CustomShowCollection.add()`

```ts theme={null}
add(name: string, slides: readonly SlideRef[]): CustomShow
```

VBA `NamedSlideShows.Add`: a show of these slides, in this order.

### `CustomShowCollection.getCount()`

```ts theme={null}
getCount(): ClientResult<number>
```

### `CustomShowCollection.getItem()`

```ts theme={null}
getItem(key: string): CustomShow
```

### `CustomShowCollection.getItemAt()`

```ts theme={null}
getItemAt(index: number): CustomShow
```

### `CustomShowCollection.getItemByName()`

```ts theme={null}
getItemByName(name: string): CustomShow
```

The show with this name; throws when none has it.

### `CustomShowCollection.getItemOrNullObject()`

```ts theme={null}
getItemOrNullObject(key: string): CustomShow & { isNullObject: boolean }
```

Office.js null-object variant; inspect `isNullObject` before other members.

## `Guide`

One guide: a line across the slide at `position` points from the top or left edge.

Import from `@reductoai/pptx/officejs`.

### Guide properties

| Name | Type | Description |
| - | - | - |
| `id` | `number` | read-only |
| `color` | `string` | `#RRGGBB`. |
| `orientation` | `GuideOrientation` | read-only |
| `position` | `number` | Points from the slide's top edge (horizontal) or left edge (vertical), kept on the slide. |

### `Guide.delete()`

```ts theme={null}
delete(): void
```

## `GuideCollection`

Import from `@reductoai/pptx/officejs`.

### GuideCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `Guide[]` | read-only |

### `GuideCollection.add()`

```ts theme={null}
add(orientation: GuideOrientation, position: number): Guide
```

VBA `Guides.Add`: a new guide at `position` points, kept on the slide.

### `GuideCollection.getCount()`

```ts theme={null}
getCount(): number
```

### `GuideCollection.getItem()`

```ts theme={null}
getItem(id: number): Guide
```

### `GuideCollection.getItemOrNullObject()`

```ts theme={null}
getItemOrNullObject(id: number): Guide | null
```

## `HeaderFooter`

VBA `HeaderFooter`: one of the footer, slide number or date placeholders of a slide or a master.

Import from `@reductoai/pptx/officejs`.

### HeaderFooter properties

| Name | Type | Description |
| - | - | - |
| `format` | `DateTimeFormat` | Date only: the format of the date field (VBA `PpDateTimeFormat`). |
| `text` | `string` | The placeholder's text; on a master the new text goes to the master and each of its layouts. |
| `useFormat` | `boolean` | Date only: the date is a field that shows today in `format`. |
| `visible` | `boolean` | On a slide: it carries the placeholder. On a master: new slides get it (`p:hf`). |

## `HeadersFooters`

VBA `HeadersFooters` of a slide or a slide master.

Import from `@reductoai/pptx/officejs`.

### HeadersFooters properties

| Name | Type | Description |
| - | - | - |
| `dateAndTime` | `HeaderFooter` | read-only |
| `displayOnTitleSlide` | `boolean` | The presentation's `showSpecialPlsOnTitleSld`: title slides take the footers too. |
| `footer` | `HeaderFooter` | read-only |
| `slideNumber` | `HeaderFooter` | read-only |

## `MediaUrls`

Blob URLs of media parts: one per part while a player holds it, freed when the last one lets go.

Not exported by name. You get it from the API.

### MediaUrls properties

| Name | Type | Description |
| - | - | - |
| `held` | `string[]` | read-only Parts with a live URL. |

### `MediaUrls.hold()`

```ts theme={null}
hold(holder: object, part: string): string | null
```

### `MediaUrls.release()`

```ts theme={null}
release(holder: object): void
```

## `Section`

Extension (VBA `SectionProperties` item): a named run of slides (`p14:section`).

Import from `@reductoai/pptx/officejs`.

### Section properties

| Name | Type | Description |
| - | - | - |
| `id` | `string` | read-only |
| `index` | `number` | read-only Zero-based position among the sections. |
| `name` | `string` | |
| `slides` | `Slide[]` | read-only The section's slides in deck order. |

### `Section.delete()`

```ts theme={null}
delete(withSlides?: boolean): void
```

Removes the section; its slides join the section before it unless `withSlides` deletes them.

### `Section.move()`

```ts theme={null}
move(index: number): void
```

Moves the section and its slides to position `index` among the sections.

## `SectionCollection`

Extension (VBA `Presentation.SectionProperties`): the deck's sections in order; `getItem` takes an id.

Import from `@reductoai/pptx/officejs`.

### SectionCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `T[]` | read-only |

### `SectionCollection.add()`

```ts theme={null}
add(name: string, beforeSlide?: string | Slide): Section
```

VBA `AddBeforeSlide`: a section from `beforeSlide` on; without one it is added empty at the end.
A deck with no sections first gets a "Default Section" over the slides before it, as in PowerPoint.

### `SectionCollection.getCount()`

```ts theme={null}
getCount(): ClientResult<number>
```

### `SectionCollection.getItem()`

```ts theme={null}
getItem(key: string): Section
```

### `SectionCollection.getItemAt()`

```ts theme={null}
getItemAt(index: number): Section
```

### `SectionCollection.getItemByName()`

```ts theme={null}
getItemByName(name: string): Section
```

The first section with this name; throws when none has it.

### `SectionCollection.getItemOrNullObject()`

```ts theme={null}
getItemOrNullObject(key: string): Section & { isNullObject: boolean }
```

Office.js null-object variant; inspect `isNullObject` before other members.

## `ShowMedia`

Not exported by name. You get it from the API.

### `ShowMedia.clickAt()`

```ts theme={null}
clickAt(x: number, y: number): boolean
```

A click at `x`, `y` (hmm) on a trigger shape, a group member first, runs its calls. A video or
sound no timing names plays or pauses, as PowerPoint's own control bar would.

### `ShowMedia.enter()`

```ts theme={null}
enter(index: number, timing: MediaTiming | undefined): void
```

Slide `index` came up: its media loads and what plays Automatically starts.

### `ShowMedia.paintOf()`

```ts theme={null}
paintOf(index: number, page: LayoutPage): ShowMediaPaint | undefined
```

How slide `index`'s `page` paints while it is on screen; undefined for any other slide.

### `ShowMedia.step()`

```ts theme={null}
step(): boolean
```

Runs the next On Click step of the slide; false when none is left.

### `ShowMedia.stop()`

```ts theme={null}
stop(): void
```

## `SlideBackgroundFill`

`PowerPoint.SlideBackgroundFill`. Reads follow the inherited background; a
set writes the part's own `p:bg`, so the part stops following its master.

Import from `@reductoai/pptx/officejs`.

### SlideBackgroundFill properties

| Name | Type | Description |
| - | - | - |
| `type` | `SlideBackgroundFillType` | read-only |

### `SlideBackgroundFill.getGradientFillOrNullObject()`

```ts theme={null}
getGradientFillOrNullObject(): Nullable<SlideBackgroundGradientFill>
```

### `SlideBackgroundFill.getPatternFillOrNullObject()`

```ts theme={null}
getPatternFillOrNullObject(): Nullable<SlideBackgroundPatternFill>
```

### `SlideBackgroundFill.getPictureOrTextureFillOrNullObject()`

```ts theme={null}
getPictureOrTextureFillOrNullObject(): Nullable<SlideBackgroundPictureOrTextureFill>
```

### `SlideBackgroundFill.getSolidFillOrNullObject()`

```ts theme={null}
getSolidFillOrNullObject(): Nullable<SlideBackgroundSolidFill>
```

### `SlideBackgroundFill.setGradientFill()`

```ts theme={null}
setGradientFill(options?: SlideBackgroundGradientFillOptions): void
```

Two stops from the current colour to its 25% shade.

### `SlideBackgroundFill.setPatternFill()`

```ts theme={null}
setPatternFill(options?: SlideBackgroundPatternFillOptions): void
```

### `SlideBackgroundFill.setPictureOrTextureFill()`

```ts theme={null}
setPictureOrTextureFill(options?: SlideBackgroundPictureOrTextureFillOptions): void
```

### `SlideBackgroundFill.setSolidFill()`

```ts theme={null}
setSolidFill(options?: SlideBackgroundSolidFillOptions): void
```

## `SlideBackgroundGradientFill`

`PowerPoint.SlideBackgroundGradientFill`.

Import from `@reductoai/pptx/officejs`.

### SlideBackgroundGradientFill properties

| Name | Type | Description |
| - | - | - |
| `gradientAngle` | `number` | Extension (VBA `FillFormat.GradientAngle`): clockwise degrees, 0 = left to right. |
| `gradientFocus` | `GradientFocus` | Extension (`a:fillToRect`): where a path gradient starts, as insets of the slide (0–1). |
| `gradientStops` | `GradientStops` | read-only Extension (VBA `FillFormat.GradientStops`); the slide's own gradient only. |
| `type` | `SlideBackgroundGradientFillType` | |

## `SlideBackgroundPatternFill`

`PowerPoint.SlideBackgroundPatternFill`.

Import from `@reductoai/pptx/officejs`.

### SlideBackgroundPatternFill properties

| Name | Type | Description |
| - | - | - |
| `backgroundColor` | `string` | |
| `foregroundColor` | `string` | |
| `pattern` | `SlideBackgroundPatternFillType` | |

## `SlideBackgroundPictureOrTextureFill`

`PowerPoint.SlideBackgroundPictureOrTextureFill`.

Import from `@reductoai/pptx/officejs`.

### SlideBackgroundPictureOrTextureFill properties

| Name | Type | Description |
| - | - | - |
| `transparency` | `number` | |

### `SlideBackgroundPictureOrTextureFill.setImage()`

```ts theme={null}
setImage(base64EncodedImage: string): void
```

## `SlideBackgroundSolidFill`

`PowerPoint.SlideBackgroundSolidFill`.

Import from `@reductoai/pptx/officejs`.

### SlideBackgroundSolidFill properties

| Name | Type | Description |
| - | - | - |
| `color` | `string` | |
| `transparency` | `number` | |

## `SlideLayoutBackground`

`PowerPoint.SlideLayoutBackground`.

Import from `@reductoai/pptx/officejs`. Extends [`SlideBackground`](https://docs.reducto.ai/office/pptx/api/themes#slidebackground).

### SlideLayoutBackground properties

| Name | Type | Description |
| - | - | - |
| `fill` | `SlideBackgroundFill` | read-only |
| `areBackgroundGraphicsHidden` | `boolean` | |
| `colorMapping` | `SlideColorMapping` | Extension (`p:clrMapOvr`): "Dark" maps background 1/2 to dark 1/2 and text 1/2 to light 1/2, as PowerPoint's built-in dark layouts do, so theme-coloured text turns light. |
| `isMasterBackgroundFollowed` | `boolean` | |

### `SlideLayoutBackground.reset()`

```ts theme={null}
reset(): void
```

## `SlideMasterBackground`

`PowerPoint.SlideMasterBackground`.

Import from `@reductoai/pptx/officejs`.

### SlideMasterBackground properties

| Name | Type | Description |
| - | - | - |
| `fill` | `SlideBackgroundFill` | read-only |

## `SlideShow`

Not exported by name. You get it from the API.

### SlideShow properties

| Name | Type | Description |
| - | - | - |
| `blank` | `"black" \| "white" \| null` | |
| `closed` | `boolean` | |
| `elapsedMs` | `number` | |
| `ended` | `boolean` | |
| `index` | `number` | The slide on screen, a deck index. |
| `mode` | `ShowMode` | read-only |
| `move` | `{ seq: number; transition?: ShowTransition }` | Bumped on each move; `transition` is how the screen got there. |
| `onClose` | `() => void` | |
| `over` | `boolean` | Set when the presenter a follower watches stops. |
| `paused` | `boolean` | |
| `peer` | `string \| undefined` | read-only The presenter a follower watches. |
| `slides` | `ShowSlide[]` | |
| `current` | `ShowSlide \| undefined` | read-only |
| `nextIndex` | `number \| undefined` | read-only The deck index of the slide a click would show next, if any. |
| `position` | `number` | read-only |
| `screen` | `Screen` | read-only |
| `shown` | `number[]` | read-only Slides the show plays; a hidden slide counts while it is on screen. |

### `SlideShow.click()`

```ts theme={null}
click(at?: { x: number; y: number }): void
```

A click on a trigger shape (`at`, hmm) runs it; else it moves on when the slide allows it (`advClick`).

### `SlideShow.close()`

```ts theme={null}
close(): void
```

### `SlideShow.follow()`

```ts theme={null}
follow(slide: number | undefined): void
```

A follower's presenter moved or stopped.

### `SlideShow.goTo()`

```ts theme={null}
goTo(index: number, forward?: boolean): void
```

Puts slide `index` up; `forward` plays its transition.

### `SlideShow.key()`

```ts theme={null}
key(event: KeyboardEvent): boolean
```

PowerPoint's slide show keys; true when the key was the show's.

### `SlideShow.next()`

```ts theme={null}
next(): void
```

The slide's next On Click media step plays before the show moves on.

### `SlideShow.previous()`

```ts theme={null}
previous(): void
```

### `SlideShow.resetTimer()`

```ts theme={null}
resetTimer(): void
```

### `SlideShow.screenOf()`

```ts theme={null}
screenOf(index: number | undefined): Screen
```

### `SlideShow.sync()`

```ts theme={null}
sync(): void
```

Reads the deck again after an edit: slides added, hidden or given notes.

### `SlideShow.toggleBlank()`

```ts theme={null}
toggleBlank(kind: "black" | "white"): void
```

### `SlideShow.togglePause()`

```ts theme={null}
togglePause(): void
```

### `SlideShow.useMedia()`

```ts theme={null}
useMedia(media: ShowMedia): void
```

Plays the slides' videos and sounds through `media`; a follower keeps the posters.
