예제 #1
0
        public override void Initialize()
        {
            PNode n1 = PPath.CreateEllipse(0, 0, 100, 100);
            PNode n2 = PPath.CreateRectangle(300, 200, 100, 100);

            n1.Tag = "node 1";
            n2.Tag = "node 2";
            Canvas.Layer.AddChild(n1);
            Canvas.Layer.AddChild(n2);

            PCamera camera = Canvas.Camera;

            tooltipNode = new PText();

            tooltipNode.Pickable = false;
            camera.AddChild(tooltipNode);

            PBasicInputEventHandler tipEventHandler = new PBasicInputEventHandler();

            tipEventHandler.MouseMove = new MouseMoveDelegate(MouseMoveHandler);
            tipEventHandler.MouseDrag = new MouseDragDelegate(MouseDragHandler);
            camera.AddInputEventListener(tipEventHandler);
        }
예제 #2
0
 /// <summary>
 /// Overridden.  Adds the event handler that will be responsible for setting the mouse
 /// cursor when it enters/leaves this handle.
 /// </summary>
 protected override void InstallHandleEventHandlers()
 {
     base.InstallHandleEventHandlers();
     handleCursorHandler = new HandleCursorHandler(this);
     AddInputEventListener(handleCursorHandler);
 }