glimmer-dsl-swt 4.20.0.0 → 4.20.0.5
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 +18 -14
- data/VERSION +1 -1
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +11 -7
- data/docs/reference/GLIMMER_SAMPLES.md +170 -17
- data/docs/reference/GLIMMER_STYLE_GUIDE.md +4 -3
- data/glimmer-dsl-swt.gemspec +0 -0
- 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/tool_bar_proxy.rb +51 -0
- data/lib/glimmer/swt/widget_proxy.rb +7 -1
- 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_composite.rb +71 -0
- data/samples/hello/hello_cool_bar.rb +147 -0
- data/samples/hello/hello_layout.rb +243 -0
- data/samples/hello/hello_shell.rb +205 -0
- data/samples/hello/hello_text.rb +120 -0
- data/samples/hello/hello_tool_bar.rb +143 -0
- metadata +28 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b539c452b30e337ec632c8e4e034a2ef0585000eb7fdad70afe77ec5851f2d49
|
4
|
+
data.tar.gz: a562eca963b5d39cbb8c7b56219dae2bc23ad93e2f8b76cb1853c38077e07c93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cea713cd788b554522e83e7e72da27e942f962fb3996a415ed2d06b803f6a95345265a7e81d9fcd3dc7e6567b4951fdee1dbeedb908ecb146cdcfb70f17c6f7f
|
7
|
+
data.tar.gz: 4a15d50266466f54713a440f563d203137c5ea9a2f290d2f6f2e44f752a70ddcc772d901152aeb6fc31957b7d7d9cf6ef04df82f45db4a3964c14ed467a32c94
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.20.0.5
|
4
|
+
|
5
|
+
- Hello, Text! sample
|
6
|
+
- Timer elaborate sample (copied and simplified from external sample)
|
7
|
+
- Calculator elaborate sample (copied and simplified from external sample)
|
8
|
+
- Fixed issue relating to cleaning up display listeners
|
9
|
+
|
10
|
+
### 4.20.0.4
|
11
|
+
|
12
|
+
- Weather elaborate sample
|
13
|
+
|
14
|
+
### 4.20.0.3
|
15
|
+
|
16
|
+
- Hello, Shell! sample
|
17
|
+
|
18
|
+
### 4.20.0.2
|
19
|
+
|
20
|
+
- Hello, Tool Bar! sample
|
21
|
+
- Hello, Cool Bar! sample
|
22
|
+
|
23
|
+
### 4.20.0.1
|
24
|
+
|
25
|
+
- Hello, Composite! sample
|
26
|
+
- Hello, Layout! sample
|
27
|
+
- Removed inclusion of Glimmer module in scaffolded App class since it is no longer needed with relying on SomeCustomShell.launch method
|
28
|
+
|
3
29
|
### 4.20.0.0
|
4
30
|
|
5
31
|
- Upgrade to SWT 4.20, supporting AARCH64 experimentally
|
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.5
|
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 creator [Andy Maleh](https://andymaleh.blogspot.com/),
|
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 creator [Andy Maleh](https://andymaleh.blogspot.com/), 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.20.0.
|
18
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.0.5 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.5
|
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.0.5'
|
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.5
|
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
|
|
@@ -568,7 +568,7 @@ Here is a list of notable 3rd party gems used by Glimmer:
|
|
568
568
|
- [puts_debuggerer](https://github.com/AndyObtiva/puts_debuggerer): helps in troubleshooting when adding `require 'pd'` and using the `pd` command instead of `puts` or `p` (also `#pd_inspect` or `#pdi` instead of `#inspect`)
|
569
569
|
- [rake](https://github.com/ruby/rake): used to implement and execute `glimmer` commands
|
570
570
|
- [rake-tui](https://github.com/AndyObtiva/rake-tui): Rake Text-based User Interface. Allows navigating rake tasks with arrow keys and filtering task list by typing to quickly find an run a rake task.
|
571
|
-
- [rouge](https://github.com/rouge-ruby/rouge): Ruby syntax highlighter used in the `code_text` [Glimmer DSL for SWT custom widget](#custom-widgets) leveraged by the [Glimmer Meta-Sample](#samples)
|
571
|
+
- [rouge](https://github.com/rouge-ruby/rouge): Ruby syntax highlighter used in the `code_text` [Glimmer DSL for SWT custom widget](#custom-widgets) leveraged by the [Glimmer Meta-Sample](/docs/reference/GLIMMER_SAMPLES.md#samples)
|
572
572
|
- [super_module](https://github.com/AndyObtiva/super_module): used to cleanly write the Glimmer::UI:CustomWidget and Glimmer::UI::CustomShell modules
|
573
573
|
- [text-table](https://github.com/aptinio/text-table): renders textual data in a textual table for the command-line interface of Glimmer
|
574
574
|
- [warbler](https://github.com/jruby/warbler): converts a Glimmer app into a Java JAR file during packaging
|
@@ -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.0.5
|
@@ -49,6 +49,7 @@ This guide should help you get started with Glimmer DSL for SWT. For more advanc
|
|
49
49
|
- [Animation via Data-Binding](#animation-via-data-binding)
|
50
50
|
- [Data-Binding](#data-binding)
|
51
51
|
- [General Examples](#general-examples)
|
52
|
+
- [Shine](#shine)
|
52
53
|
- [Combo](#combo)
|
53
54
|
- [List](#list)
|
54
55
|
- [Table](#table)
|
@@ -183,8 +184,9 @@ This screenshot taken from the link above should give a glimpse of how SWT widge
|
|
183
184
|
|
184
185
|
[![SWT Widgets](/images/glimmer-swt-widgets.png)](https://www.eclipse.org/swt/widgets/)
|
185
186
|
|
186
|
-
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.
|
187
188
|
|
189
|
+
For example, here are some Glimmer widgets and their SWT counterparts:
|
188
190
|
- `shell` instantiates `org.eclipse.swt.widgets.Shell`
|
189
191
|
- `text` instantiates `org.eclipse.swt.widgets.Text`
|
190
192
|
- `button` instantiates `org.eclipse.swt.widgets.Button`
|
@@ -297,7 +299,8 @@ This is not an exaustive list, but should give you a good start in learning Glim
|
|
297
299
|
- `checkbox`: featured in [Hello, Checkbox Group!](GLIMMER_SAMPLES.md#hello-checkbox-group) / [Hello, Checkbox!](GLIMMER_SAMPLES.md#hello-checkbox)
|
298
300
|
- `checkbox_group`: featured in [Hello, Checkbox Group!](GLIMMER_SAMPLES.md#hello-checkbox-group)
|
299
301
|
- `combo`: featured in [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Combo!](GLIMMER_SAMPLES.md#hello-combo)
|
300
|
-
- `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)
|
301
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)
|
302
305
|
- `date_drop_down`: featured in [Hello, Table!](GLIMMER_SAMPLES.md#hello-table) / [Hello, Date Time!](GLIMMER_SAMPLES.md#hello-date-time)
|
303
306
|
- `group`: featured in [Hello, Group!](GLIMMER_SAMPLES.md#hello-group) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
@@ -317,14 +320,16 @@ This is not an exaustive list, but should give you a good start in learning Glim
|
|
317
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)
|
318
321
|
- `text`: featured in [Hello, Computed!](GLIMMER_SAMPLES.md#hello-computed) / [Login](GLIMMER_SAMPLES.md#login) / [Contact Manager](GLIMMER_SAMPLES.md#contact-manager)
|
319
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)
|
320
325
|
- Glimmer::UI::CustomWidget: ability to define any keyword as a custom widget - featured in [Hello, Custom Widget!](GLIMMER_SAMPLES.md#hello-custom-widget)
|
321
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)
|
322
327
|
|
323
328
|
**Layouts:**
|
324
|
-
- `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)
|
325
|
-
- `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)
|
326
|
-
- `fill_layout`: featured in [Hello, Custom Widget!](GLIMMER_SAMPLES.md#hello-custom-widget)
|
327
|
-
- `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)
|
328
333
|
|
329
334
|
**Graphics/Style:**
|
330
335
|
- `color`: featured in [Hello, Custom Widget!](GLIMMER_SAMPLES.md#hello-custom-widget) / [Hello, Menu Bar!](GLIMMER_SAMPLES.md#hello-menu-bar)
|
@@ -1395,7 +1400,6 @@ Also, for a reference, check the SWT API:
|
|
1395
1400
|
|
1396
1401
|
https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/index.html
|
1397
1402
|
|
1398
|
-
|
1399
1403
|
### Canvas Shape DSL
|
1400
1404
|
|
1401
1405
|
**(ALPHA FEATURE)**
|
@@ -1,6 +1,11 @@
|
|
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)
|
@@ -28,7 +33,6 @@
|
|
28
33
|
- [Hello, Date Time!](#hello-date-time)
|
29
34
|
- [Hello, Spinner!](#hello-spinner)
|
30
35
|
- [Hello, Table!](#hello-table)
|
31
|
-
- [Hello, Button!](#hello-button)
|
32
36
|
- [Hello, Link!](#hello-link)
|
33
37
|
- [Hello, Dialog!](#hello-dialog)
|
34
38
|
- [Hello, Code Text!](#hello-code-text)
|
@@ -45,6 +49,8 @@
|
|
45
49
|
- [Hello, Font Dialog!](#hello-font-dialog)
|
46
50
|
- [Hello, Shape!](#hello-shape)
|
47
51
|
- [Hello, Custom Shape!](#hello-custom-shape)
|
52
|
+
- [Hello, Tool Bar!](#hello-tool-bar)
|
53
|
+
- [Hello, Cool Bar!](#hello-cool-bar)
|
48
54
|
- [Elaborate Samples](#elaborate-samples)
|
49
55
|
- [User Profile](#user-profile)
|
50
56
|
- [Login](#login)
|
@@ -54,6 +60,7 @@
|
|
54
60
|
- [Mandelbrot Fractal](#mandelbrot-fractal)
|
55
61
|
- [Stock Ticker](#stock-ticker)
|
56
62
|
- [Metronome](#metronome)
|
63
|
+
- [Weather](#weather)
|
57
64
|
- [External Samples](#external-samples)
|
58
65
|
- [Glimmer Calculator](#glimmer-calculator)
|
59
66
|
- [Gladiator](#gladiator)
|
@@ -94,6 +101,110 @@ Code:
|
|
94
101
|
|
95
102
|
![Hello World](/images/glimmer-hello-world.png)
|
96
103
|
|
104
|
+
#### Hello, Button!
|
105
|
+
|
106
|
+
This sample demonstrates the use of the `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
|
107
|
+
|
108
|
+
Code:
|
109
|
+
|
110
|
+
[samples/hello/hello_button.rb](/samples/hello/hello_button.rb)
|
111
|
+
|
112
|
+
Hello, Button!
|
113
|
+
|
114
|
+
![Hello Button](/images/glimmer-hello-button.png)
|
115
|
+
|
116
|
+
Hello, Button! Incremented 7 times!
|
117
|
+
|
118
|
+
![Hello Button Incremented](/images/glimmer-hello-button-incremented.png)
|
119
|
+
|
120
|
+
#### Hello, Text!
|
121
|
+
|
122
|
+
This sample demonstrates the use of the `text` widget in Glimmer, including data-binding (e.g. via the `<=>` operator) and event handling.
|
123
|
+
|
124
|
+
Code:
|
125
|
+
|
126
|
+
[samples/hello/hello_text.rb](/samples/hello/hello_text.rb)
|
127
|
+
|
128
|
+
Hello, Text!
|
129
|
+
|
130
|
+
![Hello Text](/images/glimmer-hello-text.png)
|
131
|
+
|
132
|
+
#### Hello, Composite!
|
133
|
+
|
134
|
+
This sample demonstrates the `composite` widget, which is simply used as a container for visual layout and organization.
|
135
|
+
|
136
|
+
Code:
|
137
|
+
|
138
|
+
[samples/hello/hello_composite.rb](/samples/hello/hello_composite.rb)
|
139
|
+
|
140
|
+
![Hello Composite](/images/glimmer-hello-composite.png)
|
141
|
+
|
142
|
+
#### Hello, Layout!
|
143
|
+
|
144
|
+
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`
|
145
|
+
|
146
|
+
Code:
|
147
|
+
|
148
|
+
[samples/hello/hello_layout.rb](/samples/hello/hello_layout.rb)
|
149
|
+
|
150
|
+
![Hello Layout Tab1](/images/glimmer-hello-layout-tab1.png)
|
151
|
+
|
152
|
+
![Hello Layout Tab2](/images/glimmer-hello-layout-tab2.png)
|
153
|
+
|
154
|
+
![Hello Layout Tab3](/images/glimmer-hello-layout-tab3.png)
|
155
|
+
|
156
|
+
![Hello Layout Tab4](/images/glimmer-hello-layout-tab4.png)
|
157
|
+
|
158
|
+
![Hello Layout Tab5](/images/glimmer-hello-layout-tab5.png)
|
159
|
+
|
160
|
+
![Hello Layout Tab6](/images/glimmer-hello-layout-tab6.png)
|
161
|
+
|
162
|
+
![Hello Layout Tab7](/images/glimmer-hello-layout-tab7.png)
|
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
|
+
|
97
208
|
#### Hello, Tab!
|
98
209
|
|
99
210
|
Code:
|
@@ -518,22 +629,6 @@ Hello, Table! Context Menu
|
|
518
629
|
|
519
630
|
![Hello Table](/images/glimmer-hello-table-context-menu.png)
|
520
631
|
|
521
|
-
#### Hello, Button!
|
522
|
-
|
523
|
-
This sample demonstrates the use of the `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
|
524
|
-
|
525
|
-
Code:
|
526
|
-
|
527
|
-
[samples/hello/hello_button.rb](/samples/hello/hello_button.rb)
|
528
|
-
|
529
|
-
Hello, Button!
|
530
|
-
|
531
|
-
![Hello Button](/images/glimmer-hello-button.png)
|
532
|
-
|
533
|
-
Hello, Button! Incremented 7 times!
|
534
|
-
|
535
|
-
![Hello Button Incremented](/images/glimmer-hello-button-incremented.png)
|
536
|
-
|
537
632
|
#### Hello, Link!
|
538
633
|
|
539
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.
|
@@ -786,6 +881,44 @@ Hello, Custom Shape!
|
|
786
881
|
|
787
882
|
![Hello Custom Shape](/images/glimmer-hello-custom-shape.png)
|
788
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
|
+
|
789
922
|
### Elaborate Samples
|
790
923
|
|
791
924
|
For more elaborate samples, check the following:
|
@@ -934,6 +1067,26 @@ Code:
|
|
934
1067
|
|
935
1068
|
[Download video with sound](/videos/glimmer-metronome.mp4?raw=true).
|
936
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
|
+
|
937
1090
|
### External Samples
|
938
1091
|
|
939
1092
|
#### Glimmer Calculator
|