Class ActionFeedBack
- Namespace
- CADability.Actions
- Assembly
- CADability.dll
A container for Feedback objects. These are objects that give visual feedback to the user while a Action is in progress. Currently you can add IGeoObjects or FeedBackPlanes that provide the feedback.
public class ActionFeedBack
- Inheritance
-
ActionFeedBack
- Inherited Members
Properties
SelectOutline
Meant to switch the outline of the objects added with AddSelected(IGeoObject) on (width from the setting "Select.SelectWidth") or off. The current repaint does not evaluate it and always draws these objects in the select mode, so setting it has no visible effect.
public bool SelectOutline { get; set; }
Property Value
Methods
Add(IFeedBack)
Adds an IFeedBack to the list of feedback objects. The object shows in the appropriate view and the view reflects all changes of the object. Currently there are the GeoObjects and the FeedBackPlane object which support the IFeedBack interface. You could also implement your own IFeedBack objects.
public int Add(IFeedBack feedBackObject)
Parameters
feedBackObjectIFeedBackthe object to show
Returns
- int
the index in the list, may be used for Remove(int)
Add(GeoObjectList)
Adds all objects of feedBackObjects that implement IFeedBack (which the
GeoObjects of CADability do) to the list of feedback objects, see Add(IFeedBack).
public int Add(GeoObjectList feedBackObjects)
Parameters
feedBackObjectsGeoObjectListthe objects to show
Returns
- int
the index of the last added object in the list, may be used for Remove(int)
Add(IEnumerable<IGeoObject>)
Adds all objects of feedBackObjects to the list of feedback objects, see
Add(IFeedBack). The objects must implement IFeedBack, which the GeoObjects of
CADability do.
public int Add(IEnumerable<IGeoObject> feedBackObjects)
Parameters
feedBackObjectsIEnumerable<IGeoObject>the objects to show
Returns
- int
the index of the last added object in the list, may be used for Remove(int)
AddSelected(GeoObjectList)
Adds all objects of feedBackObjects to the list of objects displayed in the select color
and the select display mode, see AddSelected(IGeoObject).
public int AddSelected(GeoObjectList feedBackObjects)
Parameters
feedBackObjectsGeoObjectListthe objects to add
Returns
- int
the index of the last added object in the list, may be used for RemoveSelected(int)
AddSelected(IGeoObject)
Adds a GeoObject to the list of displayed objects. In contrary to Add(IFeedBack) the object is displayed in the select color and the select display mode.
public int AddSelected(IGeoObject feedBackObject)
Parameters
feedBackObjectIGeoObjectObject to add
Returns
- int
the index in the list, may be used for RemoveSelected(int)
AddSelected(IEnumerable<IGeoObject>)
Adds all objects of feedBackObjects to the list of objects displayed in the select color
and the select display mode, see AddSelected(IGeoObject).
public int AddSelected(IEnumerable<IGeoObject> feedBackObjects)
Parameters
feedBackObjectsIEnumerable<IGeoObject>the objects to add
Returns
- int
the index of the last added object in the list, may be used for RemoveSelected(int)
AddTransparent(IGeoObject)
Adds a GeoObject to the list of objects that are displayed semi-transparent (with blending) on top of the model, e.g. the rotation arrow of the parametric angle action. The view reflects changes of the object.
public void AddTransparent(IGeoObject feedBackObject)
Parameters
feedBackObjectIGeoObjectthe object to add
AddTransparent(IEnumerable<IGeoObject>)
Adds all objects of feedBackObjects to the list of objects displayed semi-transparent, see
AddTransparent(IGeoObject).
public void AddTransparent(IEnumerable<IGeoObject> feedBackObjects)
Parameters
feedBackObjectsIEnumerable<IGeoObject>the objects to add
ClearAll()
Removes all feedback objects.
public void ClearAll()
ClearSelected()
Removes all objects from the list of "display as selected" objects
public void ClearSelected()
ClearTransparent()
Removes all objects from the list of objects displayed semi-transparent.
public void ClearTransparent()
FeedbackPoint(IFrame)
Creates a point which can be used as a feedback object. The point uses the feedback color as specified in the project settings.
public static Point FeedbackPoint(IFrame frame)
Parameters
frameIFrameFrame to gat access to the settings
Returns
FeedbackPoint(IFrame, PointSymbol)
Creates a point which can be used as a feedback object and is displayed with the given pointSymbol.
The point uses the feedback color ("Colors.Feedback") as specified in the project settings. Construction actions
typically add the returned point to their feedback to mark positions they are working with.
public static Point FeedbackPoint(IFrame frame, PointSymbol pointSymbol)
Parameters
frameIFrameFrame to get access to the settings
pointSymbolPointSymbolThe symbol with which the point is displayed
Returns
MakeModelTransparent(bool)
Requests that the views draw the model transparent while the action runs, so that feedback objects inside solids stay visible, and triggers a repaint. The request is forwarded to the views whenever the feedback changes; whether it is honoured depends on the view (ModelView currently only repaints).
public void MakeModelTransparent(bool transparent)
Parameters
transparentbooltrue to draw the model transparent, false to draw it normally
Remove(IFeedBack)
Removes an previously added IFeedBack from the list of feedback objects. The object is no longer displayed.
public void Remove(IFeedBack feedBackObject)
Parameters
feedBackObjectIFeedBackObject to remove
Remove(int)
Removes an IFeedBack object by its index from the list of the displayed objects.
public void Remove(int index)
Parameters
indexintIndex of the object to remove
RemoveSelected(IGeoObject)
Removes the provided and previously added object from the list of "display as selected" objects
public void RemoveSelected(IGeoObject feedBackObject)
Parameters
feedBackObjectIGeoObjectObject to remove
RemoveSelected(int)
Removes the object (identified by its index) from the list of "display as selected" objects
public void RemoveSelected(int index)
Parameters
indexintindex of the object to remove
RemoveTransparent(IGeoObject)
Removes a previously added object from the list of objects displayed semi-transparent. Does nothing if the object is not in the list.
public void RemoveTransparent(IGeoObject feedBackObject)
Parameters
feedBackObjectIGeoObjectthe object to remove