Saturday, February 27, 2021

Glimmer DSL for SWT 4.18.5.4 Nested Shapes with Default Bounds

 Glimmer DSL for SWT v4.18.5.3 and v4.18.5.4 got released with the following big changes:

  • New Canvas Shape DSL support for Nested Shapes with Relative Positioning (you can now nest shapes like text glyphs within shapes like rectangle with x/y coordinates assumed as relative to parent, and if you move the parent, the children move with it)
  • Canvas Shape DSL bounding box for all shapes (e.g. `Shape#bounds` returns rectangular bounding box top-left location and dimensions for a polygon or pie arc)
  • Canvas Shape DSL default x/y are calculated as "centered within parent" when x/y coordinates are specified for shapes that have them as `:default`, `nil`, or left out altogether
  • Canvas Shape DSL default width/height of nested shape parent are calculated automatically when set to `:default`, `nil`, or left out altogether by encompassing all children's widths/heights to fit them all inside the parent shape
  • Hello, Canvas! Sample updates including thread-started Shape Data-Binding changes and Nested Shapes with default x, y, width, and height in some shapes. 

Screenshots of Hello, Canvas! Demoing Shape Data-Binding and Nested Shapes:




Hello, Canvas! Glimmer GUI DSL code:



Happy Glimmering!

No comments: