moduleOn()

Opens a new module without connection to the event manager.

Synopsis

int moduleOn( dyn_anytype params);

Parameters

Parameter Description
params

The dynamic filed "params" consists of following elements:

[1]: string moduleName

[2]: int x

[3]: int y

[4]: int w

[5]: int h

[6]: int iconbar

[7]: int menubar

[8]: string ResizeMode

[9]: string FileName

[10]: string PanelName

[11]: dyn_string Parameter

moduleName Name of the opened module
x X position (-1: Centered in relation to the screen area. -2: The position at which the module has been opened last. This position will be saved in the user settings (PVSS00ui.ini file) per OS user when the module is closed. The UI notes the position per module name. Therefore, the module name might not be empty. If you want to open the module at the last specified position, you have to use the option -2 twice in succession. This means that you do not specify a position first and then use -2 but use -2 at the first and second time.)
y Y position (-1: Centered in relation to the screen area. -2: The position at which the module has been opened last. This position will be saved in the user settings (PVSS00ui.ini file) per OS user when the module is closed. The UI notes the position per module name. Therefore, the module name might not be empty. If you want to open the module at the last specified position, you have to use the option -2 twice in succession. This means that you do not specify a position first and then use -2 but use -2 at the first and second time).
w Width
h Height
iconbar

0...Default from the config file (see config entry nvIconBarOn chapter User interface)

1...without an icon bar

2...with icon bar

>2...default (0)

menubar

0...Default from the config file (see config entry nvMenuBarOn chapter User interface)

1...without a menu bar

2...with menu bar

>2...default (0)

ResizeMode

""...Default from the config file (see config entry visionResizeMode chapter User interface)

"None"...Scaling not possible in the VISION module

"Scale"...Scaling possible in the VISION module by changing the size of the window

"Zoom"...Scaling only possible with the Navigator

"FitSmallPanel"...If the panel in the module is bigger than the module when initializing, scroll bars are shown automatically

otherwise...default ("")

FileName File name of the rootpanel
PanelName Name of the panel
Parameter List of the $ parameters that are to be passed

Return value

In case of errors, the function returns -1 and otherwise, 0.

Error

Missing or invalid arguments.

Description

Opens a new module and the specified root panel in the module (the panel opens if FileName != "") in the right size. No connection to the Event Manager has to be established for opening the module. The _Ui data points are not used.

The new module is not opened, when another module with the same name is already open.

Example

main()
{
  dyn_anytype params;
  params[1] = "M1";
  params[2] = 0;
  params[3] = 0;
  params[4] = 70;
  params[5] = 70;
  params[6] = 2;
  params[7] = 2;
  params[8] = "Zoom";
  params[9] = "";
  params[10] = "";
  params[11] = makeDynString();
  moduleOn(params);
}

Assignment

Miscellaneous functions

Availability

UI