diff -r 3145aadca3d2 -r 0c551e8818e0 External/Aga.Controls/Tree/Input/ClickColumnState.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/External/Aga.Controls/Tree/Input/ClickColumnState.cs Sun May 27 15:16:19 2012 +0000 @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using System.Drawing; + +namespace Aga.Controls.Tree +{ + internal class ClickColumnState : ColumnState + { + private Point _location; + + public ClickColumnState(TreeViewAdv tree, TreeColumn column, Point location) + : base(tree, column) + { + _location = location; + } + + public override void KeyDown(KeyEventArgs args) + { + } + + public override void MouseDown(TreeNodeAdvMouseEventArgs args) + { + } + + 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; + } + + public override void MouseUp(TreeNodeAdvMouseEventArgs args) + { + Tree.ChangeInput(); + Tree.UpdateView(); + Tree.OnColumnClicked(Column); + } + } +}