glimmer-dsl-swt 4.20.13.1 → 4.20.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +5 -5
- data/VERSION +1 -1
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer/swt/custom/shape.rb +7 -1
- data/samples/hello/hello_canvas_drag_and_drop.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d2fa9af6ffbacb6449131175cd36971568e98ed763ac861d4126bb638c8f975
|
4
|
+
data.tar.gz: ef23b0d547e1d42e2832f5f10c0b15b1c70ce3c8adb6b588b6b74dafa8b1e6de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58bfac7f7af0ef1de30e4d9db32fb8c218a272c6de892f0b59261e4c9e96458e1b50169e3ee8da96b2c686f05c8687ee79f801189a7eef3bd225bf42ad1e684c
|
7
|
+
data.tar.gz: 7f5ee3e3f28e7a8bdd32aeea1ac18f20953480ba4dbed2e186e5c299f1af8de908c32df2ae3cfe417599b5b684725cbf06697ec3802e1ab4abddc43946adcf79
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.20.13.2
|
4
|
+
|
5
|
+
- Support `drop_event.doit = false` to deny dropping and move dragged shape back to where it was
|
6
|
+
|
3
7
|
### 4.20.13.1
|
4
8
|
|
5
9
|
- Supporting having a `drag_source` that is dragged and not dropped at a target go back to its original position
|
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.
|
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
|
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.
|
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).
|
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.
|
329
|
+
jgem install glimmer-dsl-swt -v 4.20.13.2
|
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.
|
357
|
+
gem 'glimmer-dsl-swt', '~> 4.20.13.2'
|
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.
|
378
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.13.2
|
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.
|
1
|
+
4.20.13.2
|
data/glimmer-dsl-swt.gemspec
CHANGED
Binary file
|
@@ -62,7 +62,7 @@ module Glimmer
|
|
62
62
|
class Shape
|
63
63
|
include Properties
|
64
64
|
|
65
|
-
DropEvent = Struct.new(:x, :y, :dragged_shape, :dragged_shape_original_x, :dragged_shape_original_y, :dragging_x, :dragging_y, :drop_shapes, keyword_init: true)
|
65
|
+
DropEvent = Struct.new(:doit, :x, :y, :dragged_shape, :dragged_shape_original_x, :dragged_shape_original_y, :dragging_x, :dragging_y, :drop_shapes, keyword_init: true)
|
66
66
|
|
67
67
|
class << self
|
68
68
|
attr_accessor :dragging, :dragging_x, :dragging_y, :dragged_shape, :dragged_shape_original_x, :dragged_shape_original_y
|
@@ -594,6 +594,7 @@ module Glimmer
|
|
594
594
|
handle_observation_request('on_mouse_up') do |event|
|
595
595
|
if Shape.dragged_shape
|
596
596
|
drop_event = DropEvent.new(
|
597
|
+
doit: true,
|
597
598
|
dragged_shape: Shape.dragged_shape,
|
598
599
|
dragged_shape_original_x: Shape.dragged_shape_original_x,
|
599
600
|
dragged_shape_original_y: Shape.dragged_shape_original_y,
|
@@ -609,6 +610,10 @@ module Glimmer
|
|
609
610
|
Glimmer::Config.logger.error e.full_message
|
610
611
|
ensure
|
611
612
|
Shape.dragging = false
|
613
|
+
if !drop_event.doit && Shape.dragged_shape
|
614
|
+
Shape.dragged_shape.x = Shape.dragged_shape_original_x
|
615
|
+
Shape.dragged_shape.y = Shape.dragged_shape_original_y
|
616
|
+
end
|
612
617
|
Shape.dragged_shape = nil
|
613
618
|
end
|
614
619
|
end
|
@@ -776,6 +781,7 @@ module Glimmer
|
|
776
781
|
shapes.dup.each {|shape| shape.dispose(dispose_images: dispose_images, dispose_patterns: dispose_patterns, redraw: false) }
|
777
782
|
end
|
778
783
|
end
|
784
|
+
alias dispose_shapes clear_shapes
|
779
785
|
|
780
786
|
# Indicate if this is a container shape (meaning a shape bag that is just there to contain nested shapes, but doesn't render anything of its own)
|
781
787
|
def container?
|
@@ -63,6 +63,7 @@ class HelloCanvasDragAndDrop
|
|
63
63
|
|
64
64
|
on_drop do |drop_event|
|
65
65
|
# drop_event attributes: :x, :y, :dragged_shape, :dragged_shape_original_x, :dragged_shape_original_y, :dragging_x, :dragging_y, :drop_shapes
|
66
|
+
# drop_event.doit = false # drop event can be cancelled by setting doit attribute to false
|
66
67
|
ball_count = @number_shape.string.to_i
|
67
68
|
@number_shape.dispose
|
68
69
|
@drop_square.content {
|