Changeset 201:889ad17c1fe1
- Timestamp:
- 03/08/08 08:01:38
(7 months ago)
- Author:
- Frank Benoit <benoit@tionex.de>
- branch:
- default
- Message:
Synced with dwt-win
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r152 |
r201 |
|
| 24 | 24 | import tango.text.Util; |
|---|
| 25 | 25 | import tango.util.Convert; |
|---|
| | 26 | import dwt.dwthelper.utils; |
|---|
| 26 | 27 | |
|---|
| 27 | 28 | /** |
|---|
| … | … | |
| 112 | 113 | } |
|---|
| 113 | 114 | |
|---|
| 114 | | protected override Point computeSize (Composite composite, int wHint, int hHint, bool flushCache) { |
|---|
| | 115 | override protected Point computeSize (Composite composite, int wHint, int hHint, bool flushCache) { |
|---|
| 115 | 116 | Control [] children = composite.getChildren (); |
|---|
| 116 | 117 | int count = children.length; |
|---|
| … | … | |
| 174 | 175 | } |
|---|
| 175 | 176 | |
|---|
| 176 | | protected override bool flushCache (Control control) { |
|---|
| | 177 | override protected bool flushCache (Control control) { |
|---|
| 177 | 178 | Object data = control.getLayoutData(); |
|---|
| 178 | 179 | if (data !is null) (cast(FillData)data).flushCache(); |
|---|
| … | … | |
| 187 | 188 | } |
|---|
| 188 | 189 | |
|---|
| 189 | | protected override void layout (Composite composite, bool flushCache) { |
|---|
| | 190 | override protected void layout (Composite composite, bool flushCache) { |
|---|
| 190 | 191 | Rectangle rect = composite.getClientArea (); |
|---|
| 191 | 192 | Control [] children = composite.getChildren (); |
|---|
| … | … | |
| 233 | 234 | * @return a string representation of the layout |
|---|
| 234 | 235 | */ |
|---|
| 235 | | public override char[] toString () { |
|---|
| | 236 | override public char[] toString () { |
|---|
| 236 | 237 | char[] string = getName () ~ " {"; |
|---|
| 237 | 238 | string ~= "type="~((type is DWT.VERTICAL) ? "DWT.VERTICAL" : "DWT.HORIZONTAL")~" "; |
|---|
| r150 |
r201 |
|
| 18 | 18 | import dwt.widgets.Control; |
|---|
| 19 | 19 | import dwt.layout.FormAttachment; |
|---|
| 20 | | import tango.text.Util; |
|---|
| 21 | 20 | |
|---|
| 22 | 21 | import tango.text.Util; |
|---|
| … | … | |
| 335 | 334 | * @return a string representation of the FormData object |
|---|
| 336 | 335 | */ |
|---|
| 337 | | public override char[] toString () { |
|---|
| | 336 | override public char[] toString () { |
|---|
| 338 | 337 | char[] string = getName()~" {"; |
|---|
| 339 | 338 | if (width !is DWT.DEFAULT) string ~= "width="~to!(char[])(width)~" "; |
|---|
| r152 |
r201 |
|
| 248 | 248 | } |
|---|
| 249 | 249 | |
|---|
| 250 | | protected override Point computeSize (Composite composite, int wHint, int hHint, bool flushCache) { |
|---|
| | 250 | override protected Point computeSize (Composite composite, int wHint, int hHint, bool flushCache) { |
|---|
| 251 | 251 | Point size = layout (composite, false, 0, 0, wHint, hHint, flushCache); |
|---|
| 252 | 252 | if (wHint !is DWT.DEFAULT) size.x = wHint; |
|---|
| … | … | |
| 255 | 255 | } |
|---|
| 256 | 256 | |
|---|
| 257 | | protected override bool flushCache (Control control) { |
|---|
| | 257 | override protected bool flushCache (Control control) { |
|---|
| 258 | 258 | Object data = control.getLayoutData (); |
|---|
| 259 | 259 | if (data !is null) (cast(FormData) data).flushCache (); |
|---|
| … | … | |
| 288 | 288 | } |
|---|
| 289 | 289 | |
|---|
| 290 | | protected override void layout (Composite composite, bool flushCache) { |
|---|
| | 290 | override protected void layout (Composite composite, bool flushCache) { |
|---|
| 291 | 291 | Rectangle rect = composite.getClientArea (); |
|---|
| 292 | 292 | int x = rect.x + marginLeft + marginWidth; |
|---|
| … | … | |
| 380 | 380 | * @return a string representation of the layout |
|---|
| 381 | 381 | */ |
|---|
| 382 | | public override char[] toString () { |
|---|
| | 382 | override public char[] toString () { |
|---|
| 383 | 383 | char[] string = getName ()~" {"; |
|---|
| 384 | 384 | if (marginWidth !is 0) string ~= "marginWidth="~to!(char[])(marginWidth)~" "; |
|---|
| r150 |
r201 |
|
| 517 | 517 | * @return a string representation of the GridData object |
|---|
| 518 | 518 | */ |
|---|
| 519 | | public override char[] toString () { |
|---|
| | 519 | override public char[] toString () { |
|---|
| 520 | 520 | char[] hAlign = ""; |
|---|
| 521 | 521 | switch (horizontalAlignment) { |
|---|
| r152 |
r201 |
|
| 171 | 171 | } |
|---|
| 172 | 172 | |
|---|
| 173 | | protected override Point computeSize (Composite composite, int wHint, int hHint, bool flushCache_) { |
|---|
| | 173 | override protected Point computeSize (Composite composite, int wHint, int hHint, bool flushCache_) { |
|---|
| 174 | 174 | Point size = layout (composite, false, 0, 0, wHint, hHint, flushCache_); |
|---|
| 175 | 175 | if (wHint !is DWT.DEFAULT) size.x = wHint; |
|---|
| … | … | |
| 178 | 178 | } |
|---|
| 179 | 179 | |
|---|
| 180 | | protected override bool flushCache (Control control) { |
|---|
| | 180 | override protected bool flushCache (Control control) { |
|---|
| 181 | 181 | Object data = control.getLayoutData (); |
|---|
| 182 | 182 | if (data !is null) (cast(GridData) data).flushCache (); |
|---|
| … | … | |
| 201 | 201 | } |
|---|
| 202 | 202 | |
|---|
| 203 | | protected override void layout (Composite composite, bool flushCache_) { |
|---|
| | 203 | override protected void layout (Composite composite, bool flushCache_) { |
|---|
| 204 | 204 | Rectangle rect = composite.getClientArea (); |
|---|
| 205 | 205 | layout (composite, true, rect.x, rect.y, rect.width, rect.height, flushCache_); |
|---|
| … | … | |
| 741 | 741 | * @return a string representation of the layout |
|---|
| 742 | 742 | */ |
|---|
| 743 | | public override char[] toString () { |
|---|
| | 743 | override public char[] toString () { |
|---|
| 744 | 744 | char[] string = getName ()~" {"; |
|---|
| 745 | 745 | if (numColumns !is 1) string ~= "numColumns="~to!(char[])(numColumns)~" "; |
|---|
| r150 |
r201 |
|
| 119 | 119 | * @return a string representation of the RowData object |
|---|
| 120 | 120 | */ |
|---|
| 121 | | public override char[] toString () { |
|---|
| | 121 | override public char[] toString () { |
|---|
| 122 | 122 | char[] string = getName ()~" {"; |
|---|
| 123 | 123 | if (width !is DWT.DEFAULT) string ~= "width="~to!(char[])(width)~" "; |
|---|
| r152 |
r201 |
|
| 195 | 195 | } |
|---|
| 196 | 196 | |
|---|
| 197 | | protected override Point computeSize (Composite composite, int wHint, int hHint, bool flushCache_) { |
|---|
| | 197 | override protected Point computeSize (Composite composite, int wHint, int hHint, bool flushCache_) { |
|---|
| 198 | 198 | Point extent; |
|---|
| 199 | 199 | if (type is DWT.HORIZONTAL) { |
|---|
| … | … | |
| 217 | 217 | } |
|---|
| 218 | 218 | |
|---|
| 219 | | protected override bool flushCache (Control control) { |
|---|
| | 219 | override protected bool flushCache (Control control) { |
|---|
| 220 | 220 | return true; |
|---|
| 221 | 221 | } |
|---|
| … | … | |
| 228 | 228 | } |
|---|
| 229 | 229 | |
|---|
| 230 | | protected override void layout (Composite composite, bool flushCache_) { |
|---|
| | 230 | override protected void layout (Composite composite, bool flushCache_) { |
|---|
| 231 | 231 | Rectangle clientArea = composite.getClientArea (); |
|---|
| 232 | 232 | if (type is DWT.HORIZONTAL) { |
|---|
| … | … | |
| 457 | 457 | * @return a string representation of the layout |
|---|
| 458 | 458 | */ |
|---|
| 459 | | public override char[] toString () { |
|---|
| | 459 | override public char[] toString () { |
|---|
| 460 | 460 | char[] string = getName ()~" {"; |
|---|
| 461 | 461 | string ~= "type="~((type !is DWT.HORIZONTAL) ? "DWT.VERTICAL" : "DWT.HORIZONTAL")~" "; |
|---|