glimmer-dsl-swt 4.17.4.0 → 4.17.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/README.md +191 -29
- data/VERSION +1 -1
- data/glimmer-dsl-swt.gemspec +18 -5
- data/lib/glimmer/dsl/swt/checkbox_group_selection_data_binding_expression.rb +61 -0
- data/lib/glimmer/dsl/swt/custom_widget_expression.rb +2 -0
- data/lib/glimmer/dsl/swt/dsl.rb +2 -0
- data/lib/glimmer/dsl/swt/expand_item_expression.rb +60 -0
- data/lib/glimmer/dsl/swt/radio_group_selection_data_binding_expression.rb +61 -0
- data/lib/glimmer/dsl/swt/widget_expression.rb +1 -0
- data/lib/glimmer/swt/custom/checkbox_group.rb +160 -0
- data/lib/glimmer/swt/custom/code_text.rb +20 -13
- data/lib/glimmer/swt/custom/radio_group.rb +155 -0
- data/lib/glimmer/swt/expand_item_proxy.rb +97 -0
- data/lib/glimmer/swt/image_proxy.rb +5 -0
- data/lib/glimmer/swt/menu_proxy.rb +1 -1
- data/lib/glimmer/swt/sash_form_proxy.rb +1 -1
- data/lib/glimmer/swt/styled_text_proxy.rb +43 -0
- data/lib/glimmer/swt/tab_item_proxy.rb +1 -1
- data/lib/glimmer/swt/widget_proxy.rb +94 -35
- data/lib/glimmer/ui/custom_widget.rb +3 -0
- data/samples/elaborate/meta_sample.rb +36 -31
- data/samples/hello/hello_checkbox.rb +85 -0
- data/samples/hello/hello_checkbox_group.rb +68 -0
- data/samples/hello/hello_combo.rb +12 -12
- data/samples/hello/hello_expand_bar.rb +110 -0
- data/samples/hello/hello_list_multi_selection.rb +23 -23
- data/samples/hello/hello_list_single_selection.rb +14 -13
- data/samples/hello/hello_radio.rb +108 -0
- data/samples/hello/hello_radio_group.rb +84 -0
- data/samples/hello/hello_styled_text.rb +138 -0
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a6e9aed9497c88e3858e2e4a5c3734d784fce7aed040f4f538433e2318317d1
|
4
|
+
data.tar.gz: 10edec048056954ef796359f731f72d85ff586ec011291ece257d2d268fc34f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de93b471548a07642f95d134a838b8e4ecf9045f209fa50d3ec8958b8d5c5bc3f39bc9ed0071a24724c2313913ed807d20b97ecd4b4313f52413e178606bca5c
|
7
|
+
data.tar.gz: 206afc10eb6b566e0617da956f92507145e50393c30b8e398580af8565ea8a3cde61c03fbdc675e9b52a616fcfd7c1920764901c1318c94272848fc95572a12c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,39 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.17.7.0
|
4
|
+
|
5
|
+
- `checkbox_group` built-in custom widget
|
6
|
+
- Hello, Checkbox Group! Sample
|
7
|
+
- Refactor `radio_group` to render labels instead of relying on radio button text since they are better stylable
|
8
|
+
- Refactor Glimmer Meta-Sample to use `radio_group` instead of `radio`
|
9
|
+
- Fix issue with ExpandBar fill_layout with the extra element at the end (remove it)
|
10
|
+
|
11
|
+
### 4.17.6.0
|
12
|
+
|
13
|
+
- New `radio_group` built-in Glimmer custom widget
|
14
|
+
- Hello, Radio! Sample
|
15
|
+
- Hello, Radio Group! Sample
|
16
|
+
- Hello, Checkbox! Sample
|
17
|
+
|
18
|
+
### 4.17.5.0
|
19
|
+
|
20
|
+
- Support auto-scaling by aspect ratio of width and height (write specs)
|
21
|
+
- Support SWT ExpandBar via expand_bar keyword
|
22
|
+
- Hello, Expand Bar! Sample
|
23
|
+
- Hello, Styled Text! Sample
|
24
|
+
- Use expand_bar in Glimmer Meta-Sample
|
25
|
+
|
26
|
+
### 4.17.4.2
|
27
|
+
|
28
|
+
- Support StyledText data-binding of caret_offset, selection_count, selection, top_index, and top_pixel, useful for code_text
|
29
|
+
- Support `width, height` hash options for ImageProxy and image properties on widgets
|
30
|
+
- Default SWT styles for tool_bar (:border) and tool_item (:push)
|
31
|
+
|
32
|
+
### 4.17.4.1
|
33
|
+
|
34
|
+
- Optimize code_text line style listener algorithm or avoid setting code_text style via listener for performance reasons
|
35
|
+
- Optimize code_text syntax highlighting by not lexing except when content changes (e.g. during scrolling, do not lex)
|
36
|
+
|
3
37
|
### 4.17.4.0
|
4
38
|
|
5
39
|
- Glimmer sample app to launch samples (sample of samples meta-sample)
|
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.
|
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.7.0
|
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)
|
@@ -10,10 +10,14 @@
|
|
10
10
|
|
11
11
|
(The Original Glimmer Library Since 2007. Beware of Imitators!)
|
12
12
|
|
13
|
-
[
|
13
|
+
[Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer) is a native-GUI cross-platform desktop development library written in [JRuby](https://www.jruby.org/), an OS-threaded faster version of [Ruby](https://www.ruby-lang.org/en/). [Glimmer](https://github.com/AndyObtiva/glimmer)'s main innovation is a declarative [Ruby DSL](#glimmer-dsl-syntax) that enables productive and efficient authoring of desktop application user-interfaces while 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](#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. To get started quickly, [Glimmer](https://rubygems.org/gems/glimmer) offers [scaffolding](#scaffolding) options for [Apps](#in-production), [Gems](#custom-shell-gem), and [Custom Widgets](#custom-widgets). [Glimmer](https://rubygems.org/gems/glimmer) also includes native-executable [packaging](#packaging--distribution) 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](#custom-shell-gem) on [Linux](https://www.linux.org/).
|
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
|
+
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
|
+
|
17
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
|
|
@@ -249,7 +253,7 @@ Glimmer App:
|
|
249
253
|
- [Glimmer Command](#glimmer-command)
|
250
254
|
- [Basic Usage](#basic-usage)
|
251
255
|
- [Advanced Usage](#advanced-usage)
|
252
|
-
- [Samples](#samples)
|
256
|
+
- [Glimmer Samples](#glimmer-samples)
|
253
257
|
- [Scaffolding](#scaffolding)
|
254
258
|
- [App](#app)
|
255
259
|
- [Desktopify](#desktopify)
|
@@ -282,6 +286,7 @@ Glimmer App:
|
|
282
286
|
- [Color](#color)
|
283
287
|
- [Font](#font)
|
284
288
|
- [Image](#image)
|
289
|
+
- [Image Options](#image-options)
|
285
290
|
- [Cursor](#cursor)
|
286
291
|
- [Layouts](#layouts)
|
287
292
|
- [Layout Data](#layout-data)
|
@@ -340,6 +345,12 @@ Glimmer App:
|
|
340
345
|
- [Hello, Custom Widget!](#hello-custom-widget)
|
341
346
|
- [Hello, Custom Shell!](#hello-custom-shell)
|
342
347
|
- [Hello, Sash Form!](#hello-sash-form)
|
348
|
+
- [Hello, Styled Text!](#hello-styled-text)
|
349
|
+
- [Hello, Expand Bar!](#hello-expand-bar)
|
350
|
+
- [Hello, Radio!](#hello-radio)
|
351
|
+
- [Hello, Radio Group!](#hello-radio-group)
|
352
|
+
- [Hello, Checkbox!](#hello-checkbox)
|
353
|
+
- [Hello, Checkbox Group!](#hello-checkbox-group)
|
343
354
|
- [Elaborate Samples](#elaborate-samples)
|
344
355
|
- [User Profile](#user-profile)
|
345
356
|
- [Login](#login)
|
@@ -433,11 +444,9 @@ jgem install glimmer-dsl-swt
|
|
433
444
|
|
434
445
|
Or this command if you want a specific version:
|
435
446
|
```
|
436
|
-
jgem install glimmer-dsl-swt -v 4.17.
|
447
|
+
jgem install glimmer-dsl-swt -v 4.17.7.0
|
437
448
|
```
|
438
449
|
|
439
|
-
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.
|
440
|
-
|
441
450
|
`jgem` is JRuby's version of `gem` command.
|
442
451
|
RVM allows running `gem install` directly as an alias.
|
443
452
|
Otherwise, you may also run `jruby -S gem install ...`
|
@@ -511,7 +520,7 @@ bin/glimmer samples
|
|
511
520
|
Below are the full usage instructions that come up when running `glimmer` without args.
|
512
521
|
|
513
522
|
```
|
514
|
-
Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.
|
523
|
+
Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.7.0
|
515
524
|
|
516
525
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
517
526
|
|
@@ -622,18 +631,18 @@ You should see output like the following:
|
|
622
631
|
|
623
632
|
```
|
624
633
|
$ glimmer scaffold[greeter]
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
634
|
+
create .gitignore
|
635
|
+
create Rakefile
|
636
|
+
create Gemfile
|
637
|
+
create LICENSE.txt
|
638
|
+
create README.rdoc
|
639
|
+
create .document
|
640
|
+
create lib
|
641
|
+
create lib/greeter.rb
|
642
|
+
create spec
|
643
|
+
create spec/spec_helper.rb
|
644
|
+
create spec/greeter_spec.rb
|
645
|
+
create .rspec
|
637
646
|
Juwelier has prepared your gem in ./greeter
|
638
647
|
Created greeter/.gitignore
|
639
648
|
Created greeter/.ruby-version
|
@@ -731,15 +740,15 @@ Successfully installed github_api-0.19.0
|
|
731
740
|
Successfully installed nokogiri-1.10.10-java
|
732
741
|
Successfully installed juwelier-2.4.9
|
733
742
|
7 gems installed
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
+
create .gitignore
|
744
|
+
create Rakefile
|
745
|
+
create Gemfile
|
746
|
+
create LICENSE.txt
|
747
|
+
create README.markdown
|
748
|
+
create .document
|
749
|
+
create lib
|
750
|
+
create lib/snowboard_utah.rb
|
751
|
+
create .rspec
|
743
752
|
Juwelier has prepared your gem in ./snowboard_utah
|
744
753
|
Created snowboard_utah/.gitignore
|
745
754
|
Created snowboard_utah/.ruby-version
|
@@ -988,7 +997,7 @@ Output:
|
|
988
997
|
|
989
998
|
Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
|
990
999
|
Opal glimmer-dsl-opal 0.4.0 AndyMaleh Glimmer DSL for Opal
|
991
|
-
Swt glimmer-dsl-swt 4.17.
|
1000
|
+
Swt glimmer-dsl-swt 4.17.7.0 AndyMaleh Glimmer DSL for SWT
|
992
1001
|
Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
|
993
1002
|
Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
|
994
1003
|
```
|
@@ -1784,6 +1793,23 @@ Glimmer recently included **EXPERIMENTAL** gif animation support for the `backgr
|
|
1784
1793
|
|
1785
1794
|
Learn more about images in general at this SWT Image guide: https://www.eclipse.org/articles/Article-SWT-images/graphics-resources.html
|
1786
1795
|
|
1796
|
+
#### Image Options
|
1797
|
+
|
1798
|
+
Options may be passed in a hash at the end of `image` arguments:
|
1799
|
+
|
1800
|
+
- `width`: width of image
|
1801
|
+
- `height`: height of image
|
1802
|
+
|
1803
|
+
If only the width or height alone are specified, the other is calculated while maintaining the image aspect ratio.
|
1804
|
+
|
1805
|
+
Example:
|
1806
|
+
|
1807
|
+
```
|
1808
|
+
label {
|
1809
|
+
image 'someimage.png', width: 400, height: 300
|
1810
|
+
}
|
1811
|
+
```
|
1812
|
+
|
1787
1813
|
### Cursor
|
1788
1814
|
|
1789
1815
|
SWT widget `cursor` property represents the mouse cursor you see on the screen when you hover over that widget.
|
@@ -3053,6 +3079,55 @@ shell(:no_resize) {
|
|
3053
3079
|
|
3054
3080
|
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.
|
3055
3081
|
|
3082
|
+
#### Checkbox Group Widget
|
3083
|
+
|
3084
|
+
`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.
|
3085
|
+
|
3086
|
+
`checkbox_group` consists of a root `composite` (with `grid_layout 1, false` by default) that holds nested `checkbox` (`button(:check)`) widgets.
|
3087
|
+
|
3088
|
+
The `selection` property determines which `checkbox` buttons are checked. It expects an `Array` of `String` objects
|
3089
|
+
The `selection_indices` property determines which `checkbox` button indices are checked. It expects an `Array` of index `Integer` objects that are zero-based.
|
3090
|
+
The `checkboxes` property returns the list of nested `checkbox` widgets.
|
3091
|
+
|
3092
|
+
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.
|
3093
|
+
|
3094
|
+
You may see an example at the [Hello, Checkbox Group!](#hello-checkbox-group) sample.
|
3095
|
+
|
3096
|
+
![Hello Checkbox Group](images/glimmer-hello-checkbox-group.png)
|
3097
|
+
|
3098
|
+
#### Radio Group Widget
|
3099
|
+
|
3100
|
+
`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.
|
3101
|
+
|
3102
|
+
`radio_group` consists of a root `composite` (with `grid_layout 1, false` by default) that holds nested `radio` widgets.
|
3103
|
+
|
3104
|
+
The `selection` property determines which `radio` button is selected. It expects a `String`
|
3105
|
+
The `selection_index` property determines which `radio` button index is selected. It expects an index integer that is zero-based.
|
3106
|
+
The `radios` property returns the list of nested `radio` widgets.
|
3107
|
+
|
3108
|
+
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.
|
3109
|
+
|
3110
|
+
This custom widget is used in the [Glimmer Meta-Sample (The Sample of Samples)](#samples):
|
3111
|
+
|
3112
|
+
![Glimmer Meta-Sample](images/glimmer-meta-sample.png)
|
3113
|
+
|
3114
|
+
Glimmer Meta-Sample Code Example:
|
3115
|
+
|
3116
|
+
```ruby
|
3117
|
+
# ...
|
3118
|
+
radio_group { |radio_group_proxy|
|
3119
|
+
row_layout(:vertical) {
|
3120
|
+
fill true
|
3121
|
+
}
|
3122
|
+
selection bind(sample_directory, :selected_sample_name)
|
3123
|
+
font height: 24
|
3124
|
+
}
|
3125
|
+
|
3126
|
+
# ...
|
3127
|
+
```
|
3128
|
+
|
3129
|
+
You may see another example at the [Hello, Radio Group!](#hello-radio-group) sample.
|
3130
|
+
|
3056
3131
|
#### Code Text Widget
|
3057
3132
|
|
3058
3133
|
`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.
|
@@ -3089,6 +3164,8 @@ You may obtain via `glimmer-cw-video` gem.
|
|
3089
3164
|
|
3090
3165
|
It can be customized with the `weights` attribute by setting initial weights to size the panes at first display.
|
3091
3166
|
|
3167
|
+
One noteworthy thing about the Glimmer implementation is that, unlike behavior in SWT, it allows declaring `weights` before the content of the `sash_form`, thus providing more natural and convenient syntax (Glimmer automatically takes care of sending that declaration to SWT at the end of declaring `sash_form` content as per the SWT requirements)
|
3168
|
+
|
3092
3169
|
Example (you may copy/paste in [`girb`](#girb-glimmer-irb-command)):
|
3093
3170
|
|
3094
3171
|
```ruby
|
@@ -3585,6 +3662,90 @@ Hello, Sash Form! Red Label Maximized
|
|
3585
3662
|
|
3586
3663
|
![Hello Sash Form Red Maximized](images/glimmer-hello-sash-form-red-maximized.png)
|
3587
3664
|
|
3665
|
+
#### Hello, Styled Text!
|
3666
|
+
|
3667
|
+
This sample demonstrates the use of a `styled_text` in Glimmer.
|
3668
|
+
|
3669
|
+
Code:
|
3670
|
+
|
3671
|
+
[samples/hello/hello_styled_text.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_styled_text.rb)
|
3672
|
+
|
3673
|
+
Hello, Styled Text!
|
3674
|
+
|
3675
|
+
![Hello Styled Text](images/glimmer-hello-styled-text.png)
|
3676
|
+
|
3677
|
+
#### Hello, Expand Bar!
|
3678
|
+
|
3679
|
+
This sample demonstrates the use of a `expand_bar` and `expand_item` in Glimmer.
|
3680
|
+
|
3681
|
+
Code:
|
3682
|
+
|
3683
|
+
[samples/hello/hello_expand_bar.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_expand_bar.rb)
|
3684
|
+
|
3685
|
+
Hello, Expand Bar! All Expanded
|
3686
|
+
|
3687
|
+
![Hello Expand Bar All Expanded](images/glimmer-hello-expand-bar-all-expanded.png)
|
3688
|
+
|
3689
|
+
Hello, Expand Bar! Productivity Expanded
|
3690
|
+
|
3691
|
+
![Hello Expand Bar Productivity Expanded](images/glimmer-hello-expand-bar-productivity-expanded.png)
|
3692
|
+
|
3693
|
+
Hello, Expand Bar! Tools Expanded
|
3694
|
+
|
3695
|
+
![Hello Expand Bar Tools Expanded](images/glimmer-hello-expand-bar-tools-expanded.png)
|
3696
|
+
|
3697
|
+
Hello, Expand Bar! Reading Expanded
|
3698
|
+
|
3699
|
+
![Hello Expand Bar Reading Expanded](images/glimmer-hello-expand-bar-reading-expanded.png)
|
3700
|
+
|
3701
|
+
#### Hello, Radio!
|
3702
|
+
|
3703
|
+
This sample demonstrates the use of a `radio` (aka `button(:radio)`) in Glimmer.
|
3704
|
+
|
3705
|
+
Code:
|
3706
|
+
|
3707
|
+
[samples/hello/hello_radio.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_radio.rb)
|
3708
|
+
|
3709
|
+
Hello, Radio!
|
3710
|
+
|
3711
|
+
![Hello Radio](images/glimmer-hello-radio.png)
|
3712
|
+
|
3713
|
+
#### Hello, Radio Group!
|
3714
|
+
|
3715
|
+
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.
|
3716
|
+
|
3717
|
+
Code:
|
3718
|
+
|
3719
|
+
[samples/hello/hello_radio_group.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_radio_group.rb)
|
3720
|
+
|
3721
|
+
Hello, Radio Group!
|
3722
|
+
|
3723
|
+
![Hello Radio Group](images/glimmer-hello-radio-group.png)
|
3724
|
+
|
3725
|
+
#### Hello, Checkbox!
|
3726
|
+
|
3727
|
+
This sample demonstrates the use of a `checkbox` (aka `check` or `button(:check)`) in Glimmer.
|
3728
|
+
|
3729
|
+
Code:
|
3730
|
+
|
3731
|
+
[samples/hello/hello_checkbox.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_checkbox.rb)
|
3732
|
+
|
3733
|
+
Hello, Checkbox!
|
3734
|
+
|
3735
|
+
![Hello Checkbox](images/glimmer-hello-checkbox.png)
|
3736
|
+
|
3737
|
+
#### Hello, Checkbox Group!
|
3738
|
+
|
3739
|
+
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.
|
3740
|
+
|
3741
|
+
Code:
|
3742
|
+
|
3743
|
+
[samples/hello/hello_checkbox_group.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_checkbox_group.rb)
|
3744
|
+
|
3745
|
+
Hello, Checkbox Group!
|
3746
|
+
|
3747
|
+
![Hello Checkbox Group](images/glimmer-hello-checkbox-group.png)
|
3748
|
+
|
3588
3749
|
### Elaborate Samples
|
3589
3750
|
|
3590
3751
|
For more elaborate samples, check the following:
|
@@ -3897,6 +4058,7 @@ Here is a list of notable 3rd party gems used by Glimmer:
|
|
3897
4058
|
- [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`)
|
3898
4059
|
- [rake](https://github.com/ruby/rake): used to implement and execute `glimmer` commands
|
3899
4060
|
- [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.
|
4061
|
+
- [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)
|
3900
4062
|
- [super_module](https://github.com/AndyObtiva/super_module): used to cleanly write the Glimmer::UI:CustomWidget and Glimmer::UI::CustomShell modules
|
3901
4063
|
- [text-table](https://github.com/aptinio/text-table): renders textual data in a textual table for the command-line interface of Glimmer
|
3902
4064
|
- [warbler](https://github.com/jruby/warbler): converts a Glimmer app into a Java JAR file during packaging
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.17.
|
1
|
+
4.17.7.0
|
data/glimmer-dsl-swt.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glimmer-dsl-swt 4.17.
|
5
|
+
# stub: glimmer-dsl-swt 4.17.7.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer-dsl-swt".freeze
|
9
|
-
s.version = "4.17.
|
9
|
+
s.version = "4.17.7.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["AndyMaleh".freeze]
|
14
|
-
s.date = "2020-10-
|
14
|
+
s.date = "2020-10-29"
|
15
15
|
s.description = "Glimmer DSL for SWT (JRuby Desktop Development GUI Library)".freeze
|
16
16
|
s.email = "andy.am@gmail.com".freeze
|
17
17
|
s.executables = ["glimmer".freeze, "girb".freeze]
|
@@ -45,6 +45,7 @@ Gem::Specification.new do |s|
|
|
45
45
|
"lib/glimmer/dsl/swt/async_exec_expression.rb",
|
46
46
|
"lib/glimmer/dsl/swt/bind_expression.rb",
|
47
47
|
"lib/glimmer/dsl/swt/block_property_expression.rb",
|
48
|
+
"lib/glimmer/dsl/swt/checkbox_group_selection_data_binding_expression.rb",
|
48
49
|
"lib/glimmer/dsl/swt/color_expression.rb",
|
49
50
|
"lib/glimmer/dsl/swt/column_properties_expression.rb",
|
50
51
|
"lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb",
|
@@ -56,6 +57,7 @@ Gem::Specification.new do |s|
|
|
56
57
|
"lib/glimmer/dsl/swt/dnd_expression.rb",
|
57
58
|
"lib/glimmer/dsl/swt/dsl.rb",
|
58
59
|
"lib/glimmer/dsl/swt/exec_expression.rb",
|
60
|
+
"lib/glimmer/dsl/swt/expand_item_expression.rb",
|
59
61
|
"lib/glimmer/dsl/swt/font_expression.rb",
|
60
62
|
"lib/glimmer/dsl/swt/image_expression.rb",
|
61
63
|
"lib/glimmer/dsl/swt/layout_data_expression.rb",
|
@@ -66,6 +68,7 @@ Gem::Specification.new do |s|
|
|
66
68
|
"lib/glimmer/dsl/swt/message_box_expression.rb",
|
67
69
|
"lib/glimmer/dsl/swt/observe_expression.rb",
|
68
70
|
"lib/glimmer/dsl/swt/property_expression.rb",
|
71
|
+
"lib/glimmer/dsl/swt/radio_group_selection_data_binding_expression.rb",
|
69
72
|
"lib/glimmer/dsl/swt/rgb_expression.rb",
|
70
73
|
"lib/glimmer/dsl/swt/rgba_expression.rb",
|
71
74
|
"lib/glimmer/dsl/swt/shell_expression.rb",
|
@@ -84,9 +87,12 @@ Gem::Specification.new do |s|
|
|
84
87
|
"lib/glimmer/rake_task/scaffold.rb",
|
85
88
|
"lib/glimmer/swt/color_proxy.rb",
|
86
89
|
"lib/glimmer/swt/cursor_proxy.rb",
|
90
|
+
"lib/glimmer/swt/custom/checkbox_group.rb",
|
87
91
|
"lib/glimmer/swt/custom/code_text.rb",
|
92
|
+
"lib/glimmer/swt/custom/radio_group.rb",
|
88
93
|
"lib/glimmer/swt/display_proxy.rb",
|
89
94
|
"lib/glimmer/swt/dnd_proxy.rb",
|
95
|
+
"lib/glimmer/swt/expand_item_proxy.rb",
|
90
96
|
"lib/glimmer/swt/font_proxy.rb",
|
91
97
|
"lib/glimmer/swt/image_proxy.rb",
|
92
98
|
"lib/glimmer/swt/layout_data_proxy.rb",
|
@@ -98,6 +104,7 @@ Gem::Specification.new do |s|
|
|
98
104
|
"lib/glimmer/swt/scrolled_composite_proxy.rb",
|
99
105
|
"lib/glimmer/swt/shell_proxy.rb",
|
100
106
|
"lib/glimmer/swt/style_constantizable.rb",
|
107
|
+
"lib/glimmer/swt/styled_text_proxy.rb",
|
101
108
|
"lib/glimmer/swt/swt_proxy.rb",
|
102
109
|
"lib/glimmer/swt/tab_item_proxy.rb",
|
103
110
|
"lib/glimmer/swt/table_column_proxy.rb",
|
@@ -119,18 +126,24 @@ Gem::Specification.new do |s|
|
|
119
126
|
"samples/elaborate/tic_tac_toe/cell.rb",
|
120
127
|
"samples/elaborate/user_profile.rb",
|
121
128
|
"samples/hello/hello_browser.rb",
|
129
|
+
"samples/hello/hello_checkbox.rb",
|
130
|
+
"samples/hello/hello_checkbox_group.rb",
|
122
131
|
"samples/hello/hello_combo.rb",
|
123
132
|
"samples/hello/hello_computed.rb",
|
124
133
|
"samples/hello/hello_computed/contact.rb",
|
125
134
|
"samples/hello/hello_custom_shell.rb",
|
126
135
|
"samples/hello/hello_custom_widget.rb",
|
127
136
|
"samples/hello/hello_drag_and_drop.rb",
|
137
|
+
"samples/hello/hello_expand_bar.rb",
|
128
138
|
"samples/hello/hello_list_multi_selection.rb",
|
129
139
|
"samples/hello/hello_list_single_selection.rb",
|
130
140
|
"samples/hello/hello_menu_bar.rb",
|
131
141
|
"samples/hello/hello_message_box.rb",
|
132
142
|
"samples/hello/hello_pop_up_context_menu.rb",
|
143
|
+
"samples/hello/hello_radio.rb",
|
144
|
+
"samples/hello/hello_radio_group.rb",
|
133
145
|
"samples/hello/hello_sash_form.rb",
|
146
|
+
"samples/hello/hello_styled_text.rb",
|
134
147
|
"samples/hello/hello_tab.rb",
|
135
148
|
"samples/hello/hello_world.rb",
|
136
149
|
"vendor/swt/linux/swt.jar",
|
@@ -148,7 +161,7 @@ Gem::Specification.new do |s|
|
|
148
161
|
end
|
149
162
|
|
150
163
|
if s.respond_to? :add_runtime_dependency then
|
151
|
-
s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.
|
164
|
+
s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.2"])
|
152
165
|
s.add_runtime_dependency(%q<super_module>.freeze, ["~> 1.4.1"])
|
153
166
|
s.add_runtime_dependency(%q<nested_inherited_jruby_include_package>.freeze, ["~> 0.3.0"])
|
154
167
|
s.add_runtime_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.2"])
|
@@ -167,7 +180,7 @@ Gem::Specification.new do |s|
|
|
167
180
|
s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
|
168
181
|
s.add_development_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
|
169
182
|
else
|
170
|
-
s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.
|
183
|
+
s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.2"])
|
171
184
|
s.add_dependency(%q<super_module>.freeze, ["~> 1.4.1"])
|
172
185
|
s.add_dependency(%q<nested_inherited_jruby_include_package>.freeze, ["~> 0.3.0"])
|
173
186
|
s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.2"])
|