pub struct Theme {
pub name: String,
pub colors: ColorScheme,
pub fonts: FontScheme,
}Expand description
A presentation’s customizable color/font theme (ppt/theme/theme1.xml’s own
<a:clrScheme>/<a:fontScheme>).
Deliberately mirrors word_ooxml::Theme/ColorScheme/FontScheme by name and shape, not by
crate dependency — this workspace’s established posture for a shared real-world concept with no
shared crate backing it (see PictureFormat’s own doc comment for the same reasoning). Unlike
word_ooxml::Theme (genuinely optional — word/theme/theme1.xml is only written when
Document.theme is set), a PowerPoint theme part is mandatory: Presentation.theme: None
still always produces a full theme1.xml, just with Theme::office_default’s colors/fonts
rather than a caller-supplied palette — see Presentation’s own doc comment.
Real PowerPoint files can and do carry more than one distinct theme (a real fixture has both
theme1.xml and theme2.xml, the latter the notes master’s own); this crate, like
word-ooxml, still only exposes a single customizable theme for the slide master (the notes
master’s own separate theme part stays fixed at Theme::office_default’s content regardless).
fmtScheme (CT_BaseStyles requires it alongside clrScheme/ fontScheme) stays a fixed,
non-configurable copy of Office’s own built-in default, same scope limit as
word_ooxml::Theme’s own fmtScheme — irrelevant to word-ooxml there, but genuinely relevant
to a slide’s shapes here; still out of scope.
Fields§
§name: StringThe theme’s name (<a:theme name="..">), also reused unchanged as the nested
<a:clrScheme>/<a:fontScheme> elements’ own name attribute, same convention as
word_ooxml::Theme.
colors: ColorScheme§fonts: FontSchemeImplementations§
Source§impl Theme
impl Theme
Sourcepub fn office_default() -> Theme
pub fn office_default() -> Theme
Office’s own built-in default theme (“Office”: Calibri Light/ Calibri, the classic blue-accented palette) — byte-for-byte the same colors/fonts this crate’s writer has always produced as its fixed theme, now expressed as data instead of a hardcoded XML literal.
Trait Implementations§
impl Eq for Theme
impl StructuralPartialEq for Theme
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnsafeUnpin for Theme
impl UnwindSafe for Theme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.