attach_drawing_object_to_window — Attach an existing drawing object to a HALCON window.
attach_drawing_object_to_window attaches the drawing object
to the HALCON window specified in
When attached to a window the drawing object is displayed in the specified
window. The drawing object can be modified interactively in the HALCON window.
The window is automatically updated when the objects properties are modified
using the operator
When two or more drawing objects overlap, a double-click on the currently selected drawing object will shift the focus to the next drawing object.
Furthermore it is possible to react to modifications of the drawing object
caused by user interaction when using any of the language interface.
Please see the documentation of
The drawing object can be removed from the current window with the operator
As soon as a drawing object is attached to the window, each HALCON object
which is displayed by any of the graphical operators, namely
disp_xld, is stored internally in a graphical stack associated with
WindowHandle, so that they can be displayed together with the
attached drawing object. These remain in the stack until the user calls
clear_window or the window is closed.
The size of this graphical stack can be queried and modified
set_system, respectively. See the
corresponding documentation reference for further details.
Note that using any synchronous operator which actively probe the event
read_char, will conflict with the
interaction with the drawing objects. In case you need to read the state of the
cursor, please refer to the documentation of your framework of choice for an
appropriate, non-invasive alternative.
Furthermore, the event based functionality should not be used together with
the former blocking operators
draw_circle. They conflict with the event based functionality, since
they actively fetch all events sent to the HALCON window.
When working under UNIX/Linux it is necessary to turn on the support for multithreading in the Xlib. This is achieved by calling the function XInitThreads() before any other function of the Xlib library. This means that you need to call it before any other function or method of your graphical development environment of choice. See the documentation of the function XInitThreads() in the corresponding manual page for further details.
Handle of the drawing object.
attach_drawing_object_to_window returns 2 (H_MSG_TRUE), if the
WindowHandle are valid. Otherwise an exception is raised.