comparison mde/gui/IGui.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 57d000574d75
comparison
equal deleted inserted replaced
33:6886402c1545 34:6b4116e6355c
11 See the GNU General Public License for more details. 11 See the GNU General Public License for more details.
12 12
13 You should have received a copy of the GNU General Public License 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/>. */ 14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
15 15
16 module mde.gui.IGui;
17
18 public import mde.gui.renderer.IRenderer;
19
16 /** The Gui interface. 20 /** The Gui interface.
17 * 21 *
18 * This contains the functions for use by Windows, not those for external use (use Gui directly for 22 * This contains the functions for use by Windows, not those for external use (use Gui directly for
19 * that). */ 23 * that). */
20 module mde.gui.IGui;
21
22 public import mde.gui.renderer.IRenderer;
23
24 interface IGui 24 interface IGui
25 { 25 {
26 /** Get the Gui's renderer. May be overriden by the window. */ 26 /** Get the Gui's renderer. May be overriden by the window. */
27 IRenderer renderer (); 27 IRenderer renderer ();
28
29 /** Add a mouse click callback: delegate will be called for all mouse click events recieved. */
30 void addClickCallback (void delegate (ushort cx, ushort cy, ubyte b, bool state) dg);
31 /** Add a mouse motion callback: delegate will be called for all motion events recieved. */
32 void addMotionCallback (void delegate (ushort cx, ushort cy) dg);
33 /** Remove all event callbacks with _frame pointer frame. */
34 void removeCallbacks (void* frame);
28 } 35 }