Text mode rendering (TUI mode)

What is the text mode (TUI)?

The text user interface (TUI) has been designed for character-based terminals. This mode can be used to run your application on a text terminal hardware or in a terminal emulator.

In TUI mode, all application forms will display within the current terminal device or emulator as shown.

Figure: Text mode console example

Text mode rendering screenshot
Important: Using a LAYOUT section is for GUI mode only. When displaying a form defined with LAYOUT section in TUI mode (FGLGUI=0), the runtime system will raise the error -6315.

Enabling text mode

In order to run a Genero program on text mode, set the FGLGUI environment variable to 0 (zero).

Important: On UNIX™ platforms, you need to configure your terminal capabilities with the TERM, TERMINFO or TERMCAP environment variables.

Checking for text mode in programs

In the program code, use the ui.Interface.getFrontEndName() method to query for the front-end type.

When this method returns "console", the program executes in text mode.