glimmer-dsl-swt 4.18.2.0 → 4.18.2.5

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: beefdf4e3985d47de8a553ea073466812c89a738a1efa691bac62a9d375bb5b9
4
- data.tar.gz: ed6373191af3b73886ae171313d0fbcd279205c883f887e2c940cbc0318275a3
3
+ metadata.gz: 6d0dbd3170cb9c04be90cd8d7cfa83a68c491eaa89d3752d2ab5ac8d1e5f22c4
4
+ data.tar.gz: 368a549d962ecd554a02c2257c05e476f7b6b3843193b5a7197a9725ed74e9aa
5
5
  SHA512:
6
- metadata.gz: 52eaa3d36b54333a9c457233a00de3975c3e932f99ef7b9b484fdff20c6f96ea2b7465a63f6e2cc46b91b86a3631edef913643b2303103fc2901920402459bea
7
- data.tar.gz: 84273ec05bc34a8a233d403edba5ad372a631560252cfec36d3d5bd200410a1a0f9184e07ebb77d0241ae3ea723d6c7575f7441575a61115f53d9c302fb54fb5
6
+ metadata.gz: 18ce78d054b799add79df4a7536237a863b1a9b408498af4d78e899575f2784921b15af7364f287921ddfe5223810845d1ec4b6b39b02f55106ea27ad6a9041a
7
+ data.tar.gz: be2ad49fabf44c811eb153293bf26b6dbb922ad0a757b06f110bbe014b6f9a2a87a5f4ac5a263f8ed11f125bd4754685ec07c6e1bfeef10dd2b4d66338db8814
@@ -1,5 +1,42 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.18.2.5
4
+
5
+ - ColorProxy args now are automatically fit into 0..255 bounds upon use of the `color`/`rgb`/`rgba` keywords
6
+ - Canvas Shape DSL (Property) Data-Binding support (No Argument Data-Binding support yet)
7
+ - Add a more bevel 3D look to Tetris blocks
8
+ - Use flyweight pattern with colors
9
+ - Use flyweight pattern with widget classes
10
+ - Use flyweight pattern with custom widget classes
11
+ - Optimized performance of Canvas Shape DSL
12
+ - Optimized performance of Tetris game
13
+ - Fixed issue with top-level sync_exec/async_exec use randomly bombing
14
+
15
+ ### 4.18.2.4
16
+
17
+ - Tetris scoring
18
+ - Tetris eliminated Line tracking
19
+ - Tetris level tracking and speed-ups
20
+ - Tetris preview upcoming tetromino shape
21
+ - Added parent_proxy to CustomWidget and CustomShell classes
22
+ - Update CustomShell#center and ShellProxy#center to center_within_display to avoid clash with `row_layout` center property
23
+ - Fixed issue with shell/dialog/custom-shell not maintaining parent when not passed
24
+ - Fix Tetris sideways edge detection
25
+
26
+ ### 4.18.2.3
27
+
28
+ - Added Tetris Elaborate Sample
29
+ - Added support for CustomShell `::launch` and `::shutdown` class methods to treat a top-level custom shell as a self contained launchable app (saving you from writing boilerplate code for launching Glimmer applications)
30
+
31
+ ### 4.18.2.2
32
+
33
+ - Fixed issue with processing shape color due to missing Color class package name
34
+
35
+ ### 4.18.2.1
36
+
37
+ - Ensure drawing image works in Shape DSL
38
+ - Support passing image as simply an image path or image proxy to Shape DSL image method
39
+
3
40
  ### 4.18.2.0
4
41
 
5
42
  - Canvas animation start method (useful if animation had a frame count limit or cycle count limit and needed to be started again after it stopped)
data/README.md CHANGED
@@ -1,6 +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.18.2.0
2
-
3
-
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.18.2.5
4
2
  ## JRuby Desktop Development GUI Framework
