void PEXBeginPickAll( Display *display, Drawable drawable, PEXRenderer renderer, long structure_id, int method, int send_event, int max_hits, int pick_device_type, PEXPickRecord *pick_record )
None.
Invoke PEXBeginPickAll to start an immediate-mode pick, setting the renderer's renderer state to PEXPicking.
When the renderer state is PEXPicking, primitives are hit tested instead of converted to pixels. All picked primitives are recorded until the maximum hits specified. Additional picked primitives are not recorded. Once the maximum number of hits is reached, then the implementation may ignore subsequent primitives.
Inquire the supported pick device types by invoking the PEXGetEnumTypeInfo function.
The specified structure identifier is inserted as the first structure component in the returned pick path(s).
PEXlib defines two standard pick methods:
If the send event flag is True and the pick method is PEXPickAllAll, then a PEXMaxHitsReached event is sent from the implementation to the client whenever implementation reaches the specified maximum number of hits, if the implementation supports the event. To determine the maximum number of supported hits, invoke the PEXGetImpDepConstants function. Upon receiving the event, the application should stop sending primitives and process the recorded hits. If the pick method is PEXPickAllVisible, then a complete set of primitives must be sent to the implementation before the implementation can determine which primitives to select.
If the specified drawable does not have the same root and depth as the drawable used to create the renderer, or, if the specified drawable is not one of the supported drawables, then the implementation issues a BadMatch error. To determine the supported drawables, invoke the PEXMatchRenderingTargets function. If the renderer state is set to PEXRendering, PEXMultipassRendering or PEXPicking when this function is called, then the operation in progress is aborted, the PEXBeginPickAll function is completed, and the implementation issues a BadPEXRendererState error.
When the renderer state is PEXPicking, you can invoke any function which processes output commands or manipulates attributes (e.g., all output command functions, PEXBeginStructure, PEXEndStructure, PEXRenderElements, and PEXAccumulateState). These functions have the same semantics except that primitives are hit tested instead of converted to pixels.
For a list of all Renderer Pick functions and related topics, see Renderer Picking.