Select the application structure¶
This application note introduces the different application structures and discusses how to use them.
An application contains various independent pages. Those pages can be generated dynamically at run-time, stored in Flash at build-time, or read from an SD-card.
There are four structures for the applications:
-
With the dynamic structure, the application generates all the pages at run-time;
-
With the static structure, the application displays the pages from header files included at build-time into the Flash memory;
-
With the indirect structure, the application reads the images from files on an SD-card and displays them on the screen at run-time;
-
With the combined structure, the application displays the pages as background, from Flash memory or from files on an SD-card, and updates some elements on foreground at run-time.
Use the dynamic structure¶
This is the standard approach.
The application generates all the pages dynamically at run-time.
Use the static structure¶
This approach offers a wider flexibility.
-
Images originate from
-
An application generating and displaying the pages on the screen and then saving them as images with the File library or printing them to the console with the Serial library;
-
The Viewer edition generating and recording the pages directly on the main computer;
-
An external tool running on the main computer. This allows to manage non-Latin languages, for example left-to-right languages.
-
-
Those images are then converted into header files. The header files are included into the application Flash memory at build-time. The application note Generate header file from image explains how to proceed.
-
At run-time, the application displays the pages from the Flash memory, as shown in the section Display - Pixmap on serial console.
Use the indirect structure¶
This approach relies on images stored on an SD-card.
-
Images originate from the same options as for the static structure.
-
Those images are saved on an SD-card.
-
At run-time, the application reads the files from the SD-card abd displays the pages, as shown in the section Display - BMP file on SD-card or Display - Pixmap file on SD-card
Warning
The file operations on SD-card require the external SD library library.
Ensure the external SD-card library is installed and configured properly.
The indirect structure requires the Commercial edition.
Use the combined structure¶
With the combined structure, the application displays the pages as background, from Flash memory or from files on an SD-card, and updates some elements on foreground dynamically.
As examples,
-
The output element Label displays formatted values on a static page.
-
The input element Area defines an active zone on the screen to manage touch.
-
Other input elements can be used as well, like the Cursor.
Setting a grid eases the coordinates, as explained in the application note Design a page.