Mercurial > projects > mde
comparison mde/gui/renderer/IRenderer.d @ 95:2a364c7d82c9
Boolean options can be adjusted from the gui now (using a very basic widget). Also some bug-fixes.
Fixed a minor bug where layouts with the same id but without shared alignments would be messed up.
Tracked down the "nothing trawn until a resize" bug (see jobs.txt).
If widgets throw during creation they're now replaced by debug widgets.
Function pointers are converted to delegates using a safer method.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Thu, 06 Nov 2008 11:07:18 +0000 |
parents | 08a4ae11454b |
children | 30470bc19ca4 |
comparison
equal
deleted
inserted
replaced
94:9520cc0448e5 | 95:2a364c7d82c9 |
---|---|
74 /** Restrict following draw operations to given box. | 74 /** Restrict following draw operations to given box. |
75 * | 75 * |
76 * Restrict "pushes" a restriction onto a stack; relax must be called afterwards to "pop" the | 76 * Restrict "pushes" a restriction onto a stack; relax must be called afterwards to "pop" the |
77 * restriction. */ | 77 * restriction. */ |
78 void restrict (wdim x, wdim y, wdim w, wdim h); | 78 void restrict (wdim x, wdim y, wdim w, wdim h); |
79 | 79 void relax (); /// ditto |
80 /** See restrict. */ | |
81 void relax (); | |
82 | 80 |
83 /** Draw a window border plus background. */ | 81 /** Draw a window border plus background. */ |
84 void drawWindow (wdim x, wdim y, wdim w, wdim h); | 82 void drawWindow (wdim x, wdim y, wdim w, wdim h); |
85 | 83 |
86 /** Draws a widget background. Usually doesn't do anything since backgrounds are transparent. */ | 84 /** Draws a widget background. Usually doesn't do anything since backgrounds are transparent. */ |
90 void drawBlank (wdim x, wdim y, wdim w, wdim h); | 88 void drawBlank (wdim x, wdim y, wdim w, wdim h); |
91 | 89 |
92 /** Draws a button frame, in if pushed == true. */ | 90 /** Draws a button frame, in if pushed == true. */ |
93 void drawButton (wdim x, wdim y, wdim w, wdim h, bool pushed); | 91 void drawButton (wdim x, wdim y, wdim w, wdim h, bool pushed); |
94 | 92 |
95 /** Get a TextAdapter to draw some text. */ | 93 /** Toggle buttons. |
96 TextAdapter getAdapter (char[] text, int colour); | 94 * |
95 * These have a fixed size which getToggleSize returns. */ | |
96 wdimPair getToggleSize (); | |
97 void drawToggle (wdim x, wdim y, bool state, bool pushed); /// ditto | |
98 | |
99 /** Get a TextAdapter to draw some text. | |
100 * | |
101 * If no colour is passes, a default is used (white). */ | |
102 TextAdapter getAdapter (char[] text, int colour = 0xFFFFFF); | |
97 | 103 |
98 /** For drawing text - one instance per string. | 104 /** For drawing text - one instance per string. |
99 * | 105 * |
100 * NOTE: currently inflexible. Could use (function) pointers, class interfaces or struct | 106 * NOTE: currently inflexible. Could use (function) pointers, class interfaces or struct |
101 * interfaces when available to allow flexibility. */ | 107 * interfaces when available to allow flexibility. */ |