HPS::HCA::ModelTreeItem

class HPS.HCA.ModelTreeItem : public HPS.Sprocket

The ModelTreeItem class is a smart pointer which corresponds to an item or node in a tree object in a GUI toolkit, e.g., a TreeViewItem in WPF or an HTREEITEM in MFC. This class must be derived from to facilitate tree creation in the various GUI toolkits. It is used to represent items in a model browser.

Subclassed by HPS.HCA.ModelTreeItem.ModelTreeItemUnknown

Public Functions

abstract HPS.HCA.ModelTreeItem AddChild (Int64 in_node_id)

This function is used to create a new ModelTreeItem to be the child of this ModelTreeItem. You will need to implement this function in your class which derives from HCA.ModelTreeItem. This function will be invoked if this ComponentTreeItem has children and Expand has been invoked on it. This function should contain any necessary calls to GUI toolkits to create the appropriate GUI elements. Additionally, since this function requires the creation of a derived ModelTreeItem, that derived ModelTreeItem should use the base constructor which is appropriate for creating non-root items.

Param in_node_id

The node ID to be associated with the ModelTreeItem being added to the ModelTree.

void Assign (HPS.HCA.ModelTreeItem in_that)

Share the underlying smart-pointer of the ModelTreeItem source.

Param in_that

The ModelTreeItem source of the assignment.

Return

A reference to this ModelTreeItem.

void Collapse ()

This function should be invoked when this ModelTreeItem needs to collapse. If this function is overridden, the overriding function should invoke this base function. Additionally, this function will always release all children for this ModelTreeItem when invoked.

override void Dispose ()
delegate void DtorDelegate (IntPtr cPtr)
bool Equals (HPS.HCA.ModelTreeItem in_that)

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

Param in_that

The source ModelTreeItem to compare to this ModelTreeItem.

Return

true if the objects reference the same underlying data, false otherwise.

override bool Equals (Object obj)
void Expand ()

This function should be invoked when this ModelTreeItem needs to expand. If this function is overridden, the overriding function should invoke this base function. Additionally, this function will always repopulate the children for this ModelTreeItem when invoked.

override int GetHashCode ()
HPS.HCA.ModelTree.ItemType GetItemType ()

Gets the item type for this ModelTreeItem. This is used to determine what type of data this ModelTreeItem represents in the ModelTree.

Return

The item type for this ModelTreeItem.

UInt64 GetNodeId ()

Returns the HCA node ID associated with this ModelTreeItem

Return

The HCA node ID associated with this ModelTreeItem .

string GetTitle ()

Gets the title for this ModelTreeItem. This is the text that should be displayed for this ModelTreeItem in the ModelTree.

Return

The title for this ModelTreeItem.

HPS.HCA.ModelTree GetTree ()

Gets the ModelTree associated with this ModelTreeItem. This provides a means of accessing the derived ModelTree by this ModelTreeItem if necessary.

Return

The ModelTree associated with this ModelTreeItem.

bool HasChildren ()

Indicates whether this ModelTreeItem has any children.

Return

true if this ModelTreeItem has children, false otherwise.

void Hide ()

Hides this ModelTreeItem it isn’t already. Geometry associated with a hidden ModelTreeItem becomes invisible. Calling this function will result in a call to OnShowHide after the hide operation has taken place.

void Highlight (HPS.HighlightOptionsKit in_highlight_options)

Highlights this ModelTreeItem using the options specified. Calling this function will result in a call to OnHighlightUnhighlight after the highlight operation has taken place.

bool IsExpanded ()

Indicates whether this ModelTreeItem is currently expanded.

Return

true if this ModelTreeItem is expanded, false otherwise.

bool IsHidden ()

Indicates whether this ModelTreeItem is currently hidden.

Return

true if this ModelTreeItem is hidden, false otherwise.

bool IsHighlighted ()

Indicates whether this ModelTreeItem is currently highlighted.

Return

true if this ModelTreeItem is highlighted, false otherwise.

void Isolate ()

Shows this ModelTreeItem and hides every other nodes in the tree, causing this item to become the only one visible. The camera will zoom to the isolated item. Calling this function will result in a call to OnShowHide for the item which is isolated, after the isolate operation has taken place.

ModelTreeItem ()

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

ModelTreeItem (HPS.HCA.ModelTree in_tree, HPS.HCA.Model in_hca_model)

This constructor creates a ModelTreeItem suitable for acting as a root in a ModelTree.

Param in_tree

A pointer to the ModelTree which will contain this ModelTreeItem

Param in_hca_model

The HCA.Model which will be assigned to this ModelTreeItem.

ModelTreeItem (HPS.HCA.ModelTree in_tree, Int64 in_node_id)

This constructor creates a ModelTreeItem which is not suitable for acting as a root in a ModelTree, but is suitable to be a ModelTreeItem under the root of the ModelTree. This constructor should be the one invoked in the overridden AddChild function.

Param in_tree

A pointer to the ModelTree which will contain this ModelTreeItem.

Param in_node_id

The node ID to be associated with this ModelTreeItem.

ModelTreeItem (HPS.HCA.ModelTreeItem in_that)

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

Param in_that

The source ModelTreeItem to copy.

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 OnHighlightUnhighlight ()

This function will be invoked when this item becomes highlighted or unhighlighted. If you want something to happen when an item’s highlight state changes you should provide an implementation for this function in your class which derives from HCA.ModelTreeItem. A common usage for this function is to make the text associated with highlighted items bold to indicate to users whether the item is highlighted or not at a glance.

void OnShowHide ()

This function will be invoked when this item becomes shown or hidden. If you want something to happen when an item becomes shown or hidden you should provide an implementation for this function in your class which derives from HCA.ModelTreeItem. A common usage for this function is to change the icon associated with the node to indicate to users whether the item is shown or hidden at a glance.

delegate void RemoveCacheItemDelegate (IntPtr cPtr)
bool RequestProperties (out UInt32 out_request_id)
void Show ()

Shows this ModelTreeItem it isn’t already visible. Geometry associated with a shown ModelTreeItem becomes visible. Calling this function will result in a call to OnShowHide after the show operation has taken place.

void Unhighlight ()

Removes all highlights from this ModelTreeItem. Calling this function will result in a call to OnHighlightUnhighlight after the unhighlight operation has taken place.

void Zoom ()

Smoothly zooms the camera to focus on this item. The transition lasts half a second.

Public Static Functions

bool operator!= (HPS.HCA.ModelTreeItem a, HPS.HCA.ModelTreeItem b)
bool operator== (HPS.HCA.ModelTreeItem a, HPS.HCA.ModelTreeItem b)