comparison dwt/custom/LineStyleEvent.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children 1a8b3cb347e0
comparison
equal deleted inserted replaced
-1:000000000000 0:380af2bdd8e5
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 *******************************************************************************/
11 module dwt.custom;
12
13 import dwt.events.*;
14
15 /**
16 * This event is sent when a line is about to be drawn.
17 */
18 public class LineStyleEvent : TypedEvent {
19
20 /**
21 * line start offset (input)
22 */
23 public int lineOffset;
24
25 /**
26 * line text (input)
27 */
28 public String lineText;
29
30 /**
31 * line ranges (output)
32 *
33 * @since 3.2
34 */
35 public int[] ranges;
36
37 /**
38 * line styles (output)
39 *
40 * Note: Because a StyleRange includes the start and length, the
41 * same instance cannot occur multiple times in the array of styles.
42 * If the same style attributes, such as font and color, occur in
43 * multiple StyleRanges, <code>ranges</code> can be used to share
44 * styles and reduce memory usage.
45 */
46 public StyleRange[] styles;
47
48 /**
49 * line alignment (input, output)
50 *
51 * @since 3.2
52 */
53 public int alignment;
54
55 /**
56 * line indent (input, output)
57 *
58 * @since 3.2
59 */
60 public int indent;
61
62 /**
63 * line justification (input, output)
64 *
65 * @since 3.2
66 */
67 public bool justify;
68
69 /**
70 * line bullet (output)
71 * @since 3.2
72 */
73 public Bullet bullet;
74
75 /**
76 * line bullet index (output)
77 * @since 3.2
78 */
79 public int bulletIndex;
80
81 static final long serialVersionUID = 3906081274027192884L;
82
83 public LineStyleEvent(StyledTextEvent e) {
84 super(e);
85 styles = e.styles;
86 ranges = e.ranges;
87 lineOffset = e.detail;
88 lineText = e.text;
89 alignment = e.alignment;
90 justify = e.justify;
91 indent = e.indent;
92 bullet = e.bullet;
93 bulletIndex = e.bulletIndex;
94 }
95 }