1 /*******************************************************************************
2  * Copyright (c) 2003, 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  * Port to the D programming language:
11  *      John Reimer <terminal.node@gmail.com>
12  *******************************************************************************/
13 module org.eclipse.swt.browser.ProgressEvent;
14 
15 
16 import java.lang.all;
17 
18 import org.eclipse.swt.events.TypedEvent;
19 import org.eclipse.swt.widgets.Widget;
20 
21 /**
22  * A <code>ProgressEvent</code> is sent by a {@link Browser} to
23  * {@link ProgressListener}'s when a progress is made during the
24  * loading of the current URL or when the loading of the current
25  * URL has been completed.
26  * 
27  * @since 3.0
28  */
29 public class ProgressEvent : TypedEvent {
30     /** current value */
31     public int current;
32     /** total value */
33     public int total;
34     
35     static const long serialVersionUID = 3977018427045393972L;
36 
37 this(Widget w) {
38     super(w);
39 }
40 
41 /**
42  * Returns a string containing a concise, human-readable
43  * description of the receiver.
44  *
45  * @return a string representation of the event
46  */
47 public override String toString() {
48     return Format( "{} current = {}, total = {}}", 
49         super.toString()[0 .. $-1], current, total );  
50 }
51 }