Rename PrintStyledFont
to PrintStyledContent
(#297)
This commit is contained in:
parent
fe6ddb90f1
commit
4ccc240866
@ -23,6 +23,7 @@
|
||||
- `style module`
|
||||
- Rename `ObjectStyle` to `ContentStyle`. Now full names are used for methods.
|
||||
- Rename `StyledObject` to `StyledContent` and made members private.
|
||||
- Rename `PrintStyledFont` to `PrintStyledContent`
|
||||
- Rename `attr` method to `attribute`.
|
||||
- Rename `Attribute::NoInverse` to `NoReverse`
|
||||
|
||||
|
10
src/lib.rs
10
src/lib.rs
@ -132,7 +132,7 @@
|
||||
//! if (y == 0 || y == 40 - 1) || (x == 0 || x == 150 - 1) {
|
||||
//! stdout
|
||||
//! .queue(cursor::MoveTo(x,y))?
|
||||
//! .queue(style::PrintStyledFont( "█".magenta()))?;
|
||||
//! .queue(style::PrintStyledContent( "█".magenta()))?;
|
||||
//! }
|
||||
//! }
|
||||
//! }
|
||||
@ -146,7 +146,7 @@
|
||||
//! ```no_run
|
||||
//! use std::io::{stdout, Write};
|
||||
//! use crossterm::{
|
||||
//! execute, queue, Color, PrintStyledFont,
|
||||
//! execute, queue, Color, PrintStyledContent,
|
||||
//! Colorize, cursor, terminal, style, Result
|
||||
//! };
|
||||
//!
|
||||
@ -158,7 +158,7 @@
|
||||
//! for y in 0..40 {
|
||||
//! for x in 0..150 {
|
||||
//! if (y == 0 || y == 40 - 1) || (x == 0 || x == 150 - 1) {
|
||||
//! queue!(stdout, cursor::MoveTo(x,y), style::PrintStyledFont( "█".magenta()))?;
|
||||
//! queue!(stdout, cursor::MoveTo(x,y), style::PrintStyledContent( "█".magenta()))?;
|
||||
//! }
|
||||
//! }
|
||||
//! }
|
||||
@ -178,8 +178,8 @@ pub use screen::{
|
||||
};
|
||||
#[cfg(feature = "style")]
|
||||
pub use style::{
|
||||
color, style, Attribute, Color, Colored, Colorize, ContentStyle, PrintStyledFont, ResetColor,
|
||||
SetAttr, SetBg, SetFg, StyledContent, Styler, TerminalColor,
|
||||
color, style, Attribute, Color, Colored, Colorize, ContentStyle, PrintStyledContent,
|
||||
ResetColor, SetAttr, SetBg, SetFg, StyledContent, Styler, TerminalColor,
|
||||
};
|
||||
pub use utils::{Command, ErrorKind, ExecutableCommand, Output, QueueableCommand, Result};
|
||||
|
||||
|
@ -372,9 +372,9 @@ impl Command for SetAttr {
|
||||
/// # Notes
|
||||
///
|
||||
/// Commands must be executed/queued for execution otherwise they do nothing.
|
||||
pub struct PrintStyledFont<D: Display + Clone>(pub StyledContent<D>);
|
||||
pub struct PrintStyledContent<D: Display + Clone>(pub StyledContent<D>);
|
||||
|
||||
impl<D> Command for PrintStyledFont<D>
|
||||
impl<D> Command for PrintStyledContent<D>
|
||||
where
|
||||
D: Display + Clone,
|
||||
{
|
||||
@ -413,6 +413,6 @@ impl Command for ResetColor {
|
||||
impl_display!(for SetFg);
|
||||
impl_display!(for SetBg);
|
||||
impl_display!(for SetAttr);
|
||||
impl_display!(for PrintStyledFont<String>);
|
||||
impl_display!(for PrintStyledFont<&'static str>);
|
||||
impl_display!(for PrintStyledContent<String>);
|
||||
impl_display!(for PrintStyledContent<&'static str>);
|
||||
impl_display!(for ResetColor);
|
||||
|
Loading…
Reference in New Issue
Block a user