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