glimmer-dsl-swt 4.19.0.2 → 4.20.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +26 -27
  4. data/RUBY_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +44 -15
  7. data/docs/reference/GLIMMER_SAMPLES.md +157 -17
  8. data/glimmer-dsl-swt.gemspec +0 -0
  9. data/lib/glimmer/data_binding/shine.rb +41 -26
  10. data/lib/glimmer/dsl/swt/dsl.rb +2 -1
  11. data/lib/glimmer/dsl/swt/shine_data_binding_expression.rb +49 -0
  12. data/lib/glimmer/dsl/swt/widget_expression.rb +2 -0
  13. data/lib/glimmer/launcher.rb +6 -0
  14. data/lib/glimmer/rake_task/scaffold.rb +0 -2
  15. data/lib/glimmer/swt/combo_proxy.rb +48 -0
  16. data/lib/glimmer/swt/custom/code_text.rb +13 -9
  17. data/lib/glimmer/swt/tool_bar_proxy.rb +51 -0
  18. data/lib/glimmer/swt/widget_proxy.rb +6 -0
  19. data/samples/elaborate/contact_manager.rb +7 -5
  20. data/samples/elaborate/login.rb +18 -16
  21. data/samples/elaborate/mandelbrot_fractal.rb +2 -2
  22. data/samples/elaborate/metronome.rb +3 -3
  23. data/samples/elaborate/tetris/model/game.rb +0 -3
  24. data/samples/elaborate/tic_tac_toe.rb +2 -2
  25. data/samples/elaborate/weather.rb +164 -0
  26. data/samples/hello/hello_button.rb +1 -1
  27. data/samples/hello/hello_c_combo.rb +2 -1
  28. data/samples/hello/hello_c_tab.rb +1 -0
  29. data/samples/hello/hello_canvas.rb +5 -5
  30. data/samples/hello/hello_canvas_animation_data_binding.rb +1 -1
  31. data/samples/hello/hello_canvas_data_binding.rb +16 -16
  32. data/samples/hello/hello_checkbox.rb +4 -4
  33. data/samples/hello/hello_code_text.rb +3 -57
  34. data/samples/hello/hello_color_dialog.rb +1 -1
  35. data/samples/hello/hello_combo.rb +1 -1
  36. data/samples/hello/hello_composite.rb +71 -0
  37. data/samples/hello/hello_computed.rb +5 -5
  38. data/samples/hello/hello_cool_bar.rb +147 -0
  39. data/samples/hello/hello_custom_widget.rb +1 -1
  40. data/samples/hello/hello_date_time.rb +4 -4
  41. data/samples/hello/hello_dialog.rb +3 -2
  42. data/samples/hello/hello_drag_and_drop.rb +1 -1
  43. data/samples/hello/hello_file_dialog.rb +1 -1
  44. data/samples/hello/hello_font_dialog.rb +3 -3
  45. data/samples/hello/hello_group.rb +6 -6
  46. data/samples/hello/hello_layout.rb +243 -0
  47. data/samples/hello/hello_link.rb +56 -50
  48. data/samples/hello/hello_list_multi_selection.rb +1 -1
  49. data/samples/hello/hello_list_single_selection.rb +1 -1
  50. data/samples/hello/hello_progress_bar.rb +10 -10
  51. data/samples/hello/hello_radio.rb +6 -6
  52. data/samples/hello/hello_sash_form.rb +4 -4
  53. data/samples/hello/hello_shell.rb +205 -0
  54. data/samples/hello/hello_spinner.rb +6 -2
  55. data/samples/hello/hello_styled_text.rb +11 -11
  56. data/samples/hello/hello_tool_bar.rb +143 -0
  57. data/vendor/swt/linux/swt.jar +0 -0
  58. data/vendor/swt/linux_aarch64/swt.jar +0 -0
  59. data/vendor/swt/mac/swt.jar +0 -0
  60. data/vendor/swt/mac_aarch64/swt.jar +0 -0
  61. data/vendor/swt/windows/swt.jar +0 -0
  62. metadata +14 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93ec7af6cbc39ea5df42b33602473d8f8577cd1f1370e794f684ce059dab41ee
