Appearance
Class: SlideMaster ​
A deck's slide master (slideMasterN.xml) as a modeled object. Exposes the property tiers a bound slide inherits: the colorMap (token → theme slot), its theme, its shapes and the placeholders subset of them, its own background, and the layouts that build on it. Reachable from SlideLayout.master and Slide.master.
shapes is where a template's non-placeholder furniture lives: the header band, the rule under the title, the logo. Whether a given slide draws them is Slide.showMasterSp (and, for a layout, SlideLayout.showMasterSp).
Extends ​
TemplatePart
Constructors ​
Constructor ​
new SlideMaster(
opc,part):SlideMaster
Parameters ​
| Parameter | Type | Description |
|---|---|---|
opc | OpcPackage | The package this part belongs to, for reaching related parts (theme, master, media). |
part | Part | This tier's OPC part. |
Returns ​
SlideMaster
Inherited from ​
TemplatePart.constructor
Properties ​
opc ​
readonlyopc:OpcPackage
The package this part belongs to, for reaching related parts (theme, master, media).
Inherited from ​
TemplatePart.opc
part ​
readonlypart:Part
This tier's OPC part.
Inherited from ​
TemplatePart.part
Accessors ​
background ​
Get Signature ​
get background():
SlideBackground|null
The master's own background (p:cSld/p:bg), decoded, or null when it defines none. Scoped to the master's own element — a slide's effective background, resolved through the slide → layout → master chain, is Slide.background.
Returns ​
SlideBackground | null
Overrides ​
TemplatePart.background
colorMap ​
Get Signature ​
get colorMap():
Record<ColorMapToken,string|null>
The master's colour map (p:clrMap): each of the 12 ColorMapTokens mapped to the ThemeColorSlot it resolves through. This is the indirection that lets a slide's schemeClr val="tx1" reach a theme slot (e.g. tx1 → dk1). A token the map omits reads null.
Returns ​
Record<ColorMapToken, string | null>
layouts ​
Get Signature ​
get layouts():
SlideLayout[]
The layouts built on this master (via p:sldLayoutIdLst → its relationships), in list order.
Returns ​
name ​
Get Signature ​
get name():
string
The authoring name (p:cSld/@name), or '' when unnamed.
Returns ​
string
Inherited from ​
TemplatePart.name
partName ​
Get Signature ​
get partName():
string
Partname of this part.
Returns ​
string
Inherited from ​
TemplatePart.partName
placeholders ​
Get Signature ​
get placeholders():
Placeholder[]
This tier's placeholder shapes (p:sp carrying a p:ph), in document order.
Returns ​
Inherited from ​
TemplatePart.placeholders
relationships ​
Get Signature ​
get relationships():
Relationships
This part's relationships (its theme or master, image embeds, hyperlinks, …).
Returns ​
Inherited from ​
TemplatePart.relationships
shapes ​
Get Signature ​
get shapes():
AnyShape[]
Every shape in this tier's p:cSld/p:spTree, in document order — the same AnyShape union Slide.shapes returns, so shape-walking code applies unchanged.
placeholders is the filtered view of the same tree.
Returns ​
AnyShape[]
Inherited from ​
TemplatePart.shapes
theme ​
Get Signature ​
get theme():
Theme|null
The master's theme (via its theme relationship), or null when absent.
Returns ​
Theme | null
Overrides ​
TemplatePart.theme
Methods ​
shapeByIdDeep() ​
shapeByIdDeep(
id):AnyShape|undefined
The shape anywhere in this tier's tree with the given drawing id, or undefined.
Parameters ​
| Parameter | Type |
|---|---|
id | number |
Returns ​
AnyShape | undefined
Inherited from ​
TemplatePart.shapeByIdDeep
themeContext() ​
themeContext():
ThemeContext
This tier's colour/font context, resolved once and cached. Backs each Placeholder's text frame.
Returns ​
Inherited from ​
TemplatePart.themeContext