using System;
using System.Collections.Generic;
using System.Text;

namespace Vortex.SceneFramework {

	/// <summary>
	/// Simple event information class
	/// </summary>
	public class EventInfo {
		private Node _target;

		/// <summary>
		/// Initializes a new instance of the <see cref="EventInfo"/> class.
		/// </summary>
		/// <param name="eventTarget">The event target element.</param>
		public EventInfo(Node eventTarget) {
			_target = eventTarget;
		}

		/// <summary>
		/// Gets the target of event.
		/// </summary>
		/// <value>The event target element.</value>
		public Node Target {
			get { return _target; }
		}
	}

	/// <summary>
	/// Bubbled event information class. It provides functionality for bubbling events 
	/// </summary>
	public class BubbledEventInfo : EventInfo {
		private bool _canceled;

		/// <summary>
		/// Initializes a new instance of the <see cref="BubbledEventInfo"/> class.
		/// </summary>
		/// <param name="eventTarget">The event target element.</param>
		public BubbledEventInfo(Node eventTarget)
			: base(eventTarget) {
		}

		/// <summary>
		/// Gets or sets a value indicating whether current event is canceled. Set value to true for preventing bubbling
		/// </summary>
		/// <value><c>true</c> if event is canceled; otherwise, <c>false</c>.</value>
		public bool IsCanceled {
			get { return _canceled; }
			set { _canceled = value; }
		}
	}

}
