diff dwt/widgets/TreeItem.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents 25f88bf5a6df
children 36f5cb12e1a2
line wrap: on
line diff
--- a/dwt/widgets/TreeItem.d	Sat Apr 26 10:01:48 2008 +0200
+++ b/dwt/widgets/TreeItem.d	Mon May 05 00:12:38 2008 +0200
@@ -56,7 +56,7 @@
      */
     public HANDLE handle;
     Tree parent;
-    char[] [] strings;
+    String [] strings;
     Image [] images;
     bool cached;
     int background = -1, foreground = -1;
@@ -511,7 +511,7 @@
                     rect.left = rect.right + Tree.INSET;
                     rect.right = headerRect.right;
                 } else {
-                    char[] string = index is 0 ? text : strings !is null ? strings [index] : null;
+                    String string = index is 0 ? text : strings !is null ? strings [index] : null;
                     if (string !is null) {
                         RECT textRect;
                         TCHAR[] buffer = StrToTCHARs (parent.getCodePage (), string, false);
@@ -883,7 +883,7 @@
     return hItem !is null ? parent._getItem (hItem) : null;
 }
 
-override public char[] getText () {
+override public String getText () {
     checkWidget();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     return super.getText ();
@@ -903,13 +903,13 @@
  *
  * @since 3.1
  */
-public char[] getText (int index) {
+public String getText (int index) {
     checkWidget();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     if (index is 0) return getText ();
     if (strings !is null) {
         if (0 <= index && index < strings.length) {
-            char[] string = strings [index];
+            String string = strings [index];
             return string !is null ? string : "";
         }
     }
@@ -1777,11 +1777,11 @@
  *
  * @since 3.1
  */
-public void setText (char[][] strings) {
+public void setText (String[] strings) {
     checkWidget();
     if (strings is null) error (DWT.ERROR_NULL_ARGUMENT);
     for (int i=0; i<strings.length; i++) {
-        char[] string = strings [i];
+        String string = strings [i];
         if (string !is null) setText (i, string);
     }
 }
@@ -1802,7 +1802,7 @@
  *
  * @since 3.1
  */
-public void setText (int index, char[] string) {
+public void setText (int index, String string) {
     checkWidget();
     if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (index is 0) {
@@ -1812,7 +1812,7 @@
     int count = Math.max (1, parent.getColumnCount ());
     if (0 > index || index > count - 1) return;
     if (strings is null && index !is 0) {
-        strings = new char[] [count];
+        strings = new String [count];
         strings [0] = text;
     }
     if (strings !is null) {
@@ -1835,7 +1835,7 @@
     }
 }
 
-override public void setText (char[] string) {
+override public void setText (String string) {
     checkWidget();
     setText (0, string);
 }