annotate snippets/display/Snippet42.d @ 132:104f5ed240fc

More snippets from TomD, thanks!
author Frank Benoit <benoit@tionex.de>
date Tue, 29 Jul 2008 01:50:10 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
132
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
1 /*******************************************************************************
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
3 * All rights reserved. This program and the accompanying materials
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
4 * are made available under the terms of the Eclipse Public License v1.0
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
5 * which accompanies this distribution, and is available at
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
6 * http://www.eclipse.org/legal/epl-v10.html
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
7 *
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
8 * Contributors:
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
9 * IBM Corporation - initial API and implementation
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
10 * D Port:
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
11 * Thomas Demmer <t_demmer AT web DOT de>
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
12 *******************************************************************************/
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
13 module display.Snippet42;
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
14
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
15 /*
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
16 * Display example snippet: get the bounds and client area of a display
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
17 *
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
18 * For a list of all DWT example snippets see
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
19 * http://www.eclipse.org/swt/snippets/
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
20 */
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
21 import dwt.widgets.Display;
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
22
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
23 import dwt.dwthelper.utils;
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
24
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
25 import tango.io.Stdout;
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
26 void main (String [] args) {
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
27 Display display = new Display ();
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
28 Stdout.formatln("Display Bounds= {} Display ClientArea= {}"
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
29 ,display.getBounds(),display.getClientArea());
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
30 display.dispose ();
104f5ed240fc More snippets from TomD, thanks!
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
31 }