/** Node name. When drawing the tree map, this shows up at the top of the inside of the node's rectangle */
FStringName;
/** Node name (line 2). Left nodes only. This shows up on the second line of the node, right underneath its name. Might be drawn in a smaller font by default. */
FStringName2;
/** Center info text. Leaf nodes only. This draws right in the center of the node, with a larger font by default */
FStringCenterText;
/**
* Size of this node. This works differently depending on whether the node is a leaf node (no children) or a container node (has children):
* - Leaf nodes must ALWAYS have a non-zero size.
* - Container nodes with size of zero will have their size determined automatically by the sum of their child sizes
* - Container nodes with a non-zero size will override their child sizes and always have the explicitly set size. Sizes of children will still be used to proportionately scale the size of the child nodes within this container.
*/
floatSize;
/** Background brush for this node's box (optional) */
conststructFSlateBrush*BackgroundBrush;
/** Color for this node. This will be set automatically unless you use a customization. */
FLinearColorColor;
/** Hashtags for this node. This is just meta-data for the node that may have been loaded from a file. It is not used by the TreeMap system
directly, but you could harvest these tags and convert them into custom attributes if you wanted to! */
TArray<FString>HashTags;
/** Map of attribute name to it's respective bit of data */
TMap<FName,FTreeMapAttributeDataPtr>Attributes;
/** Back pointer to parent node, or NULL if no parent exists (root node) */
FTreeMapNodeData*Parent;
/** List of child nodes */
TArray<FTreeMapNodeDataPtr>Children;
public:
/** Default constructor for FTreeMapNodeData */
FTreeMapNodeData()
:Name(),
Name2(),
CenterText(),
Size(0.0),
BackgroundBrush(nullptr),
Color(FLinearColor::White),
HashTags(),
Parent(NULL),
Children()
{
}
/** @return Returns true if this is a leaf node */
boolIsLeafNode()const
{
returnChildren.Num()==0;
}
/** @return Copies this node into another node (not children, though. The copied node will have no children.) */
/** Font to use for titles. This is needed so that we can calculate the amount of padding space needed. This font will be used for text
titles at the root-most level of the tree. Nested levels get smaller fonts. This also affects the amount of space reserved for the title area at the top of each node. */
FSlateFontInfoNameFont;
/** Font for second line of text, under the title. Leaf nodes only. Usually a bit smaller. Works just like NameFont */
FSlateFontInfoName2Font;
/** Font for any text that's centered inside the middle of the node. Leaf nodes only. Usually a bit larger. Works just like NameFont */
FSlateFontInfoCenterTextFont;
/** Number of font sizes to drop with each depth level of the tree */
int32FontSizeChangeBasedOnDepth;
/** Padding around the outside of top-level container nodes in the tree */
floatTopLevelContainerOuterPadding;
/** Padding around the outside of nested container nodes in the tree */
floatNestedContainerOuterPadding;
/** Padding around a set of children inside of containers, under the container's title area */
floatContainerInnerPadding;
/** Minimize size of a tree node that will be allowed to have a title and padding. Nodes smaller than this will be a simple rectangle. Doesn't apply to top level nodes. */
floatMinimumInteractiveNodeSize;
/** Default constructor for FTreeMapOptions that initializes good defaults */