public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point initialMouseLocation)
     : base(tree, column)
 {
     _location   = new Point(initialMouseLocation.X + Tree.OffsetX, 0);
     _dragOffset = tree.GetColumnX(column) - initialMouseLocation.X;
     _ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ColumnHeaderHeight), tree.Font);
 }
Example #2
0
 public TreeViewVarNode(VelerSoftware.SZC.Debugger.Debugger.Process process, VelerSoftware.SZC.TreeViewAdv.Tree.TreeViewAdv _localVarList, TreeNode content)
     : base(_localVarList, new object())
 {
     this.process      = process;
     this.localVarList = _localVarList;
     SetContentRecursive(content);
 }
 public AutoRowHeightLayout(TreeViewAdv treeView, int rowHeight)
 {
     _rowCache                = new List <Rectangle>();
     _treeView                = treeView;
     PreferredRowHeight       = rowHeight;
     _measureContext          = new DrawContext();
     _measureContext.Graphics = Graphics.FromImage(new Bitmap(1, 1));
 }
 public override bool MouseMove(MouseEventArgs args)
 {
     if (TreeViewAdv.Dist(_location, args.Location) > TreeViewAdv.ItemDragSensivity &&
         Tree.AllowColumnReorder)
     {
         Tree.Input = new ReorderColumnState(Tree, Column, args.Location);
         Tree.UpdateView();
     }
     return(true);
 }
Example #5
0
 internal protected TreeNodeAdv(TreeViewAdv tree, object tag)
 {
     _row   = -1;
     _tree  = tree;
     _nodes = new NodeCollection(this);
     if (tree.Model != null)
     {
         _children = new ReadOnlyCollection <TreeNodeAdv>(_nodes);
     }
     else
     {
         _children = _nodes;
     }
     _tag = tag;
 }
 public NormalInputState(TreeViewAdv tree)
     : base(tree)
 {
 }
Example #7
0
 public FixedRowHeightLayout(TreeViewAdv treeView, int rowHeight)
 {
     _treeView          = treeView;
     PreferredRowHeight = rowHeight;
 }
Example #8
0
        /// <summary>
        /// Function for setting the root treenode of a TreeViewAdv ment to display debugger variables.
        /// </summary>
        /// <param name="process">The process that contains the stackframe with the given variables.</param>
        /// <param name="localVarList">A list of local variables.</param>
        /// <param name="contentEnum">A list of local variables.</param>
        public static void SetContentRecursive(VelerSoftware.SZC.Debugger.Debugger.Process process, VelerSoftware.SZC.TreeViewAdv.Tree.TreeViewAdv localVarList, IEnumerable <TreeNode> contentEnum)
        {
            IList <TreeNodeAdv> childNodes = localVarList.Root.Children;

            SetContentRecursive(process, localVarList, childNodes, contentEnum);
        }
Example #9
0
        /// <summary>
        /// Private form of SetContentRecursive. This form contains an extra parameter used by LoadChildren.
        /// This adds the childNodes parameter, which can be set to the children of a particular child element.
        /// </summary>
        /// <param name="process"></param>
        /// <param name="localVarList"></param>
        /// <param name="childNodes"></param>
        /// <param name="contentEnum"></param>
        private static void SetContentRecursive(VelerSoftware.SZC.Debugger.Debugger.Process process, VelerSoftware.SZC.TreeViewAdv.Tree.TreeViewAdv localVarList, IList <TreeNodeAdv> childNodes, IEnumerable <TreeNode> contentEnum)
        {
            contentEnum = contentEnum ?? new TreeNode[0];

            int index = 0;

            foreach (TreeNode content in contentEnum)
            {
                // Add or overwrite existing items
                if (index < childNodes.Count)
                {
                    // Overwrite
                    ((TreeViewVarNode)childNodes[index]).SetContentRecursive(content);
                }
                else
                {
                    // Add
                    childNodes.Add(new TreeViewVarNode(process, localVarList, content));
                }
                index++;
            }
            int count = index;

            // Delete other nodes
            while (childNodes.Count > count)
            {
                childNodes.RemoveAt(count);
            }
        }
Example #10
0
 public TreeColumnCollection(TreeViewAdv treeView)
 {
     _treeView = treeView;
 }
Example #11
0
 public IncrementalSearch(TreeViewAdv tree)
 {
     _tree = tree;
 }
 public InputWithShift(TreeViewAdv tree)
     : base(tree)
 {
 }
Example #13
0
 public InputState(TreeViewAdv tree)
 {
     _tree = tree;
 }
 public ClickColumnState(TreeViewAdv tree, TreeColumn column, Point location)
     : base(tree, column)
 {
     _location = location;
 }
Example #15
0
 public ResizeColumnState(TreeViewAdv tree, TreeColumn column, Point p)
     : base(tree, column)
 {
     _initLocation = p;
     _initWidth    = column.Width;
 }