Mercurial > projects > mde
diff mde/gui/renderer/IRenderer.d @ 58:d43523ed4b62
Included a wdim typedef for all variables to do with window position or size instead of just using int.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 14 Jun 2008 17:15:06 +0100 |
parents | 1530d9c04d4d |
children | 25cb7420dc91 |
line wrap: on
line diff
--- a/mde/gui/renderer/IRenderer.d Sat Jun 14 13:09:03 2008 +0100 +++ b/mde/gui/renderer/IRenderer.d Sat Jun 14 17:15:06 2008 +0100 @@ -16,6 +16,8 @@ /** Interface for the renderer. This is planned to replace decoration.d */ module mde.gui.renderer.IRenderer; +public import mde.gui.IGui; // wdim type is used by just about everything including this + /** Interface for renderers. * * Renderers provide unified drawing methods for widget, e.g. to draw a window background, a frame, @@ -29,7 +31,7 @@ /// A container for the dimensions struct BorderDimensions { /// The dimensions: left, top, right, bottom - ubyte l, t, r, b; + wdim l, t, r, b; void opAddAssign (BorderDimensions d) { l += d.l; @@ -61,23 +63,23 @@ * Returns: * RESIZE_TYPE = NONE for a move, an or'd combination of L/R/T/B for resizing. */ - RESIZE_TYPE getResizeType (int cx, int cy, int w, int h); + RESIZE_TYPE getResizeType (wdim cx, wdim cy, wdim w, wdim h); /** Return the renderer's between-widget spacing (for layout widgets). */ - int layoutSpacing (); + wdim layoutSpacing (); //END Get dimensions //BEGIN draw routines /** Draw a window border plus background. */ - void drawWindow (int x, int y, int w, int h); + void drawWindow (wdim x, wdim y, wdim w, wdim h); /** Draws a widget background. Usually doesn't do anything since backgrounds are transparent. */ - void drawWidgetBack (int x, int y, int w, int h); + void drawWidgetBack (wdim x, wdim y, wdim w, wdim h); /** Draws a blank widget (temporary) */ - void drawBlank (int x, int y, int w, int h); + void drawBlank (wdim x, wdim y, wdim w, wdim h); /** Draws a button frame, in if pushed == true. */ - void drawButton (int x, int y, int w, int h, bool pushed); + void drawButton (wdim x, wdim y, wdim w, wdim h, bool pushed); //END draw routines }