Mercurial > projects > mde
comparison mde/gui/widget/createWidget.d @ 105:08651e8a8c51
Quit button, big changes to content system.
Moved mde.gui.content to mde.content to reflect it's not only used by the gui.
Split Content module into Content and AStringContent.
New AContent and EventContent class.
Callbacks are now generic and implemented in AContent.
Renamed TextContent to StringContent and ValueContent to AStringContent.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 29 Nov 2008 12:36:39 +0000 |
parents | 42e241e7be3e |
children | c9fc2d303178 |
comparison
equal
deleted
inserted
replaced
104:ee209602770d | 105:08651e8a8c51 |
---|---|
19 * tidier. */ | 19 * tidier. */ |
20 module mde.gui.widget.createWidget; | 20 module mde.gui.widget.createWidget; |
21 | 21 |
22 import mde.gui.widget.Ifaces; | 22 import mde.gui.widget.Ifaces; |
23 import mde.gui.exception : WidgetDataException; | 23 import mde.gui.exception : WidgetDataException; |
24 import mde.gui.content.Content; //NOTE - maybe move IContent to a separate module | 24 import mde.content.Content; |
25 | 25 |
26 // Widgets to create: | 26 // Widgets to create: |
27 import mde.gui.widget.layout; | 27 import mde.gui.widget.layout; |
28 import mde.gui.widget.miscWidgets; | 28 import mde.gui.widget.miscWidgets; |
29 import mde.gui.widget.TextWidget; | 29 import mde.gui.widget.TextWidget; |
95 SizableBlank = 0x2, | 95 SizableBlank = 0x2, |
96 Debug = 0xF, | 96 Debug = 0xF, |
97 | 97 |
98 // buttons: 0x10 | 98 // buttons: 0x10 |
99 Button = 0x10, | 99 Button = 0x10, |
100 TextButton = 0x11, | |
101 | 100 |
102 // labels: 0x20 | 101 // labels: 0x20 |
103 ContentLabel = TAKES_CONTENT | 0x20, | 102 ContentLabel = TAKES_CONTENT | 0x20, |
104 TextLabel = 0x21, | 103 TextLabel = 0x21, |
105 | 104 |
108 addContent = FUNCTION | 0x31, | 107 addContent = FUNCTION | 0x31, |
109 | 108 |
110 // content widgets: 0x40 | 109 // content widgets: 0x40 |
111 DisplayContent = TAKES_CONTENT | 0x40, | 110 DisplayContent = TAKES_CONTENT | 0x40, |
112 BoolContent = TAKES_CONTENT | 0x41, | 111 BoolContent = TAKES_CONTENT | 0x41, |
113 ValueContent = TAKES_CONTENT | 0x42, | 112 AStringContent = TAKES_CONTENT | 0x42, |
113 ButtonContent = TAKES_CONTENT | 0x43, | |
114 | 114 |
115 GridLayout = TAKES_CONTENT | PARENT | 0x100, | 115 GridLayout = TAKES_CONTENT | PARENT | 0x100, |
116 ContentList = TAKES_CONTENT | PARENT | 0x110, | 116 ContentList = TAKES_CONTENT | PARENT | 0x110, |
117 | 117 |
118 FloatingArea = PARENT | 0x200, | 118 FloatingArea = PARENT | 0x200, |
124 const char[][] WIDGETS = [ | 124 const char[][] WIDGETS = [ |
125 "FixedBlank", | 125 "FixedBlank", |
126 "SizableBlank", | 126 "SizableBlank", |
127 "Debug", | 127 "Debug", |
128 "Button", | 128 "Button", |
129 "TextButton", | |
130 "TextLabel", | 129 "TextLabel", |
131 "addContent", | 130 "addContent", |
132 "ContentLabel", | 131 "ContentLabel", |
133 "DisplayContent", | 132 "DisplayContent", |
134 "BoolContent", | 133 "BoolContent", |
135 "ValueContent", | 134 "AStringContent", |
135 "ButtonContent", | |
136 "editContent", | 136 "editContent", |
137 "FloatingArea", | 137 "FloatingArea", |
138 "GridLayout", | 138 "GridLayout", |
139 "ContentList"]; | 139 "ContentList"]; |
140 | 140 |