comparison dwt/custom/LineBackgroundEvent.d @ 41:6337764516f1

Sync dwt/custom with dwt-linux (took copy of complete folder)
author Frank Benoit <benoit@tionex.de>
date Tue, 07 Oct 2008 16:29:55 +0200
parents 1a8b3cb347e0
children
comparison
equal deleted inserted replaced
40:fbe68c33eeee 41:6337764516f1
1 /******************************************************************************* 1 /*******************************************************************************
2 * Copyright (c) 2000, 2005 IBM Corporation and others. 2 * Copyright (c) 2000, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de>
10 *******************************************************************************/ 12 *******************************************************************************/
11 module dwt.custom; 13 module dwt.custom.LineBackgroundEvent;
12 14
13 import dwt.events.*; 15 import dwt.dwthelper.utils;
14 import dwt.graphics.*; 16
17
18 import dwt.events.TypedEvent;
19 import dwt.graphics.Color;
20 import dwt.custom.StyledTextEvent;
15 21
16 /** 22 /**
17 * This event is sent when a line is about to be drawn. 23 * This event is sent when a line is about to be drawn.
24 *
25 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
18 */ 26 */
19 public class LineBackgroundEvent : TypedEvent { 27 public class LineBackgroundEvent : TypedEvent {
20 28
21 /** 29 /**
22 * line start offset 30 * line start offset
23 */ 31 */
24 public int lineOffset; 32 public int lineOffset;
25 33
26 /** 34 /**
27 * line text 35 * line text
28 */ 36 */
29 public String lineText; 37 public String lineText;
30 38
31 /** 39 /**
32 * line background color 40 * line background color
33 */ 41 */
34 public Color lineBackground; 42 public Color lineBackground;
35 43
36 static final long serialVersionUID = 3978711687853324342L; 44 static final long serialVersionUID = 3978711687853324342L;
37 45
46 /**
47 * Constructs a new instance of this class based on the
48 * information in the given event.
49 *
50 * @param e the event containing the information
51 */
38 public this(StyledTextEvent e) { 52 public this(StyledTextEvent e) {
39 super(e); 53 super(cast(Object)e);
40 lineOffset = e.detail; 54 lineOffset = e.detail;
41 lineText = e.text; 55 lineText = e.text;
42 lineBackground = e.lineBackground; 56 lineBackground = e.lineBackground;
43 } 57 }
44 } 58 }