iced_widget/
text.rs

1//! Draw and interact with text.
2mod rich;
3
4pub use crate::core::text::{Fragment, Highlighter, IntoFragment, Span};
5pub use crate::core::widget::text::*;
6pub use rich::Rich;
7
8/// A bunch of text.
9///
10/// # Example
11/// ```no_run
12/// # mod iced { pub mod widget { pub use iced_widget::*; } pub use iced_widget::Renderer; pub use iced_widget::core::*; }
13/// # pub type State = ();
14/// # pub type Element<'a, Message> = iced_widget::core::Element<'a, Message, iced_widget::Theme, iced_widget::Renderer>;
15/// use iced::widget::text;
16/// use iced::color;
17///
18/// enum Message {
19///     // ...
20/// }
21///
22/// fn view(state: &State) -> Element<'_, Message> {
23///     text("Hello, this is iced!")
24///         .size(20)
25///         .color(color!(0x0000ff))
26///         .into()
27/// }
28/// ```
29pub type Text<'a, Theme = crate::Theme, Renderer = crate::Renderer> =
30    crate::core::widget::Text<'a, Theme, Renderer>;