Expand description
The DeckCraft document model.
A Presentation has slide masters (each with a theme and layouts) and slides. Each slide
uses a layout; placeholders on a slide inherit position, formatting and text styles from the
matching placeholder on its layout and master (resolve). Slides and masters sit behind
Arcs so an undo snapshot of the whole deck costs one clone of the slide list.
Re-exports§
pub use anim::AnimClass;pub use anim::AnimStart;pub use anim::Animation;pub use anim::Transition;pub use chart::Chart;pub use style::ColorBase;pub use style::ColorRef;pub use style::Effects;pub use style::Fill;pub use style::Line;pub use style::ShapeStyle;pub use table::Cell;pub use table::Table;pub use text::Paragraph;pub use text::Run;pub use text::RunProps;pub use text::TextBody;pub use theme::Theme;
Modules§
- anim
- Slide transitions and object animations.
- chart
- Charts: an embedded data grid plus type and element options.
- defaults
- A new presentation: one master with the standard set of layouts, master text styles, and a first title slide. Positions and sizes are our own (16:9 at 960 × 540 pt, 4:3 scaled).
- edit
- Text editing on a
TextBody: positions are (paragraph, character offset). Inserting text with\nsplits paragraphs; formatting a range splits runs at its ends. - resolve
- Inheritance: effective position, fill, line, body and text properties of a shape, following slide → layout placeholder → master placeholder → master text styles → theme.
- style
- Colours, fills, lines and effects.
- table
- Tables (graphic frames with
a:tbl). - text
- Text bodies: body properties, paragraphs, runs, list styles.
- theme
- Themes: colour scheme, font scheme and format scheme (the fill/line/effect “style matrix”).
- words
- Word boundaries in a paragraph, as PowerPoint’s Ctrl+arrow, Ctrl+Backspace/Delete and
double-click see them (observed black-box on PowerPoint for Windows, see
docs/ui-parity.md, Text editing keys).
Structs§
- Color
Scheme - A colour scheme: the twelve theme colours.
- Comment
- Custom
Path - One sub-path of a custom geometry: SVG-like commands in path units.
- Custom
Show - Header
Footer - Which placeholders slides show in the footer row (Header & Footer dialog).
- InkStroke
- One ink stroke (Draw tab): points in slide coordinates with pressure.
- Layout
- Layout
Id - Master
- Master
Id - Media
Clip - Embedded audio or video on a slide.
- MediaId
- Media
Item - An embedded file (image, audio, video, font, workbook).
- Placeholder
- Presentation
- Properties
- Document properties (File ▸ Properties).
- Rect
- A rectangle.
- Rgba
- An sRGB colour with straight alpha, components 0–255.
- Section
- Shape
- ShapeId
- Show
Settings - Slide Show ▸ Set Up Slide Show.
- Size
- A 2D size.
- Slide
- SlideId
- Xfrm
- A shape’s placement on its slide (or in its group’s child space): offset, extent, rotation (degrees clockwise) and flips. Rotation and flips are about the centre.
Enums§
- Background
- Background of a slide, layout or master.
- Color
Transform - One colour transform, in file units (percentages ×1000, angles ×60000), applied in order.
- Geom
- Shape geometry: a preset name with adjust values, or a custom path.
- Layout
Type - Model
Error - PhType
- Placeholder types.
- Scheme
Slot - The twelve theme colour slots, plus the mapped aliases (
bg1,tx1…) andphClr(the placeholder colour a style matrix entry is applied with). - Shape
Kind
Functions§
- find_
shape - find_
shape_ mut - map_
slot - Resolve
bg1/tx1/bg2/tx2through the colour mapmap(the default mapping when it has no entry). - parent_
of - The group directly holding
id:Some(None)for a top-level shape,Nonewhen absent. - sibling_
list_ mut - The list holding
idamong its siblings: the tree’s top level, or a group’s children. - walk
- Walk shapes depth-first (groups included).