Class vdSelection
- Namespace
- VectorDraw.Professional.vdCollections
- Assembly
- VectorDraw.Professional.dll
Implements the vdSelection object which is a collection of vdFigure objects.
public sealed class vdSelection : vdBaseObject, IDisposable, IVDSerialise, IBaseObject, IEnumerable
- Inheritance
-
vdSelection
- Implements
- Inherited Members
Remarks
Using theSelect(SelectingMode, gPoints) method you can add items to the collection by selecting them in the document drawing area.
You can also add items to the collection by using the AddItem(vdFigure, bool, AddItemCheck) method or the AddRange(vdSelection, AddItemCheck) method.
or remove items from the collection by using the RemoveItem(vdFigure) method or the RemoveAt(int) method.
Support rendering, transformation and export operations for the selection (render to graphics or bitmap, create a document from selection, drag/drop).
Support filtering selection items by using the FilterSelect methods.
Constructors
- vdSelection()
Initializes the vdSelection collection object.
- vdSelection(string)
Initializes the vdSelection collection object with the specified name.
Properties
- Count
Get the item's count of the collection.
- Description
Get/Set the description of the selection.
- FreezeEvents
Get/Set a boolean value representing if the vdSelection events will be fired or not.
- HighLight
Get/Set the hightlight of the objects of the collection.
- IgnoreGroups
A boolean value that controls if groups will be ignored , internally used to avoid entities to be entered multiple times in collections.
- this[int]
Get a vdFigure object from the collection at a specified index.
- Last
Returns the last item in the collection.
- Name
Get/Set the name of the selection.
Methods
- Add(object)
Adds an object to the end of the collection.
- AddItem(object)
Adds an object to the end of the collection.
- AddItem(vdFigure, bool, AddItemCheck)
Addds a vdFigure object to the collection.
- AddItem(vdFigure, bool, AddItemCheck, bool)
Addds a vdFigure object to the collection.
- AddRange(vdEntities, AddItemCheck)
Adds all vdFigure objects from the passed collection to this collection.
- AddRange(vdSelection, AddItemCheck)
Adds all vdFigure objects from the passed collection to this collection.
- ApplyFilter(vdFilterObject)
Applies a filter to the collection specified by a vdFilterObject
- ChangeOrder(vdFigure, bool)
Changes the position of a vdFigure object to the front or the end of the collection.
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the vdSelection object when opening in vdml format.
- Dispose()
Releases all resources used by this object.
- Draw(vdRender, vdLights)
Draws the entities of the collection to a specified vdRender object.
- FilterSelect(vdFilterObject)
Applies a filter to the collection's Document and adds all entities to the collection that pass the filter.
- FilterSelect(vdFilterObject, bool)
Applies a filter to the collection's Document and adds all entities to the collection that pass the filter.
- FindItem(vdFigure)
Checks if an object exists in the collection.
- GetBoundingBox()
Gets the Bounding Box of all vdFigure objects of the collection.
- GetEnumerator()
Implements the "foreach" expression for the collection.
- GetTableDependecies(vdTableDependeciesArgs)
Fills the passed vdTableDependeciesArgs args with all the table references of this object (vdLayer, vdBlock, vdDimstyle, vdLineType, vdTextstyle, vdImageDef, vdHatchPattern etc).
- InsertAt(int, vdFigure)
Insert a vdFigure object to a specified index of the collection.
- Invalidate()
Invalidates the collection's Bounding Box and causes the control to be redrawn in this region.
- RaiseOnUserChanged()
Raizes the OnUserChanged event.
- RemoveAll()
Removes all objects from the collection.
- RemoveAt(int)
Removes an object from the specified index of the collection.
- RemoveItem(vdFigure)
Removes a specific vdFigure object from the collection.
- RenderToGraphics(Graphics, Bitmap, Color, vdRender, Size, Box)
Renders the objects of the selection in a GDI+ graphics render.
- Reverse()
Changes the order of the collection.
- Select(SelectingMode, gPoints)
Selects and adds vdFigure objects to the collection.
- Serialize(Serializer)
This Function is called when saving the vdSelection object to vdml format.
- ShowGrips(bool)
Depending from the parameter the grip points of the objects of the collection are drawn or not.
- Sort(IComparer<vdFigure>)
Sorts the entities of the Selection taking into consideration the passed comparer.
- ToArray()
Returns a new vdFigure[] array filled with the collection's objects.
- ToDocument(gPoint)
Creates and Returns a vdDocument object contaning to it's model all the vdFigure objects of the collection.
- ToImage(Color, vdRender, Size, Box)
Renders the objects of the collection to a GDI+ Bitmap object.
- ToString()
Gets a System.String that represents the count of the vdSelection collection Object.
- Transformby(Matrix)
Transforms all the geometrical properties of the objects of the collection with the specific Matrix mat.
- swap(vdFigure, vdFigure)
Swaps the position between two different vdFigure objects existing in the collection.
Events
- OnAddItem
Occurs before adding one item to the collection.
- OnAfterAddItem
Occurs after adding one item to the collection.
- OnRemoveAllItems
Occurs after removing all items from the collection.
- OnRemoveItem
Occurs after removing an item from the collection.
- OnUserChanged
Occurs when the collection is changed( an item was added or removed).