E_ENTER
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
xcall E_ENTER([D_SHARE|D_NEW])
Arguments
D_SHARE
(optional) Shared display. (n)
D_NEW
(optional) New display. (default) (n)
Discussion
E_ENTER defines a new environment and determines whether the display is shared.
Passing D_SHARE flags the display as shared. This means that the new environment accesses the previous environment’s menu bar, menu columns, toolbars, and screen body. However, the display is owned by the environment that defined it, and although the new environment can modify the menu bar and toolbars, it cannot delete local menu columns, toolbars, or windows. If you modify a shared display, that modification will affect the previous environment.
If D_NEW is passed, the display is also created with the previous environment’s menu bar, menu columns, toolbars, and screen body. However, if you make a modification (for example, removing a menu column or toolbar), that modification will not affect the previous environment.
E_ENTER performs the following operations:
- Saves the description of the current environment
- Defines new display screen sections and copies the contents of the previous environment’s sections into the new sections
- If the display is not shared, defines a new menu bar and remembers which windows, toolbars, and columns were placed (also remembers the enabled/disabled state of menu columns and entries and toolbar buttons)
- Copies the previous environment’s state flags
- Initializes the new local window and local channel lists to empty
You do not need to call E_ENTER after a U_START, as U_START automatically enters the first environment.
Note that even though you define a new environment, all previous environments still exist. Suppose, for example, that you have passed some global file channels and windows created in the caller’s current environment to a routine. Even if you enter a new environment, you can use the passed channels and windows. Although they are not owned by the new environment, they still exist and are accessible. The non-owning environment, however, cannot delete windows and channels.
Examples
This example defines a new environment with a shared display.
xcall e_enter(D_SHARE)