Skip to main content

Crate pptx

Crate pptx 

Source
Expand description

§API naming conventions

This crate follows these naming patterns:

  • new() / with_*(): Constructors. new is the primary constructor; with_* creates an instance with additional parameters (mirrors Vec::with_capacity).
  • set_*(): Mutating setters that take &mut self and set a value.
  • *_mut(): Methods returning a mutable reference to an inner value.
  • Builder-pattern with_*() / without_*(): Methods that consume self and return Self, used on small value types (e.g. Comment, SlideTransition).
  • add_*(): Methods that append a new item to an internal collection and typically return &mut Item.
  • Enum prefixes: Xl* (Excel/chart enums), Mso* (Microsoft Office shared enums), and Pp* (PowerPoint-specific enums) follow python-pptx naming for familiarity.
  • Public fields: Used for simple data types without invariants. Setters are provided only when validation or side-effects are needed.

Re-exports§

pub use error::PackageError;
pub use error::PartNotFoundExt;
pub use error::PptxError;
pub use error::PptxResult;
pub use error::SlideError;
pub use presentation::Presentation;
pub use units::Centipoints;
pub use units::Cm;
pub use units::ConnectionPointIndex;
pub use units::DurationMs;
pub use units::Emu;
pub use units::Inches;
pub use units::Mm;
pub use units::PlaceholderIndex;
pub use units::Pt;
pub use units::ShapeId;
pub use units::SlideId;
pub use units::Twips;
pub use shapes::AutoShape;
pub use shapes::Connector;
pub use shapes::GraphicFrame;
pub use shapes::GroupShape;
pub use shapes::OleObject;
pub use shapes::Picture;
pub use shapes::PlaceholderFormat;
pub use shapes::Shape;
pub use shapes::ShapeProperties;
pub use shapes::ShapeTree;
pub use text::font::RgbColor;
pub use text::BulletFormat;
pub use text::Font;
pub use text::Paragraph;
pub use text::Run;
pub use text::TextFrame;
pub use table::Cell;
pub use table::CellBorder;
pub use table::Column;
pub use table::Row;
pub use table::Table;
pub use dml::ColorFormat;
pub use dml::FillFormat;
pub use dml::GradientFill;
pub use dml::GradientStop;
pub use dml::HslColor;
pub use dml::LineFormat;
pub use dml::PatternFill;
pub use dml::PictureFill;
pub use dml::PresetColor;
pub use dml::SolidFill;
pub use dml::SystemColor;
pub use dml::ThemeColor;
pub use chart::AxisTitle;
pub use chart::BubbleChartData;
pub use chart::Categories;
pub use chart::Category;
pub use chart::CategoryAxis;
pub use chart::CategoryChartData;
pub use chart::CategoryLevel;
pub use chart::Chart;
pub use chart::ChartFormat;
pub use chart::ChartTitle;
pub use chart::ChartXmlWriter;
pub use chart::ComboChartData;
pub use chart::ComboSeriesData;
pub use chart::ComboSeriesType;
pub use chart::DataLabel;
pub use chart::DataLabels;
pub use chart::DateAxis;
pub use chart::DateAxisChartData;
pub use chart::Legend;
pub use chart::LegendEntry;
pub use chart::Marker;
pub use chart::MarkerFormat;
pub use chart::Plot;
pub use chart::PlotProperties;
pub use chart::Point;
pub use chart::Series;
pub use chart::SeriesCollection;
pub use chart::SeriesFormat;
pub use chart::TickLabels;
pub use chart::ValueAxis;
pub use chart::XyChartData;
pub use media::Audio;
pub use media::Image;
pub use media::Video;
pub use core_properties::CoreProperties;
pub use shapes::action::ActionSetting;
pub use shapes::freeform::FreeformBuilder;
pub use dml::effect::ShadowFormat;
pub use dml::effect::ShadowType;
pub use dml::effect3d::Bevel;
pub use dml::effect3d::Camera;
pub use dml::effect3d::LightRig;
pub use dml::effect3d::Rotation3D;
pub use dml::effect3d::Scene3D;
pub use dml::effect3d::Shape3D;
pub use transition::SlideTransition;
pub use transition::TransitionType;
pub use animation::AnimationEffect;
pub use animation::AnimationSequence;
pub use animation::AnimationTrigger;
pub use animation::EmphasisType;
pub use animation::EntranceType;
pub use animation::ExitType;
pub use animation::SlideAnimation;
pub use section::Section;
pub use comment::Comment;
pub use enums::action::PpActionType;
pub use enums::chart::XlAxisCrosses;
pub use enums::chart::XlCategoryType;
pub use enums::chart::XlChartType;
pub use enums::chart::XlDataLabelPosition;
pub use enums::chart::XlLegendPosition;
pub use enums::chart::XlMarkerStyle;
pub use enums::chart::XlTickLabelPosition;
pub use enums::chart::XlTickMark;
pub use enums::dml::BevelType;
pub use enums::dml::CameraPreset;
pub use enums::dml::LightDirection;
pub use enums::dml::LightRigType;
pub use enums::dml::MaterialPreset;
pub use enums::dml::MsoColorType;
pub use enums::dml::MsoFillType;
pub use enums::dml::PresetColorVal;
pub use enums::dml::SystemColorVal;
pub use enums::misc::ExcelNumFormat;
pub use enums::misc::HandoutLayout;
pub use enums::misc::PpMediaType;
pub use enums::misc::PrintColorMode;
pub use enums::misc::PrintOrientation;
pub use enums::misc::PrintWhat;
pub use enums::shapes::PlaceholderOrientation;
pub use enums::shapes::PlaceholderSize;
pub use enums::shapes::PresetGeometry;
pub use enums::text::TextDirection;
pub use theme::parse_theme_color_scheme;
pub use theme::update_theme_color_scheme;
pub use theme::ThemeColorScheme;
pub use smartart::SmartArt;
pub use smartart::SmartArtNode;
pub use embedded_font::EmbeddedFont;
pub use print_settings::PrintSettings;
pub use repair::IssueCategory;
pub use repair::PptxRepairer;
pub use repair::PptxValidator;
pub use repair::RepairReport;
pub use repair::Severity;
pub use repair::ValidationIssue;
pub use signature::DigitalSignature;
pub use signature::HashAlgorithm;
pub use signature::SignatureCommitment;
pub use signature::SignerInfo;
pub use export::HtmlExporter;

Modules§

animation
Slide animation types and settings.
chart
Chart types and XML generation for PowerPoint charts.
comment
Slide comments for PowerPoint presentations.
core_properties
Core document properties (docProps/core.xml).
dml
DrawingML formatting types: color, fill, line, and effects.
embedded_font
enums
Enumerations for PowerPoint object types and properties.
error
export
Export functionality for converting presentations to other formats.
media
Media types (images, video, audio) for embedding in presentations.
opc
presentation
print_settings
Print settings and handout layout configuration for presentations.
repair
Validation and repair functionality for PPTX files.
section
Section management for PowerPoint presentations.
shapes
signature
Digital signature support for PPTX files.
slide
Slide, layout, master, and notes types, parsing, and XML generation.
smartart
table
Table support for PowerPoint slides.
text
Text formatting: TextFrame, Paragraph, Run, and Font.
theme
Basic theme support for reading the color scheme from theme1.xml.
transition
Slide transition types and settings.
units

Traits§

WriteXml
Trait for types that can serialize themselves as XML.