glimmer-dsl-swt 4.17.10.3 → 4.17.10.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/README.md +78 -60
- data/VERSION +1 -1
- data/glimmer-dsl-swt.gemspec +16 -14
- data/lib/glimmer/data_binding/table_items_binding.rb +8 -9
- data/lib/glimmer/data_binding/tree_items_binding.rb +7 -7
- data/lib/glimmer/swt/menu_proxy.rb +0 -1
- data/lib/glimmer/swt/table_proxy.rb +14 -14
- data/lib/glimmer/swt/widget_proxy.rb +8 -6
- data/samples/elaborate/login.rb +10 -13
- data/samples/elaborate/meta_sample.rb +54 -18
- data/samples/hello/hello_browser.rb +2 -0
- data/samples/hello/hello_button.rb +46 -0
- data/samples/hello/hello_computed.rb +9 -3
- data/samples/hello/hello_link.rb +80 -0
- data/samples/hello/hello_list_multi_selection.rb +22 -17
- data/samples/hello/hello_list_single_selection.rb +5 -5
- data/samples/hello/hello_message_box.rb +9 -8
- data/samples/hello/hello_pop_up_context_menu.rb +33 -6
- data/samples/hello/hello_table.rb +0 -4
- metadata +35 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f86e6ce8dc5b52db4661c0cb5aa9d9bce7e0cc644408ae1536aed5d2ea25d0cd
|
4
|
+
data.tar.gz: ccdbb42c7bebc81a2a73235ee80ef53ce6607810152ea66b6336e33490a8e83a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d1e3ee58b861a453d79cca264749bcfc17f0efd4e490864aadec61a4b4269ad033cc49fbf291ccf8b9840ed54813130e8620a557d1f15c3c6c25883276ee6cb
|
7
|
+
data.tar.gz: 7fb220ed34798e701839cf118e1a7df1ebf5492b938570a8ee7dd0ad6a0a624808f52fe74ac30d221f58e6269ff708dd6d71098b0251c3470d16fa2a5c472323
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.17.10.8
|
4
|
+
|
5
|
+
- Support editing sample code in the Glimmer Meta-Sample to enable experimentation and learning
|
6
|
+
- Add a "Reset" button to the Glimmer Meta-Sample to allow resetting sample code changes
|
7
|
+
- Refactor/revise hello_message_box.rb and hello_pop_up_context_menu.rb samples
|
8
|
+
- Upgrade to glimmer 1.0.6
|
9
|
+
|
10
|
+
### 4.17.10.7
|
11
|
+
|
12
|
+
- Loosened dependencies on most Glimmer author-owned gems
|
13
|
+
- Refactored/Simplified/Fixed Hello, Link! Sample
|
14
|
+
|
15
|
+
### 4.17.10.6
|
16
|
+
|
17
|
+
- Hello, Link! Sample
|
18
|
+
- Refactor hello list samples
|
19
|
+
|
20
|
+
### 4.17.10.5
|
21
|
+
|
22
|
+
- Hello, Button! Sample
|
23
|
+
|
24
|
+
### 4.17.10.4
|
25
|
+
|
26
|
+
- Do not select first row in a table by default (keep unselected)
|
27
|
+
- Prevented extra call to model data in table items data-binding
|
28
|
+
- Upgraded to glimmer v1.0.5
|
29
|
+
|
3
30
|
### 4.17.10.3
|
4
31
|
|
5
32
|
- Fixed issue in StyledText data-binding relating to capturing selection changes on mouse click
|
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.10.
|
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.10.8
|
2
2
|
|
3
3
|
## JRuby Desktop Development GUI Framework
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
|
@@ -33,7 +33,7 @@ Glimmer DSL gems:
|
|
33
33
|
|
34
34
|
### Hello, World!
|
35
35
|
|
36
|
-
Glimmer code (from [samples/hello/hello_world.rb](
|
36
|
+
Glimmer code (from [samples/hello/hello_world.rb](samples/hello/hello_world.rb)):
|
37
37
|
```ruby
|
38
38
|
include Glimmer
|
39
39
|
|
@@ -57,12 +57,10 @@ Glimmer app:
|
|
57
57
|
|
58
58
|
### Tic Tac Toe
|
59
59
|
|
60
|
-
Glimmer code (from [samples/elaborate/tic_tac_toe.rb](
|
60
|
+
Glimmer code (from [samples/elaborate/tic_tac_toe.rb](samples/elaborate/tic_tac_toe.rb)):
|
61
61
|
|
62
62
|
```ruby
|
63
63
|
# ...
|
64
|
-
@tic_tac_toe_board = Board.new
|
65
|
-
|
66
64
|
@shell = shell {
|
67
65
|
text "Tic-Tac-Toe"
|
68
66
|
minimum_size 150, 178
|
@@ -83,11 +81,6 @@ Glimmer code (from [samples/elaborate/tic_tac_toe.rb](https://github.com/AndyObt
|
|
83
81
|
}
|
84
82
|
}
|
85
83
|
}
|
86
|
-
|
87
|
-
observe(@tic_tac_toe_board, :game_status) { |game_status|
|
88
|
-
display_win_message if game_status == Board::WIN
|
89
|
-
display_draw_message if game_status == Board::DRAW
|
90
|
-
}
|
91
84
|
# ...
|
92
85
|
```
|
93
86
|
|
@@ -103,7 +96,7 @@ Glimmer app:
|
|
103
96
|
|
104
97
|
### Contact Manager
|
105
98
|
|
106
|
-
Glimmer code (from [samples/elaborate/contact_manager.rb](
|
99
|
+
Glimmer code (from [samples/elaborate/contact_manager.rb](samples/elaborate/contact_manager.rb)):
|
107
100
|
|
108
101
|
```ruby
|
109
102
|
# ...
|
@@ -353,7 +346,6 @@ Glimmer App:
|
|
353
346
|
- [Hello, Expand Bar!](#hello-expand-bar)
|
354
347
|
- [Hello, Radio!](#hello-radio)
|
355
348
|
- [Hello, Radio Group!](#hello-radio-group)
|
356
|
-
- [Hello, Checkbox!](#hello-checkbox)
|
357
349
|
- [Hello, Group!](#hello-group)
|
358
350
|
- [Hello, Checkbox!](#hello-checkbox)
|
359
351
|
- [Hello, Checkbox Group!](#hello-checkbox-group)
|
@@ -362,6 +354,8 @@ Glimmer App:
|
|
362
354
|
- [Hello, Date Time!](#hello-date-time)
|
363
355
|
- [Hello, Spinner!](#hello-spinner)
|
364
356
|
- [Hello, Table!](#hello-table)
|
357
|
+
- [Hello, Button!](#hello-button)
|
358
|
+
- [Hello, Link!](#hello-link)
|
365
359
|
- [Elaborate Samples](#elaborate-samples)
|
366
360
|
- [User Profile](#user-profile)
|
367
361
|
- [Login](#login)
|
@@ -455,7 +449,7 @@ jgem install glimmer-dsl-swt
|
|
455
449
|
|
456
450
|
Or this command if you want a specific version:
|
457
451
|
```
|
458
|
-
jgem install glimmer-dsl-swt -v 4.17.10.
|
452
|
+
jgem install glimmer-dsl-swt -v 4.17.10.8
|
459
453
|
|
460
454
|
```
|
461
455
|
|
@@ -532,7 +526,7 @@ bin/glimmer samples
|
|
532
526
|
Below are the full usage instructions that come up when running `glimmer` without args.
|
533
527
|
|
534
528
|
```
|
535
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.
|
529
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.8
|
536
530
|
|
537
531
|
|
538
532
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
@@ -710,7 +704,7 @@ glimmer bin/greeter
|
|
710
704
|
|
711
705
|
#### Desktopify
|
712
706
|
|
713
|
-
|
707
|
+
Desktopify basically turns a website into a desktop application by wrapping the website within a [Browser Widget](#browser-widget).
|
714
708
|
|
715
709
|
The desktopify app is similar to the standard scaffolded app. It can be extended and the [browser may even be instrumented](https://help.eclipse.org/2020-09/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html).
|
716
710
|
|
@@ -1009,8 +1003,8 @@ Output:
|
|
1009
1003
|
Name Gem Version Author Description
|
1010
1004
|
|
1011
1005
|
Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
|
1012
|
-
Opal glimmer-dsl-opal 0.
|
1013
|
-
Swt glimmer-dsl-swt 4.17.10.
|
1006
|
+
Opal glimmer-dsl-opal 0.8.0 AndyMaleh Glimmer DSL for Opal
|
1007
|
+
Swt glimmer-dsl-swt 4.17.10.8
|
1014
1008
|
AndyMaleh Glimmer DSL for SWT
|
1015
1009
|
Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
|
1016
1010
|
Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
|
@@ -3292,10 +3286,8 @@ Glimmer Meta-Sample Code Example:
|
|
3292
3286
|
|
3293
3287
|
```ruby
|
3294
3288
|
# ...
|
3295
|
-
code_text {
|
3296
|
-
text bind(SampleDirectory, 'selected_sample.content')
|
3297
|
-
editable false
|
3298
|
-
caret nil
|
3289
|
+
@code_text = code_text {
|
3290
|
+
text bind(SampleDirectory, 'selected_sample.content', read_only: true)
|
3299
3291
|
}
|
3300
3292
|
# ...
|
3301
3293
|
```
|
@@ -3631,7 +3623,7 @@ https://www.eclipse.org/nebula/
|
|
3631
3623
|
|
3632
3624
|
## Samples
|
3633
3625
|
|
3634
|
-
Check the [samples](samples) directory in [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) for examples on how to write Glimmer applications. To run a sample, make sure to install the `glimmer` gem first and then use the `glimmer` command to run it (alternatively, you may clone the repo, follow [CONTRIBUTING.md](CONTRIBUTING.md) instructions, and run samples locally with development glimmer command: `bin/glimmer`).
|
3626
|
+
Check the [samples](samples) directory in [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) for examples on how to write Glimmer applications. To run a sample, make sure to install the `glimmer` gem first and then use the `glimmer samples` command to run it (alternatively, you may clone the repo, follow [CONTRIBUTING.md](CONTRIBUTING.md) instructions, and run samples locally with development glimmer command: `bin/glimmer`).
|
3635
3627
|
|
3636
3628
|
You may run any sample via this command:
|
3637
3629
|
|
@@ -3643,6 +3635,8 @@ This brings up the [Glimmer Meta-Sample (The Sample of Samples)](samples/elabora
|
|
3643
3635
|
|
3644
3636
|
![Glimmer Meta-Sample](images/glimmer-meta-sample.png)
|
3645
3637
|
|
3638
|
+
You may edit the code of any sample before launching it via the "Launch" button. This helps you learn by experiementing with Glimmer GUI DSL syntax. To go back to original code, simply hit the "Reset" button.
|
3639
|
+
|
3646
3640
|
### Hello Samples
|
3647
3641
|
|
3648
3642
|
For hello-type simple samples, check the following.
|
@@ -3651,7 +3645,7 @@ For hello-type simple samples, check the following.
|
|
3651
3645
|
|
3652
3646
|
Code:
|
3653
3647
|
|
3654
|
-
[samples/hello/hello_world.rb](
|
3648
|
+
[samples/hello/hello_world.rb](samples/hello/hello_world.rb)
|
3655
3649
|
|
3656
3650
|
![Hello World](images/glimmer-hello-world.png)
|
3657
3651
|
|
@@ -3659,7 +3653,7 @@ Code:
|
|
3659
3653
|
|
3660
3654
|
Code:
|
3661
3655
|
|
3662
|
-
[samples/hello/hello_tab.rb](
|
3656
|
+
[samples/hello/hello_tab.rb](samples/hello/hello_tab.rb)
|
3663
3657
|
|
3664
3658
|
![Hello Tab English](images/glimmer-hello-tab-english.png)
|
3665
3659
|
![Hello Tab French](images/glimmer-hello-tab-french.png)
|
@@ -3670,7 +3664,7 @@ This sample demonstrates combo data-binding.
|
|
3670
3664
|
|
3671
3665
|
Code:
|
3672
3666
|
|
3673
|
-
[samples/hello/hello_combo.rb](
|
3667
|
+
[samples/hello/hello_combo.rb](samples/hello/hello_combo.rb)
|
3674
3668
|
|
3675
3669
|
![Hello Combo](images/glimmer-hello-combo.png)
|
3676
3670
|
![Hello Combo Expanded](images/glimmer-hello-combo-expanded.png)
|
@@ -3681,7 +3675,7 @@ This sample demonstrates list single-selection data-binding.
|
|
3681
3675
|
|
3682
3676
|
Code:
|
3683
3677
|
|
3684
|
-
[samples/hello/hello_list_single_selection.rb](
|
3678
|
+
[samples/hello/hello_list_single_selection.rb](samples/hello/hello_list_single_selection.rb)
|
3685
3679
|
|
3686
3680
|
![Hello List Single Selection](images/glimmer-hello-list-single-selection.png)
|
3687
3681
|
|
@@ -3691,7 +3685,7 @@ This sample demonstrates list multi-selection data-binding.
|
|
3691
3685
|
|
3692
3686
|
Code:
|
3693
3687
|
|
3694
|
-
[samples/hello/hello_list_multi_selection.rb](
|
3688
|
+
[samples/hello/hello_list_multi_selection.rb](samples/hello/hello_list_multi_selection.rb)
|
3695
3689
|
|
3696
3690
|
![Hello List Multi Selection](images/glimmer-hello-list-multi-selection.png)
|
3697
3691
|
|
@@ -3701,7 +3695,7 @@ This sample demonstrates computed data-binding.
|
|
3701
3695
|
|
3702
3696
|
Code:
|
3703
3697
|
|
3704
|
-
[samples/hello/hello_computed.rb](
|
3698
|
+
[samples/hello/hello_computed.rb](samples/hello/hello_computed.rb)
|
3705
3699
|
|
3706
3700
|
![Hello Browser](images/glimmer-hello-computed.png)
|
3707
3701
|
|
@@ -3711,7 +3705,7 @@ This sample demonstrates a `message_box` dialog.
|
|
3711
3705
|
|
3712
3706
|
Code:
|
3713
3707
|
|
3714
|
-
[samples/hello/hello_message_box.rb](
|
3708
|
+
[samples/hello/hello_message_box.rb](samples/hello/hello_message_box.rb)
|
3715
3709
|
|
3716
3710
|
![Hello Message Box](images/glimmer-hello-message-box.png)
|
3717
3711
|
![Hello Message Box Dialog](images/glimmer-hello-message-box-dialog.png)
|
@@ -3722,7 +3716,7 @@ This sample demonstrates the `browser` widget.
|
|
3722
3716
|
|
3723
3717
|
Code:
|
3724
3718
|
|
3725
|
-
[samples/hello/hello_browser.rb](
|
3719
|
+
[samples/hello/hello_browser.rb](samples/hello/hello_browser.rb)
|
3726
3720
|
|
3727
3721
|
![Hello Browser](images/glimmer-hello-browser.png)
|
3728
3722
|
|
@@ -3732,7 +3726,7 @@ This sample demonstrates drag and drop in Glimmer.
|
|
3732
3726
|
|
3733
3727
|
Code:
|
3734
3728
|
|
3735
|
-
[samples/hello/hello_drag_and_drop.rb](
|
3729
|
+
[samples/hello/hello_drag_and_drop.rb](samples/hello/hello_drag_and_drop.rb)
|
3736
3730
|
|
3737
3731
|
![Hello Drag and Drop](images/glimmer-hello-drag-and-drop.gif)
|
3738
3732
|
|
@@ -3742,7 +3736,7 @@ This sample demonstrates menus in Glimmer.
|
|
3742
3736
|
|
3743
3737
|
Code:
|
3744
3738
|
|
3745
|
-
[samples/hello/hello_menu_bar.rb](
|
3739
|
+
[samples/hello/hello_menu_bar.rb](samples/hello/hello_menu_bar.rb)
|
3746
3740
|
|
3747
3741
|
![Hello Menu Bar](images/glimmer-hello-menu-bar.png)
|
3748
3742
|
![Hello Menu Bar File Menu](images/glimmer-hello-menu-bar-file-menu.png)
|
@@ -3754,7 +3748,7 @@ This sample demonstrates pop up context menus in Glimmer.
|
|
3754
3748
|
|
3755
3749
|
Code:
|
3756
3750
|
|
3757
|
-
[samples/hello/hello_pop_up_context_menu.rb](
|
3751
|
+
[samples/hello/hello_pop_up_context_menu.rb](samples/hello/hello_pop_up_context_menu.rb)
|
3758
3752
|
|
3759
3753
|
![Hello Pop Up Context Menu](images/glimmer-hello-pop-up-context-menu.png)
|
3760
3754
|
![Hello Pop Up Context Menu Popped Up](images/glimmer-hello-pop-up-context-menu-popped-up.png)
|
@@ -3765,7 +3759,7 @@ This sample demonstrates the use of a custom widget in Glimmer.
|
|
3765
3759
|
|
3766
3760
|
Code:
|
3767
3761
|
|
3768
|
-
[samples/hello/hello_custom_widget.rb](
|
3762
|
+
[samples/hello/hello_custom_widget.rb](samples/hello/hello_custom_widget.rb)
|
3769
3763
|
|
3770
3764
|
![Hello Custom Widget](images/glimmer-hello-custom-widget.gif)
|
3771
3765
|
|
@@ -3775,7 +3769,7 @@ This sample demonstrates the use of a custom shell (aka custom window) in Glimme
|
|
3775
3769
|
|
3776
3770
|
Code:
|
3777
3771
|
|
3778
|
-
[samples/hello/hello_custom_shell.rb](
|
3772
|
+
[samples/hello/hello_custom_shell.rb](samples/hello/hello_custom_shell.rb)
|
3779
3773
|
|
3780
3774
|
![Hello Custom Shell](images/glimmer-hello-custom-shell.png)
|
3781
3775
|
![Hello Custom Shell Email1](images/glimmer-hello-custom-shell-email1.png)
|
@@ -3788,7 +3782,7 @@ This sample demonstrates the use of a `sash_form` in Glimmer.
|
|
3788
3782
|
|
3789
3783
|
Code:
|
3790
3784
|
|
3791
|
-
[samples/hello/hello_sash_form.rb](
|
3785
|
+
[samples/hello/hello_sash_form.rb](samples/hello/hello_sash_form.rb)
|
3792
3786
|
|
3793
3787
|
Hello, Sash Form! Horizontal Orientation
|
3794
3788
|
|
@@ -3820,7 +3814,7 @@ This sample demonstrates the use of a `styled_text` in Glimmer.
|
|
3820
3814
|
|
3821
3815
|
Code:
|
3822
3816
|
|
3823
|
-
[samples/hello/hello_styled_text.rb](
|
3817
|
+
[samples/hello/hello_styled_text.rb](samples/hello/hello_styled_text.rb)
|
3824
3818
|
|
3825
3819
|
Hello, Styled Text!
|
3826
3820
|
|
@@ -3832,7 +3826,7 @@ This sample demonstrates the use of a `expand_bar` and `expand_item` in Glimmer.
|
|
3832
3826
|
|
3833
3827
|
Code:
|
3834
3828
|
|
3835
|
-
[samples/hello/hello_expand_bar.rb](
|
3829
|
+
[samples/hello/hello_expand_bar.rb](samples/hello/hello_expand_bar.rb)
|
3836
3830
|
|
3837
3831
|
Hello, Expand Bar! All Expanded
|
3838
3832
|
|
@@ -3856,7 +3850,7 @@ This sample demonstrates the use of a `radio` (aka `button(:radio)`) in Glimmer.
|
|
3856
3850
|
|
3857
3851
|
Code:
|
3858
3852
|
|
3859
|
-
[samples/hello/hello_radio.rb](
|
3853
|
+
[samples/hello/hello_radio.rb](samples/hello/hello_radio.rb)
|
3860
3854
|
|
3861
3855
|
Hello, Radio!
|
3862
3856
|
|
@@ -3868,27 +3862,19 @@ This sample demonstrates the use of a `radio_group` in Glimmer, which provides t
|
|
3868
3862
|
|
3869
3863
|
Code:
|
3870
3864
|
|
3871
|
-
[samples/hello/hello_radio_group.rb](
|
3865
|
+
[samples/hello/hello_radio_group.rb](samples/hello/hello_radio_group.rb)
|
3872
3866
|
|
3873
3867
|
Hello, Radio Group!
|
3874
3868
|
|
3875
3869
|
![Hello Radio Group](images/glimmer-hello-radio-group.png)
|
3876
3870
|
|
3877
|
-
#### Hello, Checkbox!
|
3878
|
-
|
3879
|
-
This sample demonstrates the use of a `checkbox` (aka `check` or `button(:check)`) in Glimmer.
|
3880
|
-
|
3881
|
-
Code:
|
3882
|
-
|
3883
|
-
[samples/hello/hello_checkbox.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_checkbox.rb)
|
3884
|
-
|
3885
3871
|
#### Hello, Group!
|
3886
3872
|
|
3887
3873
|
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).
|
3888
3874
|
|
3889
3875
|
Code:
|
3890
3876
|
|
3891
|
-
[samples/hello/hello_group.rb](
|
3877
|
+
[samples/hello/hello_group.rb](samples/hello/hello_group.rb)
|
3892
3878
|
|
3893
3879
|
Hello, Group!
|
3894
3880
|
|
@@ -3900,7 +3886,7 @@ This sample demonstrates the use of a `checkbox` (aka `check` or `button(:check)
|
|
3900
3886
|
|
3901
3887
|
Code:
|
3902
3888
|
|
3903
|
-
[samples/hello/hello_checkbox.rb](
|
3889
|
+
[samples/hello/hello_checkbox.rb](samples/hello/hello_checkbox.rb)
|
3904
3890
|
|
3905
3891
|
Hello, Checkbox!
|
3906
3892
|
|
@@ -3912,7 +3898,7 @@ This sample demonstrates the use of a `checkbox_group` (aka `check_group`) in Gl
|
|
3912
3898
|
|
3913
3899
|
Code:
|
3914
3900
|
|
3915
|
-
[samples/hello/hello_checkbox_group.rb](
|
3901
|
+
[samples/hello/hello_checkbox_group.rb](samples/hello/hello_checkbox_group.rb)
|
3916
3902
|
|
3917
3903
|
Hello, Checkbox Group!
|
3918
3904
|
|
@@ -3924,7 +3910,7 @@ This sample demonstrates the use of a `directory_dialog` in Glimmer.
|
|
3924
3910
|
|
3925
3911
|
Code:
|
3926
3912
|
|
3927
|
-
[samples/hello/hello_directory_dialog.rb](
|
3913
|
+
[samples/hello/hello_directory_dialog.rb](samples/hello/hello_directory_dialog.rb)
|
3928
3914
|
|
3929
3915
|
Hello, Directory Dialog!
|
3930
3916
|
|
@@ -3944,7 +3930,7 @@ This sample demonstrates the use of a `file_dialog` in Glimmer.
|
|
3944
3930
|
|
3945
3931
|
Code:
|
3946
3932
|
|
3947
|
-
[samples/hello/hello_file_dialog.rb](
|
3933
|
+
[samples/hello/hello_file_dialog.rb](samples/hello/hello_file_dialog.rb)
|
3948
3934
|
|
3949
3935
|
Hello, File Dialog!
|
3950
3936
|
|
@@ -3964,7 +3950,7 @@ This sample demonstrates the use of [date_time](#datetime) widget keywords in Gl
|
|
3964
3950
|
|
3965
3951
|
Code:
|
3966
3952
|
|
3967
|
-
[samples/hello/hello_date_time.rb](
|
3953
|
+
[samples/hello/hello_date_time.rb](samples/hello/hello_date_time.rb)
|
3968
3954
|
|
3969
3955
|
Hello, Date Time!
|
3970
3956
|
|
@@ -3976,7 +3962,7 @@ This sample demonstrates the use of `spinner` widget in Glimmer
|
|
3976
3962
|
|
3977
3963
|
Code:
|
3978
3964
|
|
3979
|
-
[samples/hello/hello_spinner.rb](
|
3965
|
+
[samples/hello/hello_spinner.rb](samples/hello/hello_spinner.rb)
|
3980
3966
|
|
3981
3967
|
Hello, Spinner!
|
3982
3968
|
|
@@ -3988,7 +3974,7 @@ This sample demonstrates the use of [table](#table) widget in Glimmer, including
|
|
3988
3974
|
|
3989
3975
|
Code:
|
3990
3976
|
|
3991
|
-
[samples/hello/hello_table.rb](
|
3977
|
+
[samples/hello/hello_table.rb](samples/hello/hello_table.rb)
|
3992
3978
|
|
3993
3979
|
Hello, Table!
|
3994
3980
|
|
@@ -4030,6 +4016,38 @@ Hello, Table! Context Menu
|
|
4030
4016
|
|
4031
4017
|
![Hello Table](images/glimmer-hello-table-context-menu.png)
|
4032
4018
|
|
4019
|
+
#### Hello, Button!
|
4020
|
+
|
4021
|
+
This sample demonstrates the use of the `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
|
4022
|
+
|
4023
|
+
Code:
|
4024
|
+
|
4025
|
+
[samples/hello/hello_button.rb](samples/hello/hello_button.rb)
|
4026
|
+
|
4027
|
+
Hello, Button!
|
4028
|
+
|
4029
|
+
![Hello Button](images/glimmer-hello-button.png)
|
4030
|
+
|
4031
|
+
Hello, Button! Incremented 7 times!
|
4032
|
+
|
4033
|
+
![Hello Button Incremented](images/glimmer-hello-button-incremented.png)
|
4034
|
+
|
4035
|
+
#### Hello, Link!
|
4036
|
+
|
4037
|
+
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.
|
4038
|
+
|
4039
|
+
Code:
|
4040
|
+
|
4041
|
+
[samples/hello/hello_link.rb](samples/hello/hello_link.rb)
|
4042
|
+
|
4043
|
+
Hello, Link!
|
4044
|
+
|
4045
|
+
![Hello Link](images/glimmer-hello-link.png)
|
4046
|
+
|
4047
|
+
Hello, Link! Clicked
|
4048
|
+
|
4049
|
+
![Hello Link Clicked](images/glimmer-hello-link-clicked.png)
|
4050
|
+
|
4033
4051
|
### Elaborate Samples
|
4034
4052
|
|
4035
4053
|
For more elaborate samples, check the following:
|
@@ -4042,7 +4060,7 @@ Please note that the code has changed since that article was written (the GUI DS
|
|
4042
4060
|
|
4043
4061
|
Code:
|
4044
4062
|
|
4045
|
-
[samples/elaborate/user_profile.rb](
|
4063
|
+
[samples/elaborate/user_profile.rb](samples/elaborate/user_profile.rb)
|
4046
4064
|
|
4047
4065
|
![User Profile](images/glimmer-user-profile.png)
|
4048
4066
|
|
@@ -4052,7 +4070,7 @@ This sample demonstrates basic data-binding, password and text fields, and field
|
|
4052
4070
|
|
4053
4071
|
Code:
|
4054
4072
|
|
4055
|
-
[samples/elaborate/login.rb](
|
4073
|
+
[samples/elaborate/login.rb](samples/elaborate/login.rb)
|
4056
4074
|
|
4057
4075
|
![Login](images/glimmer-login.png)
|
4058
4076
|
![Login Filled In](images/glimmer-login-filled-in.png)
|
@@ -4066,7 +4084,7 @@ Code:
|
|
4066
4084
|
|
4067
4085
|
(Please note that on some Linux instances where the display x-axis is set to double-scale, you need to set the `shell` `minimum_size` to `300, 178` instead of `150, 178`)
|
4068
4086
|
|
4069
|
-
[samples/elaborate/tic_tac_toe.rb](
|
4087
|
+
[samples/elaborate/tic_tac_toe.rb](samples/elaborate/tic_tac_toe.rb)
|
4070
4088
|
|
4071
4089
|
![Tic Tac Toe](images/glimmer-tic-tac-toe.png)
|
4072
4090
|
![Tic Tac Toe In Progress](images/glimmer-tic-tac-toe-in-progress.png)
|
@@ -4078,7 +4096,7 @@ This sample demonstrates table data-binding, sorting, filtering, GUI layout, MVP
|
|
4078
4096
|
|
4079
4097
|
Code:
|
4080
4098
|
|
4081
|
-
[samples/elaborate/contact_manager.rb](
|
4099
|
+
[samples/elaborate/contact_manager.rb](samples/elaborate/contact_manager.rb)
|
4082
4100
|
|
4083
4101
|
Contact Manager
|
4084
4102
|
|