Mercurial > projects > mde
diff mde/gui/renderer/IRenderer.d @ 38:8c4c96f04e7f
Windows can now be resized!
Windows have both a resize border and a move border with independant size for each side.
Windows resizing support.
committer: Diggory Hardy <diggory.hardy@gmail.com>
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Mon, 05 May 2008 17:02:21 +0100 |
parents | 052df9b2fe07 |
children | b3a6ca4516b4 |
line wrap: on
line diff
--- a/mde/gui/renderer/IRenderer.d Mon May 05 14:47:25 2008 +0100 +++ b/mde/gui/renderer/IRenderer.d Mon May 05 17:02:21 2008 +0100 @@ -26,8 +26,30 @@ interface IRenderer { //BEGIN Get dimensions - /** Return the renderer's window border width. */ - int windowBorder (); + /// A container for the dimensions + struct BorderDimensions { + /// The dimensions: left, top, right, bottom + ubyte l, t, r, b; + + void opAddAssign (BorderDimensions d) { + l += d.l; + t += d.t; + r += d.r; + b += d.b; + } + } + + /// An enum for border types + enum BORDER_TYPES { + WINDOW_TOTAL, + WINDOW_RESIZE, + } + + /** Return the renderer's window border width. + * + * Type should be an element of BORDER_TYPES; if not the method may throw or simply return + * without an error. */ + BorderDimensions getBorder (BORDER_TYPES type); /** Return the renderer's between-widget spacing (for layout widgets). */ int layoutSpacing ();