diff options
author | nyamatongwe <unknown> | 2003-04-06 00:00:52 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-04-06 00:00:52 +0000 |
commit | d533f4848830d2c85b2e81e5a66d83db1f9f32f0 (patch) | |
tree | a9bd40f0adfe163f4803d05d1de296a707ccf51f /include/Platform.h | |
parent | 2cbcba20e38fe5978a8aae79d41c1f6c56a3bc3b (diff) | |
download | scintilla-mirror-d533f4848830d2c85b2e81e5a66d83db1f9f32f0.tar.gz |
Move method for Rectangle class.
Ensure windows that are moved are not moved off screen to the top or left.
Diffstat (limited to 'include/Platform.h')
-rw-r--r-- | include/Platform.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/Platform.h b/include/Platform.h index 5ad782c03..db3cd6c7d 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -104,6 +104,12 @@ public: return (right > other.left) && (left < other.right) && (bottom > other.top) && (top < other.bottom); } + void Move(int xDelta, int yDelta) { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } int Width() { return right - left; } int Height() { return bottom - top; } }; |