glimmer-dsl-swt 4.24.0.2 → 4.24.1.0

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: b4fbbf7e487d4ee6667d7b9b30833ce767ae9c14c0cfd90c893f40269a8d8c2e
4
- data.tar.gz: 49750266d23f5a59e4123aaa02b9864c6907366e6be70dcac69b0ef5c96aabc7
3
+ metadata.gz: 4ed904011b359114245bc0485e75023e038fa9b208a2a818aaba46b923e94f4c
4
+ data.tar.gz: 0a1d365ab053b96ee367716aedb6a1ecf4a2057fa051736709c1dce8f87914a1
5
5
  SHA512:
6
- metadata.gz: 36d166223378ffa459eb42d2154432be06c4efe7305ffeaa34683476fa08267bf6dd94c2ba5056a8b534fbdedbeda8aa5702a6f5bb6baec593461d9fb2f66547
7
- data.tar.gz: 55736839c473741195ac69ac63ed0e01efebb6d9c3867f77756172e8b636fa8f1c69c97a7fe46827112a72cd0c73b11cabfa2df11c65a1ee4886307b98d1faff
6
+ metadata.gz: bd0c8206fd81b65e1df28ed4cfa65c3926a79fa5481d7952b8c79b4e2fe8df3b05038ff8d027b5cd0e719fc2343daf9a90b4a70ef26e11919f90b7deb32fd76f
7
+ data.tar.gz: 2ba445c625a88d29701f7d7a37e92c6da6e3aa7c202eee23207ca7f723133fcc80484697d2e9e708b5b8c1c47fd19e9afeb1ba9f2e16746c6b7903719624489d
data/CHANGELOG.md CHANGED
@@ -1,8 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.24.1.0
4
+
5
+ - Upgrade to JRuby 9.3.6.0
6
+ - Speed up app scaffolding by dropping packaging from the scaffolding steps as there is no point in packaging an unfinished product
7
+ - Refactor/simplify Hello, Canvas Path!
8
+
3
9
  ## 4.24.0.2
4
10
 
5
- - Extend Hello, Canvas Data-Binding! to support quadratic bezier curves, cubic bezier curves, and Drag & Drop of endpoints / control points
11
+ - Update Hello, Canvas Data-Binding! to support quadratic bezier curves, cubic bezier curves, and Drag & Drop of endpoints / control points
6
12
  - Fix issue with data-binding `quad` & `cubic` path shape `point_array`
7
13
 
8
14
  ## 4.24.0.1
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.24.0.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.24.1.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)
@@ -19,7 +19,7 @@ Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) an
19
19
 
20
20
  ![Eclipse SWT RCP NASA Mars Rover](/images/glimmer-eclipse-swt-rcp-nasa-mars-rover.png)
21
21
 
