Mercurial > projects > dwt-win
annotate dwt/custom/LineBackgroundEvent.d @ 315:349b8c12e243
Sync dwt/custom with dwt-linux
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 07 Oct 2008 16:18:26 +0200 |
parents | fd9c62a2998e |
children |
rev | line source |
---|---|
315
349b8c12e243
Sync dwt/custom with dwt-linux
Frank Benoit <benoit@tionex.de>
parents:
246
diff
changeset
|
1 /******************************************************************************* |
246 | 2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
155 | 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 | |
315
349b8c12e243
Sync dwt/custom with dwt-linux
Frank Benoit <benoit@tionex.de>
parents:
246
diff
changeset
|
15 import dwt.dwthelper.utils; |
349b8c12e243
Sync dwt/custom with dwt-linux
Frank Benoit <benoit@tionex.de>
parents:
246
diff
changeset
|
16 |
155 | 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. | |
246 | 24 * |
25 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> | |
155 | 26 */ |
27 public class LineBackgroundEvent : TypedEvent { | |
28 | |
29 /** | |
30 * line start offset | |
31 */ | |
32 public int lineOffset; | |
33 | |
34 /** | |
35 * line text | |
36 */ | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
37 public String lineText; |
155 | 38 |
39 /** | |
40 * line background color | |
41 */ | |
42 public Color lineBackground; | |
43 | |
44 static final long serialVersionUID = 3978711687853324342L; | |
45 | |
246 | 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 */ | |
155 | 52 public this(StyledTextEvent e) { |
53 super(cast(Object)e); | |
54 lineOffset = e.detail; | |
55 lineText = e.text; | |
213 | 56 lineBackground = e.lineBackground; |
155 | 57 } |
58 } | |
59 | |
60 |