comparison dwt/printing/PrinterData.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents 8491a1efab40
children 36f5cb12e1a2
comparison
equal deleted inserted replaced
211:ff59aeb96cac 212:ab60f3309436
14 14
15 15
16 import dwt.graphics.DeviceData; 16 import dwt.graphics.DeviceData;
17 17
18 import tango.text.convert.Format; 18 import tango.text.convert.Format;
19 import dwt.dwthelper.utils;
19 20
20 /** 21 /**
21 * Instances of this class are descriptions of a print job 22 * Instances of this class are descriptions of a print job
22 * in terms of the printer, and the scope and type of printing 23 * in terms of the printer, and the scope and type of printing
23 * that is desired. For example, the number of pages and copies 24 * that is desired. For example, the number of pages and copies
43 * On X/Window systems, this is the name of a display connection to the 44 * On X/Window systems, this is the name of a display connection to the
44 * Xprt server (the default is ":1"). 45 * Xprt server (the default is ":1").
45 * On GTK+, this is the backend type name (eg. GtkPrintBackendCups). 46 * On GTK+, this is the backend type name (eg. GtkPrintBackendCups).
46 */ 47 */
47 // TODO: note that this api is not finalized for GTK+ 48 // TODO: note that this api is not finalized for GTK+
48 public char[] driver; 49 public String driver;
49 50
50 /** 51 /**
51 * the name of the printer 52 * the name of the printer
52 * On Windows systems, this is the name of the 'device'. 53 * On Windows systems, this is the name of the 'device'.
53 * On Mac OSX, X/Window systems, and GTK+, this is the printer's 'name'. 54 * On Mac OSX, X/Window systems, and GTK+, this is the printer's 'name'.
54 */ 55 */
55 public char[] name; 56 public String name;
56 57
57 /** 58 /**
58 * the scope of the print job, expressed as one of the following values: 59 * the scope of the print job, expressed as one of the following values:
59 * <dl> 60 * <dl>
60 * <dt><code>ALL_PAGES</code></dt> 61 * <dt><code>ALL_PAGES</code></dt>
86 87
87 /** 88 /**
88 * the name of the file to print to if printToFile is true. 89 * the name of the file to print to if printToFile is true.
89 * Note that this field is ignored if printToFile is false. 90 * Note that this field is ignored if printToFile is false.
90 */ 91 */
91 public char[] fileName; 92 public String fileName;
92 93
93 /** 94 /**
94 * the number of copies to print. 95 * the number of copies to print.
95 * Note that this field may be controlled by the printer driver 96 * Note that this field may be controlled by the printer driver
96 * In other words, the printer itself may be capable of printing 97 * In other words, the printer itself may be capable of printing
150 * @param name the name of the printer 151 * @param name the name of the printer
151 * 152 *
152 * @see #driver 153 * @see #driver
153 * @see #name 154 * @see #name
154 */ 155 */
155 public this(char[] driver, char[] name) { 156 public this(String driver, String name) {
156 this.driver = driver; 157 this.driver = driver;
157 this.name = name; 158 this.name = name;
158 } 159 }
159 160
160 /** 161 /**
161 * Returns a string containing a concise, human-readable 162 * Returns a string containing a concise, human-readable
162 * description of the receiver. 163 * description of the receiver.
163 * 164 *
164 * @return a string representation of the receiver 165 * @return a string representation of the receiver
165 */ 166 */
166 public char[] toString() { 167 public String toString() {
167 return Format("PrinterData {{driver = {}, name = {}}", driver, name ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ 168 return Format("PrinterData {{driver = {}, name = {}}", driver, name ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
168 } 169 }
169 } 170 }