5
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
6
4
  [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
@@ -10,9 +8,7 @@
10
8
 
11
9
  **[Contributors Wanted! (Submit a Glimmer App Sample to Get Started)](#contributing)**
12
10
 
13
- (The Original Glimmer Library Since 2007. Beware of Imitators!)
14
-
15
- [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer) is a native-GUI cross-platform desktop development library written in [JRuby](https://www.jruby.org/), an OS-threaded faster version of [Ruby](https://www.ruby-lang.org/en/). [Glimmer](https://github.com/AndyObtiva/glimmer)'s main innovation is a declarative [Ruby DSL](#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](#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](#widgets), but also supports drawing Canvas Graphics like [Shapes](#canvas-shape-dsl) and [Animations](#canvas-animation-dsl). To get started quickly, [Glimmer](https://rubygems.org/gems/glimmer) offers [scaffolding](#scaffolding) options for [Apps](#in-production), [Gems](#custom-shell-gem), and [Custom Widgets](#custom-widgets). [Glimmer](https://rubygems.org/gems/glimmer) also includes native-executable [packaging](#packaging--distribution) 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](#custom-shell-gem) on [Linux](https://www.linux.org/).
11
+ [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer) 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](#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](#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](#widgets), but it also supports drawing Canvas Graphics like [Shapes](#canvas-shape-dsl) and [Animations](#canvas-animation-dsl). To get started quickly, [Glimmer](https://rubygems.org/gems/glimmer) offers [scaffolding](#scaffolding) options for [Apps](#in-production), [Gems](#custom-shell-gem), and [Custom Widgets](#custom-widgets). [Glimmer](https://rubygems.org/gems/glimmer) also includes native-executable [packaging](#packaging--distribution) 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](#custom-shell-gem) on [Linux](https://www.linux.org/).
16
12
 
17
13
  [Glimmer receives two updates per month](https://rubygems.org/gems/glimmer-dsl-swt/versions). You can trust [Glimmer](https://rubygems.org/gems/glimmer) with your Ruby desktop GUI development needs. Please make [Glimmer](https://rubygems.org/gems/glimmer) even better by providing feedback and [contributing](#contributing) when possible.
18
14
 
@@ -230,6 +226,11 @@ Glimmer App:
230
226
 
231
227
  [![Math Bowling App Screenshot](https://raw.githubusercontent.com/AndyObtiva/MathBowling/master/Math-Bowling-Screenshot.png)](https://github.com/AndyObtiva/MathBowling)
232
228
 
229
+ **Note:** I offer Glimmer as an open-source project that represents my interests in Ruby Programming, Desktop GUI application development with SWT, Object Oriented Design, Design Patterns, and Software Architecture.
230
+ Additionally, I am sharing my professional experience and expertise in Eclipse SWT given that I am an [EclipseCon](http://andymaleh.blogspot.com/2007/03/eclipsecon-2007-day-3.html)/[EclipseWorld](http://andymaleh.blogspot.com/2008/11/eclipseworld-2008-highlights.html) presenter and have built professional applications in SWT/JFace/RCP for Obtiva and the Pampered Chef in the past. This is also done in the hopes that it would indirectly bring me work in a field I am extremely passionate about.
231
+ That said, please keep in mind that I myself am learning topics in Software Engineering too everyday, including newer editions of SWT and JRuby, which seem to pop up every quarter.
232
+ If you see anything that needs to be improved, please do not hesitate to contact me on [Gitter](https://gitter.im/AndyObtiva/glimmer) or submit [Issues](https://github.com/AndyObtiva/glimmer-dsl-swt/issues)/[Pull-Requests](https://github.com/AndyObtiva/glimmer-dsl-swt/pulls).
233
+
233
234
  ## Table of contents
234
235
 
235
236
  - [Glimmer (JRuby Desktop Development GUI Framework)](#jruby-desktop-development-gui-framework)
@@ -305,7 +306,7 @@ Glimmer App:
305
306
  - [Custom Widget API](#custom-widget-api)
306
307
  - [Content/Options Example](#contentoptions-example)
307
308
  - [Gotcha](#gotcha)
308
- - [Final Notes](#final-notes)
309
+ - [Custom Widget Final Notes](#custom-widget-final-notes)
309
310
  - [Custom Shells](#custom-shells)
310
311
  - [Drag and Drop](#drag-and-drop)
311
312
  - [Miscellaneous](#miscellaneous)
@@ -368,6 +369,7 @@ Glimmer App:
368
369
  - [Login](#login)
369
370
  - [Tic Tac Toe Sample](#tic-tac-toe-sample)
370
371
  - [Contact Manager Sample](#contact-manager-sample)
372
+ - [Tetris](#tetris)
371
373
  - [External Samples](#external-samples)
372
374
  - [Glimmer Calculator](#glimmer-calculator)
373
375
  - [Gladiator](#gladiator)
@@ -456,7 +458,7 @@ jgem install glimmer-dsl-swt
456
458
 
457
459
  Or this command if you want a specific version:
458
460
  ```
459
- jgem install glimmer-dsl-swt -v 4.18.2.0
461
+ jgem install glimmer-dsl-swt -v 4.18.2.5
460
462
 
461
463
 
462
464
  ```
@@ -476,7 +478,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
476
478
 
477
479
  Add the following to `Gemfile`:
478
480
  ```
479
- gem 'glimmer-dsl-swt', '~> 4.18.2.0
481
+ gem 'glimmer-dsl-swt', '~> 4.18.2.5
480
482
  '
481
483
  ```
482
484
 
@@ -535,7 +537,7 @@ bin/glimmer samples
535
537
  Below are the full usage instructions that come up when running `glimmer` without args.
536
538
 
537
539
  ```
538
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.18.2.0
540
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.18.2.5
539
541
 
540
542
 
541
543
 
@@ -1016,7 +1018,7 @@ Output:
1016
1018
 
1017
1019
  Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
1018
1020
  Opal glimmer-dsl-opal 0.10.2 AndyMaleh Glimmer DSL for Opal
1019
- Swt glimmer-dsl-swt 4.18.2.0
1021
+ Swt glimmer-dsl-swt 4.18.2.5
1020
1022
 
1021
1023
  AndyMaleh Glimmer DSL for SWT
1022
1024
  Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
@@ -1084,6 +1086,8 @@ With `glimmer-dsl-swt` installed, you may want to run `girb` instead of standard
1084
1086
  girb
1085
1087
  ```
1086
1088
 
1089
+ ![GIRB](images/glimmer-girb.png)
1090
+
1087
1091
  If you cloned [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) project locally, you may run `bin/girb` instead.
1088
1092
 
1089
1093
  ```
@@ -1349,7 +1353,8 @@ This is not an exaustive list, but should give you a good start in learning Glim
1349
1353
  **Event loop:**
1350
1354
  - `display`: featured in [Tic Tac Toe](#tic-tac-toe)
1351
1355
  - `async_exec`: featured in [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Custom Shell!](#hello-custom-shell)
1352
-
1356
+ - `sync_exec`: executes a block on the event loop synchronously (usually from another thread)
1357
+ - `timer_exec`: executes a block after a delay of time has passed
1353
1358
 
1354
1359
  #### SWT Proxies
1355
1360
 
@@ -2340,25 +2345,33 @@ Example (you may copy/paste in [`girb`](#girb-glimmer-irb-command)):
2340
2345
  ```ruby
2341
2346
  include Glimmer
2342
2347
 
2348
+ # image object has to be declared outside the canvas and shell to avoid confusing with canvas image property
2349
+ image_object = image(File.expand_path('./icons/scaffold_app.png'), width: 100)
2350
+
2343
2351
  shell {
2344
2352
  text 'Canvas Example'
2345
2353
  minimum_size 320, 400
2346
2354
 
2347
2355
  canvas {
2348
- background :yellow
2356
+ background :dark_yellow
2349
2357
  rectangle(0, 0, 220, 400, fill: true) {
2350
- background :red
2358
+ background :dark_red
2351
2359
  }
2352
2360
  rectangle(50, 20, 300, 150, 30, 50, round: true, fill: true) {
2353
- background :magenta
2361
+ background :yellow
2354
2362
  }
2355
2363
  rectangle(150, 200, 100, 70, true, gradient: true) {
2356
- background :dark_magenta
2364
+ background :dark_red
2357
2365
  foreground :yellow
2358
2366
  }
2367
+ text('Glimmer', 208, 83) {
2368
+ font height: 25, style: :bold
2369
+ }
2359
2370
  rectangle(200, 80, 108, 36) {
2360
- foreground color(:dark_blue)
2371
+ foreground :black
2372
+ line_width 3
2361
2373
  }
2374
+ image(image_object, 70, 50)
2362
2375
  }
2363
2376
  }.open
2364
2377
  ```
@@ -2400,7 +2413,11 @@ shell {
2400
2413
  }.open
2401
2414
  ```
2402
2415
 
2403
- In any case, if there is anything you would like added to the Glimmer Shape DSL that you saw available in the SWT APIs, you may [report and issue](https://github.com/AndyObtiva/glimmer-dsl-swt/issues) or implement yourself and [contribute](#contributing) via a Pull Request.
2416
+ In any case, if there is anything missing you would like added to the Glimmer Shape DSL that you saw available in the SWT APIs, you may [report an issue](https://github.com/AndyObtiva/glimmer-dsl-swt/issues) or implement yourself and [contribute](#contributing) via a [Pull Request](https://github.com/AndyObtiva/glimmer-dsl-swt/pulls).
2417
+
2418
+ #### Shapes inside a Widget
2419
+
2420
+ Keep in mind that the Shape DSL can be used inside any widget, not just `canvas`. Unlike shapes on a `canvas`, which are standalone graphics, when included in a widget, which already has its own look and feel, shapes are used as a decorative add-on that complements its look by getting painted on top of it. For example, shapes were used to decorate `composite` blocks in the [Tetris](#tetris) sample to have a more bevel look. In summary, Shapes can be used in a hybrid approach (shapes inside a widget), not just standalone in a `canvas`.
2404
2421
 
2405
2422
  ### Canvas Animation DSL
2406
2423
 
@@ -2462,7 +2479,7 @@ API of Animation Object (returned from `animation` keyword):
2462
2479
 
2463
2480
  Learn more at the [Hello, Canvas Animation! Sample](#hello-canvas-animation).
2464
2481
 
2465
- If there is anything you would like added to the Glimmer Animation DSL that you saw available in the SWT APIs, you may [report and issue](https://github.com/AndyObtiva/glimmer-dsl-swt/issues) or implement yourself and [contribute](#contributing) via a Pull Request.
2482
+ If there is anything missing you would like added to the Glimmer Animation DSL that you saw available in the SWT APIs, you may [report an issue](https://github.com/AndyObtiva/glimmer-dsl-swt/issues) or implement yourself and [contribute](#contributing) via a Pull Request.
2466
2483
 
2467
2484
  ### Data-Binding
2468
2485
 
@@ -2944,7 +2961,7 @@ If you need a better widget with the ability to customize the date format patter
2944
2961
 
2945
2962
  ### Observer
2946
2963
 
2947
- Glimmer comes with `Observer` module, which is used internally for data-binding, but can also be used externally for custom use of the Observer Pattern. It is hidden when observing widgets, and used explicitly when observing models.
2964
+ Glimmer comes with the `Observer` mixin module, which is used internally for data-binding, but can also be used externally for custom use of the Observer Pattern. It is hidden when observing widgets, and used explicitly when observing models. In bidirectional data-binding, `Observer` is automatically unregistered from models once a widget is disposed to avoid memory leaks and worrying about managing them yourself.
2948
2965
 
2949
2966
  #### Observing Widgets
2950
2967
 
@@ -3310,7 +3327,7 @@ body {
3310
3327
 
3311
3328
  The `text` method invoked in the custom widget body will call the one you defined above it. To avoid this gotcha, simply name the text property above something else, like `custom_text`.
3312
3329
 
3313
- #### Final Notes
3330
+ #### Custom Widget Final Notes
3314
3331
 
3315
3332
  This [Eclipse guide](https://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm) for how to write custom SWT widgets is also applicable to Glimmer Custom Widgets written in Ruby. I recommend reading it:
3316
3333
  [https://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm](https://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm)
@@ -4634,6 +4651,18 @@ Contact Manager - Edit Done
4634
4651
 
4635
4652
  ![Contact Manager](images/glimmer-contact-manager-edit-done.png)
4636
4653
 
4654
+ #### Tetris
4655
+
4656
+ This sample demonstrates how to build an interactive animated game with MVC architecture, custom-shell/custom-widgets, multi-threading, asynchronous programming, data-binding, canvas shape graphic decorations, and keyboard events.
4657
+
4658
+ Code:
4659
+
4660
+ [samples/elaborate/tetris.rb](samples/elaborate/tetris.rb)
4661
+
4662
+ ![Tetris](images/glimmer-tetris.png)
4663
+
4664
+ ![Tetris Game Over](images/glimmer-tetris-game-over.png)
4665
+
4637
4666
  ### External Samples
4638
4667
 
4639
4668
  #### Glimmer Calculator
@@ -4661,7 +4690,7 @@ Gladiator is a good demonstration of:
4661
4690
 
4662
4691
  #### Timer
4663
4692
 
4664
- [<img alt="Glimmer Timer Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-timer/master/images/glimmer-timer-logo.png" height=40 /> Timer](https://github.com/AndyObtiva/glimmer-cs-timer) is a sample app demonstrating data-binding, multi-threading, and Java (Sound) library integration in a desktop application.
4693
+ [<img alt="Glimmer Timer Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-timer/master/images/glimmer-timer-logo.png" height=40 /> Timer](https://github.com/AndyObtiva/glimmer-cs-timer) is a sample app demonstrating data-binding, multi-threading, and JSound (Java Sound) library integration in a desktop application.
4665
4694
 
4666
4695
  [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-timer/master/glimmer-timer-screenshot.png" />](https://github.com/AndyObtiva/glimmer-cs-timer)
4667
4696
 
@@ -4687,6 +4716,8 @@ If you have a Glimmer app you would like referenced here, please mention in a Pu
4687
4716
 
4688
4717
  Note: this section mostly applies to Mac and Windows. On Linux, you can just run `glimmer package:gem` and after installing the gem, you get an executable matching the name of the app/custom-shell-gem you are building (e.g. `calculator` command becomes available after installing the [glimmer-cs-calculator](https://github.com/AndyObtiva/glimmer-cs-calculator) gem)
4689
4718
 
4719
+ Note 2: Glimmer packaging has a strong dependency on JDK8 at the moment. JDK9 & JDK10 might work, but JDK11 and onward definitely won't since they dropped javapackager, which later came back as jpackage in JDK14, but it's not ready for prime time yet. Just stick to JDK8 for now, strongly supported by Oracle for the next 6 years at least.
4720
+
4690
4721
  Glimmer simplifies the process of native-executable packaging and distribution on Mac and Windows via a single `glimmer package` command:
4691
4722
 
4692
4723
  ```
@@ -4754,6 +4785,8 @@ require_relative '../app/my_application.rb'
4754
4785
 
4755
4786
  ### javapackager Extra Arguments
4756
4787
 
4788
+ (note: currently `Glimmer::RakeTask::Package.javapackager_extra_args` is only honored when packaging from bash, not zsh)
4789
+
4757
4790
  In order to explicitly configure javapackager, Mac package attributes, or sign your Mac app to distribute on the App Store, you can follow more advanced instructions for `javapackager` here:
4758
4791
  - https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719
4759
4792
  - https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html
@@ -4862,6 +4895,16 @@ By the way, keep in mind that during normal operation, it does also indicate a f
4862
4895
  Exec failed with code 2 command [[/usr/bin/SetFile, -c, icnC, /var/folders/4_/g1sw__tx6mjdgyh3mky7vydc0000gp/T/fxbundler4076750801763032201/images/MathBowling/.VolumeIcon.icns] in unspecified directory
4863
4896
  ```
4864
4897
 
4898
+ 3. Zsh (Z Shell)
4899
+
4900
+ Currently, `Glimmer::RakeTask::Package.javapackager_extra_args` is only honored when packaging from bash, not zsh.
4901
+
4902
+ You can get around that in zsh by running glimmer package commands with `bash -c` prefix:
4903
+
4904
+ ```
4905
+ bash -c 'glimmer package'
4906
+ ```
4907
+
4865
4908
  ## App Updates
4866
4909
 
4867
4910
  Glimmer already supports automatic (and manual) app updates via the Mac App Store for Mac apps. Simply run the `glimmer package` command with the Mac App Store keys configured as per [Mac Application Distribution](mac-application-distribution) instructions and you get automatic (and manual) app update support courtesy of the Mac App Store.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.18.2.0
1
+ 4.18.2.5
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer-dsl-swt 4.18.2.0 ruby lib
5
+ # stub: glimmer-dsl-swt 4.18.2.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer-dsl-swt".freeze
9
- s.version = "4.18.2.0"
9
+ s.version = "4.18.2.5"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["AndyMaleh".freeze]
14
- s.date = "2021-01-20"
15
- s.description = "Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) is a native-GUI cross-platform desktop development library written in JRuby, an OS-threaded faster version of Ruby. Glimmer's main innovation is a declarative Ruby DSL that enables productive and efficient authoring of desktop application user-interfaces by relying on the robust Eclipse SWT library. Glimmer additionally innovates by having built-in 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, but also supports drawing Canvas Graphics like Shapes and Animations. To get started quickly, Glimmer offers scaffolding options for Apps, Gems, and Custom Widgets. Glimmer also includes native-executable packaging support, sorely lacking in other libraries, thus enabling the delivery of desktop apps written in Ruby as truly native DMG/PKG/APP files on the Mac + App Store, MSI/EXE files on Windows, and Gem Packaged Shell Scripts on Linux.".freeze
14
+ s.date = "2021-01-24"
15
+ s.description = "Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) is a native-GUI cross-platform desktop development library written in JRuby, an OS-threaded faster JVM version of Ruby. Glimmer's main innovation is a declarative Ruby DSL that enables productive and efficient authoring of desktop application user-interfaces by relying on the robust Eclipse SWT library. Glimmer additionally innovates by having built-in 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, but it also supports drawing Canvas Graphics like Shapes and Animations. To get started quickly, Glimmer offers scaffolding options for Apps, Gems, and Custom Widgets. Glimmer also includes native-executable packaging support, sorely lacking in other libraries, thus enabling the delivery of desktop apps written in Ruby as truly native DMG/PKG/APP files on the Mac + App Store, MSI/EXE files on Windows, and Gem Packaged Shell Scripts on Linux.".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.executables = ["glimmer".freeze, "girb".freeze]
18
18
  s.extra_rdoc_files = [
@@ -132,6 +132,14 @@ Gem::Specification.new do |s|
132
132
  "samples/elaborate/contact_manager/contact_repository.rb",
133
133
  "samples/elaborate/login.rb",
134
134
  "samples/elaborate/meta_sample.rb",
135
+ "samples/elaborate/tetris.rb",
136
+ "samples/elaborate/tetris/model/block.rb",
137
+ "samples/elaborate/tetris/model/game.rb",
138
+ "samples/elaborate/tetris/model/tetromino.rb",
139
+ "samples/elaborate/tetris/view/block.rb",
140
+ "samples/elaborate/tetris/view/game_over_dialog.rb",
141
+ "samples/elaborate/tetris/view/playfield.rb",
142
+ "samples/elaborate/tetris/view/score_lane.rb",
135
143
  "samples/elaborate/tic_tac_toe.rb",
136
144
  "samples/elaborate/tic_tac_toe/board.rb",
137
145
  "samples/elaborate/tic_tac_toe/cell.rb",
@@ -182,7 +190,7 @@ Gem::Specification.new do |s|
182
190
  s.specification_version = 4
183
191
 
184
192
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
185
- s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.8"])
193
+ s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.9"])
186
194
  s.add_runtime_dependency(%q<super_module>.freeze, [">= 1.4.1", "< 2.0.0"])
187
195
  s.add_runtime_dependency(%q<nested_inherited_jruby_include_package>.freeze, [">= 0.3.0", "< 2.0.0"])
188
196
  s.add_runtime_dependency(%q<puts_debuggerer>.freeze, [">= 0.11.0", "< 2.0.0"])
@@ -201,7 +209,7 @@ Gem::Specification.new do |s|
201
209
  s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
202
210
  s.add_development_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
203
211
  else
204
- s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.8"])
212
+ s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.9"])
205
213
  s.add_dependency(%q<super_module>.freeze, [">= 1.4.1", "< 2.0.0"])
206
214
  s.add_dependency(%q<nested_inherited_jruby_include_package>.freeze, [">= 0.3.0", "< 2.0.0"])
207
215
  s.add_dependency(%q<puts_debuggerer>.freeze, [">= 0.11.0", "< 2.0.0"])
@@ -221,7 +229,7 @@ Gem::Specification.new do |s|
221
229
  s.add_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
222
230
  end
223
231
  else
224
- s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.8"])
232
+ s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.9"])
225
233
  s.add_dependency(%q<super_module>.freeze, [">= 1.4.1", "< 2.0.0"])
226
234
  s.add_dependency(%q<nested_inherited_jruby_include_package>.freeze, [">= 0.3.0", "< 2.0.0"])
227
235
  s.add_dependency(%q<puts_debuggerer>.freeze, [">= 0.11.0", "< 2.0.0"])
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2007-2021 Andy Maleh
2
- #
2
+ #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
5
5
  # "Software"), to deal in the Software without restriction, including
@@ -7,10 +7,10 @@
7
7
  # distribute, sublicense, and/or sell copies of the Software, and to
8
8
  # permit persons to whom the Software is furnished to do so, subject to
9
9
  # the following conditions:
10
- #
10
+ #
11
11
  # The above copyright notice and this permission notice shall be
12
12
  # included in all copies or substantial portions of the Software.
13
- #
13
+ #
14
14
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
15
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
16
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -32,7 +32,7 @@ module Glimmer
32
32
  include_package 'org.eclipse.swt.widgets'
33
33
 
34
34
  def interpret(parent, keyword, *args, &block)
35
- Glimmer::SWT::ColorProxy.new(*args)
35
+ Glimmer::SWT::ColorProxy.flyweight(*args)
36
36
  end
37
37
  end
38
38
  end
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2007-2021 Andy Maleh
2
- #
2
+ #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
5
5
  # "Software"), to deal in the Software without restriction, including
@@ -7,10 +7,10 @@
7
7
  # distribute, sublicense, and/or sell copies of the Software, and to
8
8
  # permit persons to whom the Software is furnished to do so, subject to
9
9
  # the following conditions:
10
- #
10
+ #
11
11
  # The above copyright notice and this permission notice shall be
12
12
  # included in all copies or substantial portions of the Software.
13
- #
13
+ #
14
14
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
15
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
16
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2007-2021 Andy Maleh
2
- #
2
+ #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
5
5
  # "Software"), to deal in the Software without restriction, including
@@ -7,10 +7,10 @@
7
7
  # distribute, sublicense, and/or sell copies of the Software, and to
8
8
  # permit persons to whom the Software is furnished to do so, subject to
9
9
  # the following conditions:
10
- #
10
+ #
11
11
  # The above copyright notice and this permission notice shall be
12
12
  # included in all copies or substantial portions of the Software.
13
- #
13
+ #
14
14
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
15
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
16
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -30,7 +30,8 @@ module Glimmer
30
30
  args.size > 0 and
31
31
  parent.respond_to?(:set_attribute) and
32
32
  parent.respond_to?(:has_attribute?) and
33
- parent.has_attribute?(keyword, *args)
33
+ parent.has_attribute?(keyword, *args) and
34
+ !(parent.respond_to?(:swt_widget) && parent.swt_widget.class == org.eclipse.swt.widgets.Canvas && keyword == 'image')
34
35
  end
35
36
 
36
37
  def interpret(parent, keyword, *args, &block)
@@ -23,6 +23,7 @@ require 'glimmer/dsl/expression'
23
23
  require 'glimmer/dsl/parent_expression'
24
24
  require 'glimmer/swt/swt_proxy'
25
25
  require 'glimmer/swt/custom/shape'
26
+ require 'glimmer/swt/custom/drawable'
26
27
 
27
28
  module Glimmer
28
29
  module DSL
@@ -31,10 +32,7 @@ module Glimmer
31
32
  include ParentExpression
32
33
 
33
34
  def can_interpret?(parent, keyword, *args, &block)
34
- (
35
- (parent.respond_to?(:swt_widget) and parent.swt_widget.is_a?(org.eclipse.swt.graphics.Drawable)) or
36
- (parent.respond_to?(:swt_display) and parent.swt_display.is_a?(org.eclipse.swt.graphics.Drawable))
37
- ) and
35
+ parent.is_a?(Glimmer::SWT::Custom::Drawable) and
38
36
  Glimmer::SWT::Custom::Shape.valid?(parent, keyword, *args, &block)
39
37
  end
40
38