glimmer-dsl-swt 4.20.13.2 → 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: 3d2fa9af6ffbacb6449131175cd36971568e98ed763ac861d4126bb638c8f975
4
- data.tar.gz: ef23b0d547e1d42e2832f5f10c0b15b1c70ce3c8adb6b588b6b74dafa8b1e6de
3
+ metadata.gz: 9d49b7c8377c625821d745fe902daa4f2120a2f913aac28cc180a541b4d5e7b2
4
+ data.tar.gz: fa0600350138e85e73ddd25487890357080f0a7c5bf3d329b374239690ac9cec
5
5
  SHA512:
6
- metadata.gz: 58bfac7f7af0ef1de30e4d9db32fb8c218a272c6de892f0b59261e4c9e96458e1b50169e3ee8da96b2c686f05c8687ee79f801189a7eef3bd225bf42ad1e684c
7
- data.tar.gz: 7f5ee3e3f28e7a8bdd32aeea1ac18f20953480ba4dbed2e186e5c299f1af8de908c32df2ae3cfe417599b5b684725cbf06697ec3802e1ab4abddc43946adcf79
6
+ metadata.gz: d29652357d6e5cbcb667b69584f6bc50551d5a04733e799522945ec38a36456c6d2dadbe48c44f0646b46edeebc95f43f5b37e56701b6067fa18cf17adf65c64
7
+ data.tar.gz: 383f1cbae1582175c8047f25e6a03889f46099cda58d9c885d6a5a820bfc2fc3675e19cc3bda4f6760f8dd905814a69dafa54d230b62f7f9a2a7937e88a2b2b1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
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
+
8
+ ### 4.20.13.5
9
+
10
+ - Fix issue occurring with shape drag & drop when the dragged shape is a drop target too, thus getting dropped back to itself.
11
+
12
+ ### 4.20.13.4
13
+
14
+ - Improved shape drag and drop checking for inclusion in drop target when there are multiple drop targets
15
+
16
+ ### 4.20.13.3
17
+
18
+ - Fix issue regarding `nil` calculated_width/calculated_height encountered in Shape#contain?
19
+
3
20
  ### 4.20.13.2
4
21
 
5
22
  - Support `drop_event.doit = false` to deny dropping and move dragged shape back to where it was
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.2
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.2 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.2
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.2'
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.2
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.2
1
+ 4.20.13.6
Binary file
@@ -217,7 +217,7 @@ module Glimmer
217
217
  # some shapes may choose to provide a fuzz factor to make usage of this method for mouse clicking more user friendly
218
218
  def contain?(x, y)
219
219
  # assume a rectangular filled shape by default (works for several shapes like image, text, and focus)
220
- x.between?(self.absolute_x, self.absolute_x + calculated_width) && y.between?(self.absolute_y, self.absolute_y + calculated_height)
220
+ x.between?(self.absolute_x, self.absolute_x + calculated_width.to_f) && y.between?(self.absolute_y, self.absolute_y + calculated_height.to_f)
221
221
  end
222
222
 
223
223
  # Returns if shape includes a point. When the shape is filled, this is the same as contain. When the shape is drawn, it only returns true if the point lies on the edge (boundary/border)
@@ -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.dragged_shape
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,
@@ -605,7 +605,7 @@ module Glimmer
605
605
  y: event.y
606
606
  )
607
607
  begin
608
- shape_block.call(drop_event)
608
+ block.call(drop_event)
609
609
  rescue => e
610
610
  Glimmer::Config.logger.error e.full_message
611
611
  ensure
@@ -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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.13.2
4
+ version: 4.20.13.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-28 00:00:00.000000000 Z
11
+ date: 2021-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement