comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet134.d @ 29:4e5843b771cc

First snippets buildable on windows
author Frank Benoit <benoit@tionex.de>
date Sun, 22 Mar 2009 19:55:00 +0100
parents 69b1fa94a4a8
children 536e43f63c81
comparison
equal deleted inserted replaced
28:69b1fa94a4a8 29:4e5843b771cc
54 Shell shell; 54 Shell shell;
55 55
56 void main(char[][] args) { 56 void main(char[][] args) {
57 display = new Display(); 57 display = new Display();
58 //Shell must be created with style SWT.NO_TRIM 58 //Shell must be created with style SWT.NO_TRIM
59 shell = new Shell(display, SWT.NO_TRIM | DWT.ON_TOP); 59 shell = new Shell(display, SWT.NO_TRIM | SWT.ON_TOP);
60 shell.setBackground(display.getSystemColor(SWT.COLOR_RED)); 60 shell.setBackground(display.getSystemColor(SWT.COLOR_RED));
61 //define a region that looks like a key hole 61 //define a region that looks like a key hole
62 Region region = new Region(); 62 Region region = new Region();
63 region.add(circle(67, 67, 67)); 63 region.add(circle(67, 67, 67));
64 region.subtract(circle(20, 67, 50)); 64 region.subtract(circle(20, 67, 50));