Inheritance diagram for HPS.ComponentTree:
HPS.Sprocket HPS.Object

Public Types

enum  ItemType {
  ItemType.None = 0, ItemType.ExchangeComponent = 1, ItemType.ExchangeModelFile = 2, ItemType.ExchangeViewGroup = 3,
  ItemType.ExchangeAnnotationViewGroup = 4, ItemType.ExchangePMIGroup = 5, ItemType.ExchangeModelGroup = 6, ParasolidComponent = 7,
  ParasolidModelFile = 8, DWGComponent = 9, DWGModelFile = 10
}



 

Public Member Functions

void AddHighlightOptions (HPS.HighlightOptionsKit in_options)
 
virtual void Assign (HPS.ComponentTree in_that)
 
 ComponentTree ()
 
 ComponentTree (HPS.Canvas in_canvas, ulong in_layer)
 
 ComponentTree (HPS.Canvas in_canvas)
 
 ComponentTree (HPS.ComponentTree in_that)
 
override void Dispose ()
 
delegate void DtorDelegate (IntPtr cPtr)
 
override bool Equals (System.Object obj)
 
bool Equals (HPS.ComponentTree in_that)
 
virtual void Flush ()
 
override int GetHashCode ()
 
bool GetHighlightEventHandling ()
 
HPS.HighlightOptionsKit [] GetHighlightOptions ()
 
HPS.ComponentTreeItem GetRoot ()
 
override HPS.Type ObjectType ()
 
void ReExpand ()
 
delegate void RemoveCacheItemDelegate (IntPtr cPtr)
 
void SetHighlightEventHandling (bool in_state)
 
void SetHighlightOptions (HPS.HighlightOptionsKit in_options)
 
void SetHighlightOptions (HPS.HighlightOptionsKit[] in_options)
 
void SetRoot (HPS.ComponentTreeItem in_root)
 
- Public Member Functions inherited from HPS.Sprocket
override void Dispose ()
 
 Sprocket (HPS.Sprocket in_that)
 
- Public Member Functions inherited from HPS.Object
virtual bool Empty ()
 
IntPtr GetClassID ()
 
IntPtr GetInstanceID ()
 
bool HasType (HPS.Type in_mask)
 
 Object (HPS.Object that)
 
virtual void Reset ()
 
virtual HPS.Type Type ()
 

Static Public Member Functions

static bool operator!= (HPS.ComponentTree a, HPS.ComponentTree b)
 
static bool operator== (HPS.ComponentTree a, HPS.ComponentTree b)
 
- Static Public Member Functions inherited from HPS.Object
static IntPtr ClassID< T > ()
 

Protected Member Functions

override void deleteCptr ()
 
virtual bool DerivedClassHasMethod (string methodName, System.Type[] methodTypes)
 
override IntPtr GetNonDirectorClassID ()
 
virtual bool IsUserDerived ()
 
- Protected Member Functions inherited from HPS.Sprocket
override void deleteCptr ()
 

Protected Attributes

HandleRef sptr
 
- Protected Attributes inherited from HPS.Object
bool cMemOwn
 
HandleRef cptr
 

Static Protected Attributes

static Dictionary< IntPtr, ComponentTreecachedObjects = new Dictionary<IntPtr, ComponentTree>()
 
static Dictionary< IntPtr, WeakReference > cachedWeakRefs = new Dictionary<IntPtr, WeakReference>()
 
static ReaderWriterLockSlim mapLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion)
 

Detailed Description

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.

Member Enumeration Documentation

◆ ItemType

Enumerates the types of items that can be contained in a ComponentTree.

Enumerator
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.

Constructor & Destructor Documentation

◆ ComponentTree() [1/4]

HPS.ComponentTree.ComponentTree ( )
inline

The default constructor creates an uninitialized ComponentTree object. The Type() function will return Type.None.

◆ ComponentTree() [2/4]

HPS.ComponentTree.ComponentTree ( HPS.Canvas  in_canvas,
ulong  in_layer 
)
inline

This constructor creates a ComponentTree object associated with a Canvas and a layer. This constructor should be used to create a new ComponentTree object.

