ComponentTree
- class HPS.ComponentTree : public HPS.Sprocket
The ComponentTree class is a smart pointer which corresponds to a tree object in a GUI toolkit, e.g., a TreeView in WPF or a CTreeCtrl in MFC. This class can be derived from to facilitate tree creation in the various GUI toolkits. It is used to create a component or model browser.
Public Types
- enum ItemType
Enumerates the types of items that can be contained in a ComponentTree.
Values:
- None
No type.
- ExchangeComponent
Item is an Exchange.Component.
- ExchangeModelFile
Item is an Exchange.CADModel.
- ExchangeViewGroup
Item is a collection of Exchange.Capture objects.
- ExchangeAnnotationViewGroup
Item is a collection of Exchange.Capture objects which are annotation captures.
- ExchangePMIGroup
Item is a collection of Exchange.Component objects representing PMI.
- ExchangeModelGroup
Item is a collection of root Exchange.Component objects.
- ParasolidComponent
- ParasolidModelFile
- DWGComponent
- DWGModelFile
Public Functions
- void AddHighlightOptions (HPS.HighlightOptionsKit in_options)
Appends one highlight options kit to the array that will be used by this ComponentTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as highlighted when highlights are performed by ComponentPath.Highlight. If the options kit requested is already part of the ComponentTree highlight options array, it will not be added to it.
- See
- See
- See
- See
- Param in_options
The highlight options that will be used by this ComponentTree.
- void Assign (HPS.ComponentTree in_that)
Share the underlying smart-pointer of the ComponentTree source.
- Param in_that
The ComponentTree source of the assignment.
- Return
A reference to this ComponentTree.
- ComponentTree ()
The default constructor creates an uninitialized ComponentTree object. The Type() function will return Type.None.
- ComponentTree (HPS.Canvas in_canvas)
This constructor creates a ComponentTree object associated with a Canvas and a layer. This constructor should be used to create a new ComponentTree object.
- Param in_canvas
The Canvas to associate this ComponentTree with.
- ComponentTree (HPS.Canvas in_canvas, ulong in_layer)
This constructor creates a ComponentTree object associated with a Canvas and a layer. This constructor should be used to create a new ComponentTree object.
- Param in_canvas
The Canvas to associate this ComponentTree with.
- Param in_layer
The layer in the Canvas to associate this ComponentTree with.
- ComponentTree (HPS.ComponentTree in_that)
The copy constructor creates a ComponentTree object that shares the underlying smart-pointer of the source ComponentTree.
- Param in_that
The source ComponentTree to copy.
- override void Dispose ()
- delegate void DtorDelegate (IntPtr cPtr)
- bool Equals (HPS.ComponentTree in_that)
Check if the source ComponentTree points to the same underlying impl as this ComponentTree.
- Param in_that
The source ComponentTree to compare to this ComponentTree.
- Return
true if the objects reference the same impl, false otherwise.
- override bool Equals (Object obj)
- void Flush ()
Resets the root ComponentTreeItem for this ComponentTree. This will release the root ComponentTreeItem by this ComponentTree and set the root to a null pointer. If this function is overridden, the overriding function should invoke this base function.
- override int GetHashCode ()
- bool GetHighlightEventHandling ()
Whether this ComponentTree is currently handling highlight events This include expanding the tree to the highlighted components, and making the text for the highlighted component tree items bold.
- Return
Whether this ComponentTree is currently handling highlight events.
- HPS.HighlightOptionsKit[] GetHighlightOptions ()
Gets the highlight options that will be used by this ComponentTree.
- Return
An array of highlight options that will be used by this ComponentTree.
- HPS.ComponentTreeItem GetRoot ()
Gets the root ComponentTreeItem for this ComponentTree.
- Return
The root ComponentTreeItem for this ComponentTree.
- override HPS.Type ObjectType ()
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Return
The declared type of the object in question, which may differ from the true, underlying type.
- void ReExpand ()
Collapses the root ComponentTreeItem for this ComponentTree and then re-expands the tree. It will try to preserve the original expansion state, however, if the underlying component structure has changed, the resulting expansion may look different.
- delegate void RemoveCacheItemDelegate (IntPtr cPtr)
- void SetHighlightEventHandling (bool in_state)
Whether the ComponentTree should handle highlighting events. This include expanding the tree to the highlighted components, and making the text for the highlighted component tree items bold. By default the ComponentTree will handle highlight events.
- Param in_state
Whether to handle highlight events.
- void SetHighlightOptions (HPS.HighlightOptionsKit in_options)
Sets the highlight options that will be used by this ComponentTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as highlighted when highlights are performed by ComponentPath.Highlight. Calling this function replaces any highlight options previously set on this object.
- See
- See
- See
- See
- Param in_options
The highlight options that will be used by this ComponentTree.
- void SetHighlightOptions (HPS.HighlightOptionsKit[] in_options)
Sets the highlight options that will be used by this ComponentTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as highlighted when highlights are performed by ComponentPath.Highlight. Calling this function replaces any highlight options previously set on this object. All elements of the array should be unique. In the case of multiple identical elements, only the first unique one will be added.
- See
- See
- See
- See
- Param in_options
An array of highlight options that will be used by this ComponentTree.
- void SetRoot (HPS.ComponentTreeItem in_root)
Sets the root ComponentTreeItem for this ComponentTree. This object should be created on the heap and it should have been created with a ComponentTreeItem constructor which took a CADModel, otherwise an exception will be thrown. Additionally, if there was already an existing root for this ComponentTree, the Flush function will be invoked prior to setting this as the new root, and Expand will be invoked on the new root.
- Param in_root
The root ComponentTreeItem for this ComponentTree.
Public Static Functions
- bool operator!= (HPS.ComponentTree a, HPS.ComponentTree b)
- bool operator== (HPS.ComponentTree a, HPS.ComponentTree b)