Show
Ignore:
Timestamp:
05/04/08 18:42:55 (4 years ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

reverted char[] to String

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/graphics/TextLayout.d

    r200 r238  
    5858        int start; 
    5959 
    60         public override char[] toString () { 
     60        public override String toString () { 
    6161            return Format( "StyleItem {{{}, {}}", start, style ); 
    6262        } 
     
    6464 
    6565    Font font; 
    66     char[] text; 
     66    String text; 
    6767    int ascent, descent; 
    6868    int[] segments; 
     
    7878    // ZWNBS    ZERO WIDTH NO-BREAK SPACE 
    7979    static const dchar LTR_MARK = '\u200E', RTL_MARK = '\u200F', ZWS = '\u200B', ZWNBS = '\uFEFF'; 
    80     static const char[] STR_LTR_MARK = "\u200E", STR_RTL_MARK = "\u200F", STR_ZWS = "\u200B", STR_ZWNBS = "\uFEFF"; 
     80    static const String STR_LTR_MARK = "\u200E", STR_RTL_MARK = "\u200F", STR_ZWS = "\u200B", STR_ZWNBS = "\uFEFF"; 
    8181 
    8282/** 
     
    124124void computeRuns () { 
    125125    if (attrList !is null) return; 
    126     char[] segmentsText = getSegmentsText(); 
     126    String segmentsText = getSegmentsText(); 
    127127    OS.pango_layout_set_text (layout, segmentsText.ptr, segmentsText.length); 
    128128    if (styles.length is 2 && styles[0].style is null && ascent is -1 && descent is -1 && segments is null) return; 
     
    164164        chars[ oldPos + count*6 .. oldPos + count*6 + segementsLength - oldPos ] = 
    165165            segmentsText[ oldPos .. segementsLength ]; 
    166         char[] buffer = chars;// Converter.wcsToMbcs(null, chars, false); 
     166        String buffer = chars;// Converter.wcsToMbcs(null, chars, false); 
    167167 
    168168        OS.pango_layout_set_text (layout, buffer.ptr, buffer.length); 
     
    11991199} 
    12001200 
    1201 char[] getSegmentsText() { 
     1201String getSegmentsText() { 
    12021202    if (segments is null) return text; 
    12031203    int nSegments = segments.length; 
     
    12111211    char[] newChars = new char[len + nSegments*3]; 
    12121212    int charCount = 0, segmentCount = 0; 
    1213     char[] separator = getOrientation() is DWT.RIGHT_TO_LEFT ? STR_RTL_MARK : STR_LTR_MARK; 
     1213    String separator = getOrientation() is DWT.RIGHT_TO_LEFT ? STR_RTL_MARK : STR_LTR_MARK; 
    12141214    while (charCount < len) { 
    12151215        if (segmentCount < nSegments && charCount is segments[segmentCount]) { 
     
    13231323 * </ul> 
    13241324 */ 
    1325 public char[] getText () { 
     1325public String getText () { 
    13261326    checkLayout (); 
    13271327    return text; 
     
    17361736 * </ul> 
    17371737 */ 
    1738 public void setText (char[] text) { 
     1738public void setText (String text) { 
    17391739    checkLayout (); 
    17401740    if (text.equals(this.text)) return; 
     
    17981798 * @return a string representation of the receiver 
    17991799 */ 
    1800 public override char[] toString () { 
     1800public override String toString () { 
    18011801    if (isDisposed()) return "TextLayout {*DISPOSED*}"; 
    18021802    return Format( "TextLayout {{{}}", layout ); 
     
    18361836} 
    18371837 
    1838 int validateOffset( char[] cont, int offset, int step) { 
     1838int validateOffset( String cont, int offset, int step) { 
    18391839    if (invalidOffsets is null) return offset + step; 
    18401840    int i = step > 0 ? 0 : invalidOffsets.length - 1;