comparison dwt/custom/SashForm.d @ 240:ce446666f5a2

Update to SWT 3.4M7
author Frank Benoit <benoit@tionex.de>
date Mon, 12 May 2008 19:13:01 +0200
parents 08789b28bdf3
children c0d810de7093
comparison
equal deleted inserted replaced
239:06a1f6829310 240:ce446666f5a2
108 * @return DWT.HORIZONTAL or DWT.VERTICAL 108 * @return DWT.HORIZONTAL or DWT.VERTICAL
109 */ 109 */
110 public int getOrientation() { 110 public int getOrientation() {
111 //checkWidget(); 111 //checkWidget();
112 return (sashStyle & DWT.VERTICAL) !is 0 ? DWT.HORIZONTAL : DWT.VERTICAL; 112 return (sashStyle & DWT.VERTICAL) !is 0 ? DWT.HORIZONTAL : DWT.VERTICAL;
113 }
114 /**
115 * Returns the width of the sashes when the controls in the SashForm are
116 * laid out.
117 *
118 * @return the width of the sashes
119 *
120 * @exception DWTException <ul>
121 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
122 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
123 * </ul>
124 *
125 * @since 3.4
126 */
127 public int getSashWidth() {
128 checkWidget();
129 return SASH_WIDTH;
113 } 130 }
114 public override int getStyle() { 131 public override int getStyle() {
115 int style = super.getStyle(); 132 int style = super.getStyle();
116 style |= getOrientation() is DWT.VERTICAL ? DWT.VERTICAL : DWT.HORIZONTAL; 133 style |= getOrientation() is DWT.VERTICAL ? DWT.VERTICAL : DWT.HORIZONTAL;
117 if ((sashStyle & DWT.SMOOTH) !is 0) style |= DWT.SMOOTH; 134 if ((sashStyle & DWT.SMOOTH) !is 0) style |= DWT.SMOOTH;
358 maxControl = control; 375 maxControl = control;
359 layout(false); 376 layout(false);
360 } 377 }
361 378
362 /** 379 /**
380 * Specify the width of the sashes when the controls in the SashForm are
381 * laid out.
382 *
383 * @param width the width of the sashes
384 *
385 * @exception DWTException <ul>
386 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
387 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
388 * </ul>
389 *
390 * @since 3.4
391 */
392 public void setSashWidth(int width) {
393 checkWidget();
394 if (SASH_WIDTH is width) return;
395 SASH_WIDTH = width;
396 layout(false);
397 }
398 /**
363 * Specify the relative weight of each child in the SashForm. This will determine 399 * Specify the relative weight of each child in the SashForm. This will determine
364 * what percent of the total width (if SashForm has Horizontal orientation) or 400 * what percent of the total width (if SashForm has Horizontal orientation) or
365 * total height (if SashForm has Vertical orientation) each control will occupy. 401 * total height (if SashForm has Vertical orientation) each control will occupy.
366 * The weights must be positive values and there must be an entry for each 402 * The weights must be positive values and there must be an entry for each
367 * non-sash child of the SashForm. 403 * non-sash child of the SashForm.