pub trait TextStorage: TextStorage + Data {
// Provided methods
fn add_attributes(
&self,
builder: CairoTextLayoutBuilder,
env: &Env
) -> CairoTextLayoutBuilder { ... }
fn env_update(&self, ctx: &EnvUpdateCtx<'_, '_>) -> bool { ... }
fn links(&self) -> &[Link] { ... }
}
Expand description
A type that represents text that can be displayed.
Provided Methods§
fn add_attributes(
&self,
builder: CairoTextLayoutBuilder,
env: &Env
) -> CairoTextLayoutBuilder
fn add_attributes( &self, builder: CairoTextLayoutBuilder, env: &Env ) -> CairoTextLayoutBuilder
If this TextStorage object manages style spans, it should implement this method and update the provided builder with its spans, as required.
fn env_update(&self, ctx: &EnvUpdateCtx<'_, '_>) -> bool
fn env_update(&self, ctx: &EnvUpdateCtx<'_, '_>) -> bool
This is called whenever the Env changes and should return true if the layout should be rebuilt.