22
- [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.24.0.2 includes [SWT 4.24](https://download.eclipse.org/eclipse/downloads/drops4/R-4.24-202206070700/), which was released on June 7, 2022. 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.
22
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.24.1.0 includes [SWT 4.24](https://download.eclipse.org/eclipse/downloads/drops4/R-4.24-202206070700/), which was released on June 7, 2022. 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.
23
23
 
24
24
  **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. That was [originally conceived back in 2007](https://andymaleh.blogspot.com/2007/12/data-shining-in-glimmer.html).
25
25
 
@@ -306,7 +306,7 @@ https://www.eclipse.org/swt/faq.php
306
306
 
307
307
  - JDK 18 is recommended / Minimum is JDK 16 on x64 platforms and Linux AARCH64, and JDK 17 on Mac ARM64 (find at https://www.oracle.com/java/technologies/downloads / Ensure `PATH` env var includes Java bin directory for `jpackage` command to work when packaging Glimmer applications / Preferably setup `JAVA_HOME` env var too to point to JDK home directory before installing JRuby)
308
308
  - [RVM](http://rvm.io) on Mac & Linux (not needed on Windows)
309
- - JRuby 9.3.4.0 (supporting Ruby 2.6.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.3.4.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
309
+ - JRuby 9.3.6.0 (supporting Ruby 2.6.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.3.6.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
310
310
  - SWT 4.24 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem). Note that SWT supports ARM64/AARCH64 on Mac and Linux since version 4.20
311
311
  - Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
312
312
 
@@ -336,7 +336,7 @@ jgem install glimmer-dsl-swt
336
336
 
337
337
  Or this command if you want a specific version:
338
338
  ```
339
- jgem install glimmer-dsl-swt -v 4.24.0.2
339
+ jgem install glimmer-dsl-swt -v 4.24.1.0
340
340
  ```
341
341
 
342
342
  `jgem` is JRuby's version of `gem` command.
@@ -364,7 +364,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
364
364
 
365
365
  Add the following to `Gemfile`:
366
366
  ```
367
- gem 'glimmer-dsl-swt', '~> 4.24.0.2'
367
+ gem 'glimmer-dsl-swt', '~> 4.24.1.0'
368
368
  ```
369
369
 
370
370
  And, then run:
@@ -387,7 +387,7 @@ glimmer
387
387
  ```
388
388
 
389
389
  ```
390
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.24.0.2
390
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.24.1.0
391
391
 
392
392
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
393
393
 
data/RUBY_VERSION CHANGED
@@ -1 +1 @@
1
- jruby-9.3.4.0
1
+ jruby-9.3.6.0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.24.0.2
1
+ 4.24.1.0
@@ -1077,7 +1077,7 @@ You may check out a more full-fledged example in [Hello, Sash Form!](/docs/refer
1077
1077
 
1078
1078
  ![Hello Browser](/images/glimmer-hello-browser.png)
1079
1079
 
1080
- Glimmer supports the [SWT Browser widget](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html), which can load URLs or render HTML. It can even be instrumented with JavaScript when needed (though highly discouraged since it defeats the purpose of using Ruby except in very rare cases like leveraging a pre-existing web codebase in a desktop app).
1080
+ Glimmer DSL for SWT includes a basic [SWT Browser widget](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html), which can load URLs or render HTML. It supports WebKit, IE, and Edge browsers out of the box. Its JavaScript engine can even be instrumented with Ruby code if needed.
1081
1081
 
1082
1082
  Example loading a URL (you may copy/paste in [`girb`](GLIMMER_GIRB.md)):
1083
1083
 
@@ -1114,7 +1114,11 @@ shell {
1114
1114
 
1115
1115
  This relies on Glimmer's [Multi-DSL Support](#multi-dsl-support) for building the HTML text using [Glimmer XML DSL](https://github.com/AndyObtiva/glimmer-dsl-xml).
1116
1116
 
1117
- Learn more at the [SWT Browser widget](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html) API.
1117
+ Learn more at:
1118
+ - [SWT Browser API](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html)
1119
+ - [SWT Browser FAQ](https://www.eclipse.org/swt/faq.php#whatisbrowser).
1120
+
1121
+ The built-in basic SWT `browser` widget might not satisfy all your needs. If so, consider the advanced 3rd-party browser widget [JxBrowser](https://www.teamdev.com/jxbrowser), which utilizes Google Chromium.
1118
1122
 
1119
1123
  ### Widget Styles
1120
1124
 
@@ -3562,7 +3566,7 @@ As they say, there are many ways to skin a cat! This is in line with the Ruby wa
3562
3566
 
3563
3567
  ### Canvas Path DSL
3564
3568
 
3565
- Unlike common imperative GUI graphing toolkits, Glimmer enables declarative rendering of paths with the new Canvas Path DSL (Early Alpha) via the new `path { }` keyword and by nesting one of the following path segment keywords underneath:
3569
+ Unlike common imperative GUI graphing toolkits, Glimmer enables declarative rendering of paths with the Canvas Path DSL via the new `path { }` keyword and by nesting one of the following path segment keywords underneath:
3566
3570
  - `point(x1, y1)`: renders a Point (Dot) as part of a path.
3567
3571
  - `line(x1, y1, x2=nil, y2=nil)`: renders a Line as part of a path. If you drop x2, y2, it joins to the previous point automatically. You may repeat for a series of lines forming a curve.
3568
3572
  - `quad(x1, y1, x2, y2, x3=nil, y3=nil)`: renders a Quadratic Bezier Curve. If you drop x3 and y3, it joins to the previous point automatically.
Binary file
@@ -195,16 +195,12 @@ module Glimmer
195
195
  system "bash -c '#{RVM_FUNCTION}\n cd .\n bundle\n rspec --init\n'"
196
196
  end
197
197
  write 'spec/spec_helper.rb', spec_helper_file
198
- if OS.windows?
199
- system "glimmer package" # TODO handle Windows with batch file
200
- system "\"packages/bundles/#{human_name(app_name)}/#{human_name(app_name)}.exe\""
198
+ if OS.mac?
199
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
200
+ elsif OS.linux?
201
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
201
202
  else
202
- system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer package\n'"
203
- if OS.mac?
204
- system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
205
- else
206
- system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
207
- end
203
+ system "glimmer run"
208
204
  end
209
205
  end
210
206
 
@@ -294,16 +290,12 @@ module Glimmer
294
290
  cp File.expand_path('../../../../icons/scaffold_app.png', __FILE__), icon_file
295
291
  puts "Created #{current_dir_name}/#{icon_file}"
296
292
 
297
- if OS.windows?
298
- system "glimmer package" # TODO handle windows properly with batch file
299
- system "\"packages/bundles/#{human_name(custom_shell_name)}/#{human_name(custom_shell_name)}.exe\""
293
+ if OS.mac?
294
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
295
+ elsif OS.linux?
296
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
300
297
  else
301
- system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer package\n'"
302
- if OS.mac?
303
- system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
304
- else
305
- system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
306
- end
298
+ system "glimmer run"
307
299
  end
308
300
  puts "Finished creating #{gem_name} Ruby gem."
309
301
  puts 'Edit Rakefile to configure gem details.'
@@ -22,3 +22,4 @@ Hello, Tray Item!: VYXgIr5zxMM
22
22
  Hello, Drag And Drop!: zJSG5ysow0M
23
23
  Hello, Canvas Drag And Drop!: e7taTbRrDAM
24
24
  Game Of Life: pDE79YRjOjs
25
+ Hello, Canvas Data Binding!: PQ_Y8e5VeDo
@@ -20,101 +20,105 @@
20
20
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
22
  require 'glimmer-dsl-swt'
23
-
24
- include Glimmer
25
-
26
- shell {
27
- grid_layout {
28
- margin_width 0
29
- margin_height 0
30
- margin_top 5
31
- }
32
- text 'Hello, Canvas Path!'
33
- minimum_size 800, 700
34
-
35
- @button = button {
36
- layout_data :center, :center, true, false
37
- text 'Regenerate'
38
- enabled false
39
-
40
- on_widget_selected do
41
- @regenerate = true
42
- @button.enabled = false
43
- end
44
- }
45
- canvas {
46
- layout_data :fill, :fill, true, true
47
- background :white
48
-
49
- text('line', 15, 200) {
50
- foreground :red
51
- }
52
- @path1 = path {
53
- antialias :on
54
- foreground :red
55
- }
56
-
57
- text('quad', 15, 300) {
58
- foreground :dark_green
59
- }
60
- @path2 = path {
61
- antialias :on
62
- foreground :dark_green
63
- }
23
+
24
+ class HelloCanvasPath
25
+ include Glimmer::UI::Application
64
26
 
65
- text('cubic', 15, 400) {
66
- foreground :blue
67
- }
68
- @path3 = path {
69
- antialias :on
70
- foreground :blue
27
+ after_body do
28
+ regenerate
29
+ end
30
+
31
+ body {
32
+ shell {
33
+ grid_layout {
34
+ margin_width 0
35
+ margin_height 0
36
+ margin_top 5
37
+ }
38
+
39
+ text 'Hello, Canvas Path!'
40
+ minimum_size 800, 700
41
+
42
+ @button = button {
43
+ layout_data :center, :center, true, false
44
+
45
+ text 'Regenerate'
46
+ enabled false
47
+
48
+ on_widget_selected do
49
+ regenerate
50
+ end
51
+ }
52
+
53
+ canvas {
54
+ layout_data :fill, :fill, true, true
55
+ background :white
56
+
57
+ text('line', 15, 200) {
58
+ foreground :red
59
+ }
60
+ @path1 = path {
61
+ antialias :on
62
+ foreground :red
63
+ }
64
+
65
+ text('quad', 15, 300) {
66
+ foreground :dark_green
67
+ }
68
+ @path2 = path {
69
+ antialias :on
70
+ foreground :dark_green
71
+ }
72
+
73
+ text('cubic', 15, 400) {
74
+ foreground :blue
75
+ }
76
+ @path3 = path {
77
+ antialias :on
78
+ foreground :blue
79
+ }
80
+ }
81
+
82
+ on_widget_disposed do
83
+ # safe to kill thread as data is in memory only, so no risk of data loss
84
+ @thread.kill
85
+ end
71
86
  }
72
87
  }
73
88
 
74
- on_swt_show do
75
- @regenerate = true
89
+ def regenerate
76
90
  @thread = Thread.new do
77
- loop do
78
- if @regenerate
79
- @regenerate = false
80
- @path1.clear
81
- @path2.clear
82
- @path3.clear
83
- y1 = y2 = y3 = 300
84
- 700.times.each do |x|
85
- x += 55
86
- x1 = x - 2
87
- x2 = x - 1
88
- x3 = x
89
- y1 = y3
90
- y2 = y1
91
- y3 = [[y3 + (rand*24 - 12), 0].max, 700].min
92
- @path1.content {
93
- line(x1, y1 - 100)
94
- }
95
- if x % 2 == 0
96
- @path2.content {
97
- quad(x1, y1, x2, y2)
98
- }
99
- end
100
- if x % 3 == 0
101
- @path3.content {
102
- cubic(x1, y1 + 100, x2, y2 + 100, x3, y3 + 100)
103
- }
104
- end
105
- sleep(0.01)
106
- end
107
- @button.enabled = true
91
+ @button.enabled = false
92
+ @path1.clear
93
+ @path2.clear
94
+ @path3.clear
95
+ y1 = y2 = y3 = 300
96
+ 700.times.each do |x|
97
+ x += 55
98
+ x1 = x - 2
99
+ x2 = x - 1
100
+ x3 = x
101
+ y1 = y3
102
+ y2 = y1
103
+ y3 = [[y3 + (rand*24 - 12), 0].max, 700].min
104
+ @path1.content {
105
+ line(x1, y1 - 100)
106
+ }
107
+ if x % 2 == 0
108
+ @path2.content {
109
+ quad(x1, y1, x2, y2)
110
+ }
108
111
  end
109
- sleep(0.1)
112
+ if x % 3 == 0
113
+ @path3.content {
114
+ cubic(x1, y1 + 100, x2, y2 + 100, x3, y3 + 100)
115
+ }
116
+ end
117
+ sleep(0.01)
110
118
  end
111
-
119
+ @button.enabled = true
112
120
  end
113
-
114
121
  end
115
-
116
- on_widget_disposed do
117
- @thread.kill # safe to kill since data is in memory only
118
- end
119
-
120
- }.open
122
+ end
123
+
124
+ HelloCanvasPath.launch
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.24.0.2
4
+ version: 4.24.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-15 00:00:00.000000000 Z
11
+ date: 2022-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement