glimmer-dsl-swt 4.17.5.0 → 4.17.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -2
  3. data/README.md +250 -83
  4. data/VERSION +1 -1
  5. data/glimmer-dsl-swt.gemspec +20 -5
  6. data/lib/glimmer/data_binding/tree_items_binding.rb +20 -2
  7. data/lib/glimmer/dsl/swt/checkbox_group_selection_data_binding_expression.rb +61 -0
  8. data/lib/glimmer/dsl/swt/custom_widget_expression.rb +2 -0
  9. data/lib/glimmer/dsl/swt/dialog_expression.rb +1 -0
  10. data/lib/glimmer/dsl/swt/directory_dialog_expression.rb +48 -0
  11. data/lib/glimmer/dsl/swt/dsl.rb +2 -0
  12. data/lib/glimmer/dsl/swt/file_dialog_expression.rb +48 -0
  13. data/lib/glimmer/dsl/swt/radio_group_selection_data_binding_expression.rb +61 -0
  14. data/lib/glimmer/dsl/swt/shell_expression.rb +3 -3
  15. data/lib/glimmer/dsl/swt/widget_expression.rb +8 -8
  16. data/lib/glimmer/swt/custom/checkbox_group.rb +181 -0
  17. data/lib/glimmer/swt/custom/code_text.rb +39 -31
  18. data/lib/glimmer/swt/custom/radio_group.rb +176 -0
  19. data/lib/glimmer/swt/directory_dialog_proxy.rb +65 -0
  20. data/lib/glimmer/swt/expand_item_proxy.rb +0 -1
  21. data/lib/glimmer/swt/file_dialog_proxy.rb +66 -0
  22. data/lib/glimmer/swt/menu_proxy.rb +4 -4
  23. data/lib/glimmer/swt/shell_proxy.rb +5 -5
  24. data/lib/glimmer/swt/tab_item_proxy.rb +3 -3
  25. data/lib/glimmer/swt/widget_proxy.rb +27 -27
  26. data/lib/glimmer/ui/custom_shell.rb +3 -3
  27. data/lib/glimmer/ui/custom_widget.rb +3 -0
  28. data/samples/elaborate/meta_sample.rb +24 -19
  29. data/samples/hello/hello_checkbox.rb +85 -0
  30. data/samples/hello/hello_checkbox_group.rb +68 -0
  31. data/samples/hello/hello_combo.rb +12 -12
  32. data/samples/hello/hello_directory_dialog.rb +60 -0
  33. data/samples/hello/hello_expand_bar.rb +3 -1
  34. data/samples/hello/hello_file_dialog.rb +60 -0
  35. data/samples/hello/hello_group.rb +104 -0
  36. data/samples/hello/hello_list_multi_selection.rb +23 -23
  37. data/samples/hello/hello_list_single_selection.rb +18 -17
  38. data/samples/hello/hello_radio.rb +108 -0
  39. data/samples/hello/hello_radio_group.rb +84 -0
  40. data/samples/hello/hello_world.rb +3 -3
  41. metadata +19 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2111fbe2df8040f64a319e5e62b15982cdc4749a6cd0c548b97f2b37f01b276
4
- data.tar.gz: 283eb8a7a8faedde6ab6224ebe06fda3fca7cdff44ec99b32baca35da9df7d04
3
+ metadata.gz: 517e5bcedc06e71150e504d4c8ad484adb383e839df9b09e9683d9ebcce72ce8
4
+ data.tar.gz: b9792dd4d60cdb642b187848f9cc07d2d33c5bb1801bf2cb961a59f1247d9713
5
5
  SHA512:
6
- metadata.gz: 2cb656a29e5d9da0759b295bc5dba9f1a174e8a83a1ffa2921c4b5efb6fd10542f0a46e475807cbd884c7f14270afa0983b5e49b392f97e9ddd41a6a4ecbbf30
7
- data.tar.gz: 9283a302b3aaa99f5ec50f0d0996b951bb72ce0309ae9ca978429621d81f14c4005251286229d3555f31754c0e9a727db2f15f9245fab28f902ef1456e1fa07e
6
+ metadata.gz: 74eae56731cba0eba1092b9a926cd995cc23190b78126436d5dff8454dc0b0a75e5a70ecc4c5a864d3580bb8f2ad4d003a3ef18bba4d7bb5b0a4f4a44eb5afe3
7
+ data.tar.gz: 41b95e7e364eab995e026fec0c442162fefa138b504a48a95ba0e93f39e460b676e635a64228a8c51559ea4c0468afa09695fa1be63f375d6788c7914c6609fc
@@ -1,5 +1,33 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.17.8.1
4
+
5
+ - Fixed an issue in Windows with code_text
6
+
7
+ ### 4.17.8.0
8
+
9
+ - Officially Support SWT FileDialog with the `file_dialog` keyword (was unofficially supported before via standard SWT)
10
+ - Officially Support SWT DirectoryDialog with the `directory_dialog` keyword (was unofficially supported before via standard SWT)
11
+ - Hello, File Dialog! Sample
12
+ - Hello, Directory Dialog! Sample
13
+ - Prevent tree items data-binding from updating if no tree data change occurred
14
+ - Performance optimization for `code_text` syntax highlighting through caching
15
+
16
+ ### 4.17.7.0
17
+
18
+ - `checkbox_group` built-in custom widget
19
+ - Hello, Checkbox Group! Sample
20
+ - Refactor `radio_group` to render labels instead of relying on radio button text since they are better stylable
21
+ - Refactor Glimmer Meta-Sample to use `radio_group` instead of `radio`
22
+ - Fix issue with ExpandBar fill_layout with the extra element at the end (remove it)
23
+
24
+ ### 4.17.6.0
25
+
26
+ - New `radio_group` built-in Glimmer custom widget
27
+ - Hello, Radio! Sample
28
+ - Hello, Radio Group! Sample
29
+ - Hello, Checkbox! Sample
30
+
3
31
  ### 4.17.5.0
4
32
 
5
33
  - Support auto-scaling by aspect ratio of width and height (write specs)
@@ -123,7 +151,7 @@
123
151
 
124
152
  - Add User Profile sample from DZone article
125
153
  - Colored Ruby syntax highlighting for sample:code and sample:run tasks courtesy of tty-markdown
126
- - Support `check` as alias to `checkbox` DSL keyword for Button widget with :check style.
154
+ - Support `check` as alias to `checkbox` DSL keyword for Button widget with :check style.
127
155
  - Validate scaffolded custom shell gem name to ensure it doesn't clash with a built in Ruby method
128
156
  - GLIMMER_LOGGER_ASYNC env var for disabling async logging when needed for immediate troubleshooting purposes
129
157
  - Fix issue with table equivalent sort edge case (that is two sorts that are equivalent causing an infinite loop of resorting since the table is not correctly identified as sorted already)
@@ -322,7 +350,7 @@
322
350
  ## 0.1.3
323
351
 
324
352
  - Added 'org.eclipse.swt.dnd' to glimmer auto-included Java packages
