glimmer-dsl-swt 4.20.9.1 → 4.20.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +5 -5
- data/VERSION +1 -1
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +4 -4
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer/dsl/swt/multiply_expression.rb +4 -1
- data/lib/glimmer/swt/transform_proxy.rb +13 -1
- data/samples/hello/hello_canvas_transform.rb +8 -7
- 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: d9e4926af5ca63c55c0c1dc038339964678641b28dfe0b868ef0907674b151dd
|
4
|
+
data.tar.gz: 5789d0ea80816b981f912deeadbcdd5d587a84d7669671f951983b225785a533
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c96b75dc0513e911bb0d925ecfaf76f979d9f65adf2efafaac161b622975b196c450df1300574c65913fce9ee077b96072845a578f7244c920b7a04e9c955651
|
7
|
+
data.tar.gz: 2956cc963363b9e428a3e07877e0fc7bc40c1e67ab38e5915da86ebc44f87fe2d360cd763ec2fe50565ba67891414ec0d241223740bcc9cd17f36907e45b60dd
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.20.10.0
|
4
|
+
|
5
|
+
- Support noun alternatives for `Canvas Transform DSL` operations:
|
6
|
+
- `multiply(&block)` => `multiplication(&block)`
|
7
|
+
- `invert` => `inversion`
|
8
|
+
- `rotate(angle)` => `rotation(angle)`
|
9
|
+
- `translate(x, y)` => `translation(x, y)`
|
10
|
+
|
3
11
|
### 4.20.9.1
|
4
12
|
|
5
13
|
- Fix issue with not being able to use :default x/y location with composite/custom shapes containing lines
|
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.
|
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.10.0
|
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.
|
18
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.10.0 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
|
|
@@ -347,7 +347,7 @@ jgem install glimmer-dsl-swt
|
|
347
347
|
|
348
348
|
Or this command if you want a specific version:
|
349
349
|
```
|
350
|
-
jgem install glimmer-dsl-swt -v 4.20.
|
350
|
+
jgem install glimmer-dsl-swt -v 4.20.10.0
|
351
351
|
```
|
352
352
|
|
353
353
|
`jgem` is JRuby's version of `gem` command.
|
@@ -375,7 +375,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
|
|
375
375
|
|
376
376
|
Add the following to `Gemfile`:
|
377
377
|
```
|
378
|
-
gem 'glimmer-dsl-swt', '~> 4.20.
|
378
|
+
gem 'glimmer-dsl-swt', '~> 4.20.10.0'
|
379
379
|
```
|
380
380
|
|
381
381
|
And, then run:
|
@@ -396,7 +396,7 @@ glimmer
|
|
396
396
|
```
|
397
397
|
|
398
398
|
```
|
399
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.
|
399
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.10.0
|
400
400
|
|
401
401
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
402
402
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.20.
|
1
|
+
4.20.10.0
|
@@ -2165,12 +2165,12 @@ The first 2 values represent the 1st row, the second 2 values represent the 2nd
|
|
2165
2165
|
|
2166
2166
|
Additionally, Transform operation keywords may be nested within the `transform` keyword to set its properties:
|
2167
2167
|
- `identity` resets transform to identity (no transformation)
|
2168
|
-
- `invert` inverts a transform
|
2169
|
-
- `multiply(&
|
2170
|
-
- `rotate(angle)` rotates by angle degrees
|
2168
|
+
- `invert` (alias: `inversion`) inverts a transform
|
2169
|
+
- `multiply(&transform_properties_block)` (alias: `multiplication`) multiplies by another transform (takes a block representing properties of another transform, no need for using the word transform again)
|
2170
|
+
- `rotate(angle)` (alias: `rotation`) rotates by angle degrees
|
2171
2171
|
- `scale(x, y)` scales a shape (stretch)
|
2172
2172
|
- `shear(x, y)` shear effect
|
2173
|
-
- `translate(x, y)` translate x and y coordinates (move)
|
2173
|
+
- `translate(x, y)` (alias: `translation`) translate x and y coordinates (move)
|
2174
2174
|
- `elements(m11, m12, m21, m22, dx, dy)` resets all values of the transform matrix (first 2 values represent the 1st row, second 2 values represent the 2nd row, the last 2 values represent translation on x and y axes)
|
2175
2175
|
|
2176
2176
|
Also, setting `transform` to `nil` after a previous `transform` has been set is like calling `identity`. It resets the transform.
|
data/glimmer-dsl-swt.gemspec
CHANGED
Binary file
|
@@ -31,7 +31,10 @@ module Glimmer
|
|
31
31
|
include ParentExpression
|
32
32
|
|
33
33
|
def can_interpret?(parent, keyword, *args, &block)
|
34
|
-
|
34
|
+
(
|
35
|
+
keyword == 'multiply' or
|
36
|
+
keyword == 'multiplication'
|
37
|
+
) and
|
35
38
|
parent.is_a?(Glimmer::SWT::TransformProxy)
|
36
39
|
end
|
37
40
|
|
@@ -34,6 +34,12 @@ module Glimmer
|
|
34
34
|
include_package 'org.eclipse.swt.graphics'
|
35
35
|
include_package 'org.eclipse.swt.widgets'
|
36
36
|
|
37
|
+
ATTRIBUTE_ALIASES = {
|
38
|
+
'rotation' => 'rotate',
|
39
|
+
'translation' => 'translate',
|
40
|
+
'inversion' => 'invert',
|
41
|
+
}
|
42
|
+
|
37
43
|
attr_reader :swt_transform, :parent
|
38
44
|
|
39
45
|
def initialize(parent, *args, swt_transform: nil, multiply: false)
|
@@ -81,10 +87,11 @@ module Glimmer
|
|
81
87
|
end
|
82
88
|
|
83
89
|
def has_attribute?(attribute_name, *args)
|
84
|
-
Glimmer::SWT::DisplayProxy.instance.auto_exec { @swt_transform.respond_to?(attribute_name) } || super
|
90
|
+
ATTRIBUTE_ALIASES.keys.include?(attribute_name.to_s) || Glimmer::SWT::DisplayProxy.instance.auto_exec { @swt_transform.respond_to?(attribute_name) } || super
|
85
91
|
end
|
86
92
|
|
87
93
|
def set_attribute(attribute_name, *args)
|
94
|
+
attribute_name = ATTRIBUTE_ALIASES[attribute_name.to_s] || attribute_name
|
88
95
|
if @swt_transform.respond_to?(attribute_name)
|
89
96
|
Glimmer::SWT::DisplayProxy.instance.auto_exec { @swt_transform.send(attribute_name, *args) }
|
90
97
|
else
|
@@ -92,6 +99,11 @@ module Glimmer
|
|
92
99
|
end
|
93
100
|
end
|
94
101
|
|
102
|
+
def get_attribute(attribute_name)
|
103
|
+
attribute_name = ATTRIBUTE_ALIASES[attribute_name.to_s] || attribute_name
|
104
|
+
super(attribute_name)
|
105
|
+
end
|
106
|
+
|
95
107
|
def method_missing(method_name, *args, &block)
|
96
108
|
result = Glimmer::SWT::DisplayProxy.instance.auto_exec { @swt_transform.send(method_name, *args, &block) }
|
97
109
|
result.nil? ? self : result
|
@@ -13,28 +13,29 @@ shell {
|
|
13
13
|
|
14
14
|
image(glimmer_logo, 0, 0) {
|
15
15
|
transform {
|
16
|
-
|
17
|
-
|
16
|
+
translation 110, 110
|
17
|
+
rotation 90
|
18
18
|
scale 0.21, 0.21
|
19
|
+
# also supports inversion, identity, shear, and multiplication {transform properties}
|
19
20
|
}
|
20
21
|
}
|
21
22
|
image(glimmer_logo, 0, 0) {
|
22
23
|
transform {
|
23
|
-
|
24
|
+
translation 110, 220
|
24
25
|
scale 0.21, 0.21
|
25
26
|
}
|
26
27
|
}
|
27
28
|
image(glimmer_logo, 0, 0) {
|
28
29
|
transform {
|
29
|
-
|
30
|
-
|
30
|
+
translation 220, 220
|
31
|
+
rotation 270
|
31
32
|
scale 0.21, 0.21
|
32
33
|
}
|
33
34
|
}
|
34
35
|
image(glimmer_logo, 0, 0) {
|
35
36
|
transform {
|
36
|
-
|
37
|
-
|
37
|
+
translation 220, 110
|
38
|
+
rotation 180
|
38
39
|
scale 0.21, 0.21
|
39
40
|
}
|
40
41
|
}
|