annotate dwt/custom/LineStyleEvent.d @ 41:6337764516f1

Sync dwt/custom with dwt-linux (took copy of complete folder)
author Frank Benoit <benoit@tionex.de>
date Tue, 07 Oct 2008 16:29:55 +0200
parents 1a8b3cb347e0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
1 /*******************************************************************************
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
2 * Copyright (c) 2000, 2008 IBM Corporation and others.
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
3 * All rights reserved. This program and the accompanying materials
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
4 * are made available under the terms of the Eclipse Public License v1.0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
5 * which accompanies this distribution, and is available at
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
6 * http://www.eclipse.org/legal/epl-v10.html
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
7 *
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
8 * Contributors:
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
9 * IBM Corporation - initial API and implementation
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
10 * Port to the D programming language:
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
11 * Frank Benoit <benoit@tionex.de>
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
12 *******************************************************************************/
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
13 module dwt.custom.LineStyleEvent;
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
14
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
15 import dwt.dwthelper.utils;
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
16
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
17 import dwt.events.TypedEvent;
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
18 import dwt.custom.StyleRange;
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
19 import dwt.custom.Bullet;
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
20 import dwt.custom.StyledTextEvent;
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
21
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
22 /**
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
23 * This event is sent when a line is about to be drawn.
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
24 *
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
25 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
26 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
27 public class LineStyleEvent : TypedEvent {
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
28
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
29 /**
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
30 * line start offset (input)
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
31 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
32 public int lineOffset;
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
33
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
34 /**
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
35 * line text (input)
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
36 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
37 public String lineText;
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
38
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
39 /**
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
40 * line ranges (output)
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
41 *
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
42 * @since 3.2
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
43 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
44 public int[] ranges;
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
45
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
46 /**
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
47 * line styles (output)
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
48 *
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
49 * Note: Because a StyleRange includes the start and length, the
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
50 * same instance cannot occur multiple times in the array of styles.
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
51 * If the same style attributes, such as font and color, occur in
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
52 * multiple StyleRanges, <code>ranges</code> can be used to share
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
53 * styles and reduce memory usage.
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
54 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
55 public StyleRange[] styles;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
56
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
57 /**
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
58 * line alignment (input, output)
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
59 *
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
60 * @since 3.2
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
61 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
62 public int alignment;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
63
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
64 /**
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
65 * line indent (input, output)
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
66 *
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
67 * @since 3.2
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
68 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
69 public int indent;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
70
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
71 /**
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
72 * line justification (input, output)
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
73 *
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
74 * @since 3.2
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
75 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
76 public bool justify;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
77
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
78 /**
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
79 * line bullet (output)
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
80 * @since 3.2
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
81 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
82 public Bullet bullet;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
83
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
84 /**
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
85 * line bullet index (output)
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
86 * @since 3.2
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
87 */
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
88 public int bulletIndex;
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
89
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
90 static final long serialVersionUID = 3906081274027192884L;
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
91
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
92 /**
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
93 * Constructs a new instance of this class based on the
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
94 * information in the given event.
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
95 *
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
96 * @param e the event containing the information
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
97 */
5
1a8b3cb347e0 Fix Ctors to 'this'
Frank Benoit <benoit@tionex.de>
parents: 0
diff changeset
98 public this(StyledTextEvent e) {
41
6337764516f1 Sync dwt/custom with dwt-linux (took copy of complete folder)
Frank Benoit <benoit@tionex.de>
parents: 5
diff changeset
99 super(cast(Object)e);
0
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
100 styles = e.styles;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
101 ranges = e.ranges;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
102 lineOffset = e.detail;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
103 lineText = e.text;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
104 alignment = e.alignment;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
105 justify = e.justify;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
106 indent = e.indent;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
107 bullet = e.bullet;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
108 bulletIndex = e.bulletIndex;
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
109 }
380af2bdd8e5 Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff changeset
110 }