Exemple #1
0
 public void Add(FlexNodeBase node, int index = -1)
 {
     if (index == -1)
     {
         m_ChildList.Add(node);
     }
     else
     {
         m_ChildList.Insert(0, node);
     }
 }
Exemple #2
0
        public static int CompareFlexNodes(FlexNodeBase node1, FlexNodeBase node2)
        {
            var result = 0;

            if (node1.DataItem.Order < node2.DataItem.Order)
            {
                result = -1;
            }
            else if (node1.DataItem.Order > node2.DataItem.Order)
            {
                result = 1;
            }
            return(result);
        }
Exemple #3
0
        public FlexNodeBase Add(object ffObject, int index)
        {
            var flexNode = new FlexNodeBase(this, new FlexItem(ffObject));

            if (index == -1)
            {
                m_ChildList.Add(flexNode);
            }
            else
            {
                m_ChildList.Insert(0, flexNode);
            }
            return(flexNode);
        }
Exemple #4
0
 public FlexNodeBase(FlexNodeBase parentNode, FlexItem ffObject)
 {
     m_ParentNode = parentNode;
     m_DataItem   = ffObject;
     m_Level      = (parentNode == null) ? 0 : parentNode.Level + 1;
 }
Exemple #5
0
 public void DeleteNode(FlexNodeBase node)
 {
     m_ChildList.Remove(node);
 }