comparison mde/gui/IGui.d @ 41:b3a6ca4516b4

The renderer now controls which parts of the window border allow resizing. committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Tue, 13 May 2008 12:02:36 +0100
parents 57d000574d75
children d43523ed4b62
comparison
equal deleted inserted replaced
40:b28d7adc786b 41:b3a6ca4516b4
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; 16 module mde.gui.IGui;
17 17
18 public import mde.gui.renderer.IRenderer;
19
20 /** The Gui interface. 18 /** The Gui interface.
21 * 19 *
22 * This contains the functions for use by Windows, not those for external use (use Gui directly for 20 * This contains the functions for use by Windows, not those for external use (use Gui directly for
23 * that). */ 21 * that). */
24 interface IGui 22 interface IGui
25 { 23 {
26 /** Get the Gui's renderer. May be overriden by the window. */ 24 /** Get the GUI's rendererName for creating a renderer (may be overridden by the window). */
27 IRenderer renderer (); 25 char[] rendererName ();
28 26
29 /** Called by a sub-widget when a redraw is necessary (since drawing may sometimes be done on 27 /** Called by a sub-widget when a redraw is necessary (since drawing may sometimes be done on
30 * event. 28 * event.
31 * 29 *
32 * Currently forces the whole Gui to be redrawn. */ 30 * Currently forces the whole Gui to be redrawn. */
33 void requestRedraw (); 31 void requestRedraw ();
34 32
35 /** Add a mouse click callback: delegate will be called for all mouse click events recieved. */ 33 /** Add a mouse click callback: delegate will be called for all mouse click events recieved.
36 void addClickCallback (void delegate (ushort cx, ushort cy, ubyte b, bool state) dg); 34 *
35 * The delegate should return true if it accepts the event and no further processing is
36 * required (i.e. the event should not be handled by anything else), false otherwise.
37 * Note that this is not a mechanism to prevent unwanted event handling, and in the future may
38 * be removed (so event handling cannot be cut short). */
39 void addClickCallback (bool delegate (ushort cx, ushort cy, ubyte b, bool state) dg);
37 /** Add a mouse motion callback: delegate will be called for all motion events recieved. */ 40 /** Add a mouse motion callback: delegate will be called for all motion events recieved. */
38 void addMotionCallback (void delegate (ushort cx, ushort cy) dg); 41 void addMotionCallback (void delegate (ushort cx, ushort cy) dg);
39 /** Remove all event callbacks with _frame pointer frame. */ 42 /** Remove all event callbacks with _frame pointer frame. */
40 void removeCallbacks (void* frame); 43 void removeCallbacks (void* frame);
41 } 44 }