[][src]Struct crosscurses::Attributes

pub struct Attributes { /* fields omitted */ }

Methods

impl Attributes[src]

pub fn new() -> Attributes[src]

pub fn is_alternative_char_set(&self) -> bool[src]

pub fn set_alternative_char_set(&mut self, enabled: bool)[src]

pub fn is_bold(&self) -> bool[src]

pub fn set_bold(&mut self, enabled: bool)[src]

pub fn is_char_text(&self) -> bool[src]

pub fn set_char_text(&mut self, enabled: bool)[src]

pub fn is_dim(&self) -> bool[src]

pub fn set_dim(&mut self, enabled: bool)[src]

pub fn is_leftline(&self) -> bool[src]

pub fn set_leftline(&mut self, enabled: bool)[src]

pub fn is_invisible(&self) -> bool[src]

pub fn set_invisible(&mut self, enabled: bool)[src]

pub fn is_italic(&self) -> bool[src]

pub fn set_italic(&mut self, enabled: bool)[src]

pub fn is_normal(&self) -> bool[src]

pub fn set_normal(&mut self)[src]

pub fn is_overline(&self) -> bool[src]

pub fn set_overline(&mut self, enabled: bool)[src]

pub fn is_reverse(&self) -> bool[src]

pub fn set_reverse(&mut self, enabled: bool)[src]

pub fn is_rightline(&self) -> bool[src]

pub fn set_rightline(&mut self, enabled: bool)[src]

pub fn is_strikeout(&self) -> bool[src]

pub fn set_strikeout(&mut self, enabled: bool)[src]

pub fn is_underline(&self) -> bool[src]

pub fn set_underline(&mut self, enabled: bool)[src]

pub fn color_pair(&self) -> ColorPair[src]

pub fn set_color_pair(&mut self, color_pair: ColorPair)[src]

Trait Implementations

impl BitOr<Attribute> for Attributes[src]

Implement the | operator for adding an Attribute to Attributes

Example

use crosscurses::{Attribute, Attributes};

let mut attributes = Attributes::new();
assert!(!attributes.is_bold());
attributes = attributes | Attribute::Bold;
assert!(attributes.is_bold());

type Output = Attributes

The resulting type after applying the | operator.

impl BitOr<Attributes> for Attributes[src]

Implement the | operator for adding Attributes to Attributes

Example

use crosscurses::{Attribute, Attributes};

let mut attributes = Attributes::new() | Attribute::Bold;
let other = Attributes::new() | Attribute::Reverse;
attributes = attributes | other;
assert!(attributes.is_bold());
assert!(attributes.is_reverse());
assert!(!attributes.is_italic());

type Output = Attributes

The resulting type after applying the | operator.

impl BitOr<ColorPair> for Attributes[src]

Implement the | operator for setting a color pair on an Attributes object

Example

use crosscurses::{Attribute, Attributes};
use crosscurses::colorpair::ColorPair;

let mut attributes = Attributes::new();
assert!(attributes.color_pair().0 == 0);
attributes = attributes | ColorPair(1);
assert!(attributes.color_pair().0 == 1);

type Output = Attributes

The resulting type after applying the | operator.

impl BitXor<Attribute> for Attributes[src]

Implement the ^ operator for disabling an Attribute from Attributes

Example

use crosscurses::{Attribute, Attributes};

let mut attributes = Attributes::from(Attribute::Bold);
assert!(attributes.is_bold());
attributes = attributes ^ Attribute::Bold;
assert!(!attributes.is_bold());

type Output = Attributes

The resulting type after applying the ^ operator.

impl BitXor<Attributes> for Attributes[src]

Implement the ^ operator for removing Attributes from Attributes

Example

use crosscurses::{Attribute, Attributes};

let mut attributes = Attributes::new() | Attribute::Blink | Attribute::Bold;
let other = Attributes::new() | Attribute::Reverse | Attribute::Bold;
attributes = attributes ^ other;
assert!(!attributes.is_bold());
assert!(attributes.is_reverse());
assert!(attributes.is_blink());

type Output = Attributes

The resulting type after applying the ^ operator.

impl Clone for Attributes[src]

impl Copy for Attributes[src]

impl Debug for Attributes[src]

impl Default for Attributes[src]

Implement Default for Attributes

Example

use crosscurses::Attributes;
let attributes: Attributes = Default::default();
assert_eq!(attributes, Attributes::new());

impl Eq for Attributes[src]

impl From<Attribute> for Attributes[src]

impl From<Attributes> for chtype[src]

impl Hash for Attributes[src]

impl PartialEq<Attributes> for Attributes[src]

impl StructuralEq for Attributes[src]

impl StructuralPartialEq for Attributes[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.