Mercurial > projects > dwt-linux
comparison dwt/custom/CTabItem.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 |
---|---|
770 } | 770 } |
771 /** | 771 /** |
772 * Returns <code>true</code> to indicate that the receiver's close button should be shown. | 772 * Returns <code>true</code> to indicate that the receiver's close button should be shown. |
773 * Otherwise return <code>false</code>. The initial value is defined by the style (DWT.CLOSE) | 773 * Otherwise return <code>false</code>. The initial value is defined by the style (DWT.CLOSE) |
774 * that was used to create the receiver. | 774 * that was used to create the receiver. |
775 * | 775 * |
776 * @return <code>true</code> if the close button should be shown | 776 * @return <code>true</code> if the close button should be shown |
777 * | 777 * |
778 * @exception DWTException <ul> | 778 * @exception DWTException <ul> |
779 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 779 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
780 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 780 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
781 * </ul> | 781 * </ul> |
782 * | 782 * |
783 * @since 3.4 | 783 * @since 3.4 |
784 */ | 784 */ |
785 public bool getShowClose() { | 785 public bool getShowClose() { |
786 checkWidget(); | 786 checkWidget(); |
787 return showClose; | 787 return showClose; |
1019 } | 1019 } |
1020 /** | 1020 /** |
1021 * Sets to <code>true</code> to indicate that the receiver's close button should be shown. | 1021 * Sets to <code>true</code> to indicate that the receiver's close button should be shown. |
1022 * If the parent (CTabFolder) was created with DWT.CLOSE style, changing this value has | 1022 * If the parent (CTabFolder) was created with DWT.CLOSE style, changing this value has |
1023 * no effect. | 1023 * no effect. |
1024 * | 1024 * |
1025 * @param close the new state of the close button | 1025 * @param close the new state of the close button |
1026 * | 1026 * |
1027 * @exception DWTException <ul> | 1027 * @exception DWTException <ul> |
1028 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 1028 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
1029 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 1029 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
1030 * </ul> | 1030 * </ul> |
1031 * | 1031 * |
1032 * @since 3.4 | 1032 * @since 3.4 |
1033 */ | 1033 */ |
1034 public void setShowClose(bool close) { | 1034 public void setShowClose(bool close) { |
1035 checkWidget(); | 1035 checkWidget(); |
1036 if (showClose is close) return; | 1036 if (showClose is close) return; |
1038 parent.updateItems(); | 1038 parent.updateItems(); |
1039 parent.redrawTabs(); | 1039 parent.redrawTabs(); |
1040 } | 1040 } |
1041 public override void setText (String string) { | 1041 public override void setText (String string) { |
1042 checkWidget(); | 1042 checkWidget(); |
1043 if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); | 1043 // DWT extension: allow null for zero length string |
1044 if (string==getText()) return; | 1044 //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); |
1045 if (string.equals (getText())) return; | |
1045 super.setText(string); | 1046 super.setText(string); |
1046 shortenedText = null; | 1047 shortenedText = null; |
1047 shortenedTextWidth = 0; | 1048 shortenedTextWidth = 0; |
1048 if (!parent.updateTabHeight(false)) { | 1049 if (!parent.updateTabHeight(false)) { |
1049 parent.updateItems(); | 1050 parent.updateItems(); |