Rayerd/dfl — pull request #22 by shoo (2012-06-26 14:55:53+00:00)
Title: Add onMoving event and onSizing event

I tried to enhancement of onMoving event and onSizing event.
Demonstration of this change runs by the following programs:

```D
import dfl.all;
pragma(lib, "dfl");

void main()
{
Application.enableVisualStyles();
auto f1 = new Form;
auto f2 = new Form;
bool lock = false;
void mirmovunlock(Control c, EventArgs e)
{
lock = false;
}
void mirmov(Control c, MovingEventArgs e)
{
auto f = c is f1 ? f2 : f1;
if (!lock)
{
lock = true;
immutable x = e.x + f.location.x - c.location.x,
y = e.y + f.location.y - c.location.y;

f.location = Point(x, y);
}
}
void mirsz(Control c, SizingEventArgs e)
{
auto f = c is f1 ? f2 : f1;
if (!lock)
{
lock = true;
immutable width = e.width + f.width - c.width,
height = e.height + f.height - c.height;

f.size = Size(width, height);
}
}
f1.moving ~= &mirmov;
f2.moving ~= &mirmov;
f1.sizing ~= &mirsz;
f2.sizing ~= &mirsz;
f1.move ~= &mirmovunlock;
f2.move ~= &mirmovunlock;
f1.resize ~= &mirmovunlock;
f2.resize ~= &mirmovunlock;
f1.show();
f2.show();
Application.run(f1);
}
```

I wrote this function in reference to onBeforeResize event that is commented out.
Because I don’t know why these codes commented out, this codes may bring in some enbug.
If it is possible, please review this change.