1 /** 2 * Component 3 */ 4 module d2d.Component; 5 6 import d2d; 7 8 /** 9 * A component defines something that can be drawn, handle events, and takes up a space on the screen 10 */ 11 abstract class Component : EventHandler { 12 13 protected Display container; ///The display that contains this component 14 15 /** 16 * It may be useful for a component to have access to it's containing display 17 */ 18 this(Display container) { 19 this.container = container; 20 } 21 22 @property iRectangle location(); ///Gets where the component is on the screen 23 void draw(); ///How the component should draw itself on the screen 24 25 }