glimmer-dsl-swt 4.19.0.1 → 4.19.0.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 +5 -0
- data/README.md +6 -6
- data/VERSION +1 -1
- data/glimmer-dsl-swt.gemspec +0 -0
- data/samples/elaborate/mandelbrot_fractal.rb +10 -5
- data/samples/elaborate/meta_sample.rb +4 -2
- data/samples/elaborate/metronome.rb +1 -1
- data/samples/hello/hello_shape.rb +1 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93ec7af6cbc39ea5df42b33602473d8f8577cd1f1370e794f684ce059dab41ee
|
4
|
+
data.tar.gz: 0ade71e71e6c2255b3583737ef65264a3f1518de9e135abcca354b648b66e045
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 523b11fe2143376f5fe395c2b3eb3ca440fcf16851176874d0ea87c7f533d5f87251acab138ab81fa6c5c75f535de43c4fe5cb315c8a4f945e5d58b470a7ed3c
|
7
|
+
data.tar.gz: f16f441f4e2861de3b899d3992c83f99b4ec7da30a3f077f0191708ba8a7797c01bc3b68ee5a6b430b0e972d55005715277a0c445c323fff4bd99f44dcf9ae13
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.19.0.2
|
4
|
+
|
5
|
+
- Fixed issue with Meta-Sample code editing not showing changes properly (although recording them)
|
6
|
+
- Stop Mandelbrot Fractal sample background calculation when its custom shell is closed
|
7
|
+
|
3
8
|
### 4.19.0.1
|
4
9
|
|
5
10
|
- Upgrade to JRuby 9.2.17.0
|
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.19.0.
|
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.19.0.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)
|
@@ -10,12 +10,12 @@
|
|
10
10
|
|
11
11
|
**(The Original Glimmer Library Handling the World’s Ruby GUI Needs Since 2007. Beware of Imitators!)**
|
12
12
|
|
13
|
-
[Glimmer](https://github.com/AndyObtiva/glimmer) DSL for SWT is a native-GUI cross-platform desktop development library written in [JRuby](https://www.jruby.org/), an OS-threaded faster JVM version of [Ruby](https://www.ruby-lang.org/en/). [Glimmer](https://github.com/AndyObtiva/glimmer)'s main innovation is a declarative [Ruby DSL](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#glimmer-dsl-syntax) that enables productive and efficient authoring of desktop application user-interfaces by relying on the robust [Eclipse SWT library](https://www.eclipse.org/swt/). [Glimmer](https://rubygems.org/gems/glimmer) additionally innovates by having built-in [data-binding](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#data-binding) support, which greatly facilitates synchronizing the GUI with domain models, thus achieving true decoupling of object oriented components and enabling developers to solve business problems (test-first) without worrying about GUI concerns, or alternatively drive development GUI-first, and then write clean business models (test-first) afterwards. Not only does Glimmer provide a large set of GUI [widgets](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#widgets), but it also supports drawing Canvas Graphics like [Shapes](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#canvas-shape-dsl) and [Animations](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#canvas-animation-dsl). To get started quickly, [Glimmer](https://rubygems.org/gems/glimmer) offers [scaffolding](docs/reference/GLIMMER_COMMAND.md#scaffolding) options for [Apps](#in-production), [Gems](docs/reference/GLIMMER_COMMAND.md#custom-shell-gem), and [Custom Widgets](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#custom-widgets). [Glimmer](https://rubygems.org/gems/glimmer) also includes native-executable [packaging](docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md) support, sorely lacking in other libraries, thus enabling the delivery of desktop apps written in [Ruby](https://www.ruby-lang.org/en/) as truly native DMG/PKG/APP files on the [Mac](https://www.apple.com/ca/macos) + [App Store](https://developer.apple.com/macos/distribution/), MSI/EXE files on [Windows](https://www.microsoft.com/en-ca/windows), and [Gem Packaged Shell Scripts](docs/reference/GLIMMER_COMMAND.md#packaging) on [Linux](https://www.linux.org/). [Glimmer](https://github.com/AndyObtiva/glimmer) was the [first Ruby gem](https://rubygems.org/gems/glimmer) to bring [SWT](https://www.eclipse.org/swt/) (Standard Widget Toolkit) to [Ruby](https://www.ruby-lang.org/en/), thanks to its creator [Andy Maleh](https://andymaleh.blogspot.com/), an EclipseCon/EclipseWorld/RubyConf speaker and expert
|
13
|
+
[Glimmer](https://github.com/AndyObtiva/glimmer) DSL for SWT is a native-GUI cross-platform desktop development library written in [JRuby](https://www.jruby.org/), an OS-threaded faster JVM version of [Ruby](https://www.ruby-lang.org/en/). [Glimmer](https://github.com/AndyObtiva/glimmer)'s main innovation is a declarative [Ruby DSL](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#glimmer-dsl-syntax) that enables productive and efficient authoring of desktop application user-interfaces by relying on the robust [Eclipse SWT library](https://www.eclipse.org/swt/). [Glimmer](https://rubygems.org/gems/glimmer) additionally innovates by having built-in [data-binding](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#data-binding) support, which greatly facilitates synchronizing the GUI with domain models, thus achieving true decoupling of object oriented components and enabling developers to solve business problems (test-first) without worrying about GUI concerns, or alternatively drive development GUI-first, and then write clean business models (test-first) afterwards. Not only does Glimmer provide a large set of GUI [widgets](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#widgets), but it also supports drawing Canvas Graphics like [Shapes](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#canvas-shape-dsl) and [Animations](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#canvas-animation-dsl). To get started quickly, [Glimmer](https://rubygems.org/gems/glimmer) offers [scaffolding](docs/reference/GLIMMER_COMMAND.md#scaffolding) options for [Apps](#in-production), [Gems](docs/reference/GLIMMER_COMMAND.md#custom-shell-gem), and [Custom Widgets](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#custom-widgets). [Glimmer](https://rubygems.org/gems/glimmer) also includes native-executable [packaging](docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md) support, sorely lacking in other libraries, thus enabling the delivery of desktop apps written in [Ruby](https://www.ruby-lang.org/en/) as truly native DMG/PKG/APP files on the [Mac](https://www.apple.com/ca/macos) + [App Store](https://developer.apple.com/macos/distribution/), MSI/EXE files on [Windows](https://www.microsoft.com/en-ca/windows), and [Gem Packaged Shell Scripts](docs/reference/GLIMMER_COMMAND.md#packaging) on [Linux](https://www.linux.org/). [Glimmer](https://github.com/AndyObtiva/glimmer) was the [first Ruby gem](https://rubygems.org/gems/glimmer) to bring [SWT](https://www.eclipse.org/swt/) (Standard Widget Toolkit) to [Ruby](https://www.ruby-lang.org/en/), thanks to its creator [Andy Maleh](https://andymaleh.blogspot.com/), an EclipseCon/EclipseWorld/RubyConf speaker and expert.
|
14
14
|
|
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.19.0.
|
18
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.19.0.2 includes [SWT 4.19](https://download.eclipse.org/eclipse/downloads/drops4/R-4.19-202103031800/), which was released on March 3, 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.
|
19
19
|
|
20
20
|
[Glimmer DSL for SWT receives two updates per month](https://rubygems.org/gems/glimmer-dsl-swt/versions). You can trust [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) with your Ruby desktop GUI development needs! [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) brings great ideas to the table, such as declarative programming via domain specific languages, currently under-utilized in the GUI domain. That said, it may not be feature complete enough for everybody's needs, so please help make [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) even better by providing feedback and [contributing](#contributing) when possible. The project is very active, so any feature suggestions that are accepted could be implemented within weeks if not days. Also, you are welcome to [hire me](#hire-me) full-time if you want long-term development of [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) for your project needs.
|
21
21
|
|
@@ -342,7 +342,7 @@ jgem install glimmer-dsl-swt
|
|
342
342
|
|
343
343
|
Or this command if you want a specific version:
|
344
344
|
```
|
345
|
-
jgem install glimmer-dsl-swt -v 4.19.0.
|
345
|
+
jgem install glimmer-dsl-swt -v 4.19.0.2
|
346
346
|
```
|
347
347
|
|
348
348
|
`jgem` is JRuby's version of `gem` command.
|
@@ -370,7 +370,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
|
|
370
370
|
|
371
371
|
Add the following to `Gemfile`:
|
372
372
|
```
|
373
|
-
gem 'glimmer-dsl-swt', '~> 4.19.0.
|
373
|
+
gem 'glimmer-dsl-swt', '~> 4.19.0.2'
|
374
374
|
```
|
375
375
|
|
376
376
|
And, then run:
|
@@ -391,7 +391,7 @@ glimmer
|
|
391
391
|
```
|
392
392
|
|
393
393
|
```
|
394
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.19.0.
|
394
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.19.0.2
|
395
395
|
|
396
396
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
397
397
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.19.0.
|
1
|
+
4.19.0.2
|
data/glimmer-dsl-swt.gemspec
CHANGED
Binary file
|
@@ -103,7 +103,7 @@ class Mandelbrot
|
|
103
103
|
puts "Points calculated already. Returning previously calculated points..."
|
104
104
|
return @points
|
105
105
|
end
|
106
|
-
thread_pool = Concurrent::FixedThreadPool.new(Mandelbrot.processor_count, fallback_policy: :discard)
|
106
|
+
@thread_pool = Concurrent::FixedThreadPool.new(Mandelbrot.processor_count, fallback_policy: :discard)
|
107
107
|
@points = Concurrent::Array.new(height)
|
108
108
|
Mandelbrot.work_in_progress = "Calculating Mandelbrot Points for Zoom #{zoom}x"
|
109
109
|
Mandelbrot.progress = 0
|
@@ -112,15 +112,15 @@ class Mandelbrot
|
|
112
112
|
height.times do |y|
|
113
113
|
@points[y] ||= Concurrent::Array.new(width)
|
114
114
|
width.times do |x|
|
115
|
-
thread_pool.post do
|
115
|
+
@thread_pool.post do
|
116
116
|
@points[y][x] = calculate(x_array[x], y_array[y]).last
|
117
117
|
point_index += 1
|
118
118
|
Mandelbrot.progress += 1 if (point_index.to_f / point_count.to_f)*PROGRESS_MAX >= Mandelbrot.progress
|
119
119
|
end
|
120
120
|
end
|
121
121
|
end
|
122
|
-
thread_pool.shutdown
|
123
|
-
thread_pool.wait_for_termination
|
122
|
+
@thread_pool.shutdown
|
123
|
+
@thread_pool.wait_for_termination
|
124
124
|
Mandelbrot.progress = PROGRESS_MAX
|
125
125
|
@points_calculated = true
|
126
126
|
@points
|
@@ -164,7 +164,7 @@ class MandelbrotFractal
|
|
164
164
|
}
|
165
165
|
# pre-calculate zoomed mandelbrot images even before the user zooms in
|
166
166
|
puts 'Starting background calculation thread...'
|
167
|
-
Thread.new {
|
167
|
+
@thread = Thread.new {
|
168
168
|
future_zoom = 1.5
|
169
169
|
loop {
|
170
170
|
puts "Creating mandelbrot for background calculation at zoom: #{future_zoom}"
|
@@ -183,6 +183,11 @@ class MandelbrotFractal
|
|
183
183
|
text bind(self, :mandelbrot_shell_title)
|
184
184
|
minimum_size mandelbrot.width + 29, mandelbrot.height + 77
|
185
185
|
image @mandelbrot_image
|
186
|
+
|
187
|
+
on_shell_closed {
|
188
|
+
@thread.kill # should not be dangerous in this case
|
189
|
+
puts "Mandelbrot background calculation stopped!"
|
190
|
+
}
|
186
191
|
|
187
192
|
progress_bar {
|
188
193
|
layout_data :fill, :center, true, false
|
@@ -46,6 +46,7 @@ class HelloShape
|
|
46
46
|
}
|
47
47
|
|
48
48
|
# method-based custom shape using `shape` keyword as a composite shape containing nested shapes
|
49
|
+
# See HelloCustomShape sample for a class-based custom shape alternative that enables extracting custom shape to a separate class/file
|
49
50
|
def stick_figure(x, y, width, height, &block)
|
50
51
|
head_width = width*0.2
|
51
52
|
head_height = height*0.2
|
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.19.0.
|
4
|
+
version: 4.19.0.2
|
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-
|
11
|
+
date: 2021-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -343,7 +343,9 @@ description: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) is a
|
|
343
343
|
Glimmer also includes native-executable packaging support, sorely lacking in other
|
344
344
|
libraries, thus enabling the delivery of desktop apps written in Ruby as truly native
|
345
345
|
DMG/PKG/APP files on the Mac + App Store, MSI/EXE files on Windows, and Gem Packaged
|
346
|
-
Shell Scripts on Linux.
|
346
|
+
Shell Scripts on Linux. Glimmer was the first Ruby gem to bring SWT (Standard Widget
|
347
|
+
Toolkit) to Ruby, thanks to its creator Andy Maleh, an EclipseCon/EclipseWorld/RubyConf
|
348
|
+
speaker and expert.
|
347
349
|
email: andy.am@gmail.com
|
348
350
|
executables:
|
349
351
|
- glimmer
|