void Show_Selection (char *segment)
 Returns the name of the segment that was selected by the user. More...

Detailed Description

Function Documentation

◆ Show_Selection()

void Show_Selection ( char *  segment)

Returns the name of the segment that was selected by the user.

segment- The "simple" name—not including the segment's owner, the owner's owner, etc.—of the segment that includes the window or piece of geometry that gave rise to the current selection-type event. Passed by reference always. Returned to user.


Once a "selection" event has reached the front of the event queue and become the current event—either by enabling selection events and then calling Await_Event() , or by calling Get_Selection() to do all the work—your program can ask for details about it.
The simplest detail of a selection event is the name of the segment selected. If the "selectability" attribute of this part of the segment tree was set to just "window", or if geometry was selectable too, but there wasn't anything appropriate within range, the segment named is the segment that had the relevant window. If an element of geometry was selected, the segment named is the one within the window that contained the particular geometry. (You can determine which is the case by calling Show_Selection_Element() .)


Get_Selection() and Show_Selection both return the same information. Get_Selection() is a high-level routine that does a series of actions. Show_Selection is a low-level routine whose only function is to extract one piece of information from the database.
The Show routines can be called repeatedly on the same current event without harm, if that's convenient to your program.
If the segment selected was originally created as a "no-name" segment, then the string returned will be in form of "@hex", where "hex" is the hexadecimal encoding of the segment's key. Note that this style of segment name is acceptable as input to all the various HOOPS segment routines.
If the current event is not a selection-type event, or if there is no current event, Show_Selection() will complain.


See also
Await_Event, Get_Selection, Enable_Selection_Events, Show_Selection_Element, Show_Selection_Position, Show_Selection_Pathname, Show_Selection_Keys, Show_Selection_Source, Set_Selectability, Requeue_Event, Show_Polyline, Show_Shell, Show_Marker.