moel@345: using System;
moel@345: using System.Collections.Generic;
moel@345: using System.Text;
moel@345:
moel@345: namespace Aga.Controls.Tree
moel@345: {
moel@345: public class TreeModelEventArgs: TreePathEventArgs
moel@345: {
moel@345: private object[] _children;
moel@345: public object[] Children
moel@345: {
moel@345: get { return _children; }
moel@345: }
moel@345:
moel@345: private int[] _indices;
moel@345: public int[] Indices
moel@345: {
moel@345: get { return _indices; }
moel@345: }
moel@345:
moel@345: ///
moel@345: ///
moel@345: ///
moel@345: /// Path to a parent node
moel@345: /// Child nodes
moel@345: public TreeModelEventArgs(TreePath parent, object[] children)
moel@345: : this(parent, null, children)
moel@345: {
moel@345: }
moel@345:
moel@345: ///
moel@345: ///
moel@345: ///
moel@345: /// Path to a parent node
moel@345: /// Indices of children in parent nodes collection
moel@345: /// Child nodes
moel@345: public TreeModelEventArgs(TreePath parent, int[] indices, object[] children)
moel@345: : base(parent)
moel@345: {
moel@345: if (children == null)
moel@345: throw new ArgumentNullException();
moel@345:
moel@345: if (indices != null && indices.Length != children.Length)
moel@345: throw new ArgumentException("indices and children arrays must have the same length");
moel@345:
moel@345: _indices = indices;
moel@345: _children = children;
moel@345: }
moel@345: }
moel@345: }