#[repr(C)]pub struct KuiSpan {
pub text: KuiStr,
pub color: u32,
pub flags: u32,
pub bg: u32,
pub underline_color: u32,
pub underline_style: u32,
pub bg_radius: f32,
pub family: u32,
pub size: f32,
pub font: u64,
}Expand description
One styled run of a rich-text paragraph (kui_rich_text,
kui_measure_rich_text): its text and what differs from the base
style. Travels as an array, so an append here is an ABI bump.
Fields§
§text: KuiStr§color: u320xRRGGBBAA; 0 = inherit the paragraph color
flags: u32KUI_SPAN_BOLD | KUI_SPAN_ITALIC | KUI_SPAN_UNDERLINE |
KUI_SPAN_STRIKETHROUGH
bg: u320xRRGGBBAA behind the span’s glyphs alone, one rect per line the span covers; 0 = none. ABI 8.
underline_color: u32The underline’s own colour, 0 for the span’s; non-zero implies
KUI_SPAN_UNDERLINE. ABI 17.
underline_style: u32KUI_UNDERLINE_*; non-solid implies KUI_SPAN_UNDERLINE. ABI 17.
bg_radius: f32The background’s corner radius, logical px; 0 is the square
background. Above zero, bg is joined into one shape with
every rounded background of the same colour and radius it meets —
on the line above or below, or end to end on its own line, in this
text or another — rounded outside where a line reaches past its
neighbour and filleted inside where it falls short: a selection
over rows is one outline. ABI 20.
family: u32With KUI_SPAN_FAMILY in flags, the span’s own face, a
KUI_FONT_*; without it the paragraph’s. ABI 26.
size: f32The span’s own size, logical px; 0 is the paragraph’s. ABI 26.
font: u64A registered font handle, the span’s face; non-zero overrides
family. ABI 26.
Trait Implementations§
Auto Trait Implementations§
impl !Send for KuiSpan
impl !Sync for KuiSpan
impl Freeze for KuiSpan
impl RefUnwindSafe for KuiSpan
impl Unpin for KuiSpan
impl UnsafeUnpin for KuiSpan
impl UnwindSafe for KuiSpan
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.