
Introduce ncurses library.
Install ncurses library and man pages.
Introduce the basics of ncurses library.
Explain Window APIs, and layout windows of the file management example program.
Explain Output APIs. Add window title, and add debug_line(const char *fmt, ...).
Implement to list the directory and show the directory entries in file list window.
Refine window title for long directory path name.
Explain attributes API. Implement to press TAB key to move focus around windows.
Explain color APIs. Implement directory entry in yellow and debug window background in blue.
Explain input APIs, and read a new directory path to list.
Explain mouse APIs, and select file or directory with mouse click or double-click.
Explain scroll APIs, and make debug window scroll-able.
Explain pad APIs, and show text file contents using pad in the contents windows.
Make file list window scroll-able.
Explain panel APIs and change the windows to panels.
Explain menu APIs, and add menu items, Help and Exit.
Add cascading menu and multi-value menu.
Explain form APIs, and add a filter form.
Add enumeration field and a second page in the filter form.
This course introduces the development using ncurses library, include its panel, menu, and form extensions. Although GUI applications dominate the world, TUI (text-based user interface) programs still prove their value where X window is not available or the limited network bandwidth. Many popular tools developed on top of ncurses, like Midnight Commander, vi, nano, and htop, are still popular.
In this course, a TUI file management tool will be developed to demonstrate how to use ncurses library. Here are what you will learn:
1. Basics of ncurses library, like ncurses initialization;
2. Introduce the terminal that ncurses relies on;
3. How to use window;
4. How to output text;
5. How to render text with the font type face like bold or underline, and colors;
6. How to read key input from user, or text from screen;
7. How to use mouse in a TUI program;
8. How to make a window scroll;
9. How to use pad, and what's the difference between window and pad;
10. How to use panel extension manage overlapping windows;
11. How to display a menu or a cascading menu;
12. How to use form to collect user's input, including multi-page form.
This course is also helpful, if you are going to use ncurses++, python curses module, or the Rust version, ncurses-rs. They share the same program model with ncurses.
Look forward to seeing you in the course.