Mercurial > projects > dwt-samples
annotate examples/clipboard/ClipboardExample.d @ 129:ae94c6a65f9e
Removed version=TANGOSVN for release 0.99.7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 26 Jul 2008 02:47:41 +0200 |
parents | 698e70d0dca3 |
children | eb84f9418bbf |
rev | line source |
---|---|
78 | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2004 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 * D Port: | |
11 * Jesse Phillips <Jesse.K.Phillips+D> gmail.com | |
12 *******************************************************************************/ | |
13 module examples.clipboard.ClipboardExample; | |
14 | |
15 import dwt.DWT; | |
16 import dwt.custom.ScrolledComposite; | |
17 import dwt.custom.StyledText; | |
18 import dwt.dnd.Clipboard; | |
19 import dwt.dnd.FileTransfer; | |
20 import dwt.dnd.HTMLTransfer; | |
21 import dwt.dnd.RTFTransfer; | |
22 import dwt.dnd.TextTransfer; | |
23 import dwt.dnd.Transfer; | |
24 import dwt.events.SelectionAdapter; | |
25 import dwt.events.SelectionEvent; | |
26 import dwt.graphics.Point; | |
27 import dwt.graphics.Rectangle; | |
28 import dwt.layout.FillLayout; | |
29 import dwt.layout.GridData; | |
30 import dwt.layout.GridLayout; | |
31 import dwt.widgets.Button; | |
32 import dwt.widgets.Combo; | |
33 import dwt.widgets.Composite; | |
34 import dwt.widgets.DirectoryDialog; | |
35 import dwt.widgets.Display; | |
36 import dwt.widgets.FileDialog; | |
37 import dwt.widgets.Group; | |
38 import dwt.widgets.Label; | |
39 import dwt.widgets.List; | |
40 import dwt.widgets.Shell; | |
41 import dwt.widgets.Table; | |
42 import dwt.widgets.TableItem; | |
43 import dwt.widgets.Text; | |
44 import dwt.dwthelper.utils; | |
45 | |
46 import tango.io.Stdout; | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
47 version(JIVE) import jive.stacktrace; |
129
ae94c6a65f9e
Removed version=TANGOSVN for release 0.99.7
Frank Benoit <benoit@tionex.de>
parents:
123
diff
changeset
|
48 import tango.io.model.IFile; |
ae94c6a65f9e
Removed version=TANGOSVN for release 0.99.7
Frank Benoit <benoit@tionex.de>
parents:
123
diff
changeset
|
49 |
78 | 50 class ClipboardExample { |
51 static const int SIZE = 60; | |
52 Clipboard clipboard; | |
53 Shell shell; | |
54 Text copyText; | |
55 Text pasteText; | |
56 Text copyRtfText; | |
57 Text pasteRtfText; | |
58 Text copyHtmlText; | |
59 Text pasteHtmlText; | |
60 Table copyFileTable; | |
61 Table pasteFileTable; | |
62 Text text; | |
63 Combo combo; | |
64 StyledText styledText; | |
65 Label status; | |
66 | |
67 public void open(Display display) { | |
68 clipboard = new Clipboard(display); | |
69 shell = new Shell (display); | |
70 shell.setText("DWT Clipboard"); | |
71 shell.setLayout(new FillLayout()); | |
72 | |
73 ScrolledComposite sc = new ScrolledComposite(shell, DWT.H_SCROLL | DWT.V_SCROLL); | |
74 Composite parent = new Composite(sc, DWT.NONE); | |
75 sc.setContent(parent); | |
76 parent.setLayout(new GridLayout(2, true)); | |
77 | |
78 Group copyGroup = new Group(parent, DWT.NONE); | |
79 copyGroup.setText("Copy From:"); | |
80 GridData data = new GridData(GridData.FILL_BOTH); | |
81 copyGroup.setLayoutData(data); | |
82 copyGroup.setLayout(new GridLayout(3, false)); | |
83 | |
84 Group pasteGroup = new Group(parent, DWT.NONE); | |
85 pasteGroup.setText("Paste To:"); | |
86 data = new GridData(GridData.FILL_BOTH); | |
87 pasteGroup.setLayoutData(data); | |
88 pasteGroup.setLayout(new GridLayout(3, false)); | |
89 | |
90 Group controlGroup = new Group(parent, DWT.NONE); | |
91 controlGroup.setText("Control API:"); | |
92 data = new GridData(GridData.FILL_BOTH); | |
93 data.horizontalSpan = 2; | |
94 controlGroup.setLayoutData(data); | |
95 controlGroup.setLayout(new GridLayout(5, false)); | |
96 | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
97 /* Enable with Available Types */ |
78 | 98 Group typesGroup = new Group(parent, DWT.NONE); |
99 typesGroup.setText("Available Types"); | |
100 data = new GridData(GridData.FILL_BOTH); | |
101 data.horizontalSpan = 2; | |
102 typesGroup.setLayoutData(data); | |
103 typesGroup.setLayout(new GridLayout(2, false)); | |
104 /**/ | |
105 | |
106 status = new Label(parent, DWT.BORDER); | |
107 data = new GridData(GridData.FILL_HORIZONTAL); | |
108 data.horizontalSpan = 2; | |
109 data.heightHint = 60; | |
110 status.setLayoutData(data); | |
111 | |
112 createTextTransfer(copyGroup, pasteGroup); | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
113 createRTFTransfer(copyGroup, pasteGroup); |
78 | 114 createHTMLTransfer(copyGroup, pasteGroup); |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
115 createFileTransfer(copyGroup, pasteGroup); |
78 | 116 createMyTransfer(copyGroup, pasteGroup); |
117 createControlTransfer(controlGroup); | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
118 createAvailableTypes(typesGroup); |
78 | 119 |
120 sc.setMinSize(parent.computeSize(DWT.DEFAULT, DWT.DEFAULT)); | |
121 sc.setExpandHorizontal(true); | |
122 sc.setExpandVertical(true); | |
123 | |
124 Point size = shell.computeSize(DWT.DEFAULT, DWT.DEFAULT); | |
125 Rectangle monitorArea = shell.getMonitor().getClientArea(); | |
126 shell.setSize(Math.min(size.x, monitorArea.width - 20), Math.min(size.y, monitorArea.height - 20)); | |
127 shell.open(); | |
128 while (!shell.isDisposed ()) { | |
129 if (!display.readAndDispatch ()) display.sleep (); | |
130 } | |
131 clipboard.dispose(); | |
132 } | |
133 void createTextTransfer(Composite copyParent, Composite pasteParent) { | |
134 | |
135 // TextTransfer | |
136 Label l = new Label(copyParent, DWT.NONE); | |
137 l.setText("TextTransfer:"); //$NON-NLS-1$ | |
138 copyText = new Text(copyParent, DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
139 copyText.setText("some\nplain\ntext"); | |
140 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
141 data.heightHint = data.widthHint = SIZE; | |
142 copyText.setLayoutData(data); | |
143 Button b = new Button(copyParent, DWT.PUSH); | |
144 b.setText("Copy"); | |
145 b.addSelectionListener(new class SelectionAdapter { | |
146 public void widgetSelected(SelectionEvent e) { | |
147 auto data = copyText.getText(); | |
148 if (data.length > 0) { | |
149 status.setText(""); | |
150 auto obj = new Object[1]; | |
151 auto trans = new TextTransfer[1]; | |
152 obj[0] = cast(Object) new ArrayWrapperString(data); | |
153 trans[0] = TextTransfer.getInstance(); | |
154 clipboard.setContents(obj, trans); | |
155 } else { | |
156 status.setText("nothing to copy"); | |
157 } | |
158 } | |
159 }); | |
160 | |
161 l = new Label(pasteParent, DWT.NONE); | |
162 l.setText("TextTransfer:"); //$NON-NLS-1$ | |
163 pasteText = new Text(pasteParent, DWT.READ_ONLY | DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
164 data = new GridData(GridData.FILL_HORIZONTAL); | |
165 data.heightHint = data.widthHint = SIZE; | |
166 pasteText.setLayoutData(data); | |
167 b = new Button(pasteParent, DWT.PUSH); | |
168 b.setText("Paste"); | |
169 b.addSelectionListener(new class SelectionAdapter { | |
170 public void widgetSelected(SelectionEvent e) { | |
171 auto data = cast(ArrayWrapperString) clipboard.getContents(TextTransfer.getInstance()); | |
172 if (data !is null) { | |
173 status.setText(""); | |
174 pasteText.setText("begin paste>"~data.array~"<end paste"); | |
175 } else { | |
176 status.setText("nothing to paste"); | |
177 } | |
178 } | |
179 }); | |
180 } | |
181 void createRTFTransfer(Composite copyParent, Composite pasteParent){ | |
182 // RTF Transfer | |
183 Label l = new Label(copyParent, DWT.NONE); | |
184 l.setText("RTFTransfer:"); //$NON-NLS-1$ | |
185 copyRtfText = new Text(copyParent, DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
186 copyRtfText.setText("some\nrtf\ntext"); | |
187 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
188 data.heightHint = data.widthHint = SIZE; | |
189 copyRtfText.setLayoutData(data); | |
190 Button b = new Button(copyParent, DWT.PUSH); | |
191 b.setText("Copy"); | |
192 b.addSelectionListener(new class SelectionAdapter { | |
193 public void widgetSelected(SelectionEvent e) { | |
194 auto data = copyRtfText.getText(); | |
195 if (data.length > 0) { | |
196 status.setText(""); | |
197 data = "{\\rtf1{\\colortbl;\\red255\\green0\\blue0;}\\uc1\\b\\i " ~ data ~ "}"; | |
198 auto obj = new Object[1]; | |
199 auto trans = new Transfer[1]; | |
200 obj[0] = cast(Object) new ArrayWrapperString(data); | |
201 trans[0] = RTFTransfer.getInstance(); | |
202 clipboard.setContents(obj, trans); | |
203 } else { | |
204 status.setText("nothing to copy"); | |
205 } | |
206 } | |
207 }); | |
208 | |
209 l = new Label(pasteParent, DWT.NONE); | |
210 l.setText("RTFTransfer:"); //$NON-NLS-1$ | |
211 pasteRtfText = new Text(pasteParent, DWT.READ_ONLY | DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
212 data = new GridData(GridData.FILL_HORIZONTAL); | |
213 data.heightHint = data.widthHint = SIZE; | |
214 pasteRtfText.setLayoutData(data); | |
215 b = new Button(pasteParent, DWT.PUSH); | |
216 b.setText("Paste"); | |
217 b.addSelectionListener(new class SelectionAdapter { | |
218 public void widgetSelected(SelectionEvent e) { | |
219 auto data = cast(ArrayWrapperString) clipboard.getContents(RTFTransfer.getInstance()); | |
220 if (data !is null) { | |
221 status.setText(""); | |
222 pasteRtfText.setText("begin paste>"~data.array~"<end paste"); | |
223 } else { | |
224 status.setText("nothing to paste"); | |
225 } | |
226 } | |
227 }); | |
228 } | |
229 void createHTMLTransfer(Composite copyParent, Composite pasteParent){ | |
230 // HTML Transfer | |
231 Label l = new Label(copyParent, DWT.NONE); | |
232 l.setText("HTMLTransfer:"); //$NON-NLS-1$ | |
233 copyHtmlText = new Text(copyParent, DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
234 copyHtmlText.setText("<b>Hello World</b>"); | |
235 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
236 data.heightHint = data.widthHint = SIZE; | |
237 copyHtmlText.setLayoutData(data); | |
238 Button b = new Button(copyParent, DWT.PUSH); | |
239 b.setText("Copy"); | |
240 b.addSelectionListener(new class SelectionAdapter { | |
241 public void widgetSelected(SelectionEvent e) { | |
242 auto data = copyHtmlText.getText(); | |
243 if (data.length > 0) { | |
244 status.setText(""); | |
245 auto obj = new Object[1]; | |
246 auto trans = new Transfer[1]; | |
247 obj[0] = cast(Object) new ArrayWrapperString(data); | |
248 trans[0] = HTMLTransfer.getInstance(); | |
249 clipboard.setContents(obj, trans); | |
250 } else { | |
251 status.setText("nothing to copy"); | |
252 } | |
253 } | |
254 }); | |
255 | |
256 l = new Label(pasteParent, DWT.NONE); | |
257 l.setText("HTMLTransfer:"); //$NON-NLS-1$ | |
258 pasteHtmlText = new Text(pasteParent, DWT.READ_ONLY | DWT.MULTI | DWT.BORDER | DWT.V_SCROLL | DWT.H_SCROLL); | |
259 data = new GridData(GridData.FILL_HORIZONTAL); | |
260 data.heightHint = data.widthHint = SIZE; | |
261 pasteHtmlText.setLayoutData(data); | |
262 b = new Button(pasteParent, DWT.PUSH); | |
263 b.setText("Paste"); | |
264 b.addSelectionListener(new class SelectionAdapter { | |
265 public void widgetSelected(SelectionEvent e) { | |
266 auto data = cast(ArrayWrapperString) clipboard.getContents(HTMLTransfer.getInstance()); | |
267 if (data !is null) { | |
268 status.setText(""); | |
269 pasteHtmlText.setText("begin paste>"~data.array~"<end paste"); | |
270 } else { | |
271 status.setText("nothing to paste"); | |
272 } | |
273 } | |
274 }); | |
275 } | |
276 void createFileTransfer(Composite copyParent, Composite pasteParent){ | |
277 //File Transfer | |
278 Label l = new Label(copyParent, DWT.NONE); | |
279 l.setText("FileTransfer:"); //$NON-NLS-1$ | |
280 | |
281 Composite c = new Composite(copyParent, DWT.NONE); | |
282 c.setLayout(new GridLayout(2, false)); | |
283 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
284 c.setLayoutData(data); | |
285 | |
286 copyFileTable = new Table(c, DWT.MULTI | DWT.BORDER); | |
287 data = new GridData(GridData.FILL_HORIZONTAL); | |
288 data.heightHint = data.widthHint = SIZE; | |
289 data.horizontalSpan = 2; | |
290 copyFileTable.setLayoutData(data); | |
291 | |
292 Button b = new Button(c, DWT.PUSH); | |
293 b.setText("Select file(s)"); | |
294 b.addSelectionListener(new class SelectionAdapter { | |
295 public void widgetSelected(SelectionEvent e) { | |
296 FileDialog dialog = new FileDialog(shell, DWT.OPEN | DWT.MULTI); | |
297 auto result = dialog.open(); | |
298 if (result !is null && result.length > 0){ | |
299 //copyFileTable.removeAll(); | |
300 //This cannot be used | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
301 auto separator = tango.io.model.IFile.FileConst.PathSeparatorString; |
78 | 302 auto path = dialog.getFilterPath(); |
303 auto names = dialog.getFileNames(); | |
304 for (int i = 0; i < names.length; i++) { | |
305 TableItem item = new TableItem(copyFileTable, DWT.NONE); | |
306 item.setText(path~separator~names[i]); | |
307 } | |
308 } | |
309 } | |
310 }); | |
311 b = new Button(c, DWT.PUSH); | |
312 b.setText("Select directory"); | |
313 b.addSelectionListener(new class SelectionAdapter { | |
314 public void widgetSelected(SelectionEvent e) { | |
315 DirectoryDialog dialog = new DirectoryDialog(shell, DWT.OPEN); | |
316 auto result = dialog.open(); | |
317 if (result !is null && result.length > 0){ | |
318 //copyFileTable.removeAll(); | |
319 TableItem item = new TableItem(copyFileTable, DWT.NONE); | |
320 item.setText(result); | |
321 } | |
322 } | |
323 }); | |
324 | |
325 b = new Button(copyParent, DWT.PUSH); | |
326 b.setText("Copy"); | |
327 b.addSelectionListener(new class SelectionAdapter { | |
328 public void widgetSelected(SelectionEvent e) { | |
329 TableItem[] items = copyFileTable.getItems(); | |
330 if (items.length > 0){ | |
331 status.setText(""); | |
332 auto data = new char[][items.length]; | |
333 for (int i = 0; i < data.length; i++) { | |
334 data[i] = items[i].getText(); | |
335 } | |
336 auto obj = new Object[1]; | |
337 auto trans = new Transfer[1]; | |
338 obj[0] = cast(Object) new ArrayWrapperString2(data); | |
339 trans[0] = FileTransfer.getInstance(); | |
340 clipboard.setContents(obj, trans); | |
341 } else { | |
342 status.setText("nothing to copy"); | |
343 } | |
344 } | |
345 }); | |
346 | |
347 l = new Label(pasteParent, DWT.NONE); | |
348 l.setText("FileTransfer:"); //$NON-NLS-1$ | |
349 pasteFileTable = new Table(pasteParent, DWT.MULTI | DWT.BORDER); | |
350 data = new GridData(GridData.FILL_HORIZONTAL); | |
351 data.heightHint = data.widthHint = SIZE; | |
352 pasteFileTable.setLayoutData(data); | |
353 b = new Button(pasteParent, DWT.PUSH); | |
354 b.setText("Paste"); | |
355 b.addSelectionListener(new class SelectionAdapter { | |
356 public void widgetSelected(SelectionEvent e) { | |
357 auto data = cast(ArrayWrapperString2) clipboard.getContents(FileTransfer.getInstance()); | |
358 if (data !is null && data.array.length > 0) { | |
359 status.setText(""); | |
360 pasteFileTable.removeAll(); | |
361 foreach (s; data.array) { | |
362 TableItem item = new TableItem(pasteFileTable, DWT.NONE); | |
363 item.setText(s); | |
364 } | |
365 } else { | |
366 status.setText("nothing to paste"); | |
367 } | |
368 } | |
369 }); | |
370 } | |
371 void createMyTransfer(Composite copyParent, Composite pasteParent){ | |
372 // MyType Transfer | |
373 // TODO | |
374 } | |
375 void createControlTransfer(Composite parent){ | |
376 Label l = new Label(parent, DWT.NONE); | |
377 l.setText("Text:"); | |
378 Button b = new Button(parent, DWT.PUSH); | |
379 b.setText("Cut"); | |
380 b.addSelectionListener(new class SelectionAdapter { | |
381 public void widgetSelected(SelectionEvent e) { | |
382 text.cut(); | |
383 } | |
384 }); | |
385 b = new Button(parent, DWT.PUSH); | |
386 b.setText("Copy"); | |
387 b.addSelectionListener(new class SelectionAdapter { | |
388 public void widgetSelected(SelectionEvent e) { | |
389 text.copy(); | |
390 } | |
391 }); | |
392 b = new Button(parent, DWT.PUSH); | |
393 b.setText("Paste"); | |
394 b.addSelectionListener(new class SelectionAdapter { | |
395 public void widgetSelected(SelectionEvent e) { | |
396 text.paste(); | |
397 } | |
398 }); | |
399 text = new Text(parent, DWT.BORDER | DWT.MULTI | DWT.H_SCROLL | DWT.V_SCROLL); | |
400 GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
401 data.heightHint = data.widthHint = SIZE; | |
402 text.setLayoutData(data); | |
403 | |
404 l = new Label(parent, DWT.NONE); | |
405 l.setText("Combo:"); | |
406 b = new Button(parent, DWT.PUSH); | |
407 b.setText("Cut"); | |
408 b.addSelectionListener(new class SelectionAdapter { | |
409 public void widgetSelected(SelectionEvent e) { | |
410 combo.cut(); | |
411 } | |
412 }); | |
413 b = new Button(parent, DWT.PUSH); | |
414 b.setText("Copy"); | |
415 b.addSelectionListener(new class SelectionAdapter { | |
416 public void widgetSelected(SelectionEvent e) { | |
417 combo.copy(); | |
418 } | |
419 }); | |
420 b = new Button(parent, DWT.PUSH); | |
421 b.setText("Paste"); | |
422 b.addSelectionListener(new class SelectionAdapter { | |
423 public void widgetSelected(SelectionEvent e) { | |
424 combo.paste(); | |
425 } | |
426 }); | |
427 combo = new Combo(parent, DWT.NONE); | |
428 char[][] str = new char[][4]; | |
429 str[0] = "Item 1"; | |
430 str[1] = "Item 2"; | |
431 str[2] = "Item 3"; | |
432 str[3] = "A longer Item"; | |
433 combo.setItems(str); | |
434 | |
435 l = new Label(parent, DWT.NONE); | |
436 l.setText("StyledText:"); | |
437 l = new Label(parent, DWT.NONE); | |
438 l.setVisible(false); | |
439 b = new Button(parent, DWT.PUSH); | |
440 b.setText("Copy"); | |
441 b.addSelectionListener(new class SelectionAdapter { | |
442 public void widgetSelected(SelectionEvent e) { | |
443 styledText.copy(); | |
444 } | |
445 }); | |
446 b = new Button(parent, DWT.PUSH); | |
447 b.setText("Paste"); | |
448 b.addSelectionListener(new class SelectionAdapter { | |
449 public void widgetSelected(SelectionEvent e) { | |
450 styledText.paste(); | |
451 } | |
452 }); | |
453 styledText = new StyledText(parent, DWT.BORDER | DWT.MULTI | DWT.H_SCROLL | DWT.V_SCROLL); | |
454 data = new GridData(GridData.FILL_HORIZONTAL); | |
455 data.heightHint = data.widthHint = SIZE; | |
456 styledText.setLayoutData(data); | |
457 } | |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
458 |
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
459 List list; |
78 | 460 void createAvailableTypes(Composite parent){ |
109
be3a48f1d596
ClipboardExample: reactivate comment functionality and fixed a bug.
Frank Benoit <benoit@tionex.de>
parents:
78
diff
changeset
|
461 list = new List(parent, DWT.BORDER | DWT.H_SCROLL | DWT.V_SCROLL); |
78 | 462 GridData data = new GridData(GridData.FILL_BOTH); |
463 data.heightHint = 100; | |
464 list.setLayoutData(data); | |
465 Button b = new Button(parent, DWT.PUSH); | |
466 b.setText("Get Available Types"); | |
467 b.addSelectionListener(new class SelectionAdapter { | |
468 public void widgetSelected(SelectionEvent e) { | |
469 list.removeAll(); | |
470 auto names = clipboard.getAvailableTypeNames(); | |
471 for (int i = 0; i < names.length; i++) { | |
472 list.add(names[i]); | |
473 } | |
474 } | |
475 }); | |
476 } | |
477 } | |
478 void main() { | |
479 Display display = new Display(); | |
480 (new ClipboardExample()).open(display); | |
481 display.dispose(); | |
482 } | |
483 |