Mercurial > projects > dwt-linux
comparison dwt/printing/PrinterData.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | f2e04420fd6c |
children | ce446666f5a2 |
comparison
equal
deleted
inserted
replaced
237:98b80b00af79 | 238:380bad9f6852 |
---|---|
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * Port to the D programming language: | 10 * Port to the D programming language: |
11 * Frank Benoit <benoit@tionex.de> | 11 * Frank Benoit <benoit@tionex.de> |
12 *******************************************************************************/ | 12 *******************************************************************************/ |
13 module dwt.printing.PrinterData; | 13 module dwt.printing.PrinterData; |
14 | |
15 import dwt.dwthelper.utils; | |
14 | 16 |
15 | 17 |
16 import dwt.graphics.DeviceData; | 18 import dwt.graphics.DeviceData; |
17 | 19 |
18 import tango.text.convert.Format; | 20 import tango.text.convert.Format; |
44 * On X/Window systems, this is the name of a display connection to the | 46 * On X/Window systems, this is the name of a display connection to the |
45 * Xprt server (the default is ":1"). | 47 * Xprt server (the default is ":1"). |
46 * On GTK+, this is the backend type name (eg. GtkPrintBackendCups). | 48 * On GTK+, this is the backend type name (eg. GtkPrintBackendCups). |
47 */ | 49 */ |
48 // TODO: note that this api is not finalized for GTK+ | 50 // TODO: note that this api is not finalized for GTK+ |
49 public char[] driver; | 51 public String driver; |
50 | 52 |
51 /** | 53 /** |
52 * the name of the printer | 54 * the name of the printer |
53 * On Windows systems, this is the name of the 'device'. | 55 * On Windows systems, this is the name of the 'device'. |
54 * On Mac OSX, X/Window systems, and GTK+, this is the printer's 'name'. | 56 * On Mac OSX, X/Window systems, and GTK+, this is the printer's 'name'. |
55 */ | 57 */ |
56 public char[] name; | 58 public String name; |
57 | 59 |
58 /** | 60 /** |
59 * the scope of the print job, expressed as one of the following values: | 61 * the scope of the print job, expressed as one of the following values: |
60 * <dl> | 62 * <dl> |
61 * <dt><code>ALL_PAGES</code></dt> | 63 * <dt><code>ALL_PAGES</code></dt> |
87 | 89 |
88 /** | 90 /** |
89 * the name of the file to print to if printToFile is true. | 91 * the name of the file to print to if printToFile is true. |
90 * Note that this field is ignored if printToFile is false. | 92 * Note that this field is ignored if printToFile is false. |
91 */ | 93 */ |
92 public char[] fileName; | 94 public String fileName; |
93 | 95 |
94 /** | 96 /** |
95 * the number of copies to print. | 97 * the number of copies to print. |
96 * Note that this field may be controlled by the printer driver | 98 * Note that this field may be controlled by the printer driver |
97 * In other words, the printer itself may be capable of printing | 99 * In other words, the printer itself may be capable of printing |
151 * @param name the name of the printer | 153 * @param name the name of the printer |
152 * | 154 * |
153 * @see #driver | 155 * @see #driver |
154 * @see #name | 156 * @see #name |
155 */ | 157 */ |
156 public this(char[] driver, char[] name) { | 158 public this(String driver, String name) { |
157 this.driver = driver; | 159 this.driver = driver; |
158 this.name = name; | 160 this.name = name; |
159 } | 161 } |
160 | 162 |
161 /** | 163 /** |
162 * Returns a string containing a concise, human-readable | 164 * Returns a string containing a concise, human-readable |
163 * description of the receiver. | 165 * description of the receiver. |
164 * | 166 * |
165 * @return a string representation of the receiver | 167 * @return a string representation of the receiver |
166 */ | 168 */ |
167 public override char[] toString() { | 169 public override String toString() { |
168 return Format( "PrinterData {{driver = {}, name = {}}", driver, name ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ | 170 return Format( "PrinterData {{driver = {}, name = {}}", driver, name ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
169 } | 171 } |
170 } | 172 } |