Struct TextBox

Source
pub struct TextBox {
Show 17 fields pub children: Vec<TextBoxContentChild>, pub size: (u32, u32), pub position_type: DrawingPositionType, pub simple_pos: bool, pub simple_pos_x: i32, pub simple_pos_y: i32, pub layout_in_cell: bool, pub relative_height: u32, pub allow_overlap: bool, pub position_h: DrawingPosition, pub position_v: DrawingPosition, pub relative_from_h: RelativeFromHType, pub relative_from_v: RelativeFromVType, pub dist_t: i32, pub dist_b: i32, pub dist_l: i32, pub dist_r: i32,
}

Fields§

§children: Vec<TextBoxContentChild>§size: (u32, u32)§position_type: DrawingPositionType§simple_pos: bool

Specifies that this object shall be positioned using the positioning information in the simplePos child element (§20.4.2.13). This positioning, when specified, positions the object on the page by placing its top left point at the x-y coordinates specified by that element.

§simple_pos_x: i32§simple_pos_y: i32§layout_in_cell: bool

Specifies how this DrawingML object behaves when its anchor is located in a table cell; and its specified position would cause it to intersect with a table cell displayed in the document. That behavior shall be as follows:

§relative_height: u32

Specifies the relative Z-ordering of all DrawingML objects in this document. Each floating DrawingML object shall have a Z-ordering value, which determines which object is displayed when any two objects intersect. Higher values shall indicate higher Z-order; lower values shall indicate lower Z-order.

§allow_overlap: bool§position_h: DrawingPosition§position_v: DrawingPosition§relative_from_h: RelativeFromHType§relative_from_v: RelativeFromVType§dist_t: i32

Specifies the minimum distance which shall be maintained between the top edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document’s contents., The distance shall be measured in EMUs (English Metric Units).,

§dist_b: i32§dist_l: i32§dist_r: i32

Implementations§

Source§

impl TextBox

Source

pub fn new() -> Self

Source

pub fn size(self, w_emu: u32, h_emu: u32) -> Self

Source

pub fn floating(self) -> Self

Source

pub fn offset_x(self, x: i32) -> Self

Source

pub fn offset_y(self, y: i32) -> Self

Source

pub fn position_h(self, pos: DrawingPosition) -> Self

Source

pub fn position_v(self, pos: DrawingPosition) -> Self

Source

pub fn relative_from_h(self, t: RelativeFromHType) -> Self

Source

pub fn relative_from_v(self, t: RelativeFromVType) -> Self

Source

pub fn dist_t(self, v: i32) -> Self

Source

pub fn dist_b(self, v: i32) -> Self

Source

pub fn dist_l(self, v: i32) -> Self

Source

pub fn dist_r(self, v: i32) -> Self

Source

pub fn simple_pos(self, v: bool) -> Self

Source

pub fn relative_height(self, v: u32) -> Self

Trait Implementations§

Source§

impl Clone for TextBox

Source§

fn clone(&self) -> TextBox

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 TextBox

Source§

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

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

impl Default for TextBox

Source§

fn default() -> Self

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

impl PartialEq for TextBox

Source§

fn eq(&self, other: &TextBox) -> 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 Serialize for TextBox

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TextBox

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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.