Parameters
in_canvasThe Canvas to associate this ComponentTree with.
in_layerThe layer in the Canvas to associate this ComponentTree with.

◆ ComponentTree() [3/4]

HPS.ComponentTree.ComponentTree ( HPS.Canvas  in_canvas)
inline

This constructor creates a ComponentTree object associated with a Canvas and a layer. This constructor should be used to create a new ComponentTree object.

Parameters
in_canvasThe Canvas to associate this ComponentTree with.

◆ ComponentTree() [4/4]

HPS.ComponentTree.ComponentTree ( HPS.ComponentTree  in_that)
inline

The copy constructor creates a ComponentTree object that shares the underlying smart-pointer of the source ComponentTree.

Parameters
in_thatThe source ComponentTree to copy.

Member Function Documentation

◆ AddHighlightOptions()

void HPS.ComponentTree.AddHighlightOptions ( HPS.HighlightOptionsKit  in_options)
inline

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.

Parameters
in_optionsThe highlight options that will be used by this ComponentTree.
See also
ComponentTreeItem.Highlight
ComponentTreeItem.Unhighlight
ComponentPath.Highlight
ComponentPath.Unhighlight

◆ Assign()

virtual void HPS.ComponentTree.Assign ( HPS.ComponentTree  in_that)
inlinevirtual

Share the underlying smart-pointer of the ComponentTree source.

Parameters
in_thatThe ComponentTree source of the assignment.
Returns
A reference to this ComponentTree.

◆ Equals()

bool HPS.ComponentTree.Equals ( HPS.ComponentTree  in_that)
inline

Check if the source ComponentTree points to the same underlying impl as this ComponentTree.

Parameters
in_thatThe source ComponentTree to compare to this ComponentTree.
Returns
true if the objects reference the same impl, false otherwise.

◆ Flush()

virtual void HPS.ComponentTree.Flush ( )
inlinevirtual

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.

◆ GetHighlightEventHandling()

bool HPS.ComponentTree.GetHighlightEventHandling ( )
inline

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.

Returns
Whether this ComponentTree is currently handling highlight events.

◆ GetHighlightOptions()

HPS.HighlightOptionsKit [] HPS.ComponentTree.GetHighlightOptions ( )
inline

Gets the highlight options that will be used by this ComponentTree.

Returns
An array of highlight options that will be used by this ComponentTree.

◆ GetRoot()

HPS.ComponentTreeItem HPS.ComponentTree.GetRoot ( )
inline

Gets the root ComponentTreeItem for this ComponentTree.

Returns
The root ComponentTreeItem for this ComponentTree.

◆ ObjectType()

override HPS.Type HPS.ComponentTree.ObjectType ( )
inlinevirtual

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).

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from HPS.Object.

◆ ReExpand()

void HPS.ComponentTree.ReExpand ( )
inline

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.

◆ SetHighlightEventHandling()

void HPS.ComponentTree.SetHighlightEventHandling ( bool  in_state)
inline

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.

Parameters
in_stateWhether to handle highlight events.

◆ SetHighlightOptions() [1/2]

void HPS.ComponentTree.SetHighlightOptions ( HPS.HighlightOptionsKit  in_options)
inline

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.

Parameters
in_optionsThe highlight options that will be used by this ComponentTree.
See also
ComponentTreeItem.Highlight
ComponentTreeItem.Unhighlight
ComponentPath.Highlight
ComponentPath.Unhighlight

◆ SetHighlightOptions() [2/2]

void HPS.ComponentTree.SetHighlightOptions ( HPS.HighlightOptionsKit []  in_options)
inline

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.

Parameters
in_optionsAn array of highlight options that will be used by this ComponentTree.
See also
ComponentTreeItem.Highlight
ComponentTreeItem.Unhighlight
ComponentPath.Highlight
ComponentPath.Unhighlight

◆ SetRoot()

void HPS.ComponentTree.SetRoot ( HPS.ComponentTreeItem  in_root)
inline

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.

Parameters
in_rootThe root ComponentTreeItem for this ComponentTree.
See also
Flush
ComponentTreeItem.Expand

The documentation for this class was generated from the following file:
  • internals/hps_sprk/source/cs/HPS.ComponentTree.cs