using System.Collections.Generic; using BansheeEngine; namespace BansheeEditor { /// /// Base class for handle implementations. Handles provide tools that the user can interact with in the scene view. /// This includes traditional handles like move, rotate or scale, but also custom user defined handles. Custom handles /// need to implement this class and also specify a attribute. /// public abstract class Handle { private List sliders = new List(); protected internal abstract void PreInput(); protected internal abstract void PostInput(); protected internal abstract void Draw(); /// /// Registers a new handle slider used by this handle. /// /// Slider used by the handle. internal void RegisterSlider(HandleSlider slider) { sliders.Add(slider); } /// /// Destroys the handle, removing it from the scene. /// public void Destroy() { foreach (var slider in sliders) slider.Destroy(); } } }