Changeset 95
- Timestamp:
- 02/05/06 04:51:39 (3 years ago)
- Files:
-
- trunk/current/win32/import/dwt/custom/clabel.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/custom/ctabitem.d (modified) (1 diff)
- trunk/current/win32/import/dwt/custom/tabletreeitem.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/gc.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/item.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/current/win32/import/dwt/custom/clabel.d
r82 r95 257 257 public char[] getText() { 258 258 //checkWidget(); 259 return text ;259 return text.dup; 260 260 } 261 261 public char[] getToolTipText () { … … 710 710 711 711 // <Shawn> 712 // must make a copy of the the original text, o rthe orginal text will be changed !!!712 // must make a copy of the the original text, otherwise the orginal text will be changed !!! 713 713 char[] t = ts.dup; 714 714 int w = gc.textExtent(ELLIPSIS).x; trunk/current/win32/import/dwt/custom/ctabitem.d
r76 r95 145 145 146 146 // <Shawn> 147 // must make a copy of the the original text, o r the orginal text will be changed!!!147 // must make a copy of the the original text, otherwise the orginal text will be cut short !!! 148 148 char[] t = string.dup; 149 149 int ellipseWidth = gc.textExtent(ELLIPSIS, FLAGS).x; trunk/current/win32/import/dwt/custom/tabletreeitem.d
r76 r95 479 479 public char[] getText(int index) { 480 480 //checkWidget(); 481 if (0 <= index && index < texts.length) return texts[index]; 481 482 // <Shawn> 483 // some widget shorten the text when the draw space is too small, 484 // e.g. CLable,CTabItem, change the text with ... 485 // must make a copy in case the caller change the original text 486 if (0 <= index && index < texts.length) return texts[index].dup; 482 487 return null; 483 488 } trunk/current/win32/import/dwt/graphics/gc.d
r82 r95 2634 2634 public Point textExtent(char[] string, int flags) { 2635 2635 if (handle is null) DWT.error(__FILE__, __LINE__, DWT.ERROR_GRAPHIC_DISPOSED); 2636 if (string is null) DWT.error(__FILE__, __LINE__, DWT.ERROR_NULL_ARGUMENT); 2636 // <shawn> no need to do null check 2637 // if (string is null) DWT.error(__FILE__, __LINE__, DWT.ERROR_NULL_ARGUMENT); 2637 2638 if (string.length == 0) { 2638 2639 SIZE size; trunk/current/win32/import/dwt/widgets/item.d
r82 r95 142 142 // e.g. CLable,CTabItem, change the text with ... 143 143 // must make a copy in case the caller change the original text 144 return (text);144 return text.dup; 145 145 } 146 146 … … 187 187 if (string is null) string = ""; 188 188 // error(__FILE__, __LINE__, DWT.ERROR_NULL_ARGUMENT); 189 text = string ;189 text = string.dup; 190 190 } 191 191
