org.eclipse.swt.custom.StyledText

Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

Contributors: IBM Corporation - initial API and implementation Port to the D programming language: Frank Benoit <benoit@tionex.de>

Members

Classes

StyledText
class StyledText

A StyledText is an editable user interface object that displays lines of text. The following style attributes can be defined for the text: <ul> <li>foreground color <li>background color <li>font style (bold, italic, bold-italic, regular) <li>underline <li>strikeout </ul> <p> In addition to text style attributes, the background color of a line may be specified. </p><p> There are two ways to use this widget when specifying text style information. You may use the API that is defined for StyledText or you may define your own LineStyleListener. If you define your own listener, you will be responsible for maintaining the text style information for the widget. IMPORTANT: You may not define your own listener and use the StyledText API. The following StyledText API is not supported if you have defined a LineStyleListener: <ul> <li>getStyleRangeAtOffset(int) <li>getStyleRanges() <li>replaceStyleRanges(int,int,StyleRange[]) <li>setStyleRange(StyleRange) <li>setStyleRanges(StyleRange[]) </ul> </p><p> There are two ways to use this widget when specifying line background colors. You may use the API that is defined for StyledText or you may define your own LineBackgroundListener. If you define your own listener, you will be responsible for maintaining the line background color information for the widget. IMPORTANT: You may not define your own listener and use the StyledText API. The following StyledText API is not supported if you have defined a LineBackgroundListener: <ul> <li>getLineBackground(int) <li>setLineBackground(int,int,Color) </ul> </p><p> The content implementation for this widget may also be user-defined. To do so, you must implement the StyledTextContent interface and use the StyledText API setContent(StyledTextContent) to initialize the widget. </p><p> <dl> <dt><b>Styles:</b><dd>FULL_SELECTION, MULTI, READ_ONLY, SINGLE, WRAP <dt><b>Events:</b><dd>ExtendedModify, LineGetBackground, LineGetSegments, LineGetStyle, Modify, Selection, Verify, VerifyKey </dl> </p><p> IMPORTANT: This class is <em>not</em> intended to be subclassed. </p>

Meta