pub struct Attributes { /* private fields */ }Expand description
Termianl Attributes.
Implementations§
Source§impl Attributes
impl Attributes
pub fn new(raw: u32) -> Attributes
pub fn new_sp(screen: *mut screen, raw: u32) -> Attributes
Sourcepub unsafe fn set_screen(&mut self, screen: Option<*mut screen>)
pub unsafe fn set_screen(&mut self, screen: Option<*mut screen>)
§Safety
Set the screen pointer of the Attributes.
Use with caution!!! This function only need’s to be used if using the screen type
functions and is provided to allow the alignment of the screen pointer with the
screen that the Attributes are for as this crate will apply a screen of None
by default when retriving Attributes from functions such as attr_get() and
wattr_get().
pub fn is_normal(&self) -> bool
pub fn set_normal(&self) -> Attributes
pub fn is_char_text(&self) -> bool
pub fn set_char_text(&self, enabled: bool) -> Attributes
pub fn is_standout(&self) -> bool
pub fn set_standout(&self, enabled: bool) -> Attributes
pub fn is_underline(&self) -> bool
pub fn set_underline(&self, enabled: bool) -> Attributes
pub fn is_reverse(&self) -> bool
pub fn set_reverse(&self, enabled: bool) -> Attributes
pub fn is_blink(&self) -> bool
pub fn set_blink(&self, enabled: bool) -> Attributes
pub fn is_dim(&self) -> bool
pub fn set_dim(&self, enabled: bool) -> Attributes
pub fn is_bold(&self) -> bool
pub fn set_bold(&self, enabled: bool) -> Attributes
pub fn is_alternate_char_set(&self) -> bool
pub fn set_alternative_char_set(&self, enabled: bool) -> Attributes
pub fn is_invisible(&self) -> bool
pub fn set_invisible(&self, enabled: bool) -> Attributes
pub fn is_protected(&self) -> bool
pub fn set_protected(&self, enabled: bool) -> Attributes
pub fn is_horizontal(&self) -> bool
pub fn set_horizontal(&self, enabled: bool) -> Attributes
pub fn is_left(&self) -> bool
pub fn set_left(&self, enabled: bool) -> Attributes
pub fn is_low(&self) -> bool
pub fn set_low(&self, enabled: bool) -> Attributes
pub fn is_right(&self) -> bool
pub fn set_right(&self, enabled: bool) -> Attributes
pub fn is_top(&self) -> bool
pub fn set_top(&self, enabled: bool) -> Attributes
pub fn is_vertical(&self) -> bool
pub fn set_vertical(&self, enabled: bool) -> Attributes
pub fn is_italic(&self) -> bool
pub fn set_italic(&self, enabled: bool) -> Attributes
Source§impl Attributes
impl Attributes
Sourcepub fn color_pair(&self) -> ColorPair
pub fn color_pair(&self) -> ColorPair
Return the ColorPair associated with the Attributes.
Trait Implementations§
Source§impl AsMut<Attributes> for Attributes
impl AsMut<Attributes> for Attributes
Source§fn as_mut(&mut self) -> &mut Attributes
fn as_mut(&mut self) -> &mut Attributes
Source§impl AsRef<Attributes> for Attributes
impl AsRef<Attributes> for Attributes
Source§fn as_ref(&self) -> &Attributes
fn as_ref(&self) -> &Attributes
Source§impl AttributesType<i16> for Attributes
impl AttributesType<i16> for Attributes
Source§impl BitOr<Attribute> for Attributes
Implement the | operator for adding an Attribute to Attributes
impl BitOr<Attribute> for Attributes
Implement the | operator for adding an Attribute to Attributes
Source§impl BitOr<Attributes> for ChtypeChar
impl BitOr<Attributes> for ChtypeChar
Source§type Output = ChtypeChar
type Output = ChtypeChar
| operator.Source§fn bitor(self, rhs: Attributes) -> <ChtypeChar as BitOr<Attributes>>::Output
fn bitor(self, rhs: Attributes) -> <ChtypeChar as BitOr<Attributes>>::Output
| operation. Read moreSource§impl BitOr<Attributes> for ChtypeString
impl BitOr<Attributes> for ChtypeString
Source§type Output = ChtypeString
type Output = ChtypeString
| operator.Source§fn bitor(self, rhs: Attributes) -> <ChtypeString as BitOr<Attributes>>::Output
fn bitor(self, rhs: Attributes) -> <ChtypeString as BitOr<Attributes>>::Output
| operation. Read moreSource§impl BitOr<ColorPair> for Attributes
Implement the | operator for setting a ColorPair on a Attributes.
impl BitOr<ColorPair> for Attributes
Implement the | operator for setting a ColorPair on a Attributes.
Note: as only one color pair can be applied to attributes at any one time any previously Or’d color_pair will be Xor’d out of the attributes before Or’ing the new color pair.
Source§impl BitOr for Attributes
Implement the | operator for adding Attributes to Attributes
impl BitOr for Attributes
Implement the | operator for adding Attributes to Attributes
Source§type Output = Attributes
type Output = Attributes
| operator.Source§fn bitor(self, rhs: Attributes) -> <Attributes as BitOr>::Output
fn bitor(self, rhs: Attributes) -> <Attributes as BitOr>::Output
| operation. Read moreSource§impl BitXor<Attribute> for Attributes
Implement the ^ operator for disabling an Attribute from Attributes
impl BitXor<Attribute> for Attributes
Implement the ^ operator for disabling an Attribute from Attributes
Source§impl BitXor<Attributes> for ChtypeChar
impl BitXor<Attributes> for ChtypeChar
Source§type Output = ChtypeChar
type Output = ChtypeChar
^ operator.Source§fn bitxor(self, rhs: Attributes) -> <ChtypeChar as BitXor<Attributes>>::Output
fn bitxor(self, rhs: Attributes) -> <ChtypeChar as BitXor<Attributes>>::Output
^ operation. Read moreSource§impl BitXor<Attributes> for ChtypeString
impl BitXor<Attributes> for ChtypeString
Source§type Output = ChtypeString
type Output = ChtypeString
^ operator.Source§fn bitxor(self, rhs: Attributes) -> <ChtypeString as BitXor<Attributes>>::Output
fn bitxor(self, rhs: Attributes) -> <ChtypeString as BitXor<Attributes>>::Output
^ operation. Read moreSource§impl BitXor<ColorPair> for Attributes
Implement the ^ operator for removing a ColorPair on a Attributes.
impl BitXor<ColorPair> for Attributes
Implement the ^ operator for removing a ColorPair on a Attributes.
Source§impl BitXor for Attributes
Implement the ^ operator for removing Attributes from Attributes
impl BitXor for Attributes
Implement the ^ operator for removing Attributes from Attributes
Source§type Output = Attributes
type Output = Attributes
^ operator.Source§fn bitxor(self, rhs: Attributes) -> <Attributes as BitXor>::Output
fn bitxor(self, rhs: Attributes) -> <Attributes as BitXor>::Output
^ operation. Read moreSource§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more