示例#1
0
		/// <summary>
		/// Adds the specified input event listener to receive input events 
		/// from this node.
		/// </summary>
		/// <param name="listener">The new input listener</param>
		public virtual void AddInputEventListener(PInputEventListener listener) {
			KeyDown += new PInputEventHandler(listener.OnKeyDown);
			KeyPress += new PInputEventHandler(listener.OnKeyPress);
			KeyUp += new PInputEventHandler(listener.OnKeyUp);
			Click += new PInputEventHandler(listener.OnClick);
			DoubleClick += new PInputEventHandler(listener.OnDoubleClick);
			MouseDown += new PInputEventHandler(listener.OnMouseDown);
			MouseUp += new PInputEventHandler(listener.OnMouseUp);
			MouseMove += new PInputEventHandler(listener.OnMouseMove);
			MouseDrag += new PInputEventHandler(listener.OnMouseDrag);
			MouseEnter += new PInputEventHandler(listener.OnMouseEnter);
			MouseLeave += new PInputEventHandler(listener.OnMouseLeave);
			MouseWheel += new PInputEventHandler(listener.OnMouseWheel);
			DragEnter += new PInputEventHandler(listener.OnDragEnter);
			DragLeave += new PInputEventHandler(listener.OnDragLeave);
			DragOver += new PInputEventHandler(listener.OnDragOver);
			DragDrop += new PInputEventHandler(listener.OnDragDrop);
			GotFocus += new PInputEventHandler(listener.OnGotFocus);
			LostFocus += new PInputEventHandler(listener.OnLostFocus);
		}
示例#2
0
		/// <summary>
		/// Removes the specified input event listener so that it no longer 
		/// receives input events from this node.
		/// </summary>
		/// <param name="listener">The input listener to remove.</param>
		public virtual void RemoveInputEventListener(PInputEventListener listener) {
			KeyDown -= new PInputEventHandler(listener.OnKeyDown);
			KeyPress -= new PInputEventHandler(listener.OnKeyPress);
			KeyUp -= new PInputEventHandler(listener.OnKeyUp);
			Click -= new PInputEventHandler(listener.OnClick);
			DoubleClick -= new PInputEventHandler(listener.OnDoubleClick);
			MouseDown -= new PInputEventHandler(listener.OnMouseDown);
			MouseUp -= new PInputEventHandler(listener.OnMouseUp);
			MouseMove -= new PInputEventHandler(listener.OnMouseMove);
			MouseDrag -= new PInputEventHandler(listener.OnMouseDrag);
			MouseEnter -= new PInputEventHandler(listener.OnMouseEnter);
			MouseLeave -= new PInputEventHandler(listener.OnMouseLeave);
			MouseWheel -= new PInputEventHandler(listener.OnMouseWheel);
			DragEnter -= new PInputEventHandler(listener.OnDragEnter);
			DragLeave -= new PInputEventHandler(listener.OnDragLeave);
			DragOver -= new PInputEventHandler(listener.OnDragOver);
			DragDrop -= new PInputEventHandler(listener.OnDragDrop);
			GotFocus -= new PInputEventHandler(listener.OnGotFocus);
			LostFocus -= new PInputEventHandler(listener.OnLostFocus);
		}
示例#3
0
 /// <summary>
 /// Remove an input listener to the camera associated with this canvas.
 /// </summary>
 /// <param name="listener">The listener to remove.</param>
 public virtual void RemoveInputEventListener(PInputEventListener listener)
 {
     Camera.RemoveInputEventListener(listener);
 }
示例#4
0
 /// <summary>
 /// Add an input listener to the camera associated with this canvas.
 /// </summary>
 /// <param name="listener">The listener to add.</param>
 public virtual void AddInputEventListener(PInputEventListener listener)
 {
     Camera.AddInputEventListener(listener);
 }
示例#5
0
		/// <summary>
		/// Adds the event handler that will be responsible for the drag handle interaction.
		/// </summary>
		protected virtual void InstallHandleEventHandlers() {
			handleDragger = new HandleDragEventHandler(this);
			AddInputEventListener(handleDragger);
		}
示例#6
0
		/// <summary>
		/// Removes the specified input event listener so that it no longer 
		/// receives input events from this node.
		/// </summary>
		/// <param name="listener">The input listener to remove.</param>
		public virtual void RemoveInputEventListener(PInputEventListener listener) {
			KeyDown -= listener.OnKeyDown;
			KeyPress -= listener.OnKeyPress;
			KeyUp -= listener.OnKeyUp;
			Click -= listener.OnClick;
			DoubleClick -= listener.OnDoubleClick;
			MouseDown -= listener.OnMouseDown;
			MouseUp -= listener.OnMouseUp;
			MouseMove -= listener.OnMouseMove;
			MouseDrag -= listener.OnMouseDrag;
			MouseEnter -= listener.OnMouseEnter;
			MouseLeave -= listener.OnMouseLeave;
			MouseWheel -= listener.OnMouseWheel;
			DragEnter -= listener.OnDragEnter;
			DragLeave -= listener.OnDragLeave;
			DragOver -= listener.OnDragOver;
			DragDrop -= listener.OnDragDrop;
			GotFocus -= listener.OnGotFocus;
			LostFocus -= listener.OnLostFocus;
		}
示例#7
0
		/// <summary>
		/// Adds the specified input event listener to receive input events 
		/// from this node.
		/// </summary>
		/// <param name="listener">The new input listener</param>
		public virtual void AddInputEventListener(PInputEventListener listener) {
			KeyDown += listener.OnKeyDown;
			KeyPress += listener.OnKeyPress;
			KeyUp += listener.OnKeyUp;
			Click += listener.OnClick;
			DoubleClick += listener.OnDoubleClick;
			MouseDown += listener.OnMouseDown;
			MouseUp += listener.OnMouseUp;
			MouseMove += listener.OnMouseMove;
			MouseDrag += listener.OnMouseDrag;
			MouseEnter += listener.OnMouseEnter;
			MouseLeave += listener.OnMouseLeave;
			MouseWheel += listener.OnMouseWheel;
			DragEnter += listener.OnDragEnter;
			DragLeave += listener.OnDragLeave;
			DragOver += listener.OnDragOver;
			DragDrop += listener.OnDragDrop;
			GotFocus += listener.OnGotFocus;
			LostFocus += listener.OnLostFocus;
		}