Struct ncursesw::normal::Attributes
source · [−]pub struct Attributes { /* private fields */ }
Expand description
Termianl Attributes.
Implementations
sourceimpl Attributes
impl Attributes
pub fn new(raw: attr_t) -> Self
pub fn new_sp(screen: SCREEN, raw: attr_t) -> Self
sourcepub unsafe fn set_screen(&mut self, screen: Option<SCREEN>)
pub unsafe fn set_screen(&mut self, screen: Option<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) -> Self
pub fn is_char_text(&self) -> bool
pub fn set_char_text(&self, enabled: bool) -> Self
pub fn is_standout(&self) -> bool
pub fn set_standout(&self, enabled: bool) -> Self
pub fn is_underline(&self) -> bool
pub fn set_underline(&self, enabled: bool) -> Self
pub fn is_reverse(&self) -> bool
pub fn set_reverse(&self, enabled: bool) -> Self
pub fn is_blink(&self) -> bool
pub fn set_blink(&self, enabled: bool) -> Self
pub fn is_dim(&self) -> bool
pub fn set_dim(&self, enabled: bool) -> Self
pub fn is_bold(&self) -> bool
pub fn set_bold(&self, enabled: bool) -> Self
pub fn is_alternate_char_set(&self) -> bool
pub fn set_alternative_char_set(&self, enabled: bool) -> Self
pub fn is_invisible(&self) -> bool
pub fn set_invisible(&self, enabled: bool) -> Self
pub fn is_protected(&self) -> bool
pub fn set_protected(&self, enabled: bool) -> Self
pub fn is_horizontal(&self) -> bool
pub fn set_horizontal(&self, enabled: bool) -> Self
pub fn is_left(&self) -> bool
pub fn set_left(&self, enabled: bool) -> Self
pub fn is_low(&self) -> bool
pub fn set_low(&self, enabled: bool) -> Self
pub fn is_right(&self) -> bool
pub fn set_right(&self, enabled: bool) -> Self
pub fn is_top(&self) -> bool
pub fn set_top(&self, enabled: bool) -> Self
pub fn is_vertical(&self) -> bool
pub fn set_vertical(&self, enabled: bool) -> Self
pub fn is_italic(&self) -> bool
pub fn set_italic(&self, enabled: bool) -> Self
sourceimpl Attributes
impl Attributes
sourcepub fn color_pair(&self) -> ColorPair
pub fn color_pair(&self) -> ColorPair
Return the ColorPair
associated with the Attributes
.
Trait Implementations
sourceimpl AsMut<Attributes> for Attributes
impl AsMut<Attributes> for Attributes
sourceimpl AsRef<Attributes> for Attributes
impl AsRef<Attributes> for Attributes
sourceimpl AttributesType<i16> for Attributes
impl AttributesType<i16> for Attributes
sourceimpl BitOr<Attribute> for Attributes
impl BitOr<Attribute> for Attributes
Implement the | operator for adding an Attribute to Attributes
sourceimpl BitOr<Attributes> for Attributes
impl BitOr<Attributes> for Attributes
Implement the | operator for adding Attributes to Attributes
sourceimpl BitOr<Attributes> for ChtypeChar
impl BitOr<Attributes> for ChtypeChar
sourceimpl BitOr<Attributes> for ChtypeString
impl BitOr<Attributes> for ChtypeString
sourceimpl BitOr<ColorPair> for 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.
sourceimpl BitXor<Attribute> for Attributes
impl BitXor<Attribute> for Attributes
Implement the ^ operator for disabling an Attribute from Attributes
sourceimpl BitXor<Attributes> for Attributes
impl BitXor<Attributes> for Attributes
Implement the ^ operator for removing Attributes from Attributes
sourceimpl BitXor<Attributes> for ChtypeChar
impl BitXor<Attributes> for ChtypeChar
sourceimpl BitXor<Attributes> for ChtypeString
impl BitXor<Attributes> for ChtypeString
sourceimpl BitXor<ColorPair> for Attributes
impl BitXor<ColorPair> for Attributes
Implement the ^ operator for removing a ColorPair
on a Attributes
.
sourceimpl Clone for Attributes
impl Clone for Attributes
sourcefn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Attributes
impl Debug for Attributes
sourceimpl Default for Attributes
impl Default for Attributes
sourceimpl From<Attribute> for Attributes
impl From<Attribute> for Attributes
sourceimpl From<Attributes> for ColorPair
impl From<Attributes> for ColorPair
sourcefn from(attrs: Attributes) -> Self
fn from(attrs: Attributes) -> Self
Performs the conversion.
sourceimpl Hash for Attributes
impl Hash for Attributes
sourceimpl PartialEq<Attributes> for Attributes
impl PartialEq<Attributes> for Attributes
sourcefn eq(&self, other: &Attributes) -> bool
fn eq(&self, other: &Attributes) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Attributes) -> bool
fn ne(&self, other: &Attributes) -> bool
This method tests for !=
.
impl Copy for Attributes
impl Eq for Attributes
impl StructuralEq for Attributes
impl StructuralPartialEq for Attributes
Auto Trait Implementations
impl RefUnwindSafe for Attributes
impl !Send for Attributes
impl !Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more