[−][src]Struct widgetry::Text
Fields
lines: Vec<(Option<Color>, Vec<TextSpan>)>
bg_color: Option<Color>
Implementations
impl Text
[src]
pub fn new() -> Text
[src]
pub fn from(line: TextSpan) -> Text
[src]
pub fn from_all(lines: Vec<TextSpan>) -> Text
[src]
pub fn from_multiline(lines: Vec<TextSpan>) -> Text
[src]
pub fn with_bg(self) -> Text
[src]
pub fn bg(self, bg: Color) -> Text
[src]
pub fn tooltip<MK: Into<Option<MultiKey>>>(
ctx: &EventCtx,
hotkey: MK,
action: &str
) -> Text
[src]
ctx: &EventCtx,
hotkey: MK,
action: &str
) -> Text
pub fn change_fg(self, fg: Color) -> Text
[src]
pub fn add(&mut self, line: TextSpan)
[src]
pub fn add_highlighted(&mut self, line: TextSpan, highlight: Color)
[src]
pub(crate) fn highlight_last_line(&mut self, highlight: Color)
[src]
pub fn append(&mut self, line: TextSpan)
[src]
pub fn add_appended(&mut self, lines: Vec<TextSpan>)
[src]
pub fn append_all(&mut self, lines: Vec<TextSpan>)
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn extend(&mut self, other: Text)
[src]
pub(crate) fn dims(self, assets: &Assets) -> ScreenDims
[src]
pub fn render(self, assets: &Assets) -> GeomBatch
[src]
pub fn render_g(self, g: &GfxCtx) -> GeomBatch
[src]
pub fn render_ctx(self, ctx: &EventCtx) -> GeomBatch
[src]
pub(crate) fn inner_render(self, assets: &Assets, tolerance: f32) -> GeomBatch
[src]
pub fn render_to_batch(self, prerender: &Prerender) -> GeomBatch
[src]
fn hash_key(&self) -> String
[src]
pub fn draw(self, ctx: &EventCtx) -> Widget
[src]
pub fn batch(self, ctx: &EventCtx) -> Widget
[src]
pub fn wrap_to_pct(self, ctx: &EventCtx, pct: usize) -> Text
[src]
pub(crate) fn inner_wrap_to_pct(self, limit: f64, assets: &Assets) -> Text
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,