UI

Functions for dealing with UI widgets.

IntersectPickPoint
Intersect an object in the current viewport given a point returned by PickPoint.
PushCommandPanelTaskMode
Set the command panel task mode (if needed), and save the old state.
PopCommandPanelTaskMode
Restore the last saved command panel task mode (if needed).
ValidListboxSel
Checks that passed listbox has a valid selection.

IntersectPickPoint:

Intersect an object in the current viewport given a point returned by PickPoint.

Returns:

A ray defining the intersection point and surface normal if the object was hit, otherwise undefined.

Arguments:
<obj>
The object to be hit tested.
<pnt>
A point as returned by the PickPoint function.
(Be careful with this, as PickPoint can return something other than a Point3. It's best to check the return value with something like:

pnt = PickPoint()
if (ClassOf pnt == Point3) then IntersectPickPoint obj pnt

Back to top...


PushCommandPanelTaskMode:

Set the command panel task mode (if needed), and save the old state.
The task mode won't be switched if it's already set to the mode requested (avoids UI flicker).

Returns:

TRUE if the panel actually switches, otherwise FALSE (though the mode is always pushed onto the stack).

Arguments:
<taskMode>
The mode the command panel should be switched to. Takes the same arguments as the built in Get/SetCommandPanelTaskMode() functions.

Back to top...


PopCommandPanelTaskMode:

Restore the last saved command panel task mode.
The task mode won't be switched if it's already set to the mode saved (avoids UI flicker).

Returns:

TRUE if the panel actually switches, otherwise FALSE (though the top mode is always popped off the stack).

Arguments:
none

Back to top...


ValidListboxSel:

Checks that passed listbox has a valid selection.

Returns:

True if the listbox's selection is valid, otherwise false.

Arguments:
<listBox>
The listbox to be checked.

Back to top...