User Interface
Mandolin Creek User Interface
The MCSH package includes the Mandolin Creek User Interface (MCUI) script libraries. The MCUI libraries provide an abstract Bash API for prompting users with information and collecting their input.
Portability
By using the MCUI libraries, MSCH components may interact with the user through many different possible implementations. These implementations fall into four broad categories:
- Command Line Interface (CLI)
- Textual User Interface (TUI)
- Graphical User Interface (GUI)
- Pen User Interface (PUI)
CLI
A CLI implementation provides basic line-oriented input and output support. The CLI must be used when executing without a terminal (e.g. as a sink in a command pipeline).
cli
- usesecho
andread
shell built-ins
TUI
A TUI provides a text-based "graphical" windowing interface for interactive terminal use. These provide a better experience for users than a CLI implementation, but they do not look as nice as a modern GUI.
dialog
- usesncurses
librarywhiptail
- usesnewt
libraryTODO
GUI
These graphical systems represent the state of the art
- X windows
kdialog
- uses Qt/KDE librariesgdialog
- uses GTK+/Gnome libraries (see thezenity
package)TODO
- Apple MacOS
TODO
- Microsoft Windows
TODO
PUI
A PUI provides a user experience for mobile devices, tablets, and other touch-based devices.
- Is there such a thing, similar to
dialog
and friends? If not, invent it. TODO
Automatic Detection
The MCUI library will transparently select the best implementation to use, depending on its current execution context. Presently, the software detects the following contexts in the order that they appear here:
- X - If
DISPLAY
is set, MCUI will use the best available GUI backend. - Terminal - If the controlling terminal is interactive, then MCUI will use the best TUI backend.
- Batch - MCUI will use the best CLI backend.
Manual Selection
If this process does not result in the correct backend being selected, then you may select a specific library by setting mcui_backend
in your environment or configuration file(s). When set, the automatic detection process will be skipped.
Components
The mcui
library provides the public programming interface. Scripts that utilize MCUI should only use the functions available directly in the main interface library. Conversely, functionality located inside mcui/*
should only be used indirectly through the public interfaces.
Interfaces
mcui
- Mandolin Creek UI public interface support
Implementations
mcui/cli
- MCUI backend forreadline
(CLI) supportmcui/dialog
- MCUI backend fordialog
(TUI) supportmcui/kdialog
- MCUI backend forkdialog
(GUI) support
Support Libraries
mcui/input
- CLI input support
TODO
The MCUI libraries presently have a fairly clear and present task list. These tasks will be outlined and priorities briefly in this section.
MCUI API
- More input functions
- Listbox
- Combobox
- Tree select
- Calendar
Backends
cli
- add missing callpoints as stubs
- implement stubs
dialog
- add missing call.points as stubs
- implement stubs
kdialog
- implement stubs
- More backends
- X/Gnome:
zenity
- X/GTK+:
whiptail
- MacOS: ?
- Windows: ?
- X/Gnome: