Mercurial > projects > dwt-win
annotate dwt/custom/LineStyleEvent.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 | a5afe31f5cdd |
children | 36f5cb12e1a2 |
rev | line source |
---|---|
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
1 /******************************************************************************* |
155 | 2 * Copyright (c) 2000, 2006 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.LineStyleEvent; | |
14 | |
15 import dwt.events.TypedEvent; | |
16 import dwt.custom.StyleRange; | |
17 import dwt.custom.Bullet; | |
18 import dwt.custom.StyledTextEvent; | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
19 import dwt.dwthelper.utils; |
155 | 20 |
21 /** | |
22 * This event is sent when a line is about to be drawn. | |
23 */ | |
24 public class LineStyleEvent : TypedEvent { | |
25 | |
26 /** | |
27 * line start offset (input) | |
28 */ | |
29 public int lineOffset; | |
30 | |
31 /** | |
32 * line text (input) | |
33 */ | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
34 public String lineText; |
155 | 35 |
36 /** | |
37 * line ranges (output) | |
38 * | |
39 * @since 3.2 | |
40 */ | |
41 public int[] ranges; | |
42 | |
43 /** | |
44 * line styles (output) | |
45 * | |
46 * Note: Because a StyleRange includes the start and length, the | |
47 * same instance cannot occur multiple times in the array of styles. | |
48 * If the same style attributes, such as font and color, occur in | |
49 * multiple StyleRanges, <code>ranges</code> can be used to share | |
50 * styles and reduce memory usage. | |
51 */ | |
52 public StyleRange[] styles; | |
53 | |
54 /** | |
55 * line alignment (input, output) | |
56 * | |
57 * @since 3.2 | |
58 */ | |
59 public int alignment; | |
60 | |
61 /** | |
62 * line indent (input, output) | |
63 * | |
64 * @since 3.2 | |
65 */ | |
66 public int indent; | |
67 | |
68 /** | |
69 * line justification (input, output) | |
70 * | |
71 * @since 3.2 | |
72 */ | |
73 public bool justify; | |
74 | |
75 /** | |
76 * line bullet (output) | |
77 * @since 3.2 | |
78 */ | |
79 public Bullet bullet; | |
80 | |
81 /** | |
82 * line bullet index (output) | |
83 * @since 3.2 | |
84 */ | |
85 public int bulletIndex; | |
86 | |
87 static final long serialVersionUID = 3906081274027192884L; | |
88 | |
89 public this(StyledTextEvent e) { | |
90 super(cast(Object)e); | |
91 lineOffset = e.detail; | |
92 lineText = e.text; | |
93 alignment = e.alignment; | |
94 justify = e.justify; | |
95 indent = e.indent; | |
96 bullet = e.bullet; | |
97 bulletIndex = e.bulletIndex; | |
98 } | |
99 } |