diff options
author | Bogdan Gheorghe <gheorghe> | 2010-02-25 18:06:22 +0000 |
---|---|---|
committer | Bogdan Gheorghe <gheorghe> | 2010-02-25 18:06:22 +0000 |
commit | cc83d934c7ecd9490a10ee8ca6f056b3625a0872 (patch) | |
tree | c3cd90155d8a98284658ce4721ff47604e0655f4 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java | |
parent | 9bf79aea63cb1a27afc9b9e1a2eba4b0f8c6e3b1 (diff) | |
download | eclipse.platform.swt-cc83d934c7ecd9490a10ee8ca6f056b3625a0872.tar.gz eclipse.platform.swt-cc83d934c7ecd9490a10ee8ca6f056b3625a0872.tar.xz eclipse.platform.swt-cc83d934c7ecd9490a10ee8ca6f056b3625a0872.zip |
CTabFolder refactor
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java index 37352bfa79..e2233e7d4e 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java @@ -314,6 +314,46 @@ void createHandle () { } } +/** + * WARNING: API UNDER CONSTRUCTION + * + * Fills the interior of the rectangle specified by the arguments, + * with the receiver's background. + * + * <p>The <code>offsetX</code> and <code>offsetY</code> are used to map from + * the gc origin to the origin of the parent image background. This is useful + * to ensure proper alignment of the image background.</p> + * + * @param gc the gc where the rectangle is to be filled + * @param x the x coordinate of the rectangle to be filled + * @param y the y coordinate of the rectangle to be filled + * @param width the width of the rectangle to be filled + * @param height the height of the rectangle to be filled + * @param offsetX the image background x offset + * @param offsetY the image background y offset + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the gc is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.6 + */ +public void drawBackground(GC gc, int x, int y, int width, int height, int offsetX, int offsetY) { + checkWidget (); + if (gc == null) error (SWT.ERROR_NULL_ARGUMENT); + if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); + RECT rect = new RECT (); + OS.SetRect (rect, x, y, x + width, y + height); + int /*long*/ hDC = gc.handle; + int pixel = background == -1 ? gc.getBackground ().handle : -1; + drawBackground (hDC, rect, pixel, offsetX, offsetY); +} + Composite findDeferredControl () { return layoutCount > 0 ? this : parent.findDeferredControl (); } |