Containers for program windows

Program windows are displayed in window containers by the front-end.

Program windows and window container

A Genero program can create multiple windows with the OPEN WINDOW instruction.

The front-end uses a window container to display the program windows.
  • On desktop (GDC), the window container is a frame of the OS window manager.
  • In a web browser (GAS), the window container is a browser tab.
  • On mobile devices (GMA/GMI), the window container is the device screen.

All windows created by a given program are displayed in the same window container. The window visible to the user will be the current window. If the current window is a modal window, it will appear in a frame on top of the last displayed frame of a normal window.

When multiple programs display their windows/forms in the same window container, on the left of the container, the application list can be used to navigate between these programs.

The chromebar is the top bar with a blue background. It can contain action views (buttons) to trigger actions and system buttons when GBC debug mode is active. By default, the chromebar is not visible when using the GDC desktop front-end, but it can be activated by a GBC theme variable. The chromebar is visible by default when using a browser (GAS) and with mobile devices (GMA/GMI).

To switch between normal windows created by a given program, use the window list, displayed on the top left in the chromebar.

Note that by default, with the GDC front-end, no chromebar is visible: It needs to be enabled with a GBC theme variable (refer to the GBC manual for more details).

Figure: Desktop window container and related areas

Window container screenshot

Shared or dedicated window containers for programs

With both GDC/desktop and GAS/web browser, when starting a new child program with a RUN command not using the WITHOUT WAITING clause, the parent program is frozen and is waiting for the child program to finish. In such case, the child program windows are always displayed in the same window container.

When using the GDC on desktop, by default, new programs started with RUN ... WITHOUT WAITING will display in the same window container as the parent program. To force each program to display its windows in a dedicated desktop window container, define the desktopMultiWindow style attribute to "yes" at the UserInterface node level:
<StyleList>
  <Style name="UserInterface">
     <StyleAttribute name="desktopMultiWindow" value="yes"/>
  </Style>
  ...
</StyleList>
When using the GAS with a web browser, by default, new programs started with RUN ... WITHOUT WAITING will display in the same web browser tab as the parent program. To force each child program to display its windows in a dedicated web browser tab, define the browserMultiPage style attribute to "yes" at the UserInterface node level:
<StyleList>
  <Style name="UserInterface">
     <StyleAttribute name="browserMultiPage" value="yes"/>
  </Style>
  ...
</StyleList>

The application list

The application list shows the set of programs running concurrently and displaying in the front-end window container, these can be child programs started with RUN WITHOUT WAITING.

Figure: Desktop window container with application list

Application list screenshot

With GAS and a web browser, the browser tabs display titles of regular windows, using the windowType="normal" (default) style attribute: Titles of windows defines as modal with windowType="modal" style attribute are not displayed in the browser tab caption.

By default, the application list is visible to the end user in the SideBarRail. It can be hidden by using the following UserInterface style attribute:
<StyleList>
  <Style name="UserInterface">
     <StyleAttribute name="applicationListVisible" value="no"/>
  </Style>
  ...
</StyleList>
For reference, see applicationListVisible.

The application list can also be shown in the topmenu and in the toolbar of the current window/form, by using the AUTOCOMMANDS and AUTOITEMS placeholders, with the CONTENT=PROGRAMS attribute. These placeholders can be located anywhere in the topmenu and toolbar. For more details, see Automatic action views.

The window list

The window list is defined by the set of windows opened by the current program displayed in the window container.

When the parent application launches multiple child applications and waits for them to complete (RUN not using WITHOUT WAITING), the window list shows also windows from those child applications.

The window list can be accessed from the chromebar (no available by default on GDC desktop):

Figure: Desktop window container with window list open

Window list screenshot
By default, the window list is displayed on the top left in the chromebar. It can be hidden by using the following UserInterface style attribute:
<StyleList>
  <Style name="UserInterface">
     <StyleAttribute name="windowListVisible" value="no"/>
  </Style>
  ...
</StyleList>
For reference, see windowListVisible.

The window list can also be shown in the topmenu and in the toolbar of the current window/form, by using the AUTOCOMMANDS and AUTOITEMS placeholders, with the CONTENT=WINDOWS attribute. These placeholders can be located anywhere in the topmenu and toolbar. For more details, see Automatic action views.

RUN command usage and effects

The RUN command can be used to chain application (program) execution.

In order to handle the application/program chain properly (to display the correct application list hierarchy), the front-end needs to be aware of the child program execution, before executing other sub-programs that display GUI. When executing a child program that is interactive, the parent program must make sure to be connected to the front-end, before executing the RUN command to start another interactive program.

For example, program A is started and is connected to the front-end. This root program starts a sub-program B, which does not do any user-interaction, before starting the third sub-program C, which opens a form and executes a dialog. Since B did not register to the front-end, it will consider C as if it was started individually and miss the A->B->C chain.

The solution in such case is to force the intermediate program to connect to the front-end:

MAIN
    CALL ui.Interface.refresh()
    RUN "fglrun prog-B"
END MAIN

Tabbed containers (deprecated)

Important:

tabbedContainer is deprecated and replaced by the new user interface elements to control application windows. See Containers for program windows for more details.

Application windows can be displayed in a single GUI window using folder tabs for each child program, by setting the tabbedContainer style attribute for the main window of a parent program:
<StyleList>
  <Style name="Window.main">
     <StyleAttribute name="windowType" value="normal" />
     <StyleAttribute name="tabbedContainer" value="yes" />
  </Style>
  ...
</StyleList>

When the tabbedContainer style attribute is set to "yes", the windows of several child programs will be rendered in folder tabs in a parent container.

When using tabbed containers, the tabs created for this rendering becomes the window container of the child programs.

To get tabbed container rendering, the parent program using tabbedContainer must define a Start Menu.

For reference, see tabbedContainer in the Window style attributes topic.