glimmer-dsl-swt 4.20.15.2 → 4.20.15.3

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: dda4e5ffd1bd606b7a442ed334df93dfe00bcbd69c24bb9aa76ef367e1c23f0b
4
- data.tar.gz: 94836b2214a7db325c43a5ddb456eb6769f5f1c004005a7d16a14af5840398c0
3
+ metadata.gz: 8187254bb12badee8c5b1ae5c15fe8c3245062f357ce2924af4f2c2d0a6b7f5f
4
+ data.tar.gz: d31a4d862b72eeaa862a63d79188b2b4443118e24d66d7ac2388992a22f3b660
5
5
  SHA512:
6
- metadata.gz: 44fed7644c47f57da144bce6338af41e7af8752dbe3e3e44c403f81a6ef95dfad58db43b5b9fbcc1229ff9efe1dde6ccbb378fd03203758e6b0d660169ed6c0a
7
- data.tar.gz: cb7a1a73c59fde48269685d858b8ec0a8e43a4b14ed87478bac5022da3d1a2cc91144c83670ebf95276d410a1d33b492bd8cee70e46137a6540405666f8e9adc
6
+ metadata.gz: bf2d969abd0153a9390814d25ab7ad0aebcdf89285bce909084dfa4023299f9b7a605ce444fddfb7421c3640cf8ac980fd217d660779f4cea862072d309075ca
7
+ data.tar.gz: 87da79424c4b6b9d16b4c5ae4531924e5d95d1932b673f0edc5f5a9f801ab4fa4cc4a94d0b9addb905882d1990bbc95fe649dce79303e0440ab6a3c21fdbdaae
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.20.15.3
4
+
5
+ - Updated Hello, Text! sample to have a no-border `text` widget
6
+
3
7
  ### 4.20.15.2
4
8
 
5
9
  - Fixed `widget#print` support and Hello, Print Dialog! handling of cancellation of printing
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.15.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.20.15.3
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.15.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 (please report any issues you may encounter).
18
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.15.3 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 (please 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
 
@@ -321,7 +321,7 @@ jgem install glimmer-dsl-swt
321
321
 
322
322
  Or this command if you want a specific version:
323
323
  ```
324
- jgem install glimmer-dsl-swt -v 4.20.15.2
324
+ jgem install glimmer-dsl-swt -v 4.20.15.3
325
325
  ```
326
326
 
327
327
  `jgem` is JRuby's version of `gem` command.
@@ -349,7 +349,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
349
349
 
350
350
  Add the following to `Gemfile`:
351
351
  ```
352
- gem 'glimmer-dsl-swt', '~> 4.20.15.2'
352
+ gem 'glimmer-dsl-swt', '~> 4.20.15.3'
353
353
  ```
354
354
 
355
355
  And, then run:
@@ -370,7 +370,7 @@ glimmer
370
370
  ```
371
371
 
372
372
  ```
373
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.15.2
373
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.15.3
374
374
 
375
375
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
376
376
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.20.15.2
1
+ 4.20.15.3
@@ -1248,7 +1248,7 @@ Check out a souped up large-card-size packaged version of the game in the [Glimm
1248
1248
 
1249
1249
  #### Battleship
1250
1250
 
1251
- This sample demonstrates how to build an interactive board game with A.I., MVC architecture, hybrid canvas widget/shape approach, custom-widgets, data-binding, observers, and widget drag & drop.
1251
+ This sample demonstrates how to build an interactive board game with MVC architecture, hybrid canvas widget/shape approach, custom-widgets, data-binding, observers, and widget drag & drop. Note that the A.I. is very simplistic as it is besides the point of this GUI demo, which focuses on leveraging Glimmer DSL for SWT.
1252
1252
 
1253
1253
  Code:
1254
1254
 
Binary file
@@ -72,9 +72,9 @@ class Tetris
72
72
  when swt(:arrow_right), 'd'.bytes.first
73
73
  game.right!
74
74
  when swt(:shift), swt(:alt)
75
- if key_event.keyLocation == swt(:right) # right shift key
75
+ if key_event.keyLocation == swt(:right) # right key
76
76
  game.rotate!(:right)
77
- elsif key_event.keyLocation == swt(:left) # left shift key
77
+ elsif key_event.keyLocation == swt(:left) # left key
78
78
  game.rotate!(:left)
79
79
  end
80
80
  end
@@ -48,6 +48,7 @@ class HelloCanvas
48
48
 
49
49
  @canvas = canvas {
50
50
  background :yellow
51
+
51
52
  rectangle(0, 0, 220, 400) {
52
53
  background rgb(255, 0, 0)
53
54
  }
@@ -107,18 +107,18 @@ class HelloProgressBar
107
107
  }
108
108
  text "Start"
109
109
 
110
- on_widget_selected {
110
+ on_widget_selected do
111
111
  # if a previous thread is running, then kill first
112
112
  # (killing is not dangerous since it is only a thread about updating progress)
113
113
  @current_thread&.kill
114
- @current_thread = Thread.new {
114
+ @current_thread = Thread.new do
115
115
  @progress_model.selection = @progress_model.minimum
116
116
  (@progress_model.minimum..@progress_model.maximum).to_a.each do |n|
117
117
  @progress_model.selection = n
118
118
  sleep(@progress_model.delay)
119
119
  end
120
- }
121
- }
120
+ end
121
+ end
122
122
  }
123
123
  }
