comparison mde/gui/renderer/IRenderer.d @ 32:316b0230a849

Lots more work on the GUI. Also renamed lots of files. Lots of changes to the GUI. Renderer is now used exclusively for rendering and WidgetDecoration is gone. Renamed lots of files to conform to case policies. committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Wed, 30 Apr 2008 18:05:56 +0100
parents
children 052df9b2fe07
comparison
equal deleted inserted replaced
31:baa87e68d7dc 32:316b0230a849
1 /* LICENSE BLOCK
2 Part of mde: a Modular D game-oriented Engine
3 Copyright © 2007-2008 Diggory Hardy
4
5 This program is free software: you can redistribute it and/or modify it under the terms
6 of the GNU General Public License as published by the Free Software Foundation, either
7 version 2 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 See the GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
15
16 /** Interface for the renderer. This is planned to replace decoration.d */
17 module mde.gui.renderer.IRenderer;
18
19 /** Interface for renderers.
20 *
21 * Renderers provide unified drawing methods for widget, e.g. to draw a window background, a frame,
22 * or a button. The renderer will effectively be synonymous with the theme, except that a scripted
23 * renderer may also be available.
24 *
25 * The renderer is intended to be per-GUI. */
26 interface IRenderer
27 {
28 //BEGIN Get dimensions
29 /** Return the renderer's window border width. */
30 int windowBorder ();
31
32 /** Return the renderer's between-widget spacing (for layout widgets). */
33 int layoutSpacing ();
34 //END Get dimensions
35
36 //BEGIN draw routines
37 /** Draw a window border plus background. */
38 void drawWindow (int x, int y, int w, int h);
39
40 /** Draws a widget background. Usually doesn't do anything since backgrounds are transparent. */
41 void drawWidgetBack (int x, int y, int w, int h);
42
43 /** Draw a basic box. Doesn't set the colour. Eventually to be removed. */
44 void drawBox (int x, int y, int w, int h);
45 //END draw routines
46 }