glimmer-dsl-swt 4.20.0.1 → 4.20.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +17 -13
- data/VERSION +1 -1
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +10 -7
- data/docs/reference/GLIMMER_SAMPLES.md +168 -49
- data/docs/reference/GLIMMER_STYLE_GUIDE.md +4 -3
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer/data_binding/shine.rb +3 -1
- data/lib/glimmer/data_binding/table_items_binding.rb +2 -2
- data/lib/glimmer/dsl/swt/shine_data_binding_expression.rb +6 -3
- data/lib/glimmer/dsl/swt/table_items_data_binding_expression.rb +2 -2
- data/lib/glimmer/dsl/swt/widget_expression.rb +2 -0
- data/lib/glimmer/dsl/swt/widget_listener_expression.rb +3 -3
- data/lib/glimmer/rake_task/scaffold.rb +0 -2
- data/lib/glimmer/swt/combo_proxy.rb +48 -0
- data/lib/glimmer/swt/display_proxy.rb +11 -8
- data/lib/glimmer/swt/proxy_properties.rb +2 -1
- data/lib/glimmer/swt/table_proxy.rb +15 -8
- data/lib/glimmer/swt/tool_bar_proxy.rb +51 -0
- data/lib/glimmer/swt/widget_proxy.rb +8 -2
- data/lib/glimmer/ui/custom_shell.rb +3 -3
- data/lib/glimmer/ui/custom_widget.rb +5 -2
- data/samples/elaborate/calculator.rb +116 -0
- data/samples/elaborate/calculator/model/command.rb +105 -0
- data/samples/elaborate/calculator/model/command/all_clear.rb +17 -0
- data/samples/elaborate/calculator/model/command/command_history.rb +0 -0
- data/samples/elaborate/calculator/model/command/equals.rb +18 -0
- data/samples/elaborate/calculator/model/command/number.rb +20 -0
- data/samples/elaborate/calculator/model/command/operation.rb +27 -0
- data/samples/elaborate/calculator/model/command/operation/add.rb +15 -0
- data/samples/elaborate/calculator/model/command/operation/divide.rb +15 -0
- data/samples/elaborate/calculator/model/command/operation/multiply.rb +15 -0
- data/samples/elaborate/calculator/model/command/operation/subtract.rb +15 -0
- data/samples/elaborate/calculator/model/command/point.rb +20 -0
- data/samples/elaborate/calculator/model/presenter.rb +30 -0
- data/samples/elaborate/login.rb +15 -13
- data/samples/elaborate/tetris.rb +4 -4
- data/samples/elaborate/tetris/model/game.rb +0 -3
- data/samples/elaborate/timer.rb +233 -0
- data/samples/elaborate/timer/alarm1.wav +0 -0
- data/samples/elaborate/timer/sounds/alarm1.wav +0 -0
- data/samples/elaborate/user_profile.rb +4 -2
- data/samples/elaborate/weather.rb +164 -0
- data/samples/hello/hello_cool_bar.rb +147 -0
- data/samples/hello/hello_layout.rb +6 -2
- data/samples/hello/hello_shell.rb +205 -0
- data/samples/hello/hello_table.rb +5 -5
- data/samples/hello/hello_text.rb +120 -0
- data/samples/hello/hello_tool_bar.rb +143 -0
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9779424dd8dd9fca77f9252ae072a455d2d74bf628952d02650a462bbc1021e
|
4
|
+
data.tar.gz: 1894fba96b987a4a6b7b3c6e65f5d8088396863e076deb69d90871aeff233229
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4caa0f594b722c39b0ea2586be80a2b52362fac9c6ad0bcf0c53581525af4b96ded22090c681271795503f7f99094dc1721ef6eebdbe1d314a45ef9c9ff3815c
|
7
|
+
data.tar.gz: 67472ac71632e32e4ec6dd903a88895b2e73c0c6ce00f7ab40856f4cceda34b1e36c7ac326ba5dc6a5fe81c57645a3270e33676e02cd26f164f520e0a2ade335
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,35 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.20.1.0
|
4
|
+
|
5
|
+
- Shine data-binding syntax support for `table` widget
|
6
|
+
- Use Shine syntax in Hello, Table! and Contact Manager samples
|
7
|
+
|
8
|
+
### 4.20.0.5
|
9
|
+
|
10
|
+
- Hello, Text! sample
|
11
|
+
- Timer elaborate sample (copied and simplified from external sample)
|
12
|
+
- Calculator elaborate sample (copied and simplified from external sample)
|
13
|
+
- Fixed issue relating to cleaning up display listeners
|
14
|
+
|
15
|
+
### 4.20.0.4
|
16
|
+
|
17
|
+
- Weather elaborate sample
|
18
|
+
|
19
|
+
### 4.20.0.3
|
20
|
+
|
21
|
+
- Hello, Shell! sample
|
22
|
+
|
23
|
+
### 4.20.0.2
|
24
|
+
|
25
|
+
- Hello, Tool Bar! sample
|
26
|
+
- Hello, Cool Bar! sample
|
27
|
+
|
3
28
|
### 4.20.0.1
|
4
29
|
|
5
30
|
- Hello, Composite! sample
|
6
31
|
- Hello, Layout! sample
|
32
|
+
- Removed inclusion of Glimmer module in scaffolded App class since it is no longer needed with relying on SomeCustomShell.launch method
|
7
33
|
|
8
34
|
### 4.20.0.0
|
9
35
|
|
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.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)
|
@@ -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.1.0 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
|
|
@@ -286,7 +286,7 @@ Thanks to Java and JRuby, Glimmer apps can be packaged as cross-platform JAR fil
|
|
286
286
|
|
287
287
|
The Java Virtual Machine already supports OS-native threads, so Glimmer apps can have multiple things running in parallel with no problem.
|
288
288
|
|
289
|
-
SWT supports Canvas graphics drawing, and Glimmer takes that further by provding a Canvas Shape/Transform/Animation DSL, making it very simple to decorate any existing widgets or add new widgets with a completely custom look and feel if needed for branding
|
289
|
+
SWT supports Canvas graphics drawing, and Glimmer takes that further by provding a Canvas Shape/Transform/Animation DSL, making it very simple to decorate any existing widgets or add new widgets with a completely custom look and feel if needed for branding purposes.
|
290
290
|
|
291
291
|
Audio is supported via the Java Sound library in a cross-platform approach and video is supported via a Glimmer custom widget, so any Glimmer app can be enhanced with audio and video where needed.
|
292
292
|
|
@@ -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.1.0
|
345
345
|
```
|
346
346
|
|
347
347
|
`jgem` is JRuby's version of `gem` command.
|
@@ -358,7 +358,7 @@ glimmer-setup
|
|
358
358
|
|
359
359
|
This ensures configuring extra required Mac options before using `glimmer` and `girb` commands.
|
360
360
|
|
361
|
-
If you are new to Glimmer and would like to continue learning the basics, you may continue to the [Glimmer Command](
|
361
|
+
If you are new to Glimmer and would like to continue learning the basics, you may continue to the [Glimmer Command](#glimmer-command) section.
|
362
362
|
|
363
363
|
Otherwise, if you are ready to build a Glimmer app, you can jump to the [Glimmer Scaffolding](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/docs/reference/GLIMMER_COMMAND.md#scaffolding) section next.
|
364
364
|
|
@@ -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.1.0'
|
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.1.0
|
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
|
|
@@ -592,9 +592,9 @@ Learn more by reading the [GPG](https://github.com/AndyObtiva/glimmer/blob/maste
|
|
592
592
|
|
593
593
|
https://www.eclipse.org/swt/docs.php
|
594
594
|
|
595
|
-
Here is the SWT API:
|
595
|
+
Here is the SWT Javadoc API:
|
596
596
|
|
597
|
-
https://
|
597
|
+
https://www.eclipse.org/swt/javadoc.php
|
598
598
|
|
599
599
|
Here is a visual list of SWT widgets:
|
600
600
|
|
@@ -612,22 +612,26 @@ Here is a SWT style bit constant reference:
|
|
612
612
|
|
613
613
|
https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/SWT.html
|
614
614
|
|
615
|
-
Here is an SWT
|
615
|
+
Here is an SWT Layout guide:
|
616
616
|
|
617
|
-
https://www.eclipse.org/articles/Article-
|
617
|
+
https://www.eclipse.org/articles/Article-Understanding-Layouts/Understanding-Layouts.htm
|
618
618
|
|
619
619
|
Here is an SWT Custom Widget guide:
|
620
620
|
|
621
621
|
https://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm
|
622
622
|
|
623
|
-
Here is an SWT
|
623
|
+
Here is an SWT Drag and Drop guide:
|
624
624
|
|
625
|
-
https://www.eclipse.org/articles/Article-SWT-
|
625
|
+
https://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html
|
626
626
|
|
627
627
|
Here is an SWT Graphics / Canvas-Drawing guide:
|
628
628
|
|
629
629
|
https://www.eclipse.org/articles/Article-SWT-graphics/SWT_graphics.html
|
630
630
|
|
631
|
+
Here is an SWT Image guide:
|
632
|
+
|
633
|
+
https://www.eclipse.org/articles/Article-SWT-images/graphics-resources.html
|
634
|
+
|
631
635
|
Here is the Nebula Project (custom widget library) homepage:
|
632
636
|
|
633
637
|
https://www.eclipse.org/nebula/
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.20.0
|
1
|
+
4.20.1.0
|
@@ -184,8 +184,9 @@ This screenshot taken from the link above should give a glimpse of how SWT widge
|
|
184
184
|
|
185
185
|
[![SWT Widgets](/images/glimmer-swt-widgets.png)](https://www.eclipse.org/swt/widgets/)
|
186
186
|
|
187
|
-
In Glimmer DSL, widgets are declared with lowercase underscored names mirroring their SWT names minus the package name.
|
187
|
+
In Glimmer DSL, widgets are declared with lowercase underscored names mirroring their SWT names minus the package name.
|
188
188
|
|
189
|
+
For example, here are some Glimmer widgets and their SWT counterparts:
|
189
190
|
- `shell` instantiates `org.eclipse.swt.widgets.Shell`
|
190
191
|
- `text` instantiates `org.eclipse.swt.widgets.Text`
|
191
192
|
- `button` instantiates `org.eclipse.swt.widgets.Button`
|
@@ -298,7 +299,8 @@ This is not an exaustive list, but should give you a good start in learning Glim
|
|
298
299
|
- `checkbox`: featured in [Hello, Checkbox Group!](GLIMMER_SAMPLES.md#hello-checkbox-group) / [Hello, Checkbox!](GLIMMER_SAMPLES.md#hello-checkbox)
|
299
300
|
- `checkbox_group`: featured in [Hello, Checkbox Group!](GLIMMER_SAMPLES.md#hello-checkbox-group)
|
300
301
|
- `combo`: featured in [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Combo!](GLIMMER_SAMPLES.md#hello-combo)
|
301
|
-
- `composite`: featured in [Hello, Radio!](GLIMMER_SAMPLES.md#hello-radio) / [Hello, Computed!](GLIMMER_SAMPLES.md#hello-computed) / [Hello, Checkbox!](GLIMMER_SAMPLES.md#hello-checkbox) / [Tic Tac Toe](GLIMMER_SAMPLES.md#tic-tac-toe) / [Login](GLIMMER_SAMPLES.md#login) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
302
|
+
- `composite`: featured in [Hello, Composite!](GLIMMER_SAMPLES.md#hello-composite) / [Hello, Radio!](GLIMMER_SAMPLES.md#hello-radio) / [Hello, Computed!](GLIMMER_SAMPLES.md#hello-computed) / [Hello, Checkbox!](GLIMMER_SAMPLES.md#hello-checkbox) / [Tic Tac Toe](GLIMMER_SAMPLES.md#tic-tac-toe) / [Login](GLIMMER_SAMPLES.md#login) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
303
|
+
- `cool_bar`: featured in [Hello, Cool Bar!](GLIMMER_SAMPLES.md#hello-cool-bar)
|
302
304
|
- `date`: featured in [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Date Time!](GLIMMER_SAMPLES.md#hello-date-time) / [Hello, Custom Shell!](GLIMMER_SAMPLES.md#hello-custom-shell) / [Tic Tac Toe](GLIMMER_SAMPLES.md#tic-tac-toe)
|
303
305
|
- `date_drop_down`: featured in [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Date Time!](GLIMMER_SAMPLES.md#hello-date-time)
|
304
306
|
- `group`: featured in [Hello, Group!](GLIMMER_SAMPLES.md#hello-group) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
@@ -318,14 +320,16 @@ This is not an exaustive list, but should give you a good start in learning Glim
|
|
318
320
|
- `table_column`: featured in [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Custom Shell!](GLIMMER_SAMPLES.md#hello-custom-shell) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
319
321
|
- `text`: featured in [Hello, Computed!](GLIMMER_SAMPLES.md#hello-computed) / [Login](GLIMMER_SAMPLES.md#login) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
320
322
|
- `time`: featured in [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Date Time!](GLIMMER_SAMPLES.md#hello-date-time)
|
323
|
+
- `tool_bar`: featured in [Hello, Tool Bar!](/docs/reference/GLIMMER_SAMPLES.md#hello-tool-bar)
|
324
|
+
- `tool_item`: featured in [Hello, Tool Bar!](/docs/reference/GLIMMER_SAMPLES.md#hello-tool-bar)
|
321
325
|
- Glimmer::UI::CustomWidget: ability to define any keyword as a custom widget - featured in [Hello, Custom Widget!](GLIMMER_SAMPLES.md#hello-custom-widget)
|
322
326
|
- Glimmer::UI::CustomShell: ability to define any keyword as a custom shell (aka custom window) that opens in a new browser window (tab) automatically unless there is no shell open in the current browser window (tab) - featured in [Hello, Custom Shell!](GLIMMER_SAMPLES.md#hello-custom-shell)
|
323
327
|
|
324
328
|
**Layouts:**
|
325
|
-
- `grid_layout`: featured in [Hello, Custom Shell!](GLIMMER_SAMPLES.md#hello-custom-shell) / [Hello, Computed!](GLIMMER_SAMPLES.md#hello-computed) / [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Pop Up Context Menu!](GLIMMER_SAMPLES.md#hello-pop-up-context-menu) / [Hello, Menu Bar!](GLIMMER_SAMPLES.md#hello-menu-bar) / [Hello, List Single Selection!](GLIMMER_SAMPLES.md#hello-list-single-selection) / [Hello, List Multi Selection!](GLIMMER_SAMPLES.md#hello-list-multi-selection) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager) / [Login](GLIMMER_SAMPLES.md#login) / [Tic Tac Toe](GLIMMER_SAMPLES.md#tic-tac-toe)
|
326
|
-
- `row_layout`: featured in [Hello, Radio Group!](GLIMMER_SAMPLES.md#hello-radio-group) / [Hello, Radio!](GLIMMER_SAMPLES.md#hello-radio) / [Hello, Group!](GLIMMER_SAMPLES.md#hello-group) / [Hello, Date Time!](GLIMMER_SAMPLES.md#hello-date-time) / [Hello, Combo!](GLIMMER_SAMPLES.md#hello-combo) / [Hello, Checkbox Group!](GLIMMER_SAMPLES.md#hello-checkbox-group) / [Hello, Checkbox!](GLIMMER_SAMPLES.md#hello-checkbox) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
327
|
-
- `fill_layout`: featured in [Hello, Custom Widget!](GLIMMER_SAMPLES.md#hello-custom-widget)
|
328
|
-
- `layout_data`: featured in [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Custom Shell!](GLIMMER_SAMPLES.md#hello-custom-shell) / [Hello, Computed!](GLIMMER_SAMPLES.md#hello-computed) / [Tic Tac Toe](GLIMMER_SAMPLES.md#tic-tac-toe) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
329
|
+
- `grid_layout`: featured in [Hello, Layout!](GLIMMER_SAMPLES.md#hello-layout) / [Hello, Custom Shell!](GLIMMER_SAMPLES.md#hello-custom-shell) / [Hello, Computed!](GLIMMER_SAMPLES.md#hello-computed) / [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Pop Up Context Menu!](GLIMMER_SAMPLES.md#hello-pop-up-context-menu) / [Hello, Menu Bar!](GLIMMER_SAMPLES.md#hello-menu-bar) / [Hello, List Single Selection!](GLIMMER_SAMPLES.md#hello-list-single-selection) / [Hello, List Multi Selection!](GLIMMER_SAMPLES.md#hello-list-multi-selection) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager) / [Login](GLIMMER_SAMPLES.md#login) / [Tic Tac Toe](GLIMMER_SAMPLES.md#tic-tac-toe)
|
330
|
+
- `row_layout`: featured in [Hello, Layout!](GLIMMER_SAMPLES.md#hello-layout) / [Hello, Radio Group!](GLIMMER_SAMPLES.md#hello-radio-group) / [Hello, Radio!](GLIMMER_SAMPLES.md#hello-radio) / [Hello, Group!](GLIMMER_SAMPLES.md#hello-group) / [Hello, Date Time!](GLIMMER_SAMPLES.md#hello-date-time) / [Hello, Combo!](GLIMMER_SAMPLES.md#hello-combo) / [Hello, Checkbox Group!](GLIMMER_SAMPLES.md#hello-checkbox-group) / [Hello, Checkbox!](GLIMMER_SAMPLES.md#hello-checkbox) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
331
|
+
- `fill_layout`: featured in [Hello, Layout!](GLIMMER_SAMPLES.md#hello-layout) / [Hello, Custom Widget!](GLIMMER_SAMPLES.md#hello-custom-widget)
|
332
|
+
- `layout_data`: featured in [Hello, Layout!](GLIMMER_SAMPLES.md#hello-layout) / [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Custom Shell!](GLIMMER_SAMPLES.md#hello-custom-shell) / [Hello, Computed!](GLIMMER_SAMPLES.md#hello-computed) / [Tic Tac Toe](GLIMMER_SAMPLES.md#tic-tac-toe) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
329
333
|
|
330
334
|
**Graphics/Style:**
|
331
335
|
- `color`: featured in [Hello, Custom Widget!](GLIMMER_SAMPLES.md#hello-custom-widget) / [Hello, Menu Bar!](GLIMMER_SAMPLES.md#hello-menu-bar)
|
@@ -1396,7 +1400,6 @@ Also, for a reference, check the SWT API:
|
|
1396
1400
|
|
1397
1401
|
https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/index.html
|
1398
1402
|
|
1399
|
-
|
1400
1403
|
### Canvas Shape DSL
|
1401
1404
|
|
1402
1405
|
**(ALPHA FEATURE)**
|
@@ -1,12 +1,15 @@
|
|
1
1
|
- [Samples](#samples)
|
2
2
|
- [Hello Samples](#hello-samples)
|
3
3
|
- [Hello, World!](#hello-world)
|
4
|
+
- [Hello, Button!](#hello-button)
|
5
|
+
- [Hello, Text!](#hello-text)
|
6
|
+
- [Hello, Composite!](#hello-composite)
|
7
|
+
- [Hello, Layout!](#hello-layout)
|
8
|
+
- [Hello, Shell!](#hello-shell)
|
4
9
|
- [Hello, Tab!](#hello-tab)
|
5
10
|
- [Hello, C Tab!](#hello-c-tab)
|
6
11
|
- [Hello, Combo!](#hello-combo)
|
7
12
|
- [Hello, C Combo!](#hello-c-combo)
|
8
|
-
- [Hello, Composite!](#hello-composite)
|
9
|
-
- [Hello, Layout!](#hello-layout)
|
10
13
|
- [Hello, List Single Selection!](#hello-list-single-selection)
|
11
14
|
- [Hello, List Multi Selection!](#hello-list-multi-selection)
|
12
15
|
- [Hello, Computed!](#hello-computed)
|
@@ -30,7 +33,6 @@
|
|
30
33
|
- [Hello, Date Time!](#hello-date-time)
|
31
34
|
- [Hello, Spinner!](#hello-spinner)
|
32
35
|
- [Hello, Table!](#hello-table)
|
33
|
-
- [Hello, Button!](#hello-button)
|
34
36
|
- [Hello, Link!](#hello-link)
|
35
37
|
- [Hello, Dialog!](#hello-dialog)
|
36
38
|
- [Hello, Code Text!](#hello-code-text)
|
@@ -47,6 +49,8 @@
|
|
47
49
|
- [Hello, Font Dialog!](#hello-font-dialog)
|
48
50
|
- [Hello, Shape!](#hello-shape)
|
49
51
|
- [Hello, Custom Shape!](#hello-custom-shape)
|
52
|
+
- [Hello, Tool Bar!](#hello-tool-bar)
|
53
|
+
- [Hello, Cool Bar!](#hello-cool-bar)
|
50
54
|
- [Elaborate Samples](#elaborate-samples)
|
51
55
|
- [User Profile](#user-profile)
|
52
56
|
- [Login](#login)
|
@@ -56,6 +60,7 @@
|
|
56
60
|
- [Mandelbrot Fractal](#mandelbrot-fractal)
|
57
61
|
- [Stock Ticker](#stock-ticker)
|
58
62
|
- [Metronome](#metronome)
|
63
|
+
- [Weather](#weather)
|
59
64
|
- [External Samples](#external-samples)
|
60
65
|
- [Glimmer Calculator](#glimmer-calculator)
|
61
66
|
- [Gladiator](#gladiator)
|
@@ -96,50 +101,33 @@ Code:
|
|
96
101
|
|
97
102
|
![Hello World](/images/glimmer-hello-world.png)
|
98
103
|
|
99
|
-
#### Hello,
|
100
|
-
|
101
|
-
Code:
|
102
|
-
|
103
|
-
[samples/hello/hello_tab.rb](/samples/hello/hello_tab.rb)
|
104
|
-
|
105
|
-
![Hello Tab English](/images/glimmer-hello-tab-english.png)
|
106
|
-
![Hello Tab French](/images/glimmer-hello-tab-french.png)
|
107
|
-
|
108
|
-
#### Hello, C Tab!
|
104
|
+
#### Hello, Button!
|
109
105
|
|
110
|
-
This sample demonstrates
|
106
|
+
This sample demonstrates the use of the `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
|
111
107
|
|
112
108
|
Code:
|
113
109
|
|
114
|
-
[samples/hello/
|
115
|
-
|
116
|
-
![Hello C Tab](/images/glimmer-hello-c-tab.png)
|
117
|
-
![Hello C Tab Extra Tabs](/images/glimmer-hello-c-tab-extra-tabs.png)
|
118
|
-
![Hello C Tab Other Tab](/images/glimmer-hello-c-tab-other-tab.png)
|
119
|
-
|
120
|
-
Country flag images were made by [Freepik](https://www.flaticon.com/authors/freepik) from [www.flaticon.com](http://www.flaticon.com)
|
121
|
-
|
122
|
-
#### Hello, Combo!
|
110
|
+
[samples/hello/hello_button.rb](/samples/hello/hello_button.rb)
|
123
111
|
|
124
|
-
|
112
|
+
Hello, Button!
|
125
113
|
|
126
|
-
|
114
|
+
![Hello Button](/images/glimmer-hello-button.png)
|
127
115
|
|
128
|
-
|
116
|
+
Hello, Button! Incremented 7 times!
|
129
117
|
|
130
|
-
![Hello
|
131
|
-
![Hello Combo Expanded](/images/glimmer-hello-combo-expanded.png)
|
118
|
+
![Hello Button Incremented](/images/glimmer-hello-button-incremented.png)
|
132
119
|
|
133
|
-
#### Hello,
|
120
|
+
#### Hello, Text!
|
134
121
|
|
135
|
-
This sample demonstrates the
|
122
|
+
This sample demonstrates the use of the `text` widget in Glimmer, including data-binding (e.g. via the `<=>` operator) and event handling.
|
136
123
|
|
137
124
|
Code:
|
138
125
|
|
139
|
-
[samples/hello/
|
126
|
+
[samples/hello/hello_text.rb](/samples/hello/hello_text.rb)
|
140
127
|
|
141
|
-
|
142
|
-
|
128
|
+
Hello, Text!
|
129
|
+
|
130
|
+
![Hello Text](/images/glimmer-hello-text.png)
|
143
131
|
|
144
132
|
#### Hello, Composite!
|
145
133
|
|
@@ -173,6 +161,95 @@ Code:
|
|
173
161
|
|
174
162
|
![Hello Layout Tab7](/images/glimmer-hello-layout-tab7.png)
|
175
163
|
|
164
|
+
#### Hello, Shell!
|
165
|
+
|
166
|
+
This sample demonstrates the various shells (windows) available in SWT.
|
167
|
+
|
168
|
+
Code:
|
169
|
+
|
170
|
+
[samples/hello/hello_shell.rb](/samples/hello/hello_shell.rb)
|
171
|
+
|
172
|
+
Hello, Shell!
|
173
|
+
|
174
|
+
![Hello, Shell!](/images/glimmer-hello-shell.png)
|
175
|
+
|
176
|
+
Nested Shell
|
177
|
+
|
178
|
+
![Nested Shell](/images/glimmer-hello-shell-nested-shell.png)
|
179
|
+
|
180
|
+
Independent Shell
|
181
|
+
|
182
|
+
![Independent Shell](/images/glimmer-hello-shell-independent-shell.png)
|
183
|
+
|
184
|
+
Close-Button Shell
|
185
|
+
|
186
|
+
![Close-Button Shell](/images/glimmer-hello-shell-close-button-shell.png)
|
187
|
+
|
188
|
+
Minimize-Button Shell
|
189
|
+
|
190
|
+
![Minimize-Button Shell](/images/glimmer-hello-shell-minimize-button-shell.png)
|
191
|
+
|
192
|
+
Maximize-Button Shell
|
193
|
+
|
194
|
+
![Maximize-Button Shell](/images/glimmer-hello-shell-maximize-button-shell.png)
|
195
|
+
|
196
|
+
Buttonless Shell
|
197
|
+
|
198
|
+
![Buttonless Shell](/images/glimmer-hello-shell-buttonless-shell.png)
|
199
|
+
|
200
|
+
No Trim Shell
|
201
|
+
|
202
|
+
![No Trim Shell](/images/glimmer-hello-shell-no-trim-shell.png)
|
203
|
+
|
204
|
+
Always On Top Shell
|
205
|
+
|
206
|
+
![Always On Top Shell](/images/glimmer-hello-shell-always-on-top-shell.png)
|
207
|
+
|
208
|
+
#### Hello, Tab!
|
209
|
+
|
210
|
+
Code:
|
211
|
+
|
212
|
+
[samples/hello/hello_tab.rb](/samples/hello/hello_tab.rb)
|
213
|
+
|
214
|
+
![Hello Tab English](/images/glimmer-hello-tab-english.png)
|
215
|
+
![Hello Tab French](/images/glimmer-hello-tab-french.png)
|
216
|
+
|
217
|
+
#### Hello, C Tab!
|
218
|
+
|
219
|
+
This sample demonstrates custom tab widget usage via the `c_tab_folder` and `c_tab_item` variations of `tab_folder` and `tab_item`, which can customize fonts/background/foreground colors for tabs and display additional tabs that do not fit in the window via a drop down.
|
220
|
+
|
221
|
+
Code:
|
222
|
+
|
223
|
+
[samples/hello/hello_c_tab.rb](/samples/hello/hello_c_tab.rb)
|
224
|
+
|
225
|
+
![Hello C Tab](/images/glimmer-hello-c-tab.png)
|
226
|
+
![Hello C Tab Extra Tabs](/images/glimmer-hello-c-tab-extra-tabs.png)
|
227
|
+
![Hello C Tab Other Tab](/images/glimmer-hello-c-tab-other-tab.png)
|
228
|
+
|
229
|
+
Country flag images were made by [Freepik](https://www.flaticon.com/authors/freepik) from [www.flaticon.com](http://www.flaticon.com)
|
230
|
+
|
231
|
+
#### Hello, Combo!
|
232
|
+
|
233
|
+
This sample demonstrates combo data-binding.
|
234
|
+
|
235
|
+
Code:
|
236
|
+
|
237
|
+
[samples/hello/hello_combo.rb](/samples/hello/hello_combo.rb)
|
238
|
+
|
239
|
+
![Hello Combo](/images/glimmer-hello-combo.png)
|
240
|
+
![Hello Combo Expanded](/images/glimmer-hello-combo-expanded.png)
|
241
|
+
|
242
|
+
#### Hello, C Combo!
|
243
|
+
|
244
|
+
This sample demonstrates the custom combo variation on combo, which allows the adjustment of the combo height based on font height or layout data.
|
245
|
+
|
246
|
+
Code:
|
247
|
+
|
248
|
+
[samples/hello/hello_c_combo.rb](/samples/hello/hello_c_combo.rb)
|
249
|
+
|
250
|
+
![Hello Combo](/images/glimmer-hello-c-combo.png)
|
251
|
+
![Hello Combo Expanded](/images/glimmer-hello-c-combo-expanded.png)
|
252
|
+
|
176
253
|
#### Hello, List Single Selection!
|
177
254
|
|
178
255
|
This sample demonstrates list single-selection data-binding.
|
@@ -552,22 +629,6 @@ Hello, Table! Context Menu
|
|
552
629
|
|
553
630
|
![Hello Table](/images/glimmer-hello-table-context-menu.png)
|
554
631
|
|
555
|
-
#### Hello, Button!
|
556
|
-
|
557
|
-
This sample demonstrates the use of the `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
|
558
|
-
|
559
|
-
Code:
|
560
|
-
|
561
|
-
[samples/hello/hello_button.rb](/samples/hello/hello_button.rb)
|
562
|
-
|
563
|
-
Hello, Button!
|
564
|
-
|
565
|
-
![Hello Button](/images/glimmer-hello-button.png)
|
566
|
-
|
567
|
-
Hello, Button! Incremented 7 times!
|
568
|
-
|
569
|
-
![Hello Button Incremented](/images/glimmer-hello-button-incremented.png)
|
570
|
-
|
571
632
|
#### Hello, Link!
|
572
633
|
|
573
634
|
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.
|
@@ -820,6 +881,44 @@ Hello, Custom Shape!
|
|
820
881
|
|
821
882
|
![Hello Custom Shape](/images/glimmer-hello-custom-shape.png)
|
822
883
|
|
884
|
+
#### Hello, Tool Bar!
|
885
|
+
|
886
|
+
This sample demonstrates the use of `tool_bar` & `tool_item` as well as being able to nest `combo` in a `tool_bar`.
|
887
|
+
|
888
|
+
Code:
|
889
|
+
|
890
|
+
[samples/hello/hello_tool_bar.rb](/samples/hello/hello_tool_bar.rb)
|
891
|
+
|
892
|
+
Hello, Tool Bar!
|
893
|
+
|
894
|
+
![Hello Tool Bar](/images/glimmer-hello-tool-bar.png)
|
895
|
+
|
896
|
+
![Hello Tool Bar Cut](/images/glimmer-hello-tool-bar-cut.png)
|
897
|
+
|
898
|
+
![Hello Tool Bar Copy](/images/glimmer-hello-tool-bar-copy.png)
|
899
|
+
|
900
|
+
![Hello Tool Bar Paste](/images/glimmer-hello-tool-bar-paste.png)
|
901
|
+
|
902
|
+
![Hello Tool Bar Font Size](/images/glimmer-hello-tool-bar-font-size.png)
|
903
|
+
|
904
|
+
#### Hello, Cool Bar!
|
905
|
+
|
906
|
+
This sample demonstrates the use of `cool_bar` that can contain multiple reorganizable `tool_bar` widgets
|
907
|
+
|
908
|
+
Code:
|
909
|
+
|
910
|
+
[samples/hello/hello_cool_bar.rb](/samples/hello/hello_cool_bar.rb)
|
911
|
+
|
912
|
+
Hello, Cool Bar!
|
913
|
+
|
914
|
+
![Hello Cool Bar](/images/glimmer-hello-cool-bar.png)
|
915
|
+
|
916
|
+
![Hello Cool Bar Reorg1](/images/glimmer-hello-cool-bar-reorg1.png)
|
917
|
+
|
918
|
+
![Hello Cool Bar Reorg2](/images/glimmer-hello-cool-bar-reorg2.png)
|
919
|
+
|
920
|
+
![Hello Cool Bar Reorg3](/images/glimmer-hello-cool-bar-reorg3.png)
|
921
|
+
|
823
922
|
### Elaborate Samples
|
824
923
|
|
825
924
|
For more elaborate samples, check the following:
|
@@ -968,6 +1067,26 @@ Code:
|
|
968
1067
|
|
969
1068
|
[Download video with sound](/videos/glimmer-metronome.mp4?raw=true).
|
970
1069
|
|
1070
|
+
#### Weather
|
1071
|
+
|
1072
|
+
This sample demonstrates a Weather app that leverages the Ruby built-in `'net/http'` library, courtesy of openweathermap.org. It provides a good example of tackling JSON hierarchical hash/array data and converting into data-bindable model object attributes for Glimmer GUI synchronization.
|
1073
|
+
|
1074
|
+
Code:
|
1075
|
+
|
1076
|
+
[samples/elaborate/weather.rb](/samples/elaborate/weather.rb)
|
1077
|
+
|
1078
|
+
Montreal - Celsius
|
1079
|
+
|
1080
|
+
![Montreal C](/images/glimmer-weather-montreal-celsius.png)
|
1081
|
+
|
1082
|
+
Montreal - Fahrenheit
|
1083
|
+
|
1084
|
+
![Montreal F](/images/glimmer-weather-montreal-fahrenheit.png)
|
1085
|
+
|
1086
|
+
Atlanta - Fahrenheit
|
1087
|
+
|
1088
|
+
![Atlanta F](/images/glimmer-weather-atlanta-fahrenheit.png)
|
1089
|
+
|
971
1090
|
### External Samples
|
972
1091
|
|
973
1092
|
#### Glimmer Calculator
|