Graphical mode rendering (GUI mode)
What is the graphical mode (GUI)?
Genero supports the Graphical User Interface (GUI) mode to display application windows and forms with a real graphical look and feel, for desktop workstation, web browsers and mobile front-end platforms.
The graphical mode is the default with Genero. The FGLGUI environment variable can be set to 0 (zero) to run the application in text mode.
Form specification files for GUI mode
LAYOUT
section to define the
layout of the form:SCHEMA stores
LAYOUT
...
END
ATTRIBUTES
...
END
Forms defined with the SCREEN
layout section can be displayed in GUI mode.
However, to benefit from Genero BDL graphical enhancements, use a LAYOUT
section.
Defining the target front-end
In graphical mode, the application forms are displayed on the front-end workstation identified with the FGLSERVER environment variable.
If this variable is not defined, the runtime system (fglrun) assumes that the front-end executes on the same computer.
Traditional GUI mode
To simplify migration from text mode to graphical mode with legacy applications, Genero supports the Traditional GUI mode option to render all application windows in a single front-end GUI window.
Checking for graphical mode in programs
In the program code, use the ui.Interface.getFrontEndName()
method to query for the front-end type.
When this method return a value different from "console"
, the program executes
in graphical mode.
Defining the GBC to be used in direct mode
In direct mode, it is possible to configure which GBC version has to be transmitted by the runtime system to the front-end.
The GBC component files must be located on the computer where the fglrun program executes, and will be transferred when the application starts.
- The appdir/gbc directory, where appdir is the directory where the program file is located,
- The directory defined in the FGLGBCDIR environment variable,
- The $FGLDIR/web_utilities/gbc/gbc directory.
*** uic_FT_processGet.1188: requestedName=gbc://index.html realName=/app/gbc/index.html
Defining the GBC to be used with the GAS
When executing applications through the Genero Application Server, displaying on the GDC, GMA or GMI front-ends, the GBC component files are found with the mechanism available in the GAS.
The $APPDIR/gbc directory is the recommended location for a production environment, when a specific GBC is required by an application. This is typical when an application requires a specific GBC customization.
Otherwise, if no specific GBC is required, the default GBC set in the GAS configuration will be
used (check the GBC_LOOKUP_PATH
.xcf parameter)
The FGLGBCDIR environment variable is not taken into account by the GAS to define the GBC.
For more details about GBC usage with the GAS, see the Configuring GBC client for applications topic in the Genero Application Server User Guide.
Building mobile apps with a specific GBC
When building a GMA or GMI app, the GBC component needs to be bundled with the app package.
The gmabuildtool and gmibuildtool commands support an option to specify the GBC to be bundled with the app.
For more details, see Building Android apps with Genero, Building iOS apps with Genero.