4
- data.tar.gz: 0ade71e71e6c2255b3583737ef65264a3f1518de9e135abcca354b648b66e045
3
+ metadata.gz: 76c2288c83bde07fd0e5db24556bd986b52c868db3db8dffd1f4cb4a82bd8085
4
+ data.tar.gz: 33f8584fd2ce2efac14d188a5d4753f6a807851529d663b1dbab1b57a4838db8
5
5
  SHA512:
6
- metadata.gz: 523b11fe2143376f5fe395c2b3eb3ca440fcf16851176874d0ea87c7f533d5f87251acab138ab81fa6c5c75f535de43c4fe5cb315c8a4f945e5d58b470a7ed3c
7
- data.tar.gz: f16f441f4e2861de3b899d3992c83f99b4ec7da30a3f077f0191708ba8a7797c01bc3b68ee5a6b430b0e972d55005715277a0c445c323fff4bd99f44dcf9ae13
6
+ metadata.gz: cbb93aa7d256686e409becd45a4e4a8bc4ca2597923a8b66118f3711aa8922a1b5d2b6ad62d615b6affdcf430533b1539118313c5eea95c81f94766c21a90486
7
+ data.tar.gz: 1c79ebfc57bf52c2d586ce65badaf0643ce37c534261943597d308bbd702e1fa01840f9d75164c80e9597c8e73f26d438ec95528321a8ba8f16b0d2048412814
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.20.0.4
4
+
5
+ - Weather elaborate sample
6
+
7
+ ### 4.20.0.3
8
+
9
+ - Hello, Shell! sample
10
+
11
+ ### 4.20.0.2
12
+
13
+ - Hello, Tool Bar! sample
14
+ - Hello, Cool Bar! sample
15
+
16
+ ### 4.20.0.1
17
+
18
+ - Hello, Composite! sample
19
+ - Hello, Layout! sample
20
+ - Removed inclusion of Glimmer module in scaffolded App class since it is no longer needed with relying on SomeCustomShell.launch method
21
+
22
+ ### 4.20.0.0
23
+
24
+ - Upgrade to SWT 4.20, supporting AARCH64 experimentally
25
+ - Upgrade to JRuby 9.2.19.0
26
+ - Shine syntax for data-binding
27
+ - Tweak/Fix Samples
28
+
3
29
  ### 4.19.0.2
4
30
 
