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