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