//********************************** Banshee Engine (www.banshee3d.com) **************************************************// //**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************// using System.Collections.Generic; using bs; namespace bs.Editor { /** @addtogroup Handles * @{ */ /// /// 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(); /// /// Called every frame before handle input is processed. Allows handle transforms to be updated before input. /// protected internal abstract void PreInput(); /// /// Called every frame after handle input is processed. Active handle sliders should contain values signals if and /// how much they were dragged. /// protected internal abstract void PostInput(); /// /// Called every frame after . Allows handles graphics to be drawn. This is the only /// method that draw methods may be called. /// 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(); } } /** @} */ }