Mercurial > projects > mde
comparison mde/gui/widget/createWidget.d @ 34:6b4116e6355c
Work on the Gui: some of the framework for drag & drop. Also made Window an IWidget.
Implemented getWidget(x,y) to find the widget under this location for IWidgets (but not Gui).
Made Window an IWidget and made it work a little more similarly to widgets.
Implemented callbacks on the Gui for mouse events (enabling drag & drop, etc.).
committer: Diggory Hardy <diggory.hardy@gmail.com>
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 02 May 2008 16:03:52 +0100 |
parents | 316b0230a849 |
children | 052df9b2fe07 |
comparison
equal
deleted
inserted
replaced
33:6886402c1545 | 34:6b4116e6355c |
---|---|
28 BOX = 1001, GRID, BUTTON | 28 BOX = 1001, GRID, BUTTON |
29 } | 29 } |
30 | 30 |
31 /** Create a widget of type data[0] (see enum WIDGET_TYPES) for _window window, with initialisation | 31 /** Create a widget of type data[0] (see enum WIDGET_TYPES) for _window window, with initialisation |
32 * data [1..$]. */ | 32 * data [1..$]. */ |
33 IWidget createWidget (IWindow window, IParentWidget parent, int[] data) | 33 IWidget createWidget (IWindow window, IWidget parent, int[] data) |
34 in { | 34 in { |
35 assert (window !is null, "createWidget: window is null"); | 35 assert (window !is null, "createWidget: window is null"); |
36 assert (parent !is null, "createWidget: parent is null"); | 36 assert (parent !is null, "createWidget: parent is null"); |
37 } body { | 37 } body { |
38 if (data.length < 1) throw new WidgetDataException ("No widget data"); | 38 if (data.length < 1) throw new WidgetDataException ("No widget data"); |