ele_control(3G)
NAME
ele_control − set or clear element control flags for the current element of the currently open segment
SYNOPSIS
C Syntax:
void ele_control(fildes, control, on)
int fildes, control, on;
FORTRAN77 Syntax:
subroutine ele_control(fildes, control, on)
integer*4 fildes, control, on
Pascal Syntax:
procedure ele_control(fildes, control, on: integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
control Flag indicating which element control flags are affected.
on TRUE (1) if the given element control flags should be set for the element, or FALSE (0) if they should be cleared.
Discussion
Ele_control affects how display list traversals process the current element of the currently open segment of the given fildes. This can be useful for "commenting out" a display list element without actually removing it.
Control must be a bitwise combination (i.e. bitwise OR or arithmetic sum) of the constants
DISP_IGNORE to affect whether the element is ignored during display traversal, or
PICK_IGNORE to affect whether the element is ignored during pick traversal.
If on is TRUE (1), the element will be ignored during the specified traversal(s); no processing at all will take place on that element. For example, if ignored during display traversal, a call_segment element will not be called, a line_color_index element will not cause the current line color to be changed, and a polyline2d element will not be drawn. Similarly, if ignored during pick traversal, the call_segment element will not be recursively searched for hits, and the polyline2d element can not be picked, even if it falls within the pick aperture.
If on is FALSE (0), normal processing will take place on the element during the specified traversal(s).
EXAMPLES
If the current element of the currently open segment of fildes is a call_segment(3G) element, the call
ele_control(fildes, DISP_IGNORE, TRUE);
will cause the call_segment to be ignored during display traversals, effectively becoming invisible, while the call
ele_control(fildes, PICK_IGNORE, TRUE);
will cause the call_segment to be ignored during pick traversals, effectively becoming unpickable. If the programmer were to call
ele_control(fildes, DISP_IGNORE + PICK_IGNORE, TRUE);
the element would be ignored during both pick and display traversals. The call
ele_control(fildes, DISP_IGNORE + PICK_IGNORE, FALSE);
would cause the element to be processed normally during both traversals.
ERRORS
1 Graphics device is not initialized for this operation.
6 Improper parameter value: control not one of the defined constants.
24 Segment not open.
36 Element pointer at element 0.
DEFAULTS
As an element is inserted into a display list, it is marked for normal processing in both pick and display control, i.e. elements by default have the effects listed in their respective manual pages.
WARNING
Certain elements (such as set_pick_traversal_control(3G) and application_data(3G)) are normally ignored during display and/or pick traversal. An attempt to mark a normally-ignored element for processing will not give an error, and will not change the element to allow traversal processing. For example, set_pick_traversal_control elements are normally ignored during display processing, so the call
ele_control(fd, DISP_IGNORE, FALSE);
which would normally mark the element for display traversal processing, has no effect: the element is still ignored. But either of the calls
ele_control(fd, PICK_IGNORE, FALSE);
or
ele_control(fd, DISP_IGNORE + PICK_IGNORE, FALSE);
has the effect of marking the element for pick traversal processing.
SEE ALSO
set_control(3G), inq_ele_control(3G), inq_seg_control(3G).
Hewlett-Packard Company — HP-UX Release 9.0: August 1992