OPEN action


Function
The action opens a specific graph, picture or composition.
Declaration
OPEN grObjIdent [OM_NORMAL | OM_DLG | OM_MODAL] [INSTANCE instanceExprInt]
 


or


 


OPEN grObjIdent ON procIdent [OM_NORMAL | OM_DLG | OM_MODAL] [INSTANCE instanceExprInt]
 


or


 


OPEN grObjIdent DIRECT [USE_MDD] [OM_NORMAL | OM_DLG | OM_MODAL | OM_POPUP _xIdent, _yIdent  | OM_INFO _xIdent, _yIdent] [INSTANCE instanceExprInt] [[SYNC [END]]
 


or


 


OPEN grObjIdent ON ALL [OM_NORMAL | OM_DLG | OM_MODAL] [INSTANCE instanceExprInt]
 


 


OPEN "picture name", knlId DIRECT [OM_NORMAL | OM_DLG | OM_MODAL | OM_POPUP _xIdent, _yIdent | OM_INFO _xIdent, _yIdent ] [INSTANCE instanceExprInt] [[SYNC [END]]
Parameters
grObjIdentinReference to an object of Graph, Picture or Composition type.
procIdentinIdentifier of a Process type object (Human Interface).
instanceExprIntinExpression of Int type, which specifies the object instance number .
_xIdentinInt type - x coordinate of the opened object on the desktop of the D2000 HI process.
_yIdentinInt type - y coordinate of the opened object on the desktop of the D2000 HI process .
knlIDinThe D2000 Server number in the multikernel system.
Popis
The action opens the given graphic object (optionally also the given instance) on the given console (if it is not stated, so on SELF.HIP) or on all currently running consoles.
Action with DIRECT clause is enabled in the case of an active picture. A picture opened by this (on the identical D2000 HI process) is to be opened as a subpicture - there is to be executed copying INOUT variables (local variables of the picture) between the pictures.
If the keyword SYNC is used, the action will be terminated after the picture is opened. If the keyword SYNC is followed by the keyword END, the action will be terminated after closing the picture.

The USE_MDD parameter allows the D2000 HI process to open a picture without a link to picture location, from which the picture is opened. For example, if the  HI is in a multidisplay mode (uses multiple monitors) and the picture that used the OPEN ... DIRECT call (without the USE_MDD parameter) is on the monitor No.2, the picture being opened will be placed on monitor No.2. If the USE_MDD parameter is used, then opening proceeds according to the configuration in mdd.ini file and according to picture parameters.

The action allows to adjust (using a keyword OM_*) picture window type after opening by redefining the standard setting:

Window typeKeyword
NormalOM_NORMAL
DialogOM_DLG
Dialog-modalOM_MODAL
popup pictureOM_POPUP
info pictureOM_INFO

The keyword OM_POPUP can be only used along with the keyword DIRECT. Opening the picture as a popup requires the definition of other parameters _xIdent and _yIdent, which defines the position of the window after opening it. The position is given by coordinates in regard to the picture, from which it is opened. Values are available in e.g. the active picture event OnMouseDown. If the parameters _xIdent and _yIdent are set to -1 and -1, the given window will be opened on the position of the mouse pointer.
This description is also applied for key word OM_INFO.

Picture opening as popup window - picture is opened like dialog active picture without title (it takes a focus of the active picture of process). If you click out of picture, it will be closed.

Picture opening as info window - picture is opened like dialog inactive picture with tight frame and without title. Picture is inactive (it does not take a focus of the active picture of process) if it contains only the graphic objects and window elements. Other nested objects can activate this picture. As the picture does not contain the title bar, it should have implemented its own closing mechanism.

Notice: OPEN action can fail if the picture has been opened in the HI or if it is blocked in another HI (the application modal pictures).

Note
* Can be used within active picture only. The action opens the picture given by its name (the parameter picture name). Picture is defined in the configuration of the D2000 Server process specified by the parameter KnlID.

Related pages:

Napíšte komentár