glimmer-dsl-swt 4.20.0.2 → 4.20.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/VERSION +1 -1
- data/docs/reference/GLIMMER_SAMPLES.md +96 -51
- data/glimmer-dsl-swt.gemspec +0 -0
- data/samples/hello/hello_layout.rb +6 -2
- data/samples/hello/hello_shell.rb +205 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f8d4338c2993469fc740a390cb380bf9faf4c1c93d3993e517080d5599825f
|
4
|
+
data.tar.gz: 3e82de8a5c35d17b0e92b741e3a750885842094b9ee4a8c9e5aac56419613551
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12b865d3c8e7e7a5a33928fea59a436d272a30f401171dfdf4e8464b5093c1c50db4f233af61b7af3e51ec8ddb53ebd67bff438f8525e3976acb50386a787fb9
|
7
|
+
data.tar.gz: 8ce5f6eb7ec30624f9b140cdd994c414222cd0891daf3d212e93dfc76959413bdd53ddf4256a8dd55c530f8964a4b10962278a4b2c03cffc5045052e41a9dac4
|
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.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.20.0.3
|
2
2
|
## JRuby Desktop Development GUI Framework
|
3
3
|
[](http://badge.fury.io/rb/glimmer-dsl-swt)
|
4
4
|
[](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.0.
|
18
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.0.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 (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 an early alpha, so default back to `bind` whenever needed).
|
21
21
|
|
@@ -341,7 +341,7 @@ jgem install glimmer-dsl-swt
|
|
341
341
|
|
342
342
|
Or this command if you want a specific version:
|
343
343
|
```
|
344
|
-
jgem install glimmer-dsl-swt -v 4.20.0.
|
344
|
+
jgem install glimmer-dsl-swt -v 4.20.0.3
|
345
345
|
```
|
346
346
|
|
347
347
|
`jgem` is JRuby's version of `gem` command.
|
@@ -369,7 +369,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
|
|
369
369
|
|
370
370
|
Add the following to `Gemfile`:
|
371
371
|
```
|
372
|
-
gem 'glimmer-dsl-swt', '~> 4.20.0.
|
372
|
+
gem 'glimmer-dsl-swt', '~> 4.20.0.3'
|
373
373
|
```
|
374
374
|
|
375
375
|
And, then run:
|
@@ -390,7 +390,7 @@ glimmer
|
|
390
390
|
```
|
391
391
|
|
392
392
|
```
|
393
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.0.
|
393
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.0.3
|
394
394
|
|
395
395
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
396
396
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.20.0.
|
1
|
+
4.20.0.3
|
@@ -1,12 +1,14 @@
|
|
1
1
|
- [Samples](#samples)
|
2
2
|
- [Hello Samples](#hello-samples)
|
3
3
|
- [Hello, World!](#hello-world)
|
4
|
+
- [Hello, Button!](#hello-button)
|
5
|
+
- [Hello, Composite!](#hello-composite)
|
6
|
+
- [Hello, Layout!](#hello-layout)
|
7
|
+
- [Hello, Shell!](#hello-shell)
|
4
8
|
- [Hello, Tab!](#hello-tab)
|
5
9
|
- [Hello, C Tab!](#hello-c-tab)
|
6
10
|
- [Hello, Combo!](#hello-combo)
|
7
11
|
- [Hello, C Combo!](#hello-c-combo)
|
8
|
-
- [Hello, Composite!](#hello-composite)
|
9
|
-
- [Hello, Layout!](#hello-layout)
|
10
12
|
- [Hello, List Single Selection!](#hello-list-single-selection)
|
11
13
|
- [Hello, List Multi Selection!](#hello-list-multi-selection)
|
12
14
|
- [Hello, Computed!](#hello-computed)
|
@@ -30,7 +32,6 @@
|
|
30
32
|
- [Hello, Date Time!](#hello-date-time)
|
31
33
|
- [Hello, Spinner!](#hello-spinner)
|
32
34
|
- [Hello, Table!](#hello-table)
|
33
|
-
- [Hello, Button!](#hello-button)
|
34
35
|
- [Hello, Link!](#hello-link)
|
35
36
|
- [Hello, Dialog!](#hello-dialog)
|
36
37
|
- [Hello, Code Text!](#hello-code-text)
|
@@ -98,6 +99,98 @@ Code:
|
|
98
99
|
|
99
100
|

|
100
101
|
|
102
|
+
#### Hello, Button!
|
103
|
+
|
104
|
+
This sample demonstrates the use of the `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
|
105
|
+
|
106
|
+
Code:
|
107
|
+
|
108
|
+
[samples/hello/hello_button.rb](/samples/hello/hello_button.rb)
|
109
|
+
|
110
|
+
Hello, Button!
|
111
|
+
|
112
|
+

|
113
|
+
|
114
|
+
Hello, Button! Incremented 7 times!
|
115
|
+
|
116
|
+

|
117
|
+
|
118
|
+
#### Hello, Composite!
|
119
|
+
|
120
|
+
This sample demonstrates the `composite` widget, which is simply used as a container for visual layout and organization.
|
121
|
+
|
122
|
+
Code:
|
123
|
+
|
124
|
+
[samples/hello/hello_composite.rb](/samples/hello/hello_composite.rb)
|
125
|
+
|
126
|
+

|
127
|
+
|
128
|
+
#### Hello, Layout!
|
129
|
+
|
130
|
+
This sample demonstrates the standard 3 layouts in SWT (though one can write their own for very advanced applications): `fill_layout`, `row_layout`, and `grid_layout`
|
131
|
+
|
132
|
+
Code:
|
133
|
+
|
134
|
+
[samples/hello/hello_layout.rb](/samples/hello/hello_layout.rb)
|
135
|
+
|
136
|
+

|
137
|
+
|
138
|
+

|
139
|
+
|
140
|
+

|
141
|
+
|
142
|
+

|
143
|
+
|
144
|
+

|
145
|
+
|
146
|
+

|
147
|
+
|
148
|
+

|
149
|
+
|
150
|
+
#### Hello, Shell!
|
151
|
+
|
152
|
+
This sample demonstrates the various shells (windows) available in SWT.
|
153
|
+
|
154
|
+
Code:
|
155
|
+
|
156
|
+
[samples/hello/hello_shell.rb](/samples/hello/hello_shell.rb)
|
157
|
+
|
158
|
+
Hello, Shell!
|
159
|
+
|
160
|
+

|
161
|
+
|
162
|
+
Nested Shell
|
163
|
+
|
164
|
+

|
165
|
+
|
166
|
+
Independent Shell
|
167
|
+
|
168
|
+

|
169
|
+
|
170
|
+
Close-Button Shell
|
171
|
+
|
172
|
+

|
173
|
+
|
174
|
+
Minimize-Button Shell
|
175
|
+
|
176
|
+

|
177
|
+
|
178
|
+
Maximize-Button Shell
|
179
|
+
|
180
|
+

|
181
|
+
|
182
|
+
Buttonless Shell
|
183
|
+
|
184
|
+

|
185
|
+
|
186
|
+
No Trim Shell
|
187
|
+
|
188
|
+

|
189
|
+
|
190
|
+
Always On Top Shell
|
191
|
+
|
192
|
+

|
193
|
+
|
101
194
|
#### Hello, Tab!
|
102
195
|
|
103
196
|
Code:
|
@@ -143,38 +236,6 @@ Code:
|
|
143
236
|

|
144
237
|

|
145
238
|
|
146
|
-
#### Hello, Composite!
|
147
|
-
|
148
|
-
This sample demonstrates the `composite` widget, which is simply used as a container for visual layout and organization.
|
149
|
-
|
150
|
-
Code:
|
151
|
-
|
152
|
-
[samples/hello/hello_composite.rb](/samples/hello/hello_composite.rb)
|
153
|
-
|
154
|
-

|
155
|
-
|
156
|
-
#### Hello, Layout!
|
157
|
-
|
158
|
-
This sample demonstrates the standard 3 layouts in SWT (though one can write their own for very advanced applications): `fill_layout`, `row_layout`, and `grid_layout`
|
159
|
-
|
160
|
-
Code:
|
161
|
-
|
162
|
-
[samples/hello/hello_layout.rb](/samples/hello/hello_layout.rb)
|
163
|
-
|
164
|
-

|
165
|
-
|
166
|
-

|
167
|
-
|
168
|
-

|
169
|
-
|
170
|
-

|
171
|
-
|
172
|
-

|
173
|
-
|
174
|
-

|
175
|
-
|
176
|
-

|
177
|
-
|
178
239
|
#### Hello, List Single Selection!
|
179
240
|
|
180
241
|
This sample demonstrates list single-selection data-binding.
|
@@ -554,22 +615,6 @@ Hello, Table! Context Menu
|
|
554
615
|
|
555
616
|

|
556
617
|
|
557
|
-
#### Hello, Button!
|
558
|
-
|
559
|
-
This sample demonstrates the use of the `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
|
560
|
-
|
561
|
-
Code:
|
562
|
-
|
563
|
-
[samples/hello/hello_button.rb](/samples/hello/hello_button.rb)
|
564
|
-
|
565
|
-
Hello, Button!
|
566
|
-
|
567
|
-

|
568
|
-
|
569
|
-
Hello, Button! Incremented 7 times!
|
570
|
-
|
571
|
-

|
572
|
-
|
573
618
|
#### Hello, Link!
|
574
619
|
|
575
620
|
This sample demonstrates the use of the `link` widget in Glimmer, including identifying which link was clicked and performing an action (displaying help) based on its location.
|
data/glimmer-dsl-swt.gemspec
CHANGED
Binary file
|
@@ -200,8 +200,12 @@ class HelloLayout
|
|
200
200
|
grab_excess_horizontal_space true
|
201
201
|
grab_excess_vertical_space true
|
202
202
|
}
|
203
|
-
|
204
|
-
|
203
|
+
|
204
|
+
# this is a short alternative for specifying what is above
|
205
|
+
# layout_data(:fill, :fill, true, true) {
|
206
|
+
# horizontal_span 5
|
207
|
+
# }
|
208
|
+
|
205
209
|
text "<this label fills all the space it can get\nhorizontally and vertically>"
|
206
210
|
background :magenta
|
207
211
|
}
|
@@ -0,0 +1,205 @@
|
|
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
|
+
|
22
|
+
require 'glimmer-dsl-swt'
|
23
|
+
|
24
|
+
class HelloShell
|
25
|
+
include Glimmer::UI::CustomShell
|
26
|
+
|
27
|
+
body {
|
28
|
+
# this is the initial shell that opens. If you close it, you close the app.
|
29
|
+
shell { |root_shell_proxy|
|
30
|
+
row_layout(:vertical)
|
31
|
+
text 'Hello, Shell!'
|
32
|
+
|
33
|
+
button {
|
34
|
+
layout_data {
|
35
|
+
width 200
|
36
|
+
height 50
|
37
|
+
}
|
38
|
+
text "Nested Shell"
|
39
|
+
|
40
|
+
on_widget_selected {
|
41
|
+
# build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
|
42
|
+
shell(root_shell_proxy) {
|
43
|
+
# shell has fill_layout(:horizontal) by default with no margins
|
44
|
+
text 'Nested Shell'
|
45
|
+
|
46
|
+
label {
|
47
|
+
font height: 20
|
48
|
+
text "Since this shell is nested, \nyou can hit ESC to close"
|
49
|
+
}
|
50
|
+
}.open
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
button {
|
55
|
+
layout_data {
|
56
|
+
width 200
|
57
|
+
height 50
|
58
|
+
}
|
59
|
+
text "Independent Shell"
|
60
|
+
|
61
|
+
on_widget_selected {
|
62
|
+
# build an independent shell, meaning a shell that is independent of its parent
|
63
|
+
shell {
|
64
|
+
# shell has fill_layout(:horizontal) by default with no margins
|
65
|
+
text 'Independent Shell'
|
66
|
+
|
67
|
+
label {
|
68
|
+
font height: 20
|
69
|
+
text "Since this shell is independent, \nyou cannot close by hitting ESC"
|
70
|
+
}
|
71
|
+
}.open
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
button {
|
76
|
+
layout_data {
|
77
|
+
width 200
|
78
|
+
height 50
|
79
|
+
}
|
80
|
+
text "Close-Button Shell"
|
81
|
+
|
82
|
+
on_widget_selected {
|
83
|
+
shell(:close) {
|
84
|
+
# shell has fill_layout(:horizontal) by default with no margins
|
85
|
+
text 'Nested Shell'
|
86
|
+
|
87
|
+
label {
|
88
|
+
font height: 20
|
89
|
+
text "Shell with close button only\n(varies per platform)"
|
90
|
+
}
|
91
|
+
}.open
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
button {
|
96
|
+
layout_data {
|
97
|
+
width 200
|
98
|
+
height 50
|
99
|
+
}
|
100
|
+
text "Minimize-Button Shell"
|
101
|
+
|
102
|
+
on_widget_selected {
|
103
|
+
# build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
|
104
|
+
shell(root_shell_proxy, :min) {
|
105
|
+
# shell has fill_layout(:horizontal) by default with no margins
|
106
|
+
text 'Minimize-Button Shell'
|
107
|
+
|
108
|
+
label {
|
109
|
+
font height: 20
|
110
|
+
text "Shell with minimize button only\n(varies per platform)"
|
111
|
+
}
|
112
|
+
}.open
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
button {
|
117
|
+
layout_data {
|
118
|
+
width 200
|
119
|
+
height 50
|
120
|
+
}
|
121
|
+
text "Maximize-Button Shell"
|
122
|
+
|
123
|
+
on_widget_selected {
|
124
|
+
# build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
|
125
|
+
shell(root_shell_proxy, :max) {
|
126
|
+
# shell has fill_layout(:horizontal) by default with no margins
|
127
|
+
text 'Maximize-Button Shell'
|
128
|
+
|
129
|
+
label {
|
130
|
+
font height: 20
|
131
|
+
text "Shell with maximize button only\n(varies per platform)"
|
132
|
+
}
|
133
|
+
}.open
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
button {
|
138
|
+
layout_data {
|
139
|
+
width 200
|
140
|
+
height 50
|
141
|
+
}
|
142
|
+
text "Buttonless Shell"
|
143
|
+
|
144
|
+
on_widget_selected {
|
145
|
+
# build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
|
146
|
+
shell(root_shell_proxy, :title) {
|
147
|
+
# shell has fill_layout(:horizontal) by default with no margins
|
148
|
+
text 'Buttonless Shell'
|
149
|
+
|
150
|
+
label {
|
151
|
+
font height: 20
|
152
|
+
text "Buttonless shell (title only)\n(varies per platform)"
|
153
|
+
}
|
154
|
+
}.open
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
button {
|
159
|
+
layout_data {
|
160
|
+
width 200
|
161
|
+
height 50
|
162
|
+
}
|
163
|
+
text "No Trim Shell"
|
164
|
+
|
165
|
+
on_widget_selected {
|
166
|
+
# build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
|
167
|
+
shell(root_shell_proxy, :no_trim) {
|
168
|
+
# shell has fill_layout(:horizontal) by default with no margins
|
169
|
+
text 'No Trim Shell'
|
170
|
+
|
171
|
+
label {
|
172
|
+
font height: 20
|
173
|
+
text "No trim shell, meaning no buttons or title bar.\n(varies per platform)"
|
174
|
+
}
|
175
|
+
}.open
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
button {
|
180
|
+
layout_data {
|
181
|
+
width 200
|
182
|
+
height 50
|
183
|
+
}
|
184
|
+
text "Always On Top Shell"
|
185
|
+
|
186
|
+
on_widget_selected {
|
187
|
+
# build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
|
188
|
+
shell(root_shell_proxy, :on_top) {
|
189
|
+
# shell has fill_layout(:horizontal) by default with no margins
|
190
|
+
text 'Always On Top Shell'
|
191
|
+
|
192
|
+
label {
|
193
|
+
font height: 20
|
194
|
+
text "Always on top shell.\n(varies per platform)"
|
195
|
+
}
|
196
|
+
}.open
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
}
|
201
|
+
|
202
|
+
}
|
203
|
+
end
|
204
|
+
|
205
|
+
HelloShell.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.20.0.
|
4
|
+
version: 4.20.0.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-07-
|
11
|
+
date: 2021-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -581,6 +581,7 @@ files:
|
|
581
581
|
- samples/hello/hello_radio_group.rb
|
582
582
|
- samples/hello/hello_sash_form.rb
|
583
583
|
- samples/hello/hello_shape.rb
|
584
|
+
- samples/hello/hello_shell.rb
|
584
585
|
- samples/hello/hello_spinner.rb
|
585
586
|
- samples/hello/hello_styled_text.rb
|
586
587
|
- samples/hello/hello_tab.rb
|