pub enum FrameLayout<S> {
External {
left: Dimension<i32>,
top: Dimension<i32>,
width: Option<Dimension<u32>>,
height: Option<Dimension<u32>>,
floating: bool,
},
Internal {
align: FrameAlign,
width: Option<Dimension<u32>>,
height: Option<Dimension<u32>>,
dock: Option<S>,
},
}Expand description
Alignment and position of a Frame, which may either be an external (floating) frame or
an internal (docked) frame.
See MXP specification: <FRAME> and the additions documented in MUD Standards: Frames.
Variants§
External
Specifies that the frame is a floating frame.
Fields
left: Dimension<i32>The coordinate of the left side of the frame. If a negative number is used, it means the value is relative to the right side of the screen instead of the left.
top: Dimension<i32>The coordinate of the top of the frame. If a negative value is used, it means the frame is relative to the bottom of the screen instead of the top.
width: Option<Dimension<u32>>The width of the frame. Percentage is calculated relative to screen width.
Internal
Specifies that the frame is internal to another window.
Fields
align: FrameAlignSpecifies how the frame is docked with the MUD window.
width: Option<Dimension<u32>>The width of the frame. Percentage is calculated relative to main window width.
Implementations§
Source§impl<S> FrameLayout<S>
impl<S> FrameLayout<S>
Sourcepub fn map_text<T, F>(self, f: F) -> FrameLayout<T>where
F: FnOnce(S) -> T,
pub fn map_text<T, F>(self, f: F) -> FrameLayout<T>where
F: FnOnce(S) -> T,
Applies a type transformation to all text, returning a new struct.
Source§impl<S: AsRef<str>> FrameLayout<S>
impl<S: AsRef<str>> FrameLayout<S>
Sourcepub fn borrow_text(&self) -> FrameLayout<&str>
pub fn borrow_text(&self) -> FrameLayout<&str>
Applies a type transformation to all text, returning a new struct.
Trait Implementations§
Source§impl<S: Clone> Clone for FrameLayout<S>
impl<S: Clone> Clone for FrameLayout<S>
Source§fn clone(&self) -> FrameLayout<S>
fn clone(&self) -> FrameLayout<S>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more