6.2.6.2   Develop

Synopsis:
Select operators specific to HDevelop.

This menu contains several operators that help to adapt the user interface. These operators offer the same functionality that you have using mouse interaction otherwise. They are used to configure the environment from within a program. Using these operators, the program performs actions similar to the setting of a color in the parameter window, opening a window in the menu, or iconifying the program window with the help of the window manager.

All operators in this menu start with the prefix dev_. It has been introduced to have a distinction to the underlying basic HALCON operators (e.g., dev_set_color and set_color).

The effects of each operator are described as follows:

dev_open_window, dev_close_window, dev_clear_window
The operators dev_open_window and dev_close_window are used to open and to close a floating graphics window, respectively. During opening, the parameterization allows you to specify the window's size and position. The operator dev_clear_window clears the active window's content and its history. This corresponds to the usage of the button Clear in the graphics window. Please note that dev_open_window and dev_close_window are not exported to Visual Basic .NET, and C# because here one HWindowXCtrl is used.

dev_set_window_extents
With this operator, you can set the size and position of the active floating graphics window.

dev_set_window
This operator activates the graphics window containing the given ID. This ID is an output parameter of dev_open_window. After the execution, the output is redirected to this window. This operator is not needed for exported code in C++ or C, because here every window operation uses the ID as a parameter. The operator has no effect for exported code in Visual Basic .NET, and C#.

dev_set_color, dev_set_colored
dev_set_color has the same effects as the menu item Menu Visualization ▹ Color (page 216). dev_set_colored is equal to the menu item Menu Visualization ▹ Colored (page 215).

dev_set_draw
This operator has the same effects as the menu item Menu Visualization ▹ Draw (page 217).

dev_set_line_width
For an explanation see the menu item Menu Visualization ▹ Line Width (page 218).

dev_set_lut
For an explanation see the menu item Menu Visualization ▹ Lut (page 220).

dev_set_paint
For an explanation see the menu item Menu Visualization ▹ Paint (page 221). If you want to specify all possible parameters of a given paint mode, you have to specify them as a tuple, analogously to the HALCON operator set_paint.

dev_set_shape
For an explanation see the menu item Menu Visualization ▹ Shape (page 219).

dev_set_part
This operator adjusts the coordinate system for image, region, XLD and other graphic output. This is done by specifying the upper left and the lower right corner coordinates. This specified part is shown in the entire graphics window. If the width or height of the specified rectangle has a negative value (e.g., Row1 > Row2), the result is equivalent to the menu Menu Visualization ▹ Reset Parameters: the zoom mode is switched off, i.e., the most recently displayed image fills the whole graphics window. This feature of dev_set_part is not supported for exported C, C++, Visual Basic .NET, and C# code.

dev_display
Iconic variables are displayed in the active graphics window by this operator. It is reasonable to do this when the automatic output is suppressed (see dev_update_window below and Menu Edit ▹ Preferences ▹ Runtime Settings ▹ Runtime Settings (page 179).

dev_clear_obj
This operator deletes the iconic object stored in the HDevelop variable that is passed as the input parameter. In the variable window, the object is displayed as undefined (with a ? as its icon).

dev_inspect_ctrl
This operator opens an inspection window displaying the values of the variable passed to the operator. To inspect multiple variables at once, you can pass a tuple of variable names. In most cases a list dialog is opened, which shows all values of the variable (see also section “Inspecting Variables” on page 377). In the case of an image acquisition device handle, a description of this image acquisition device is opened. In addition, this dialog allows online grabbing of images (see page 375). This operator is not supported for exported code.

dev_close_inspect_ctrl
This is the opposite operator to dev_inspect_ctrl, and closes the floating inspect window. This operator is not supported for exported code.

dev_map_par, dev_unmap_par
These operators open and close the parameter dialog, which can also be opened using the menu Menu Visualization ▹ Set Parameters. This operator is not supported for exported code.

dev_map_var, dev_unmap_var
These operators iconify the variable window (dev_unmap_var), and retransform the iconified window to the normal visualization size, respectively (dev_map_var). This means that the variable window always remains visible on the display in one of the two ways of visualization. These operators can be executed with the help of the window manager. These operators are not supported for exported code.

dev_map_prog, dev_unmap_prog
Analogously to dev_map_var and dev_unmap_var, these operators iconify or deiconify the program window. These operators are not supported for exported code.

dev_update_window, dev_update_var, dev_update_time, dev_update_pc
Using these operators, you may configure the output at runtime. It corresponds to the settings in menu Menu Edit ▹ Preferences ▹ Runtime Settings ▹ Runtime Settings (page 179). These operators are not supported for exported code.

dev_set_check
This operator is equivalent to set_check of the HALCON library. It is used to handle runtime errors caused by HALCON operators that are executed inside HDevelop. The parameter value 'give_error', which is the default, leads to a stop of the program together with an error dialog if a value not equal to H_MSG_TRUE is returned. Using the value '~give_error', errors or other messages are ignored and the program can continue. This mode is useful in connection with operators like get_mposition, file_exists, read_image, or test_region_point, which can return H_MSG_FAIL.

dev_error_var
This operator specifies a variable that contains the return value (error code) of an operator after execution. This value can be used to continue, depending on the given value. dev_error_var is normally used in connection with dev_set_check. Note that, as the procedure concept in HDevelop only allows for local variables, the variable set by dev_error_var will only be valid in calls to the relevant procedure. Furthermore, every corresponding procedure call will have an own instance of the variable, i.e. the variable might have different values in different procedure calls. For an example how to use dev_error_var in connection with dev_set_check see %HALCONEXAMPLES%\hdevelop\Graphics\Mouse\get_mposition.hdev.

dev_open_dialog, dev_open_tool, dev_close_tool, dev_show_tool,
dev_set_tool_geometry, dev_open_file_dialog
These operators perform GUI operations from an HDevelop program.

dev_get_window
This operator returns the handle of the active graphics window.

Please note that operations concerning graphics windows and their corresponding operators have additional functionality in comparison to HALCON operators with corresponding names (without dev_): graphics windows in HDevelop are based on HALCON windows (see open_window in the HALCON reference manual), but in fact, they have an enhanced functionality (e.g., history of displayed objects, interactive modification of size, and control buttons). This is also true for operators that modify visualization parameters (dev_set_color, dev_set_draw, etc.). For example, the new visualization parameter is registered in the parameter window when the operator has been executed. You can easily check this by opening the dialog Menu Visualization ▹ Set Parameters ▹ Pen and apply the operator dev_set_color. Here you will see the change of the visualization parameters in the dialog box. You have to be aware of this difference if you export dev_* to C, C++, Visual Basic .NET, and C# code.

In contrast to the parameter dialog for changing display parameters like color, the corresponding operators (like dev_set_color) do not change the contents of the graphics window (i.e., they don't cause a redisplay). They are used to prepare the parameters for the next display action.