root/dwt/custom/LineBackgroundEvent.d

Revision 315:349b8c12e243, 1.5 kB (checked in by Frank Benoit <benoit@tionex.de>, 3 months ago)

Sync dwt/custom with dwt-linux

Line 
1 /*******************************************************************************
2  * Copyright (c) 2000, 2008 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  *     Frank Benoit <benoit@tionex.de>
12  *******************************************************************************/
13 module dwt.custom.LineBackgroundEvent;
14
15 import dwt.dwthelper.utils;
16
17
18 import dwt.events.TypedEvent;
19 import dwt.graphics.Color;
20 import dwt.custom.StyledTextEvent;
21
22 /**
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>
26  */
27 public class LineBackgroundEvent : TypedEvent {
28
29     /**
30      * line start offset
31      */
32     public int lineOffset;
33
34     /**
35      * line text
36      */
37     public String lineText;
38
39     /**
40      * line background color
41      */
42     public Color lineBackground;
43
44     static final long serialVersionUID = 3978711687853324342L;
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  */
52 public this(StyledTextEvent e) {
53     super(cast(Object)e);
54     lineOffset = e.detail;
55     lineText = e.text;
56     lineBackground = e.lineBackground;
57 }
58 }
Note: See TracBrowser for help on using the browser.