Mercurial > projects > dwt-addons
comparison dwtx/draw2d/UpdateListener.d @ 98:95307ad235d9
Added Draw2d code, still work in progress
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 03 Aug 2008 00:52:14 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
96:b492ba44e44d | 98:95307ad235d9 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 2005 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.draw2d.UpdateListener; | |
14 | |
15 import dwt.dwthelper.utils; | |
16 import dwtx.dwtxhelper.Collection; | |
17 | |
18 import dwtx.draw2d.geometry.Rectangle; | |
19 | |
20 /** | |
21 * An interface used to notify listeners that the listened to object is updating. | |
22 */ | |
23 public interface UpdateListener { | |
24 | |
25 /** | |
26 * Notifies the listener that the listened to object is painting. The damage rectangle | |
27 * may be null or empty. This indicates the dirty regions were clipped or not visible. | |
28 * But for objects such as the {@link dwtx.draw2d.parts.Thumbnail}, notification | |
29 * still needs to occur. The map of dirty regions is passed to allow the listener to | |
30 * determine if it needs to update, for instance when a particular figure is painting. | |
31 * | |
32 * @param damage The area being painted | |
33 * @param dirtyRegions a Map of figures to their dirty regions | |
34 */ | |
35 void notifyPainting(Rectangle damage, Map dirtyRegions); | |
36 | |
37 /** | |
38 * Notifies the listener that the listened to object is validating. | |
39 */ | |
40 void notifyValidating(); | |
41 | |
42 } |