Class SelectObjectsAction
The Action used to select GeoObjects of a (visible) Model. Mouseclicks in the view are used to determine which objects should be selected. The user can select a rectangular area by dragging the mouse while the left button is pushed. Dragging from left to right selects all objects completely inside the rectangle, dragging from right to left selects all objects which are touched by the ractangle. The PickMode determins on which level the selection is performed, the FilterList adds additional filtering the the selection process.
Implements
Inherited Members
Namespace: CADability.Actions
Assembly: CADability.dll
Syntax
public class SelectObjectsAction : Action, ICommandHandler
Constructors
| Improve this Doc View SourceSelectObjectsAction(IFrame)
Constructs a new SelectObjectsAction. This is automatically done when a IFrame derived object is created and the instance of this class can be retrieved from ActiveAction.
Declaration
public SelectObjectsAction(IFrame Frame)
Parameters
| Type | Name | Description |
|---|---|---|
| IFrame | Frame | The IFrame on which this action operates. |
Properties
| Improve this Doc View SourceLastCursorHotspot
Get the last hotspot under the cursor
Declaration
public IHotSpot LastCursorHotspot { get; }
Property Value
| Type | Description |
|---|---|
| IHotSpot |
LastCursorPosition
Get the area the cursor is currently over. e.g. EmptySpace or Hotspot
Declaration
public SelectObjectsAction.CursorPosition LastCursorPosition { get; }
Property Value
| Type | Description |
|---|---|
| SelectObjectsAction.CursorPosition |
PickMode
Gets or sets the pick-mode or selection mode for this SelectObjectsAction.
Declaration
public PickMode PickMode { get; set; }
Property Value
| Type | Description |
|---|---|
| PickMode |
Methods
| Improve this Doc View SourceAddSelectedObject(IGeoObject)
Adds the provided GeoObject to the list of selected objects. The SelectedObjectListChangedEvent will be raised.
Declaration
public void AddSelectedObject(IGeoObject selObj)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeoObject | selObj | The object to add |
AddSelectedObjects(GeoObjectList)
Adds the provided list of geoObjects to the list of selected objects. The SelectedObjectListChangedEvent will be raised.
Declaration
public void AddSelectedObjects(GeoObjectList selObj)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoObjectList | selObj | List of objects to add |
ClearSelectedObjects()
Clears the list of selected objects. No more objects are selected after this call. The SelectedObjectListChangedEvent will be raised.
Declaration
public void ClearSelectedObjects()
GetFocusedSelectedObject()
Returns the selected object which currently has the focus. This is only meaningful if several objects are selected and the user navigates in the control center
Declaration
public IGeoObject GetFocusedSelectedObject()
Returns
| Type | Description |
|---|---|
| IGeoObject | The selected object which currently has the focus |
GetID()
Implements GetID().
Declaration
public override string GetID()
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
| Improve this Doc View SourceGetSelectedObjects()
Returns the list of selected GeoObjects.
Declaration
public GeoObjectList GetSelectedObjects()
Returns
| Type | Description |
|---|---|
| GeoObjectList | The list of selected GeoObjects |
IsOverHotSpot(MouseEventArgs, IView)
Returns true if the coordinate in the parameter e is inside a currently visible hotspot
Declaration
public bool IsOverHotSpot(MouseEventArgs e, IView vw)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | e | the parameter provided by the mouse event |
| IView | vw | the view which issued the mouse event |
Returns
| Type | Description |
|---|---|
| System.Boolean |
OnActivate(Action, Boolean)
Implements OnActivate(Action, Boolean). If you override this method don't forget to call the bas implementation.
Declaration
public override void OnActivate(Action OldActiveAction, bool SettingAction)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | OldActiveAction | |
| System.Boolean | SettingAction |
Overrides
| Improve this Doc View SourceOnCommand(String)
Overrides OnCommand(String). See OnCommand(String) for more information.
Declaration
public override bool OnCommand(string MenuId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | MenuId |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceOnDelete()
Implements OnDelete(). This implementation initiates the menu command "MenuId.Object.Delete".
Declaration
public override bool OnDelete()
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceOnDisplayChanged(DisplayChangeArg)
Implements OnDisplayChanged(DisplayChangeArg). If you override this method don't forget to call the bas implementation.
Declaration
public override void OnDisplayChanged(DisplayChangeArg d)
Parameters
| Type | Name | Description |
|---|---|---|
| DisplayChangeArg | d |
Overrides
| Improve this Doc View SourceOnHotspotChanged(IHotSpot, HotspotChangeMode)
Will be called when a hotspot becomes visible/invisible or selected/deselected. Will also be called, when a hotspot has been moved as a result of the change notification of the GeoObject. this is not the place to modify the GeoObject.
Declaration
protected void OnHotspotChanged(IHotSpot sender, HotspotChangeMode mode)
Parameters
| Type | Name | Description |
|---|---|---|
| IHotSpot | sender | The hotspot that caused this notification |
| HotspotChangeMode | mode | The kind of the change operation |
OnInactivate(Action, Boolean)
Implements OnInactivate(Action, Boolean). If you override this method don't forget to call the bas implementation.
Declaration
public override void OnInactivate(Action NewActiveAction, bool RemovingAction)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | NewActiveAction |
|
| System.Boolean | RemovingAction |
|
Overrides
| Improve this Doc View SourceOnMouseDown(MouseEventArgs, IView)
Implements OnMouseDown(MouseEventArgs, IView). If you override this method don't forget to call the bas implementation.
Declaration
public override void OnMouseDown(MouseEventArgs e, IView vw)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | e |
|
| IView | vw |
|
Overrides
| Improve this Doc View SourceOnMouseMove(MouseEventArgs, IView)
Implements OnMouseMove(MouseEventArgs, IView). If you override this method don't forget to call the bas implementation.
Declaration
public override void OnMouseMove(MouseEventArgs e, IView vw)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | e |
|
| IView | vw |
|
Overrides
| Improve this Doc View SourceOnMouseUp(MouseEventArgs, IView)
Implements OnMouseUp(MouseEventArgs, IView). If you override this method don't forget to call the bas implementation.
Declaration
public override void OnMouseUp(MouseEventArgs e, IView vw)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | e |
|
| IView | vw |
|
Overrides
| Improve this Doc View SourceOnSetAction()
Implements OnSetAction(). If you override this method don't forget to call the bas implementation.
Declaration
public override void OnSetAction()
Overrides
| Improve this Doc View SourceOnUpdateCommand(String, CommandState)
Overrides OnUpdateCommand(String, CommandState). See OnUpdateCommand(String, CommandState) for more information.
Declaration
public override bool OnUpdateCommand(string MenuId, CommandState CommandState)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | MenuId | |
| CommandState | CommandState |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceOnViewsChanged()
Implements OnViewsChanged(). If you override this method don't forget to call the bas implementation.
Declaration
public override void OnViewsChanged()
Overrides
| Improve this Doc View SourceRemoveSelectedObject(IGeoObject)
Removes the provided GeoObject from the list of selected objects. The SelectedObjectListChangedEvent will be raised.
Declaration
public void RemoveSelectedObject(IGeoObject toDeselect)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeoObject | toDeselect | The object to remove |
SetFocusedSelectedObject(IGeoObject)
Set the selected object which should get focus. This is only meaningful if several objects are selected and the user navigates in the control center
Declaration
public void SetFocusedSelectedObject(IGeoObject geoObject)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeoObject | geoObject | The GeoObject which should get the focus |
SetSelectedObjects(GeoObjectList)
Replaces the contents of the list of selected objects by the contents of the provided list. The SelectedObjectListChangedEvent will be raised.
Declaration
public void SetSelectedObjects(GeoObjectList selObj)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoObjectList | selObj | List of GeoObjects to be selected |
SetSelectedObjects(GeoObjectList, Boolean)
Replaces the contents of the list of selected objects by those objects of the provided list that are accepted by the according FilterList. The SelectedObjectListChangedEvent will be raised.
Declaration
public void SetSelectedObjects(GeoObjectList selObj, bool useFilter)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoObjectList | selObj | List of objects to select. |
| System.Boolean | useFilter | If true, applies all active Filters of the FilterList. |
Events
| Improve this Doc View SourceBeforeShowContextMenuEvent
Event raised before context menue is displayed, you can modify it here.
Declaration
public event SelectObjectsAction.BeforeShowContextMenuDelegate BeforeShowContextMenuEvent
Event Type
| Type | Description |
|---|---|
| SelectObjectsAction.BeforeShowContextMenuDelegate |
ClickOnSelectedObjectEvent
Event raised when clicking on a already selected object.
Declaration
public event SelectObjectsAction.ClickOnSelectedObjectDelegate ClickOnSelectedObjectEvent
Event Type
| Type | Description |
|---|---|
| SelectObjectsAction.ClickOnSelectedObjectDelegate |
FilterDragListEvent
Event to filter objects that are beeing dragged. This event is called just before the objects are dragged. You may modify the list of objects. If you clear the list, no objects will be dragged.
Declaration
public event SelectObjectsAction.FilterDragListDelegate FilterDragListEvent
Event Type
| Type | Description |
|---|---|
| SelectObjectsAction.FilterDragListDelegate |
FilterMouseMessagesEvent
Event raised before the according mouse message is processed by this action. The user may prevent the handling of this mouse message by this action and/or do some other work instead.
Declaration
public event SelectObjectsAction.FilterMouseMessagesDelegate FilterMouseMessagesEvent
Event Type
| Type | Description |
|---|---|
| SelectObjectsAction.FilterMouseMessagesDelegate |
SelectedObjectListChangedEvent
Event raised when the list of selected objects changed.
Declaration
public event SelectObjectsAction.SelectedObjectListChanged SelectedObjectListChangedEvent
Event Type
| Type | Description |
|---|---|
| SelectObjectsAction.SelectedObjectListChanged |