Ncurses allows attributes and color to be applied to text output, including bold, underline, inverse text, and colors for both foreground and background. Special functions determine whether the terminal is capable of color. Color is applied by defining a color pair, then applying the color pair attribute to text.
- [Man] Each character position … on the Ncurses screen is occupied … by a character and an attribute. … In this exercise file, three common attributes … are activated for basic text. … Bold, reverse and underline. … The setup works the same for each attribute. … The attron function sets the text attribute, … which applies to any text output afterwards, … as you see done here in line ten with the bold attribute. … At line 13, the attroff function disables the attribute. … Two similar clusters of code activate two more attributes, … reverse text and underline. … I've already compiled and built the code, … so let's see what it does. … And here on the AnchorASUS screen, … you see the text output bold, reversed and underlined. … On some terminals, underlined text might appear blue. … Attributes can also apply color to text, … but only if the terminal window is configured for color. … In this exercise file, … the has_colors functions at line eight … returns true if the terminal window can output color text. …
- Finding, installing, and linking libraries
- Accessing and generating XML data
- Working with JSON
- Working with the libcurl library
- Text programming
- Reading, writing, and manipulating JPEG images
- Working with PNG images
Skill Level Advanced
1. Setup and Configuration
2. Data Structures
3. Web Access
4. Text Programming
5. Computer Graphics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.