comparison mde/gui/renderer/SimpleRenderer.d @ 100:0ea4a3e651ae

There is now a position marker for text editing. Changed the way fonts are configured. Actually, not much of the new way exists yet.
author Diggory Hardy <diggory.hardy@gmail.com>
date Sat, 15 Nov 2008 17:39:14 +0000
parents 5de5810e3516
children 42e241e7be3e
comparison
equal deleted inserted replaced
99:5de5810e3516 100:0ea4a3e651ae
29 * 29 *
30 * The renderer is intended to be per-GUI. */ 30 * The renderer is intended to be per-GUI. */
31 class SimpleRenderer : IRenderer 31 class SimpleRenderer : IRenderer
32 { 32 {
33 this () { 33 this () {
34 defaultFont = FontStyle.get("default"); 34 defaultFont = FontStyle.getDefault;
35 } 35 }
36 36
37 alias Border.BTYPE BTYPE; 37 alias Border.BTYPE BTYPE;
38 Border getBorder (BTYPE type, bool wS, bool hS) { 38 Border getBorder (BTYPE type, bool wS, bool hS) {
39 Border border; 39 Border border;
133 TextAdapter getAdapter (char[] text, int col) { 133 TextAdapter getAdapter (char[] text, int col) {
134 TextAdapter a; 134 TextAdapter a;
135 a.font = defaultFont; 135 a.font = defaultFont;
136 a.content = text; 136 a.content = text;
137 a.colour = Colour (col); 137 a.colour = Colour (col);
138 return a; 138 a.index = size_t.max;
139 return a;
139 } 140 }
140 141
141 protected: 142 protected:
142 FontStyle defaultFont; 143 FontStyle defaultFont;
143 } 144 }