1 /******************************************************************************* 2 * Copyright (c) 2000, 2007 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 org.eclipse.swt.custom.StyledTextEvent; 14 15 16 import org.eclipse.swt.graphics.Color; 17 import org.eclipse.swt.widgets.Event; 18 import org.eclipse.swt.custom.StyleRange; 19 import org.eclipse.swt.custom.Bullet; 20 import org.eclipse.swt.custom.StyledTextContent; 21 22 /** 23 * 24 */ 25 class StyledTextEvent : Event { 26 // used by LineStyleEvent 27 int[] ranges; 28 StyleRange[] styles; 29 int alignment; 30 int indent; 31 bool justify; 32 Bullet bullet; 33 int bulletIndex; 34 // used by LineBackgroundEvent 35 Color lineBackground; 36 // used by BidiSegmentEvent 37 int[] segments; 38 // used by TextChangedEvent 39 int replaceCharCount; 40 int newCharCount; 41 int replaceLineCount; 42 int newLineCount; 43 // used by PaintObjectEvent 44 int x; 45 int y; 46 int ascent; 47 int descent; 48 StyleRange style; 49 50 this (StyledTextContent content) { 51 data = cast(Object)content; 52 } 53 } 54 55