Mercurial > projects > dwt-linux
diff dwt/custom/CCombo.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | 00180515eb65 |
children | ce446666f5a2 |
line wrap: on
line diff
--- a/dwt/custom/CCombo.d Sat Apr 26 10:01:30 2008 +0200 +++ b/dwt/custom/CCombo.d Mon May 05 00:42:55 2008 +0200 @@ -196,7 +196,7 @@ * * @see #add(String,int) */ -public void add (char[] string) { +public void add (String string) { checkWidget(); if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); list.add (string); @@ -224,7 +224,7 @@ * * @see #add(String) */ -public void add (char[] string, int index) { +public void add (String string, int index) { checkWidget(); if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); list.add (string, index); @@ -376,7 +376,7 @@ public override Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0; - char[][] items = list.getItems (); + String[] items = list.getItems (); GC gc = new GC (text); int spacer = gc.stringExtent (" ").x; //$NON-NLS-1$ int textWidth = gc.stringExtent (text.getText ()).x; @@ -412,7 +412,7 @@ checkWidget (); text.copy (); } -void createPopup(char[][] items, int selectionIndex) { +void createPopup(String[] items, int selectionIndex) { // create shell and list popup = new Shell (getShell (), DWT.NO_TRIM | DWT.ON_TOP); int style = getStyle (); @@ -496,7 +496,7 @@ } if (getShell() !is popup.getParent ()) { - char[][] items = list.getItems (); + String[] items = list.getItems (); int selectionIndex = list.getSelectionIndex (); list.removeListener (DWT.Dispose, listener); popup.dispose(); @@ -534,7 +534,7 @@ * an '&' character in the given string. If there are no '&' * characters in the given string, return '\0'. */ -dchar _findMnemonic (char[] string) { +dchar _findMnemonic (String string) { if (string is null) return '\0'; int index = 0; int length = string.length; @@ -602,7 +602,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public char[] getItem (int index) { +public String getItem (int index) { checkWidget(); return list.getItem (index); } @@ -651,7 +651,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public char[] [] getItems () { +public String [] getItems () { checkWidget (); return list.getItems (); } @@ -708,7 +708,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public char[] getText () { +public String getText () { checkWidget (); return text.getText (); } @@ -810,7 +810,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public int indexOf (char[] string) { +public int indexOf (String string) { checkWidget (); if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); return list.indexOf (string); @@ -834,7 +834,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public int indexOf (char[] string, int start) { +public int indexOf (String string, int start) { checkWidget (); if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); return list.indexOf (string, start); @@ -843,7 +843,7 @@ void initAccessible() { AccessibleAdapter accessibleAdapter = new class() AccessibleAdapter { public void getName (AccessibleEvent e) { - char[] name = null; + String name = null; Label label = getAssociatedLabel (); if (label !is null) { name = stripMnemonic (label.getText()); @@ -851,10 +851,10 @@ e.result = name; } public void getKeyboardShortcut(AccessibleEvent e) { - char[] shortcut = null; + String shortcut = null; Label label = getAssociatedLabel (); if (label !is null) { - char[] text = label.getText (); + String text = label.getText (); if (text !is null) { dchar mnemonic = _findMnemonic (text); if (mnemonic !is '\0') { @@ -964,7 +964,7 @@ switch (event.type) { case DWT.Dispose: if (getShell () !is popup.getParent ()) { - char[][] items = list.getItems (); + String[] items = list.getItems (); int selectionIndex = list.getSelectionIndex (); popup = null; list = null; @@ -1170,7 +1170,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void remove (char[] string) { +public void remove (String string) { checkWidget(); if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); list.remove (string); @@ -1352,7 +1352,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setItem (int index, char[] string) { +public void setItem (int index, String string) { checkWidget(); list.setItem (index, string); } @@ -1370,7 +1370,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setItems (char[] [] items) { +public void setItems (String [] items) { checkWidget (); list.setItems (items); if (!text.getEditable ()) text.setText (""); //$NON-NLS-1$ @@ -1440,7 +1440,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setText (char[] string) { +public void setText (String string) { checkWidget(); if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); int index = list.indexOf (string); @@ -1473,7 +1473,7 @@ text.setTextLimit (limit); } -public override void setToolTipText (char[] string) { +public override void setToolTipText (String string) { checkWidget(); super.setToolTipText(string); arrow.setToolTipText (string); @@ -1507,7 +1507,7 @@ if (count < 0) return; visibleItemCount = count; } -char[] stripMnemonic (char[] string) { +String stripMnemonic (String string) { int index = 0; int length_ = string.length; do {