Mercurial > projects > dwt-linux
comparison dwt/widgets/Tracker.d @ 255:5a30aa9820f3
removed tango.stdc.stringz imports and allow null for arrays and string arguments.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 15 Jun 2008 22:32:20 +0200 |
parents | ce446666f5a2 |
children | c0d810de7093 |
comparison
equal
deleted
inserted
replaced
254:8bca790583c3 | 255:5a30aa9820f3 |
---|---|
953 * widget. If the parent is a Display then these are screen coordinates. | 953 * widget. If the parent is a Display then these are screen coordinates. |
954 * | 954 * |
955 * @param rectangles the bounds of the rectangles to be drawn | 955 * @param rectangles the bounds of the rectangles to be drawn |
956 * | 956 * |
957 * @exception IllegalArgumentException <ul> | 957 * @exception IllegalArgumentException <ul> |
958 * <li>ERROR_NULL_ARGUMENT - if the set of rectangles is null or contains a null rectangle</li> | 958 * <li>ERROR_NULL_ARGUMENT - if the set of rectangles contains a null rectangle</li> |
959 * </ul> | 959 * </ul> |
960 * @exception DWTException <ul> | 960 * @exception DWTException <ul> |
961 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 961 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
962 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 962 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
963 * </ul> | 963 * </ul> |
964 */ | 964 */ |
965 public void setRectangles (Rectangle [] rectangles) { | 965 public void setRectangles (Rectangle [] rectangles) { |
966 checkWidget(); | 966 checkWidget(); |
967 if (rectangles is null) error (DWT.ERROR_NULL_ARGUMENT); | 967 // DWT extension: allow null for zero length string |
968 //if (rectangles is null) error (DWT.ERROR_NULL_ARGUMENT); | |
968 int length = rectangles.length; | 969 int length = rectangles.length; |
969 this.rectangles = new Rectangle [length]; | 970 this.rectangles = new Rectangle [length]; |
970 for (int i = 0; i < length; i++) { | 971 for (int i = 0; i < length; i++) { |
971 Rectangle current = rectangles [i]; | 972 Rectangle current = rectangles [i]; |
972 if (current is null) error (DWT.ERROR_NULL_ARGUMENT); | 973 if (current is null) error (DWT.ERROR_NULL_ARGUMENT); |