Skip to main content

Window

Struct Window 

Source
pub struct Window {
Show 30 fields pub state: WindowState, pub priority: u8, pub anchor_point: AnchorPoint, pub anchor_vertical: u8, pub anchor_horizontal: u8, pub relative_position: bool, pub row_count: u8, pub column_count: u8, pub row_lock: bool, pub column_lock: bool, pub window_style: u8, pub pen_style: u8, pub justify: Justify, pub print_direction: PrintDirection, pub scroll_direction: ScrollDirection, pub word_wrap: bool, pub fill_color: Color, pub fill_opacity: Opacity, pub border_color: Color, pub border_type: EdgeType, pub pen_size: PenSize, pub pen_offset: PenOffset, pub font_style: FontStyle, pub italics: bool, pub underline: bool, pub edge_type: EdgeType, pub fg_color: Color, pub fg_opacity: Opacity, pub bg_color: Color, pub bg_opacity: Opacity, /* private fields */
}
Available on crate feature decode only.
Expand description

A decoded CEA-708 caption window (§8.4 window model).

Holds the window attributes set by DefineWindow / SetWindowAttributes, the pen attributes set by SetPenAttributes / SetPenColor, and the painted text grid. Only created when a DefineWindow for its ID is received.

Fields§

§state: WindowState

Whether the window is currently displayed.

§priority: u8

Window priority, 0 (highest) – 7.

§anchor_point: AnchorPoint

Anchor point (which corner/edge/centre the anchor coordinates refer to).

§anchor_vertical: u8

Anchor vertical coordinate.

§anchor_horizontal: u8

Anchor horizontal coordinate.

§relative_position: bool

true if the anchor coordinates are relative (percent).

§row_count: u8

Row count (virtual rows; = rc + 1).

§column_count: u8

Column count (virtual cols; = cc + 1).

§row_lock: bool

Row lock.

§column_lock: bool

Column lock.

§window_style: u8

Window-style preset ID (0–7) requested in the last DefineWindow.

§pen_style: u8

Pen-style preset ID (0–7) requested in the last DefineWindow.

§justify: Justify

Justification.

§print_direction: PrintDirection

Print direction.

§scroll_direction: ScrollDirection

Scroll direction.

§word_wrap: bool

Word wrap.

§fill_color: Color

Window fill colour.

§fill_opacity: Opacity

Window fill opacity.

§border_color: Color

Border colour.

§border_type: EdgeType

Border type (none / raised / depressed / uniform / shadow).

§pen_size: PenSize

Pen size.

§pen_offset: PenOffset

Pen offset (subscript/normal/superscript).

§font_style: FontStyle

Font style.

§italics: bool

Pen italics.

§underline: bool

Pen underline.

§edge_type: EdgeType

Pen edge type.

§fg_color: Color

Pen foreground colour.

§fg_opacity: Opacity

Pen foreground opacity.

§bg_color: Color

Pen background colour.

§bg_opacity: Opacity

Pen background opacity.

Implementations§

Source§

impl Window

Source

pub fn text(&self) -> String

The window’s visible text, rows joined with \n, trailing blank rows trimmed and per-row trailing spaces removed.

Trait Implementations§

Source§

impl Clone for Window

Source§

fn clone(&self) -> Window

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Window

Source§

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

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

impl Eq for Window

Source§

impl PartialEq for Window

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Window

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 Window

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.