124
124
  }
@@ -109,9 +109,9 @@ shell {
109
109
  foreground :dark_green
110
110
  font height: 16
111
111
 
112
- on_widget_selected {
112
+ on_widget_selected do
113
113
  @sash_form.maximized_control = @green_label.swt_widget
114
- }
114
+ end
115
115
  }
116
116
  button {
117
117
  layout_data(:fill, :center, true, false)
@@ -119,9 +119,9 @@ shell {
119
119
  foreground :red
120
120
  font height: 16
121
121
 
122
- on_widget_selected {
122
+ on_widget_selected do
123
123
  @sash_form.maximized_control = @red_label.swt_widget
124
- }
124
+ end
125
125
  }
126
126
 
127
127
  button {
@@ -131,9 +131,9 @@ shell {
131
131
  text 'Maximize None'
132
132
  font height: 16
133
133
 
134
- on_widget_selected {
134
+ on_widget_selected do
135
135
  @sash_form.maximized_control = nil
136
- }
136
+ end
137
137
  }
138
138
  }
139
139
  }.open
@@ -1,12 +1,34 @@
1
+ # Copyright (c) 2007-2021 Andy Maleh
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
1
22
  require 'glimmer-dsl-swt'
2
23
 
3
24
  class HelloText
4
25
  include Glimmer::UI::CustomShell
5
26
 
6
- attr_accessor :default, :center, :left, :right, :password, :telephone, :read_only, :wrap, :multi
27
+ attr_accessor :default, :no_border, :center, :left, :right, :password, :telephone, :read_only, :wrap, :multi
7
28
 
8
29
  before_body do
9
30
  self.default = 'default is :border style'
31
+ self.no_border = 'no border'
10
32
  self.center = 'centered'
11
33
  self.left = 'left-aligned'
12
34
  self.right = 'right-aligned'
@@ -32,6 +54,14 @@ class HelloText
32
54
  text <=> [self, :default]
33
55
  }
34
56
 
57
+ label {
58
+ text 'text(:none)'
59
+ }
60
+ text(:none) { # no border
61
+ layout_data :fill, :center, true, false
62
+ text <=> [self, :no_border]
63
+ }
64
+
35
65
  label {
36
66
  text 'text(:center, :border)'
37
67
  }
@@ -69,7 +99,7 @@ class HelloText
69
99
  }
70
100
  text(:read_only, :border) {
71
101
  layout_data :fill, :center, true, false
72
- text <=> [self, :read_only]
102
+ text <= [self, :read_only]
73
103
  }
74
104
 
75
105
  label {
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.20.15.2
4
+ version: 4.20.15.3
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-08-18 00:00:00.000000000 Z
11
+ date: 2021-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement