RLD use 2 enums to identify different reasons why an object or group of objects was/were selected or deselected. The following sections will discuss these 2 enums.

Object Select Reasons

The different reasons for selecting an object or group of objects are defined as members of the ObjectSelectReason enum. This enum is defined like so:

public enum ObjectSelectReason
{
    None = 0,
    Click,
    ClickAppend,
    MultiSelect,
    MultiSelectAppend,
    Undo,
    Redo,
    AppendToSelectionCall,
    SetSelectedCall,
    None
}
ObjectSelectReason Description
None Useful in some situations to indicate that no objects were selected.
Click An object was selected because the user clicked on it.
ClickAppend An object was appended to the current selection. This happens when the user clicks on an object while the LCTRL key is pressed.
MultiSelect An object or group of objects were selected using the multi-selection rectangle.
MultiSelectAppend An object or group of objects were appended to the current selection using the multi-selection rectangle. This happens when the user drags the selection rectangle while holding down the LCTRL key.
Undo An object or group of objects were selected because of an Undo action.
Redo An object or group of objects were selected because of a Redo action.
AppendToSelectionCall An object or group of objects were selected because the client code called RTObjectSelection.Get.AppendObjects.
SetSelectedCall An object or group of objects were selected because the client code called RTObjectSelection.Get.SetSelectedObjects.

Object Deselect Reasons

The different reasons for deselecting an object or group of objects are defined as members of the ObjectDeselectReason enum. This enum is defined like so:

public enum ObjectDeselectReason
{
    None = 0,
    ClickSelectOther,
    CickAppendAlreadySelected,
    ClickAir,
    MultiDeselect,
    MultiSelectNotOverlapped,
    Undo,
    Redo,
    RemoveFromSelectionCall,
    ClearSelectionCall,
    SetSelectedCall,
    Inactive,
    WillBeDeleted
}
ObjectDeselectReason Description
None Useful in some situations to indicate that no objects were deselected.
ClickSelectOther An object or group of objects were deselected because the user clicked on another object.
CickAppendAlreadySelected An object was deselected because the user clicked on it while holding down the LCTRL key.
ClickAir An object or group of objects were deselected because the user clicked in thin air.
MultiDeselect An object or group of objects were deselected with the multi-select rectangle while holding down the LSHIFT key.
MultiSelectNotOverlapped An object or group of objects were deselected because they are no longer overlapped by the multi-selection rectangle. This happens when the user moves the mouse to change the size of the selection rectangle.\
Undo An object or group of objects were deselected because of an Undo action.
Redo An object or group of objects were deselected because of a Redo action.
RemoveFromSelectionCall An object or group of objects were deselected because the client code called RTObjectSelection.Get.RemoveObjects.
ClearSelectionCall An object or group of objects were deselected because the client code called RTObjectSelection.Get.ClearSelection.
SetSelectedCall An object or group of objects were deselected because the client code called RTObjectSelection.Get.SetSelectedObjects. This call will replace the current selection with the objects that are passed as argument to the function call. So the currently selected objects will be deselected.
Inactive An object or group of obejcts were deselected because they were found to be inactive.
WillBeDeleted An object or group of objects were deselected because they are about to be deleted. This can happen when the user presses the DELETE key or when the client code calls RTObjectSelection.Get.Delete().