Struct ObjectStyleDefaults

Source
pub struct ObjectStyleDefaults {
    pub shape_definition: Option<Box<DefaultShapeDefinition>>,
    pub line_definition: Option<Box<DefaultShapeDefinition>>,
    pub text_definition: Option<Box<DefaultShapeDefinition>>,
}

Fields§

§shape_definition: Option<Box<DefaultShapeDefinition>>

This element defines the formatting that is associated with the default shape. The default formatting can be applied to a shape when it is initially inserted into a document.

§Xml example

<spDef>
  <spPr>
    <solidFill>
      <schemeClr val="accent2">
        <shade val="75000"/>
      </schemeClr>
    </solidFill>
  </spPr>
  <bodyPr rtlCol="0" anchor="ctr"/>
  <lstStyle>
    <defPPr algn="ctr">
      <defRPr/>
    </defPPr>
  </lstStyle>
  <style>
    <lnRef idx="1">
      <schemeClr val="accent1"/>
    </lnRef>
    <fillRef idx="2">
      <schemeClr val="accent1"/>
    </fillRef>
    <effectRef idx="1">
      <schemeClr val="accent1"/>
    </effectRef>
    <fontRef idx="minor">
      <schemeClr val="dk1"/>
    </fontRef>
  </style>
</spDef>

In this example, we see a default shape which references a certain themed fill, line, effect, and font along with an override fill to these.

§line_definition: Option<Box<DefaultShapeDefinition>>

This element defines a default line that is used within a document.

§Xml example

<lnDef>
  <spPr/>
  <bodyPr/>
  <lstStyle/>
  <style>
    <lnRef idx="1">
      <schemeClr val="accent2"/>
    </lnRef>
    <fillRef idx="0">
      <schemeClr val="accent2"/>
    </fillRef>
    <effectRef idx="0">
      <schemeClr val="accent2"/>
    </effectRef>
    <fontRef idx="minor">
      <schemeClr val="tx1"/>
    </fontRef>
  </style>
</lnDef>

In this example, we see that the default line for the document is being defined as a themed line which references the subtle line style with idx equal to 1.

§text_definition: Option<Box<DefaultShapeDefinition>>

This element defines the default formatting which is applied to text in a document by default. The default formatting can and should be applied to the shape when it is initially inserted into a document.

<txDef>
  <spPr>
    <solidFill>
      <schemeClr val="accent2">
        <shade val="75000"/>
      </schemeClr>
    </solidFill>
  </spPr>
  <bodyPr rtlCol="0" anchor="ctr"/>
  <lstStyle>
    <defPPr algn="ctr">
      <defRPr/>
    </defPPr>
  </lstStyle>
  <style>
    <lnRef idx="1">
      <schemeClr val="accent1"/>
    </lnRef>
    <fillRef idx="2">
      <schemeClr val="accent1"/>
    </fillRef>
    <effectRef idx="1">
      <schemeClr val="accent1"/>
    </effectRef>
    <fontRef idx="minor">
      <schemeClr val="dk1"/>
    </fontRef>
  </style>
</txDef>

Implementations§

Trait Implementations§

Source§

impl Clone for ObjectStyleDefaults

Source§

fn clone(&self) -> ObjectStyleDefaults

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ObjectStyleDefaults

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ObjectStyleDefaults

Source§

fn default() -> ObjectStyleDefaults

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ObjectStyleDefaults

Source§

fn eq(&self, other: &ObjectStyleDefaults) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ObjectStyleDefaults

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.