2.4 character attribute functions
========================
2.4.1 chtype description
-----------------
* The chtype type contains two parts of information: one part contains the information about the character itself, and the other part contains the attributes related to the character. These attributes allow the character to be displayed in different ways, including reverse display, bold, color changing, underline, etc.
* When a character is passed as a parameter to a function, these attributes can be directly used | combined with characters, and multiple attributes can be used directly | used to combine attributes
2.4.2 character attribute list
-------------------
Attribute value description
--------------- + -----------------------------------------
A_NORMAL Standard Display Mode
A_BLANK flashes
A_BOLD bold
A_DIM translucent
A_REVERSE reverse display
A_STANDOUT highlight
A_UNDERLINE underline
A_ALTCHARSET substitution Character Set
COLOR_PAIR (n) specifies the background color and foreground color of a character.
A_CHARTEXT and chtype can be extracted with the & Operator
A_ATTRIBUTES and chtype attributes can be extracted using the & operator
A_COLOR and chtype can be extracted with the & operator symbol.
2.4.3 set/cancel character attributes
------------------------
/** @ Brief: sets the default character attribute for character output. After setting, all text characters are affected by this attribute. @ note: attrset (0) can be used) to disable all attributes */int attrset (chtype attrs);/** @ brief to open certain attributes */int attron (chtype attrs ); /** @ brief disable certain attributes */int attroff (chtype attrs);/** @ brief highlight attributes A_STANDOUT */int standout () on the current screen (); /** @ brief works the same way as attrset (0). Disable all attributes */int standend ();
This article is from the "dark day" blog, please be sure to keep this source http://darksun.blog.51cto.com/3874064/1286560