5
31
  - Fixed issue with Meta-Sample code editing not showing changes properly (although recording them)
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.19.0.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.0.4
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,14 +10,16 @@
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 its creator [Andy Maleh](https://andymaleh.blogspot.com/), an EclipseCon/EclipseWorld/RubyConf speaker and expert.
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.19.0.2 includes [SWT 4.19](https://download.eclipse.org/eclipse/downloads/drops4/R-4.19-202103031800/), which was released on March 3, 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.
18
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.0.4 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
- [Glimmer DSL for SWT receives two updates per month](https://rubygems.org/gems/glimmer-dsl-swt/versions). You can trust [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) with your Ruby desktop GUI development needs! [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) brings great ideas to the table, such as declarative programming via domain specific languages, currently under-utilized in the GUI domain. That said, it may not be feature complete enough for everybody's needs, so please help make [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) even better by providing feedback and [contributing](#contributing) when possible. The project is very active, so any feature suggestions that are accepted could be implemented within weeks if not days. Also, you are welcome to [hire me](#hire-me) full-time if you want long-term development of [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) for your project needs.
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
+
22
+ Please help make [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) better by providing feedback and [contributing](#contributing) whenever possible. Any feature suggestions that are accepted could be implemented within weeks if not days.
21
23
 
22
24
  Glimmer DSL gems:
23
25
  - [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
@@ -308,18 +310,15 @@ https://www.eclipse.org/swt/faq.php
308
310
  ## Pre-requisites
309
311
 
310
312
  - JDK 8u241 (1.8.0_241) (find at https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html / On Windows, ensure PATH includes Java bin directory like C:\Program Files\Java\jdk1.8.0_241\bin for javapackager to work during packaging Glimmer applications)
311
- - JRuby 9.2.17.0 (supporting Ruby 2.5.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux or find at [https://www.jruby.org/download](https://www.jruby.org/download) for Windows)
312
- - SWT 4.19 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem)
313
+ - [RVM](http://rvm.io) on Mac & Linux (not available on Windows)
314
+ - JRuby 9.2.19.0 (supporting Ruby 2.5.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.2.19.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
315
+ - SWT 4.20 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem). Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested with Glimmer DSL for SWT yet, so it is considered experimental until declared otherwise.
313
316
  - Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
314
317
 
315
- To obtain JRuby through [RVM](http://rvm.io), you may run:
316
-
317
- ```bash
318
- rvm install jruby-9.2.17.0
319
- ```
320
-
321
318
  Glimmer might still work on other versions of Java, JRuby and SWT, but there are no guarantees, so it is best to stick to the pre-requisites outlined above.
322
319
 
320
+ To change the SWT version to a custom `swt.jar` version that you have, simply set the 'SWT_JAR_FILE_PATH' env var.
321
+
323
322
  ## Setup
324
323
 
325
324
  Please follow these instructions to make the `glimmer` command available on your system via the [`glimmer-dsl-swt`](https://github.com/AndyObtiva/glimmer-dsl-swt) gem.
@@ -342,7 +341,7 @@ jgem install glimmer-dsl-swt
342
341
 
343
342
  Or this command if you want a specific version:
344
343
  ```
345
- jgem install glimmer-dsl-swt -v 4.19.0.2
344
+ jgem install glimmer-dsl-swt -v 4.20.0.4
346
345
  ```
347
346
 
348
347
  `jgem` is JRuby's version of `gem` command.
@@ -359,7 +358,7 @@ glimmer-setup
359
358
 
360
359
  This ensures configuring extra required Mac options before using `glimmer` and `girb` commands.
361
360
 
362
- If you are new to Glimmer and would like to continue learning the basics, you may continue to the [Glimmer Command](https://github.com/AndyObtiva/glimmer#glimmer-command) section.
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.
363
362
 
364
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.
365
364
 
@@ -370,7 +369,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
370
369
 
371
370
  Add the following to `Gemfile`:
372
371
  ```
373
- gem 'glimmer-dsl-swt', '~> 4.19.0.2'
372
+ gem 'glimmer-dsl-swt', '~> 4.20.0.4'
374
373
  ```
375
374
 
376
375
  And, then run:
@@ -391,7 +390,7 @@ glimmer
391
390
  ```
392
391
 
393
392
  ```
394
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.19.0.2
393
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.0.4
395
394
 
396
395
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
397
396
 
@@ -569,7 +568,7 @@ Here is a list of notable 3rd party gems used by Glimmer:
569
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`)
570
569
  - [rake](https://github.com/ruby/rake): used to implement and execute `glimmer` commands
571
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.
572
- - [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)
573
572
  - [super_module](https://github.com/AndyObtiva/super_module): used to cleanly write the Glimmer::UI:CustomWidget and Glimmer::UI::CustomShell modules
574
573
  - [text-table](https://github.com/aptinio/text-table): renders textual data in a textual table for the command-line interface of Glimmer
575
574
  - [warbler](https://github.com/jruby/warbler): converts a Glimmer app into a Java JAR file during packaging
@@ -593,9 +592,9 @@ Learn more by reading the [GPG](https://github.com/AndyObtiva/glimmer/blob/maste
593
592
 
594
593
  https://www.eclipse.org/swt/docs.php
595
594
 
596
- Here is the SWT API:
595
+ Here is the SWT Javadoc API:
597
596
 
598
- https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/index.html
597
+ https://www.eclipse.org/swt/javadoc.php
599
598
 
600
599
  Here is a visual list of SWT widgets:
601
600
 
@@ -613,22 +612,26 @@ Here is a SWT style bit constant reference:
613
612
 
614
613
  https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/SWT.html
615
614
 
616
- Here is an SWT Drag and Drop guide:
615
+ Here is an SWT Layout guide:
617
616
 
618
- https://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html
617
+ https://www.eclipse.org/articles/Article-Understanding-Layouts/Understanding-Layouts.htm
619
618
 
620
619
  Here is an SWT Custom Widget guide:
621
620
 
622
621
  https://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm
623
622
 
624
- Here is an SWT Image guide:
623
+ Here is an SWT Drag and Drop guide:
625
624
 
626
- https://www.eclipse.org/articles/Article-SWT-images/graphics-resources.html
625
+ https://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html
627
626
 
628
627
  Here is an SWT Graphics / Canvas-Drawing guide:
629
628
 
630
629
  https://www.eclipse.org/articles/Article-SWT-graphics/SWT_graphics.html
631
630
 
631
+ Here is an SWT Image guide:
632
+
633
+ https://www.eclipse.org/articles/Article-SWT-images/graphics-resources.html
634
+
632
635
  Here is the Nebula Project (custom widget library) homepage:
633
636
 
634
637
  https://www.eclipse.org/nebula/
@@ -682,10 +685,6 @@ You may apply for contributing to any of these Glimmer DSL gems whether you pref
682
685
 
683
686
  [Click here to view contributor commits.](https://github.com/AndyObtiva/glimmer-dsl-swt/graphs/contributors)
684
687
 
685
- ## Hire Me
686
-
687
- If your company would like to invest fulltime in further development of the Glimmer open-source project, [hire me](https://www.linkedin.com/in/andymaleh/).
688
-
689
688
  ## License
690
689
 
691
690
  [MIT](LICENSE.txt)
data/RUBY_VERSION CHANGED
@@ -1 +1 @@
1
- jruby-9.2.17.0
1
+ jruby-9.2.19.0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.19.0.2
1
+ 4.20.0.4
@@ -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. For example, here are some Glimmer widgets and their SWT counterparts:
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)
@@ -380,6 +385,7 @@ Shell widget proxy has extra methods specific to SWT Shell:
380
385
  - `#visible?`: Returns whether a shell is visible
381
386
  - `#opened_before?`: Returns whether a shell has been opened at least once before (additionally implying the SWT Event Loop has been started already)
382
387
  - `#visible=`: Setting to true opens/shows shell. Setting to false hides the shell.
388
+ - `#layout`: Lays out contained widgets using SWT's `Shell#layout` method
383
389
  - `#pack`: Packs contained widgets using SWT's `Shell#pack` method
384
390
  - `#pack_same_size`: Packs contained widgets without changing shell's size when widget sizes change
385
391
 
@@ -919,6 +925,7 @@ Example loading a URL (you may copy/paste in [`girb`](GLIMMER_GIRB.md)):
919
925
  ```ruby
920
926
  shell {
921
927
  minimum_size 1024, 860
928
+ maximum_size 2000, 1000
922
929
  browser {
923
930
  url 'http://brightonresort.com/about'
924
931
  }
@@ -1393,7 +1400,6 @@ Also, for a reference, check the SWT API:
1393
1400
 
1394
1401
  https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/index.html
1395
1402
 
1396
-
1397
1403
  ### Canvas Shape DSL
1398
1404
 
1399
1405
  **(ALPHA FEATURE)**
@@ -2230,13 +2236,13 @@ This example adds on the one above it by specifying converters on read and write
2230
2236
 
2231
2237
  `text bind(contact, 'address.street', sync_exec: true)`
2232
2238
 
2233
- **(ALPHA FEATURE)**
2239
+ **(BETA FEATURE)**
2234
2240
 
2235
2241
  This example forces GUI updates via [sync_exec](#sync_exec) assuming they are coming from another thread (different from the GUI thread)
2236
2242
 
2237
2243
  `text bind(contact, 'address.street', async_exec: true)`
2238
2244
 
2239
- **(ALPHA FEATURE)**
2245
+ **(BETA FEATURE)**
2240
2246
 
2241
2247
  This example forces GUI updates via [async_exec](#async_exec) assuming they are coming from another thread (different from the GUI thread)
2242
2248
 
@@ -2248,7 +2254,7 @@ This example also specifies a converter on read of the model property, but via a
2248
2254
 
2249
2255
  This is a block shortcut version of the syntax above it. It facilitates formatting model data for read-only widgets since it's a very common view concern. It also saves the developer from having to create a separate formatter/presenter for the model when the view can be an active view that handles common simple formatting operations directly.
2250
2256
 
2251
- `text bind(contact, 'address.street', read_only: true)
2257
+ `text bind(contact, 'address.street', read_only: true)`
2252
2258
 
2253
2259
  This is read-ohly data-binding. It doesn't update contact.address.street when widget text property is changed.
2254
2260
 
@@ -2270,6 +2276,33 @@ This example demonstrates nested indexed computed value data binding whereby the
2270
2276
 
2271
2277
  Example from [samples/hello/hello_combo.rb](samples/hello_combo.rb) sample (you may copy/paste in [`girb`](GLIMMER_GIRB.md)):
2272
2278
 
2279
+ #### Shine
2280
+
2281
+ **(EARLY ALPHA FEATURE)**
2282
+
2283
+ The new Shine syntax for View/Model Attribute Mapping allows data-binding visually with simple arrow operators in Ruby.
2284
+
2285
+ Use `<=> [model, attribute, options]` for bidirectional (two-way) data-binding instead of `bind(model, attribute, options)`.
2286
+ Use `<= [model, attribute, options]` for unidirectional (one-way) data-binding instead of `bind(model, attribute, read_only: true, more_options)`
2287
+
2288
+ Examples:
2289
+
2290
+ ```ruby
2291
+ text <=> [@contact, :first_name]
2292
+ ```
2293
+
2294
+ ```ruby
2295
+ text <=> [@contact, :last_name]
2296
+ ```
2297
+
2298
+ ```ruby
2299
+ text <= [@contact, :name, computed_by: [:first_name, :last_name]]
2300
+ ```
2301
+
2302
+ Note that `table`, `tree`, custom widgets, custom shapes, and animations are not supported by Shine syntax for data-binding yet, so continue to use `bind` with them for the time being.
2303
+
2304
+ Check out [sample code](/samples) for more examples of Shine syntax in action, such as [Hello, Computed!](/docs/reference/GLIMMER_SAMPLES.md#hello-computed).
2305
+
2273
2306
  #### Combo
2274
2307
 
2275
2308
  The `combo` widget provides a dropdown of options. By default, it also allows typing in a new option. To disable that behavior, you may use with the `:read_only` SWT style.
@@ -3123,8 +3156,6 @@ You may see another example at the [Hello, Radio Group!](GLIMMER_SAMPLES.md#hell
3123
3156
 
3124
3157
  ##### Code Text Custom Widget
3125
3158
 
3126
- **(BETA FEATURE)**
3127
-
3128
3159
  `code_text` is a Glimmer built-in custom widget that displays syntax highlighted Ruby code in a customized SWT [StyledText](https://help.eclipse.org/2020-09/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/custom/StyledText.html) widget.
3129
3160
 
3130
3161
  It is used in the [Glimmer Meta-Sample (The Sample of Samples)](#samples):
@@ -3149,8 +3180,6 @@ To use, simply use `code_text` in place of the `text` or `styled_text` widget. I
3149
3180
  **lines**
3150
3181
  (default: `false`)
3151
3182
 
3152
- **(BETA FEATURE)**
3153
-
3154
3183
  Shows line numbers when set to true.
3155
3184
 
3156
3185
  If set to a hash like `{width: 4}`, it sets the initial width of the line numbers lane in character count (default: 4)
@@ -3188,7 +3217,7 @@ Sets the code language, which can be one of the following [rouge gem](#https://r
3188
3217
  - bibtex
3189
3218
  - biml
3190
3219
  - bpf
3191
- - brainfuck
3220
+ - brainf*ck
3192
3221
  - brightscript
3193
3222
  - bsl
3194
3223
  - c
@@ -1,6 +1,10 @@
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)
@@ -28,7 +32,6 @@
28
32
  - [Hello, Date Time!](#hello-date-time)
29
33
  - [Hello, Spinner!](#hello-spinner)
30
34
  - [Hello, Table!](#hello-table)
31
- - [Hello, Button!](#hello-button)
32
35
  - [Hello, Link!](#hello-link)
33
36
  - [Hello, Dialog!](#hello-dialog)
34
37
  - [Hello, Code Text!](#hello-code-text)
@@ -45,6 +48,8 @@
45
48
  - [Hello, Font Dialog!](#hello-font-dialog)
46
49
  - [Hello, Shape!](#hello-shape)
47
50
  - [Hello, Custom Shape!](#hello-custom-shape)
51
+ - [Hello, Tool Bar!](#hello-tool-bar)
52
+ - [Hello, Cool Bar!](#hello-cool-bar)
48
53
  - [Elaborate Samples](#elaborate-samples)
49
54
  - [User Profile](#user-profile)
50
55
  - [Login](#login)
@@ -54,6 +59,7 @@
54
59
  - [Mandelbrot Fractal](#mandelbrot-fractal)
55
60
  - [Stock Ticker](#stock-ticker)
56
61
  - [Metronome](#metronome)
62
+ - [Weather](#weather)
57
63
  - [External Samples](#external-samples)
58
64
  - [Glimmer Calculator](#glimmer-calculator)
59
65
  - [Gladiator](#gladiator)
@@ -94,6 +100,98 @@ Code:
94
100
 
95
101
  ![Hello World](/images/glimmer-hello-world.png)
96
102
 
103
+ #### Hello, Button!
104
+
105
+ This sample demonstrates the use of the `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
106
+
107
+ Code:
108
+
109
+ [samples/hello/hello_button.rb](/samples/hello/hello_button.rb)
110
+
111
+ Hello, Button!
112
+
113
+ ![Hello Button](/images/glimmer-hello-button.png)
114
+
115
+ Hello, Button! Incremented 7 times!
116
+
117
+ ![Hello Button Incremented](/images/glimmer-hello-button-incremented.png)
118
+
119
+ #### Hello, Composite!
120
+
121
+ This sample demonstrates the `composite` widget, which is simply used as a container for visual layout and organization.
122
+
123
+ Code:
124
+
125
+ [samples/hello/hello_composite.rb](/samples/hello/hello_composite.rb)
126
+
127
+ ![Hello Composite](/images/glimmer-hello-composite.png)
128
+
129
+ #### Hello, Layout!
130
+
131
+ 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`
132
+
133
+ Code:
134
+
135
+ [samples/hello/hello_layout.rb](/samples/hello/hello_layout.rb)
136
+
137
+ ![Hello Layout Tab1](/images/glimmer-hello-layout-tab1.png)
138
+
139
+ ![Hello Layout Tab2](/images/glimmer-hello-layout-tab2.png)
140
+
141
+ ![Hello Layout Tab3](/images/glimmer-hello-layout-tab3.png)
142
+
143
+ ![Hello Layout Tab4](/images/glimmer-hello-layout-tab4.png)
144
+
145
+ ![Hello Layout Tab5](/images/glimmer-hello-layout-tab5.png)
146
+
147
+ ![Hello Layout Tab6](/images/glimmer-hello-layout-tab6.png)
148
+
149
+ ![Hello Layout Tab7](/images/glimmer-hello-layout-tab7.png)
150
+
151
+ #### Hello, Shell!
152
+
153
+ This sample demonstrates the various shells (windows) available in SWT.
154
+
155
+ Code:
156
+
157
+ [samples/hello/hello_shell.rb](/samples/hello/hello_shell.rb)
158
+
159
+ Hello, Shell!
160
+
161
+ ![Hello, Shell!](/images/glimmer-hello-shell.png)
162
+
163
+ Nested Shell
164
+
165
+ ![Nested Shell](/images/glimmer-hello-shell-nested-shell.png)
166
+
167
+ Independent Shell
168
+
169
+ ![Independent Shell](/images/glimmer-hello-shell-independent-shell.png)
170
+
171
+ Close-Button Shell
172
+
173
+ ![Close-Button Shell](/images/glimmer-hello-shell-close-button-shell.png)
174
+
175
+ Minimize-Button Shell
176
+
177
+ ![Minimize-Button Shell](/images/glimmer-hello-shell-minimize-button-shell.png)
178
+
179
+ Maximize-Button Shell
180
+
181
+ ![Maximize-Button Shell](/images/glimmer-hello-shell-maximize-button-shell.png)
182
+
183
+ Buttonless Shell
184
+
185
+ ![Buttonless Shell](/images/glimmer-hello-shell-buttonless-shell.png)
186
+
187
+ No Trim Shell
188
+
189
+ ![No Trim Shell](/images/glimmer-hello-shell-no-trim-shell.png)
190
+
191
+ Always On Top Shell
192
+
193
+ ![Always On Top Shell](/images/glimmer-hello-shell-always-on-top-shell.png)
194
+
97
195
  #### Hello, Tab!
98
196
 
99
197
  Code:
@@ -518,22 +616,6 @@ Hello, Table! Context Menu
518
616
 
519
617
  ![Hello Table](/images/glimmer-hello-table-context-menu.png)
520
618
 
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
619
  #### Hello, Link!
538
620
 
539
621
  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 +868,44 @@ Hello, Custom Shape!
786
868
 
787
869
  ![Hello Custom Shape](/images/glimmer-hello-custom-shape.png)
788
870
 
871
+ #### Hello, Tool Bar!
872
+
873
+ This sample demonstrates the use of `tool_bar` & `tool_item` as well as being able to nest `combo` in a `tool_bar`.
874
+
875
+ Code:
876
+
877
+ [samples/hello/hello_tool_bar.rb](/samples/hello/hello_tool_bar.rb)
878
+
879
+ Hello, Tool Bar!
880
+
881
+ ![Hello Tool Bar](/images/glimmer-hello-tool-bar.png)
882
+
883
+ ![Hello Tool Bar Cut](/images/glimmer-hello-tool-bar-cut.png)
884
+
885
+ ![Hello Tool Bar Copy](/images/glimmer-hello-tool-bar-copy.png)
886
+
887
+ ![Hello Tool Bar Paste](/images/glimmer-hello-tool-bar-paste.png)
888
+
889
+ ![Hello Tool Bar Font Size](/images/glimmer-hello-tool-bar-font-size.png)
890
+
891
+ #### Hello, Cool Bar!
892
+
893
+ This sample demonstrates the use of `cool_bar` that can contain multiple reorganizable `tool_bar` widgets
894
+
895
+ Code:
896
+
897
+ [samples/hello/hello_cool_bar.rb](/samples/hello/hello_cool_bar.rb)
898
+
899
+ Hello, Cool Bar!
900
+
901
+ ![Hello Cool Bar](/images/glimmer-hello-cool-bar.png)
902
+
903
+ ![Hello Cool Bar Reorg1](/images/glimmer-hello-cool-bar-reorg1.png)
904
+
905
+ ![Hello Cool Bar Reorg2](/images/glimmer-hello-cool-bar-reorg2.png)
906
+
907
+ ![Hello Cool Bar Reorg3](/images/glimmer-hello-cool-bar-reorg3.png)
908
+
789
909
  ### Elaborate Samples
790
910
 
791
911
  For more elaborate samples, check the following:
@@ -934,6 +1054,26 @@ Code:
934
1054
 
935
1055
  [Download video with sound](/videos/glimmer-metronome.mp4?raw=true).
936
1056
 
1057
+ #### Weather
1058
+
1059
+ 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.
1060
+
1061
+ Code:
1062
+
1063
+ [samples/elaborate/weather.rb](/samples/elaborate/weather.rb)
1064
+
1065
+ Montreal - Celsius
1066
+
1067
+ ![Montreal C](/images/glimmer-weather-montreal-celsius.png)
1068
+
1069
+ Montreal - Fahrenheit
1070
+
1071
+ ![Montreal F](/images/glimmer-weather-montreal-fahrenheit.png)
1072
+
1073
+ Atlanta - Fahrenheit
1074
+
1075
+ ![Atlanta F](/images/glimmer-weather-atlanta-fahrenheit.png)
1076
+
937
1077
  ### External Samples
938
1078
 
939
1079
  #### Glimmer Calculator