External/Aga.Controls/Tree/Input/InputWithControl.cs
author sl
Sun, 03 Feb 2013 19:06:01 +0100
changeset 392 8af90fa0940f
permissions -rw-r--r--
Now fetching some of our Sound Graph DLL function pointers.
     1 using System;
     2 using System.Collections.Generic;
     3 using System.Text;
     4 
     5 namespace Aga.Controls.Tree
     6 {
     7 	internal class InputWithControl: NormalInputState
     8 	{
     9 		public InputWithControl(TreeViewAdv tree): base(tree)
    10 		{
    11 		}
    12 
    13 		protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
    14 		{
    15 			if (Tree.SelectionMode == TreeSelectionMode.Single)
    16 			{
    17 				base.DoMouseOperation(args);
    18 			}
    19 			else if (CanSelect(args.Node))
    20 			{
    21 				args.Node.IsSelected = !args.Node.IsSelected;
    22 				Tree.SelectionStart = args.Node;
    23 			}
    24 		}
    25 
    26 		protected override void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
    27 		{
    28 		}
    29 	}
    30 }