325
- - Updated Tic Tac Toe sample to use new `message_box` keyword
353
+ - Updated Tic Tac Toe sample to use new `message_box` keyword
326
354
  - Add DragSource and DropTarget transfer expression that takes a symbol or symbol array representing one or more of the following: FileTransfer, HTMLTransfer, ImageTransfer, RTFTransfer, TextTransfer, URLTransfer
327
355
  - Set default style DND::DROP_COPY in DragSource and DropTarget widgets
328
356
  - Support Glimmer::SWT::DNDProxy for handling Drop & Drop styles
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.17.5.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.17.8.2
2
2
  ## JRuby Desktop Development GUI Library
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)
@@ -14,7 +14,11 @@
14
14
 
15
15
  [Glimmer receives two updates per month](https://rubygems.org/gems/glimmer-dsl-swt/versions). You can trust [Glimmer](https://rubygems.org/gems/glimmer) with your Ruby desktop GUI development needs. Please make [Glimmer](https://rubygems.org/gems/glimmer) even better by providing feedback and [contributing](#contributing) when possible.
16
16
 
17
- [<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
17
+ 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
+
19
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) versions 4.17.x.y come with [SWT 4.17](https://download.eclipse.org/eclipse/downloads/drops4/R-4.17-202009021800/), which was released on September 2, 2020.
20
+
21
+ [<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
18
22
  Featured in<br />JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do)
19
23
 
20
24
  Glimmer DSL gems:
@@ -343,6 +347,13 @@ Glimmer App:
343
347
  - [Hello, Sash Form!](#hello-sash-form)
344
348
  - [Hello, Styled Text!](#hello-styled-text)
345
349
  - [Hello, Expand Bar!](#hello-expand-bar)
350
+ - [Hello, Radio!](#hello-radio)
351
+ - [Hello, Radio Group!](#hello-radio-group)
352
+ - [Hello, Group!](#hello-group)
353
+ - [Hello, Checkbox!](#hello-checkbox)
354
+ - [Hello, Checkbox Group!](#hello-checkbox-group)
355
+ - [Hello, Directory Dialog!](#hello-directory-dialog)
356
+ - [Hello, File Dialog!](#hello-file-dialog)
346
357
  - [Elaborate Samples](#elaborate-samples)
347
358
  - [User Profile](#user-profile)
348
359
  - [Login](#login)
@@ -426,7 +437,7 @@ Otherwise, Option 2 ([Bundler](#option-2-bundler)) can be followed in rare cases
426
437
 
427
438
  Note: if you encounter any [issues](https://github.com/AndyObtiva/glimmer-dsl-swt/issues), please [report](https://github.com/AndyObtiva/glimmer-dsl-swt/issues) and then install a previous version instead from the list of [Glimmer Releases](https://rubygems.org/gems/glimmer-dsl-swt/versions).
428
439
 
429
- ### Option 1: Direct Install
440
+ ### Option 1: Direct Install
430
441
  (Use for [Scaffolding](#scaffolding))
431
442
 
432
443
  Run this command to install directly:
@@ -436,12 +447,10 @@ jgem install glimmer-dsl-swt
436
447
 
437
448
  Or this command if you want a specific version:
438
449
  ```
439
- jgem install glimmer-dsl-swt -v 4.17.5.0
450
+ jgem install glimmer-dsl-swt -v 4.17.8.2
440
451
  ```
441
452
 
442
- Note: 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.
443
-
444
- `jgem` is JRuby's version of `gem` command.
453
+ `jgem` is JRuby's version of `gem` command.
445
454
  RVM allows running `gem install` directly as an alias.
446
455
  Otherwise, you may also run `jruby -S gem install ...`
447
456
 
@@ -451,7 +460,7 @@ Otherwise, if you are ready to build a Glimmer app, you can jump to the [Glimmer
451
460
 
452
461
  Note: if you're using activerecord or activesupport, keep in mind that Glimmer unhooks ActiveSupport::Dependencies as it does not rely on it.
453
462
 
454
- ### Option 2: Bundler
463
+ ### Option 2: Bundler
455
464
  (Use for Manual App Creation)
456
465
 
457
466
  Add the following to `Gemfile`:
@@ -478,7 +487,7 @@ You can bring up usage instructions by running the `glimmer` command without arg
478
487
  glimmer
479
488
  ```
480
489
 
481
- On Mac and Linux, it additionally brings up a TUI (Text-based User Interface) for interactive navigation and execution of Glimmer tasks (courtesy of [rake-tui](https://github.com/AndyObtiva/rake-tui)).
490
+ On Mac and Linux, it additionally brings up a TUI (Text-based User Interface) for interactive navigation and execution of Glimmer tasks (courtesy of [rake-tui](https://github.com/AndyObtiva/rake-tui)).
482
491
 
483
492
  On Windows, it simply lists the available Glimmer tasks at the end (courtsey of [rake](https://github.com/ruby/rake)).
484
493
 
@@ -514,13 +523,13 @@ bin/glimmer samples
514
523
  Below are the full usage instructions that come up when running `glimmer` without args.
515
524
 
516
525
  ```
517
- Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.5.0
526
+ Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.8.2
518
527
 
519
528
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
520
529
 
521
- Runs Glimmer applications and tasks.
530
+ Runs Glimmer applications and tasks.
522
531
 
523
- When applications are specified, they are run using JRuby,
532
+ When applications are specified, they are run using JRuby,
524
533
  automatically preloading the glimmer Ruby gem and SWT jar dependency.
525
534
 
526
535
  Optionally, extra Glimmer options, JRuby options, and/or environment variables may be passed in.
@@ -543,11 +552,11 @@ Select a Glimmer task to run: (Press ↑/↓ arrow to move, Enter to select and
543
552
  glimmer package[type] # Package app for distribution (generating config, jar, and native files) (type is optional)
544
553
  glimmer package:clean # Clean by removing "dist" and "packages" directories
545
554
  glimmer package:config # Generate JAR config file
546
- glimmer package:gemspec # Generate gemspec
555
+ glimmer package:gemspec # Generate gemspec
547
556
  glimmer package:jar # Generate JAR file
548
557
  glimmer package:lock_jars # Lock JARs
549
558
  glimmer package:native[type] # Generate Native files
550
- glimmer run[app_path] # Runs Glimmer app or custom shell gem in the current directory, unless app_path is specified, then runs it instead (app_path is optional)
559
+ glimmer run[app_path] # Runs Glimmer app or custom shell gem in the current directory, unless app_path is specified, then runs it instead (app_path is optional)
551
560
  glimmer samples # Brings up the Glimmer Meta-Sample app to allow browsing, running, and viewing code of Glimmer samples
552
561
  glimmer scaffold[app_name] # Scaffold Glimmer application directory structure to build a new app
553
562
  glimmer scaffold:customshell[name,namespace] # Scaffold Glimmer::UI::CustomShell subclass (full window view) under app/views (namespace is optional) [alt: scaffold:cs]
@@ -587,10 +596,10 @@ This brings up the [Glimmer Meta-Sample (The Sample of Samples)](#samples):
587
596
  Glimmer borrows from Rails the idea of Scaffolding, that is generating a structure for your app files that
588
597
  helps you get started just like true building scaffolding helps construction workers, civil engineers, and architects.
589
598
 
590
- Glimmer scaffolding goes beyond just scaffolding the app files that Rails does. It also packages it and launches it,
599
+ Glimmer scaffolding goes beyond just scaffolding the app files that Rails does. It also packages it and launches it,
591
600
  getting you to a running and delivered state of an advanced "Hello, World!" Glimmer application right off the bat.
592
601
 
593
- This should greatly facilitate building a new Glimmer app by helping you be productive and focus on app details while
602
+ This should greatly facilitate building a new Glimmer app by helping you be productive and focus on app details while
594
603
  letting Glimmer scaffolding take care of initial app file structure concerns, such as adding:
595
604
  - Main application class that includes Glimmer (`app/{app_name}.rb`)
596
605
  - Main application view that houses main window content, menu, about dialog, and preferences dialog
@@ -605,7 +614,7 @@ You need to have your Git `user.name` and `github.user` configured before scaffo
605
614
 
606
615
  #### App
607
616
 
608
- Before you start, make sure you are in a JRuby environment with Glimmer gem installed as per "Direct Install" pre-requisites.
617
+ Before you start, make sure you are in a JRuby environment with Glimmer gem installed as per "Direct Install" pre-requisites.
609
618
 
610
619
  To scaffold a Glimmer app from scratch, run the following command:
611
620
 
@@ -699,7 +708,7 @@ The app even remembers your cookies if you log into the website, close the app,
699
708
 
700
709
  Note that on Linux, the default SWT browser, which runs on webkit, does not support HTML5 Video out of the box. If you need video support, open `Gemfile` after scaffolding and enable the line that has the `glimmer-cw-browser-chromium` gem then replace the `browser` in "app/views/snowboard_utah/app_view.rb" with `browser(:chromium)`
701
710
 
702
- Before you start, make sure you are in a JRuby environment with Glimmer gem installed as per "Direct Install" pre-requisites.
711
+ Before you start, make sure you are in a JRuby environment with Glimmer gem installed as per "Direct Install" pre-requisites.
703
712
 
704
713
  To scaffold a Glimmer desktopify app from scratch, run the following command:
705
714
 
@@ -814,8 +823,8 @@ glimmer scaffold:cw[name]
814
823
 
815
824
  #### Custom Shell Gem
816
825
 
817
- Custom shell gems are self-contained Glimmer apps as well as reusable custom shells.
818
- They have everything scaffolded Glimmer apps come with in addition to gem content like a [Juwelier](https://rubygems.org/gems/juwelier) Rakefile that can build gemspec and release gems.
826
+ Custom shell gems are self-contained Glimmer apps as well as reusable custom shells.
827
+ They have everything scaffolded Glimmer apps come with in addition to gem content like a [Juwelier](https://rubygems.org/gems/juwelier) Rakefile that can build gemspec and release gems.
819
828
  Unlike scaffolded Glimmer apps, custom shell gem content lives under the `lib` directory (not `app`).
820
829
  They can be packaged as both a native executable (e.g. Mac DMG/PKG/APP) and a Ruby gem.
821
830
  Of course, you can just build a Ruby gem and disregard native executable packaging if you do not need it.
@@ -842,7 +851,7 @@ Since custom shell gems are both an app and a gem, they provide two ways to run:
842
851
  - Run the `glimmer` command and pass it the generated script under the `bin` directory that matches the gem name (e.g. run `glimmer bin/glimmer-cs-calculator`)
843
852
  - Run the executable shell script that ships with the gem directly (does not need the `glimmer` command). It intentionally has a shorter name for convenience since it is meant to be used on the command line (not in a package), so you can leave out the `glimmer-cs-` prefix (e.g. run `bin/calculator` directly). This is also used as the main way of running custom shell gems on Linux.
844
853
 
845
- Examples:
854
+ Examples:
846
855
 
847
856
  - [glimmer-cs-gladiator](https://github.com/AndyObtiva/glimmer-cs-gladiator): Gladiator (Glimmer Editor)
848
857
  - [glimmer-cs-calculator](https://github.com/AndyObtiva/glimmer-cs-calculator): Glimmer Calculator
@@ -868,7 +877,7 @@ The Ruby gem name will follow the convention "glimmer-cw-customwidgetname-namesp
868
877
 
869
878
  Only official Glimmer gems created by the Glimmer project committers will have no namespace (e.g. [glimmer-cw-video](https://rubygems.org/gems/glimmer-cw-video) Ruby gem)
870
879
 
871
- Examples:
880
+ Examples:
872
881
 
873
882
  - [glimmer-cw-video](https://github.com/AndyObtiva/glimmer-cw-video): Video Widget
874
883
  - [glimmer-cw-cdatetime-nebula](https://github.com/AndyObtiva/glimmer-cw-cdatetime-nebula): Nebula CDateTime Widget
@@ -903,11 +912,11 @@ Output:
903
912
 
904
913
  Glimmer Custom Shell Gems at rubygems.org:
905
914
 
906
- Name Gem Version Author Description
915
+ Name Gem Version Author Description
907
916
 
908
- Calculator glimmer-cs-calculator 1.0.2 Andy Maleh Calculator - Glimmer Custom Shell
909
- Gladiator glimmer-cs-gladiator 0.2.4 Andy Maleh Gladiator (Glimmer Editor) - Glimmer Custom Shell
910
- Timer glimmer-cs-timer 1.0.0 Andy Maleh Timer - Glimmer Custom Shell
917
+ Calculator glimmer-cs-calculator 1.0.2 Andy Maleh Calculator - Glimmer Custom Shell
918
+ Gladiator glimmer-cs-gladiator 0.2.4 Andy Maleh Gladiator (Glimmer Editor) - Glimmer Custom Shell
919
+ Timer glimmer-cs-timer 1.0.0 Andy Maleh Timer - Glimmer Custom Shell
911
920
 
912
921
  ```
913
922
 
@@ -939,9 +948,9 @@ Output:
939
948
 
940
949
  Glimmer Custom Widget Gems matching [video] at rubygems.org:
941
950
 
942
- Name Gem Version Author Description
951
+ Name Gem Version Author Description
943
952
 
944
- Video glimmer-cw-video 1.0.0 Andy Maleh Glimmer Custom Widget - Video
953
+ Video glimmer-cw-video 1.0.0 Andy Maleh Glimmer Custom Widget - Video
945
954
 
946
955
  ```
947
956
 
@@ -959,11 +968,11 @@ Output:
959
968
 
960
969
  Glimmer Custom Widget Gems at rubygems.org:
961
970
 
962
- Name Gem Version Author Description
971
+ Name Gem Version Author Description
963
972
 
964
- Browser (Chromium) glimmer-cw-browser-chromium 1.0.0 Andy Maleh Chromium Browser - Glimmer Custom Widget
965
- Cdatetime (Nebula) glimmer-cw-cdatetime-nebula 1.5.0.0.1 Andy Maleh Nebula CDateTime Widget - Glimmer Custom Widget
966
- Video glimmer-cw-video 1.0.0 Andy Maleh Glimmer Custom Widget - Video
973
+ Browser (Chromium) glimmer-cw-browser-chromium 1.0.0 Andy Maleh Chromium Browser - Glimmer Custom Widget
974
+ Cdatetime (Nebula) glimmer-cw-cdatetime-nebula 1.5.0.0.1 Andy Maleh Nebula CDateTime Widget - Glimmer Custom Widget
975
+ Video glimmer-cw-video 1.0.0 Andy Maleh Glimmer Custom Widget - Video
967
976
 
968
977
  ```
969
978
 
@@ -987,13 +996,13 @@ Output:
987
996
 
988
997
  Glimmer DSL Gems at rubygems.org:
989
998
 
990
- Name Gem Version Author Description
999
+ Name Gem Version Author Description
991
1000
 
992
- Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
993
- Opal glimmer-dsl-opal 0.4.0 AndyMaleh Glimmer DSL for Opal
994
- Swt glimmer-dsl-swt 4.17.5.0 AndyMaleh Glimmer DSL for SWT
995
- Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
996
- Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
1001
+ Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
1002
+ Opal glimmer-dsl-opal 0.4.0 AndyMaleh Glimmer DSL for Opal
1003
+ Swt glimmer-dsl-swt 4.17.8.2 AndyMaleh Glimmer DSL for SWT
1004
+ Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
1005
+ Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
997
1006
  ```
998
1007
 
999
1008
  ### Packaging
@@ -1136,7 +1145,7 @@ Static keywords are pre-identified keywords in the Glimmer DSL, such as `shell`,
1136
1145
 
1137
1146
  Dynamic keywords are dynamically figured out from currently imported (aka required/loaded) SWT widgets and custom widgets. Examples are: `label`, `combo`, and `list` for SWT widgets and `c_date_time`, `video`, and `gantt_chart` for custom widgets.
1138
1147
 
1139
- The only reason to distinguish between the two is to realize that importing new Glimmer [custom widgets](#custom-widgets) and Java SWT custom widget libraries automatically expands Glimmer's DSL vocabulary with new dynamic keywords.
1148
+ The only reason to distinguish between the two is to realize that importing new Glimmer [custom widgets](#custom-widgets) and Java SWT custom widget libraries automatically expands Glimmer's DSL vocabulary with new dynamic keywords.
1140
1149
 
1141
1150
  For example, if a project adds this custom Java SWT library from the [Nebula Project](https://www.eclipse.org/nebula/):
1142
1151
 
@@ -1388,10 +1397,10 @@ message_box {
1388
1397
 
1389
1398
  #### Display
1390
1399
 
1391
- The SWT `Display` class is a singleton in Glimmer. It is used in SWT to represent your display device, allowing you to manage GUI globally
1400
+ The SWT `Display` class is a singleton in Glimmer. It is used in SWT to represent your display device, allowing you to manage GUI globally
1392
1401
  and access available monitors. Additionally, it is responsible for the SWT event loop, which runs on the first thread the Glimmer application starts on. In multi-threaded programming, `Display` provides the methods `async_exec` and `sync_exec` to enable enqueuing GUI changes asynchronously or synchronously from threads other than the main (first) thread since direct GUI changes are forbidden from other threads by design.
1393
1402
 
1394
- `Display` is automatically instantiated upon first instantiation of a `shell` widget.
1403
+ `Display` is automatically instantiated upon first instantiation of a `shell` widget.
1395
1404
 
1396
1405
  Alternatively, for advanced use cases, a `Display` can be created explicitly with the Glimmer `display` keyword. When a `shell` is later declared, it
1397
1406
  automatically uses the `display` created earlier without having to explicitly hook it.
@@ -1407,7 +1416,7 @@ automatically uses the `display` created earlier without having to explicitly ho
1407
1416
  @shell = shell { # uses display created above
1408
1417
  }
1409
1418
  ```
1410
- The benefit of instantiating an SWT Display explicitly is to set [Properties](#widget-properties) or [Observers](#observer).
1419
+ The benefit of instantiating an SWT Display explicitly is to set [Properties](#widget-properties) or [Observers](#observer).
1411
1420
  Although SWT Display is not technically a widget, it has similar APIs and DSL support.
1412
1421
 
1413
1422
  #### Multi-Threading
@@ -1629,8 +1638,8 @@ https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/
1629
1638
 
1630
1639
  When building a widget-related SWT object manually (e.g. `GridData.new(...)`), you are expected to use `SWT::CONSTANT` directly or BIT-OR a few SWT constants together like `SWT::BORDER | SWT::V_SCROLL`.
1631
1640
 
1632
- Glimmer facilitates that with `swt` keyword by allowing you to pass multiple styles as an argument array of symbols instead of dealing with BIT-OR.
1633
- Example:
1641
+ Glimmer facilitates that with `swt` keyword by allowing you to pass multiple styles as an argument array of symbols instead of dealing with BIT-OR.
1642
+ Example:
1634
1643
 
1635
1644
  ```ruby
1636
1645
  style = swt(:border, :v_scroll)
@@ -1638,7 +1647,7 @@ style = swt(:border, :v_scroll)
1638
1647
 
1639
1648
  #### Negative SWT Style Bits
1640
1649
 
1641
- In rare occasions, you might need to apply & with a negative (not) style bit to negate it from another style bit that includes it.
1650
+ In rare occasions, you might need to apply & with a negative (not) style bit to negate it from another style bit that includes it.
1642
1651
  Glimmer facilitates that by declaring the negative style bit via postfixing a symbol with `!`.
1643
1652
 
1644
1653
  Example:
@@ -1647,13 +1656,13 @@ Example:
1647
1656
  style = swt(:shell_trim, :max!) # creates a shell trim style without the maximize button (negated)
1648
1657
  ```
1649
1658
 
1650
- #### Extra SWT Styles
1659
+ #### Extra SWT Styles
1651
1660
 
1652
1661
  ##### Non-resizable Window
1653
1662
 
1654
1663
  SWT Shell widget by default is resizable. To make it non-resizable, one must pass a complicated style bit concoction like `swt(:shell_trim, :resize!, :max!)`.
1655
1664
 
1656
- Glimmer makes this easier by alternatively offering a `:no_resize` extra SWT style, added for convenience.
1665
+ Glimmer makes this easier by alternatively offering a `:no_resize` extra SWT style, added for convenience.
1657
1666
  This makes declaring a non-resizable window as easy as:
1658
1667
 
1659
1668
  ```ruby
@@ -1816,7 +1825,7 @@ Example:
1816
1825
 
1817
1826
  ```ruby
1818
1827
  shell {
1819
- minimum_size 128, 128
1828
+ minimum_size 128, 128
1820
1829
  cursor :appstarting
1821
1830
  }
1822
1831
  ```
@@ -2205,7 +2214,7 @@ It assumes you have defined the table columns via `table_column` widget.
2205
2214
  Example:
2206
2215
 
2207
2216
  ```ruby
2208
- shell {
2217
+ shell {
2209
2218
  @table = table {
2210
2219
  table_column {
2211
2220
  text "Name"
@@ -2223,13 +2232,13 @@ shell {
2223
2232
  selection bind(group, :selected_person)
2224
2233
  on_mouse_up { |event|
2225
2234
  @table.edit_table_item(event.table_item, event.column_index)
2226
- }
2235
+ }
2227
2236
  }
2228
2237
  }
2229
2238
  ```
2230
2239
 
2231
2240
  The code above includes two data-bindings:
2232
- - Table `items`, which first bind to the model collection property (group.people), and then maps each column property (name, age, adult) for displaying each table item column.
2241
+ - Table `items`, which first bind to the model collection property (group.people), and then maps each column property (name, age, adult) for displaying each table item column.
2233
2242
  - Table `selection`, which binds the single table item selected by the user to the attribute denoted by the `bind` keyword (or binds multiple table items selected for a table with `:multi` SWT style)
2234
2243
  - The `on_mouse_up` event handler invokes `@table.edit_table_item(event.table_item, event.column_index)` to start edit mode on the clicked table item cell, and then saves or cancel depending on whether the user hits ENTER or ESC once done editing (or focus-out after either making a change or not making any changes.)
2235
2244
 
@@ -2246,16 +2255,16 @@ found_array = @table.search { |table_item| table_item.getData == company.owner }
2246
2255
 
2247
2256
  This finds a person. The array is a Java array. This enables easy passing of it to SWT `Table#setSelection` method, which expects a Java array of `TableItem` objects.
2248
2257
 
2249
- To edit a table, you must invoke `TableProxy#edit_selected_table_item(column_index, before_write: nil, after_write: nil, after_cancel: nil)` or `TableProxy#edit_table_item(table_item, column_index, before_write: nil, after_write: nil, after_cancel: nil)`.
2250
- This automatically leverages the SWT TableEditor custom class behind the scenes, displaying a text widget to the user to change the selected or
2251
- passed table item text into something else.
2258
+ To edit a table, you must invoke `TableProxy#edit_selected_table_item(column_index, before_write: nil, after_write: nil, after_cancel: nil)` or `TableProxy#edit_table_item(table_item, column_index, before_write: nil, after_write: nil, after_cancel: nil)`.
2259
+ This automatically leverages the SWT TableEditor custom class behind the scenes, displaying a text widget to the user to change the selected or
2260
+ passed table item text into something else.
2252
2261
  It automatically persists the change to `items` data-bound model on ENTER/FOCUS-OUT or cancels on ESC/NO-CHANGE.
2253
2262
 
2254
2263
  ##### Table Sorting
2255
2264
 
2256
- Glimmer automatically adds sorting support to the SWT `Table` widget.
2265
+ Glimmer automatically adds sorting support to the SWT `Table` widget.
2257
2266
 
2258
- Check out the [Contact Manager](#contact-manager) sample for an example.
2267
+ Check out the [Contact Manager](#contact-manager) sample for an example.
2259
2268
  You may click on any column and it will sort by ascending order first and descending if you click again.
2260
2269
 
2261
2270
  Glimmer automatic table sorting supports `String`, `Integer`, and `Float` columns out of the box as well as any column data that is comparable.
@@ -2263,7 +2272,7 @@ Glimmer automatic table sorting supports `String`, `Integer`, and `Float` column
2263
2272
  In cases where data is nil, depending on the data-type, it is automatically converted to `Float` with `to_f`, `Integer` with `to_i`, or `String` with `to_s`.
2264
2273
 
2265
2274
  Should you have a special data type that could not be compared automatically, Glimmer offers the following 3 alternatives for custom sorting:
2266
- - `sort_property`: this may be set to an alternative property to the one data-bound to the table column. For example, a table column called 'adult', which returns `true` or `false` may be sorted with `sort_property :dob` instead. This also support multi-property (aka multi-column) sorting (e.g. `sort_property :dob, :name`).
2275
+ - `sort_property`: this may be set to an alternative property to the one data-bound to the table column. For example, a table column called 'adult', which returns `true` or `false` may be sorted with `sort_property :dob` instead. This also support multi-property (aka multi-column) sorting (e.g. `sort_property :dob, :name`).
2267
2276
  - `sort_by(&block)`: this works just like Ruby `Enumerable` `sort_by`. The block receives the table column data as argument.
2268
2277
  - `sort(&comparator)`: this works just like Ruby `Enumerable` `sort`. The comparator block receives two objects from the table column data.
2269
2278
 
@@ -2323,7 +2332,7 @@ This involves using the `bind` keyword mentioned above in addition to a special
2323
2332
  Example:
2324
2333
 
2325
2334
  ```ruby
2326
- shell {
2335
+ shell {
2327
2336
  @tree = tree {
2328
2337
  items bind(company, :owner), tree_properties(children: :coworkers, text: :name)
2329
2338
  selection bind(company, :selected_coworker)
@@ -2332,7 +2341,7 @@ shell {
2332
2341
  ```
2333
2342
 
2334
2343
  The code above includes two data-bindings:
2335
- - Tree `items`, which first bind to the root node (company.owner), and then dig down via `coworkers` `children` method, using the `name` `text` attribute for displaying each tree item.
2344
+ - Tree `items`, which first bind to the root node (company.owner), and then dig down via `coworkers` `children` method, using the `name` `text` attribute for displaying each tree item.
2336
2345
  - Tree `selection`, which binds the single tree item selected by the user to the attribute denoted by the `bind` keyword
2337
2346
 
2338
2347
  Additionally, Tree `items` data-binding automatically stores each node model unto the SWT TreeItem object via `setData` method. This enables things like searchability.
@@ -2386,7 +2395,7 @@ Let's revisit the Tic Tac Toe example shown near the beginning of the page:
2386
2395
  shell {
2387
2396
  text "Tic-Tac-Toe"
2388
2397
  minimum_size 150, 178
2389
- composite {
2398
+ composite {
2390
2399
  grid_layout 3, true
2391
2400
  (1..3).each { |row|
2392
2401
  (1..3).each { |column|
@@ -2436,7 +2445,7 @@ shell {
2436
2445
  @button1.swt_widget.setVisible(false)
2437
2446
  }
2438
2447
  on_widget_selected {
2439
- @button1.swt_widget.setVisible(true)
2448
+ @button1.swt_widget.setVisible(true)
2440
2449
  }
2441
2450
  }
2442
2451
  }.open
@@ -2458,7 +2467,7 @@ Example (you may copy/paste in [`girb`](#girb-glimmer-irb-command)):
2458
2467
  }
2459
2468
  @shell.on_shell_iconified {
2460
2469
  @shell.close
2461
- }
2470
+ }
2462
2471
  @shell.open
2463
2472
  ```
2464
2473
 
@@ -2580,7 +2589,7 @@ Usage:
2580
2589
  ```ruby
2581
2590
  shell {
2582
2591
  red_label(:center) {
2583
- text 'Red Label'
2592
+ text 'Red Label'
2584
2593
  foreground :green
2585
2594
  }
2586
2595
  }.open
@@ -2647,7 +2656,7 @@ Additionally, custom widgets can call the following class methods:
2647
2656
  - `::options(*option_names)`: declares a list of options by taking an option name array (symbols/strings). This generates option attribute accessors (e.g. `options :orientation, :bg_color` generates `#orientation`, `#orientation=(v)`, `#bg_color`, and `#bg_color=(v)` attribute accessors)
2648
2657
  - `::option(option_name, default: nil)`: declares a single option taking option name and default value as arguments (also generates attribute accessors just like `::options`)
2649
2658
 
2650
- #### Content/Options Example
2659
+ #### Content/Options Example
2651
2660
 
2652
2661
  (you may copy/paste in [`girb`](#girb-glimmer-irb-command))
2653
2662
 
@@ -2779,7 +2788,7 @@ shell { |app_shell|
2779
2788
  app_shell.hide
2780
2789
  @wizard_steps[@current_step_number - 1].open
2781
2790
  end
2782
- }
2791
+ }
2783
2792
  }
2784
2793
  }
2785
2794
  button {
@@ -3073,6 +3082,55 @@ shell(:no_resize) {
3073
3082
 
3074
3083
  Also, you may invoke `Display.setAppVersion('1.0.0')` if needed for OS app version identification reasons during development, replacing `'1.0.0'` with your application version.
3075
3084
 
3085
+ #### Checkbox Group Widget
3086
+
3087
+ `checkbox_group` (or alias `check_group`) is a Glimmer built-in custom widget that displays a list of `checkbox` buttons (`button(:check)`) based on its `items` property.
3088
+
3089
+ `checkbox_group` consists of a root `composite` (with `grid_layout 1, false` by default) that holds nested `checkbox` (`button(:check)`) widgets.
3090
+
3091
+ The `selection` property determines which `checkbox` buttons are checked. It expects an `Array` of `String` objects
3092
+ The `selection_indices` property determines which `checkbox` button indices are checked. It expects an `Array` of index `Integer` objects that are zero-based.
3093
+ The `checkboxes` property returns the list of nested `checkbox` widgets.
3094
+
3095
+ When data-binding `selection`, the model property should have a matching property with `_options` suffix (e.g. `activities_options` for `activities`) to provide an `Array` of `String` objects for `checkbox` buttons.
3096
+
3097
+ You may see an example at the [Hello, Checkbox Group!](#hello-checkbox-group) sample.
3098
+
3099
+ ![Hello Checkbox Group](images/glimmer-hello-checkbox-group.png)
3100
+
3101
+ #### Radio Group Widget
3102
+
3103
+ `radio_group` is a Glimmer built-in custom widget that displays a list of `radio` buttons (`button(:radio)`) based on its `items` property, which expects an `Array` of `String` objects.
3104
+
3105
+ `radio_group` consists of a root `composite` (with `grid_layout 1, false` by default) that holds nested `radio` widgets.
3106
+
3107
+ The `selection` property determines which `radio` button is selected. It expects a `String`
3108
+ The `selection_index` property determines which `radio` button index is selected. It expects an index integer that is zero-based.
3109
+ The `radios` property returns the list of nested `radio` widgets.
3110
+
3111
+ When data-binding `selection`, the model property should have a matching property with `_options` suffix (e.g. `country_options` for `country`) to provide text for `radio` buttons.
3112
+
3113
+ This custom widget is used in the [Glimmer Meta-Sample (The Sample of Samples)](#samples):
3114
+
3115
+ ![Glimmer Meta-Sample](images/glimmer-meta-sample.png)
3116
+
3117
+ Glimmer Meta-Sample Code Example:
3118
+
3119
+ ```ruby
3120
+ # ...
3121
+ radio_group { |radio_group_proxy|
3122
+ row_layout(:vertical) {
3123
+ fill true
3124
+ }
3125
+ selection bind(sample_directory, :selected_sample_name)
3126
+ font height: 24
3127
+ }
3128
+
3129
+ # ...
3130
+ ```
3131
+
3132
+ You may see another example at the [Hello, Radio Group!](#hello-radio-group) sample.
3133
+
3076
3134
  #### Code Text Widget
3077
3135
 
3078
3136
  `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.
@@ -3099,7 +3157,7 @@ To use, simply use `code_text` in place of `text` or `styled_text` widget. If yo
3099
3157
 
3100
3158
  [![Video Widget](images/glimmer-video-widget.png)](https://github.com/AndyObtiva/glimmer-cw-video)
3101
3159
 
3102
- Glimmer supports a [video custom widget](https://github.com/AndyObtiva/glimmer-cw-video) not in SWT.
3160
+ Glimmer supports a [video custom widget](https://github.com/AndyObtiva/glimmer-cw-video) not in SWT.
3103
3161
 
3104
3162
  You may obtain via `glimmer-cw-video` gem.
3105
3163
 
@@ -3202,7 +3260,7 @@ Glimmer configuration may be done via the `Glimmer::Config` module.
3202
3260
  ### logger
3203
3261
 
3204
3262
  The Glimmer DSL engine supports logging via a standard `STDOUT` Ruby `Logger` configured in the `Glimmer::Config.logger` config option.
3205
- It is set to level Logger::ERROR by default.
3263
+ It is set to level Logger::ERROR by default.
3206
3264
  Log level may be adjusted via `Glimmer::Config.logger.level` just like any other Ruby Logger.
3207
3265
 
3208
3266
  Example:
@@ -3244,13 +3302,13 @@ This is an array of these possible values: `:stdout` (default), `:stderr`, `:fil
3244
3302
 
3245
3303
  It defaults to `[:stdout, :syslog]`
3246
3304
 
3247
- When `:file` is included, Glimmer creates a 'log' directory directly below the Glimmer app local directory.
3305
+ When `:file` is included, Glimmer creates a 'log' directory directly below the Glimmer app local directory.
3248
3306
  It may also be customized further via the `logging_device_file_options` option.
3249
3307
  This is useful on Windows as an alternative to `syslog`, which is not available on Windows by default.
3250
3308
 
3251
3309
  #### logging_device_file_options
3252
3310
 
3253
- This is a hash of [`logging`](https://github.com/TwP/logging) gem options for the `:file` logging device.
3311
+ This is a hash of [`logging`](https://github.com/TwP/logging) gem options for the `:file` logging device.
3254
3312
 
3255
3313
  Default: `{size: 1_000_000, age: 'daily', roll_by: 'number'}`
3256
3314
 
@@ -3268,7 +3326,7 @@ That ensures asynchronous buffered logging that is flushed every 500 messages an
3268
3326
 
3269
3327
  This is a [`logging`](https://github.com/TwP/logging) gem layout that formats the logging output.
3270
3328
 
3271
- Default:
3329
+ Default:
3272
3330
 
3273
3331
  ```
3274
3332
  Logging.layouts.pattern(
@@ -3328,8 +3386,8 @@ https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby
3328
3386
 
3329
3387
  ### loop_max_count
3330
3388
 
3331
- Glimmer has infinite loop detection support.
3332
- It can detect when an infinite loop is about to occur in method_missing and stops it.
3389
+ Glimmer has infinite loop detection support.
3390
+ It can detect when an infinite loop is about to occur in method_missing and stops it.
3333
3391
  It detects potential infinite loops when the same keyword and args repeat more than 100 times, which is unusual in a GUI app.
3334
3392
 
3335
3393
  The max limit can be changed via the `Glimmer::Config::loop_max_count=(count)` config option.
@@ -3643,6 +3701,114 @@ Hello, Expand Bar! Reading Expanded
3643
3701
 
3644
3702
  ![Hello Expand Bar Reading Expanded](images/glimmer-hello-expand-bar-reading-expanded.png)
3645
3703
 
3704
+ #### Hello, Radio!
3705
+
3706
+ This sample demonstrates the use of a `radio` (aka `button(:radio)`) in Glimmer.
3707
+
3708
+ Code:
3709
+
3710
+ [samples/hello/hello_radio.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_radio.rb)
3711
+
3712
+ Hello, Radio!
3713
+
3714
+ ![Hello Radio](images/glimmer-hello-radio.png)
3715
+
3716
+ #### Hello, Radio Group!
3717
+
3718
+ This sample demonstrates the use of a `radio_group` in Glimmer, which provides terser syntax for representing multiple radio buttons by relying on data-binding to automatically spawn the `radio` widgets based on available options on the model.
3719
+
3720
+ Code:
3721
+
3722
+ [samples/hello/hello_radio_group.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_radio_group.rb)
3723
+
3724
+ Hello, Radio Group!
3725
+
3726
+ ![Hello Radio Group](images/glimmer-hello-radio-group.png)
3727
+
3728
+ #### Hello, Checkbox!
3729
+
3730
+ This sample demonstrates the use of a `checkbox` (aka `check` or `button(:check)`) in Glimmer.
3731
+
3732
+ Code:
3733
+
3734
+ [samples/hello/hello_checkbox.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_checkbox.rb)
3735
+
3736
+ #### Hello, Group!
3737
+
3738
+ This sample demonstrates the use of a `group` in Glimmer (not to be confused with the logical radio group custom widget, this is just an alternative to `composite` that provides a border around content).
3739
+
3740
+ Code:
3741
+
3742
+ [samples/hello/hello_group.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_group.rb)
3743
+
3744
+ Hello, Group!
3745
+
3746
+ ![Hello Group](images/glimmer-hello-group.png)
3747
+
3748
+ #### Hello, Checkbox!
3749
+
3750
+ This sample demonstrates the use of a `checkbox` (aka `check` or `button(:check)`) in Glimmer.
3751
+
3752
+ Code:
3753
+
3754
+ [samples/hello/hello_checkbox.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_checkbox.rb)
3755
+
3756
+ Hello, Checkbox!
3757
+
3758
+ ![Hello Checkbox](images/glimmer-hello-checkbox.png)
3759
+
3760
+ #### Hello, Checkbox Group!
3761
+
3762
+ This sample demonstrates the use of a `checkbox_group` (aka `check_group`) in Glimmer, which provides terser syntax for representing multiple checkbox buttons (`button(:check)`) by relying on data-binding to automatically spawn the `checkbox` widgets (`button(:check)`) based on available options on the model.
3763
+
3764
+ Code:
3765
+
3766
+ [samples/hello/hello_checkbox_group.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_checkbox_group.rb)
3767
+
3768
+ Hello, Checkbox Group!
3769
+
3770
+ ![Hello Checkbox Group](images/glimmer-hello-checkbox-group.png)
3771
+
3772
+ #### Hello, Directory Dialog!
3773
+
3774
+ This sample demonstrates the use of a `directory_dialog` in Glimmer.
3775
+
3776
+ Code:
3777
+
3778
+ [samples/hello/hello_directory_dialog.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_directory_dialog.rb)
3779
+
3780
+ Hello, Directory Dialog!
3781
+
3782
+ ![Hello Directory Dialog](images/glimmer-hello-directory-dialog.png)
3783
+
3784
+ Hello, Directory Dialog! Browse...
3785
+
3786
+ ![Hello Directory Dialog](images/glimmer-hello-directory-dialog-browse.png)
3787
+
3788
+ Hello, Directory Dialog! Selected Directory
3789
+
3790
+ ![Hello Directory Dialog](images/glimmer-hello-directory-dialog-selected-directory.png)
3791
+
3792
+ #### Hello, File Dialog!
3793
+
3794
+ This sample demonstrates the use of a `file_dialog` in Glimmer.
3795
+
3796
+ Code:
3797
+
3798
+ [samples/hello/hello_file_dialog.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_file_dialog.rb)
3799
+
3800
+ Hello, File Dialog!
3801
+
3802
+ ![Hello File Dialog](images/glimmer-hello-file-dialog.png)
3803
+
3804
+ Hello, File Dialog! Browse...
3805
+
3806
+ ![Hello File Dialog](images/glimmer-hello-file-dialog-browse.png)
3807
+
3808
+ Hello, File Dialog! Selected File
3809
+
3810
+ ![Hello File Dialog](images/glimmer-hello-file-dialog-selected-file.png)
3811
+
3646
3812
  ### Elaborate Samples
3647
3813
 
3648
3814
  For more elaborate samples, check the following:
@@ -3748,7 +3914,7 @@ Gladiator is a good demonstration of:
3748
3914
 
3749
3915
  The following production apps have been built with Glimmer.
3750
3916
 
3751
- If you have a Glimmer app you would like referenced here, please mention in a Pull Request.
3917
+ If you have a Glimmer app you would like referenced here, please mention in a Pull Request.
3752
3918
 
3753
3919
  ### Math Bowling
3754
3920
 
@@ -3796,11 +3962,11 @@ The Glimmer packaging process done in the `glimmer package` command consists of
3796
3962
  1. Generate JAR file using [Warbler](https://github.com/jruby/warbler) (`glimmer package:jar`): Enables bundling a Glimmer app into a JAR file under the `./dist` directory
3797
3963
  1. Generate native executable using [javapackager](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html) (`glimmer package:native`): Enables packaging a JAR file as a DMG/PKG/APP file on Mac, MSI/EXE/APP on Windows, and DEB/RPM/APP on Linux (Glimmer does not officially support Linux with the `glimmer package` command yet, but it generates the JAR file successfully, and you could use `javapackager` manually afterwards if needed).
3798
3964
 
3799
- Those steps automatically ensure generating a JAR file under the `./dist` directory using [Warbler](https://github.com/jruby/warbler), which is then used to automatically generate a DMG/MSI file (and other executables) under the `./packages/bundles` directory using `javapackager`.
3965
+ Those steps automatically ensure generating a JAR file under the `./dist` directory using [Warbler](https://github.com/jruby/warbler), which is then used to automatically generate a DMG/MSI file (and other executables) under the `./packages/bundles` directory using `javapackager`.
3800
3966
  The JAR file name will match your application local directory name (e.g. `MathBowling.jar` for `~/code/MathBowling`)
3801
3967
  The DMG file name will match the humanized local directory name + dash + application version (e.g. `Math Bowling-1.0.dmg` for `~/code/MathBowling` with version 1.0 or unspecified)
3802
3968
 
3803
- The `glimmer package` command will automatically set "mac.CFBundleIdentifier" to ="org.#{project_name}.application.#{project_name}".
3969
+ The `glimmer package` command will automatically set "mac.CFBundleIdentifier" to ="org.#{project_name}.application.#{project_name}".
3804
3970
  You may override by configuring as an extra argument for javapackger (e.g. Glimmer::RakeTask::Package.javapackager_extra_args = " -Bmac.CFBundleIdentifier=org.andymaleh.application.MathBowling")
3805
3971
 
3806
3972
  ### Packaging Defaults
@@ -3852,9 +4018,9 @@ require 'glimmer/rake_task'
3852
4018
  Glimmer::RakeTask::Package.javapackager_extra_args = '-BlicenseType="MIT" -Bmac.category="public.app-category.business" -Bmac.signing-key-developer-id-app="Andy Maleh"'
3853
4019
  ```
3854
4020
 
3855
- Note that `mac.category` defaults to "public.app-category.business", but can be overridden with one of the category UTI values mentioned here:
4021
+ Note that `mac.category` defaults to "public.app-category.business", but can be overridden with one of the category UTI values mentioned here:
3856
4022
 
3857
- https://developer.apple.com/library/archive/releasenotes/General/SubmittingToMacAppStore/index.html#//apple_ref/doc/uid/TP40010572-CH16-SW8
4023
+ https://developer.apple.com/library/archive/releasenotes/General/SubmittingToMacAppStore/index.html#//apple_ref/doc/uid/TP40010572-CH16-SW8
3858
4024
 
3859
4025
  Example (env var):
3860
4026
 
@@ -3870,7 +4036,7 @@ Pass `-v` to javapackager in `Glimmer::RakeTask::Package.javapackager_extra_args
3870
4036
 
3871
4037
  ### Windows Application Packaging
3872
4038
 
3873
- Windows offers two options for setup packaging:
4039
+ Windows offers two options for setup packaging:
3874
4040
  - `msi` (recommended): simpler packaging option. Requires [WiX Toolset](https://wixtoolset.org/) and [.NET Framework](https://dotnet.microsoft.com/download/dotnet-framework). Simply run `glimmer package[msi]` (or `glimmer package:native[msi]` if it's not your first time) and it will give you more details on the pre-requisites you need to install (e.g. [WiX Toolset](https://wixtoolset.org/) and [.NET Framework 3.5 SP1](https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1)).
3875
4041
  - `exe`: more advanced packaging option. Requires [Inno Setup](https://jrsoftware.org/isinfo.php). Simply run `glimmer package[exe]` (or `glimmer package:native[exe]` if it's not your first time) and it will tell you what you need to install.
3876
4042
 
@@ -3922,7 +4088,7 @@ Now, when you run `glimmer package`, it builds a self-signed DMG file. When you
3922
4088
 
3923
4089
  1. Specifying License File
3924
4090
 
3925
- The javapackager documentation states that a license file may be specified with "-BlicenseFile" javapackager option. However, in order for that to work, one must specify as a source file via "-srcfiles" javapackager option.
4091
+ The javapackager documentation states that a license file may be specified with "-BlicenseFile" javapackager option. However, in order for that to work, one must specify as a source file via "-srcfiles" javapackager option.
3926
4092
  Keep that in mind if you are not going to rely on the default `LICENSE.txt` support.
3927
4093
 
3928
4094
  Example:
@@ -3935,7 +4101,7 @@ Glimmer::RakeTask::Package.javapackager_extra_args = '-srcfiles "ACME.txt" -Blic
3935
4101
 
3936
4102
  If you run `glimmer package` multiple times, sometimes it leaves a mounted DMG project in your finder. Unmount before you run the command again or it might fail with an error saying: "Error: Bundler "DMG Installer" (dmg) failed to produce a bundle."
3937
4103
 
3938
- By the way, keep in mind that during normal operation, it does also indicate a false-negative while completing successfully similar to the following (please ignore):
4104
+ By the way, keep in mind that during normal operation, it does also indicate a false-negative while completing successfully similar to the following (please ignore):
3939
4105
 
3940
4106
  ```
3941
4107
  Exec failed with code 2 command [[/usr/bin/SetFile, -c, icnC, /var/folders/4_/g1sw__tx6mjdgyh3mky7vydc0000gp/T/fxbundler4076750801763032201/images/MathBowling/.VolumeIcon.icns] in unspecified directory
@@ -3955,13 +4121,14 @@ Here is a list of notable 3rd party gems used by Glimmer:
3955
4121
  - [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`)
3956
4122
  - [rake](https://github.com/ruby/rake): used to implement and execute `glimmer` commands
3957
4123
  - [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.
4124
+ - [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)
3958
4125
  - [super_module](https://github.com/AndyObtiva/super_module): used to cleanly write the Glimmer::UI:CustomWidget and Glimmer::UI::CustomShell modules
3959
4126
  - [text-table](https://github.com/aptinio/text-table): renders textual data in a textual table for the command-line interface of Glimmer
3960
4127
  - [warbler](https://github.com/jruby/warbler): converts a Glimmer app into a Java JAR file during packaging
3961
4128
 
3962
4129
  ## Glimmer Process
3963
4130
 
3964
- [Glimmer Process](https://github.com/AndyObtiva/glimmer/blob/master/PROCESS.md) is the lightweight software development process used for building Glimmer libraries and Glimmer apps, which goes beyond Agile, rendering all Agile processes obsolete. [Glimmer Process](PROCESS.md) is simply made up of 7 guidelines to pick and choose as necessary until software development needs are satisfied.
4131
+ [Glimmer Process](https://github.com/AndyObtiva/glimmer/blob/master/PROCESS.md) is the lightweight software development process used for building Glimmer libraries and Glimmer apps, which goes beyond Agile, rendering all Agile processes obsolete. [Glimmer Process](PROCESS.md) is simply made up of 7 guidelines to pick and choose as necessary until software development needs are satisfied.
3965
4132
 
3966
4133
  Learn more by reading the [GPG](https://github.com/AndyObtiva/glimmer/blob/master/PROCESS.md) (Glimmer Process Guidelines)
3967
4134
 
@@ -3984,7 +4151,7 @@ You may submit [issues](https://github.com/AndyObtiva/glimmer-dsl-swt/issues) on
3984
4151
 
3985
4152
  ### Chat
3986
4153
 
3987
- If you need live help, try to [![Join the chat at https://gitter.im/AndyObtiva/glimmer](https://badges.gitter.im/AndyObtiva/glimmer.svg)](https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4154
+ If you need live help, try to [![Join the chat at https://gitter.im/AndyObtiva/glimmer](https://badges.gitter.im/AndyObtiva/glimmer.svg)](https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3988
4155
 
3989
4156
  ## Feature Suggestions
3990
4157
 
@@ -4031,7 +4198,7 @@ If your company would like to invest fulltime in further development of the Glim
4031
4198
 
4032
4199
  [MIT](LICENSE.txt)
4033
4200
 
4034
- Copyright (c) 2007-2020 - Andy Maleh.
4201
+ Copyright (c) 2007-2020 - Andy Maleh.
4035
4202
 
4036
4203
  --
4037
4204