glimmer-dsl-swt 4.20.13.5 → 4.20.13.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b15c41b36b1464cbcf34e302e630fce0a9e63f5512754c095d14e646dcc2c2b7
4
- data.tar.gz: 02addc76d6e2f275a1c79741f30bf6ba89087fc68e03cbb7ef29eb051cbd8b87
3
+ metadata.gz: 9d49b7c8377c625821d745fe902daa4f2120a2f913aac28cc180a541b4d5e7b2
4
+ data.tar.gz: fa0600350138e85e73ddd25487890357080f0a7c5bf3d329b374239690ac9cec
5
5
  SHA512:
6
- metadata.gz: 2e7595726d4f5c1657b547f2a893a1c83e1469b9ef20d336adb1f7e50a06ea6af69e71a30272dc24a6a50bf9d85cfa9fea558ddc9e1112ef1a6c43d53b011d3f
7
- data.tar.gz: 9ccd2bedd1040f95b1e12fdb4dbfac53bf96ade95290e4e1b3e168643843cb4340dc5ca892f3f405a91c77ac81032508a9a256d6eac3798dfdb70518d3804453
6
+ metadata.gz: d29652357d6e5cbcb667b69584f6bc50551d5a04733e799522945ec38a36456c6d2dadbe48c44f0646b46edeebc95f43f5b37e56701b6067fa18cf17adf65c64
7
+ data.tar.gz: 383f1cbae1582175c8047f25e6a03889f46099cda58d9c885d6a5a820bfc2fc3675e19cc3bda4f6760f8dd905814a69dafa54d230b62f7f9a2a7937e88a2b2b1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.20.13.6
4
+
5
+ - Ensure a dragged shape can be dropped back into a parent it originally belonged to without it counting as a drop into itself.
6
+ - Add set_data and get_data to Glimmer::UI::CustomShape, which proxies calls to body_root
7
+
3
8
  ### 4.20.13.5
4
9
 
5
10
  - Fix issue occurring with shape drag & drop when the dragged shape is a drop target too, thus getting dropped back to itself.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.20.13.4
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.20.13.6
2
2
  ## JRuby Desktop Development GUI Framework
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
4
4
  [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
@@ -15,7 +15,7 @@
15
15
  [<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
16
16
  Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) and [Chalmers/Gothenburg University Software Engineering Master's Lecture Material](http://www.cse.chalmers.se/~bergert/slides/guest_lecture_DSLs.pdf)
17
17
 
18
- [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.13.4 includes [SWT 4.20](https://download.eclipse.org/eclipse/downloads/drops4/R-4.20-202106111600/), which was released on June 11, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (report any issues you may encounter).
18
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.13.6 includes [SWT 4.20](https://download.eclipse.org/eclipse/downloads/drops4/R-4.20-202106111600/), which was released on June 11, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (report any issues you may encounter).
19
19
 
20
20
  **Starting in version 4.20.0.0, [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) comes with the new [***Shine***](/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#shine) syntax** for highly intuitive and visually expressive View/Model Attribute Mapping, relying on `<=>` for bidirectional (two-way) data-binding and `<=` for unidirectional (one-way) data-binding, providing an alternative to the `bind` keyword (keep in mind that it is still a beta, so default back to `bind` whenever needed).
21
21
 
@@ -326,7 +326,7 @@ jgem install glimmer-dsl-swt
326
326
 
327
327
  Or this command if you want a specific version:
328
328
  ```
329
- jgem install glimmer-dsl-swt -v 4.20.13.4
329
+ jgem install glimmer-dsl-swt -v 4.20.13.6
330
330
  ```
331
331
 
332
332
  `jgem` is JRuby's version of `gem` command.
@@ -354,7 +354,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
354
354
 
355
355
  Add the following to `Gemfile`:
356
356
  ```
357
- gem 'glimmer-dsl-swt', '~> 4.20.13.4'
357
+ gem 'glimmer-dsl-swt', '~> 4.20.13.6'
358
358
  ```
359
359
 
360
360
  And, then run:
@@ -375,7 +375,7 @@ glimmer
375
375
  ```
376
376
 
377
377
  ```
378
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.13.4
378
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.13.6
379
379
 
380
380
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
381
381
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.20.13.5
1
+ 4.20.13.6
Binary file
@@ -228,9 +228,9 @@ module Glimmer
228
228
  contain?(x, y)
229
229
  end
230
230
 
231
- def include_with_children?(x, y)
231
+ def include_with_children?(x, y, except_child: nil)
232
232
  included = include?(x, y)
233
- included ||= expanded_shapes.detect { |shape| shape.include?(x, y) }
233
+ included ||= expanded_shapes.reject {|shape| shape == except_child}.detect { |shape| shape.include?(x, y) }
234
234
  end
235
235
 
236
236
  # Indicates if a shape's x, y, width, height differ from its bounds calculation (e.g. arc / polygon)
@@ -592,7 +592,7 @@ module Glimmer
592
592
  if observation_request == 'on_drop'
593
593
  Shape.drop_shapes << self
594
594
  handle_observation_request('on_mouse_up') do |event|
595
- if Shape.dragging && !expanded_shapes.include?(Shape.dragged_shape) && include_with_children?(event.x, event.y)
595
+ if Shape.dragging && include_with_children?(event.x, event.y, except_child: Shape.dragged_shape)
596
596
  drop_event = DropEvent.new(
597
597
  doit: true,
598
598
  dragged_shape: Shape.dragged_shape,
@@ -264,6 +264,19 @@ module Glimmer
264
264
  body_root.handle_observation_request(observation_request, &block)
265
265
  end
266
266
 
267
+ # Sets data just like SWT widgets
268
+ def set_data(key=nil, value)
269
+ body_root.set_data(key, value)
270
+ end
271
+ alias setData set_data # for compatibility with SWT APIs
272
+
273
+ # Gets data just like SWT widgets
274
+ def get_data(key=nil)
275
+ body_root.get_data(key)
276
+ end
277
+ alias getData get_data # for compatibility with SWT APIs
278
+ alias data get_data # for compatibility with SWT APIs
279
+
267
280
  def method_missing(method, *args, &block)
268
281
  # TODO Consider supporting a glimmer error silencing option for methods defined here
269
282
  # but fail the glimmer DSL for the right reason to avoid seeing noise in the log output
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.13.5
4
+ version: 4.20.13.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh