glimmer-dsl-opal 0.9.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +213 -104
  4. data/VERSION +1 -1
  5. data/lib/display.rb +1 -1
  6. data/lib/glimmer-dsl-opal.rb +4 -3
  7. data/lib/glimmer-dsl-opal/ext/file.rb +1 -1
  8. data/lib/glimmer-dsl-opal/ext/glimmer/dsl/engine.rb +27 -2
  9. data/lib/glimmer-dsl-opal/samples/elaborate/contact_manager/contact_repository.rb +4 -4
  10. data/lib/glimmer-dsl-opal/samples/elaborate/tic_tac_toe.rb +2 -2
  11. data/lib/glimmer-dsl-opal/samples/hello/hello_browser.rb +1 -1
  12. data/lib/glimmer-dsl-opal/samples/hello/hello_button.rb +1 -1
  13. data/lib/glimmer-dsl-opal/samples/hello/hello_checkbox.rb +1 -1
  14. data/lib/glimmer-dsl-opal/samples/hello/hello_checkbox_group.rb +1 -1
  15. data/lib/glimmer-dsl-opal/samples/hello/hello_combo.rb +1 -1
  16. data/lib/glimmer-dsl-opal/samples/hello/hello_computed.rb +1 -1
  17. data/lib/glimmer-dsl-opal/samples/hello/hello_computed/contact.rb +21 -0
  18. data/lib/glimmer-dsl-opal/samples/hello/hello_custom_shell.rb +1 -1
  19. data/lib/glimmer-dsl-opal/samples/hello/hello_custom_widget.rb +1 -1
  20. data/lib/glimmer-dsl-opal/samples/hello/hello_date_time.rb +1 -1
  21. data/lib/glimmer-dsl-opal/samples/hello/hello_dialog.rb +78 -0
  22. data/lib/glimmer-dsl-opal/samples/hello/hello_group.rb +1 -1
  23. data/lib/glimmer-dsl-opal/samples/hello/hello_list_multi_selection.rb +1 -1
  24. data/lib/glimmer-dsl-opal/samples/hello/hello_list_single_selection.rb +1 -1
  25. data/lib/glimmer-dsl-opal/samples/hello/hello_menu_bar.rb +1 -1
  26. data/lib/glimmer-dsl-opal/samples/hello/hello_message_box.rb +1 -1
  27. data/lib/glimmer-dsl-opal/samples/hello/hello_pop_up_context_menu.rb +1 -1
  28. data/lib/glimmer-dsl-opal/samples/hello/hello_radio.rb +1 -1
  29. data/lib/glimmer-dsl-opal/samples/hello/hello_radio_group.rb +1 -1
  30. data/lib/glimmer-dsl-opal/samples/hello/hello_tab.rb +1 -1
  31. data/lib/glimmer-dsl-opal/samples/hello/hello_table.rb +1 -1
  32. data/lib/glimmer-dsl-opal/samples/hello/hello_world.rb +1 -1
  33. data/lib/glimmer-dsl-swt.rb +1 -1
  34. data/lib/glimmer/dsl/opal/async_exec_expression.rb +1 -1
  35. data/lib/glimmer/dsl/opal/block_property_expression.rb +1 -1
  36. data/lib/glimmer/dsl/opal/checkbox_group_selection_data_binding_expression.rb +1 -1
  37. data/lib/glimmer/dsl/opal/color_expression.rb +1 -1
  38. data/lib/glimmer/dsl/opal/custom_widget_expression.rb +1 -1
  39. data/lib/glimmer/dsl/opal/dialog_expression.rb +20 -0
  40. data/lib/glimmer/dsl/opal/display_expression.rb +1 -1
  41. data/lib/glimmer/dsl/opal/dsl.rb +1 -1
  42. data/lib/glimmer/dsl/opal/exec_expression.rb +1 -1
  43. data/lib/glimmer/dsl/opal/font_expression.rb +1 -1
  44. data/lib/glimmer/dsl/opal/menu_bar_expression.rb +1 -1
  45. data/lib/glimmer/dsl/opal/menu_expression.rb +1 -1
  46. data/lib/glimmer/dsl/opal/message_box_expression.rb +1 -1
  47. data/lib/glimmer/dsl/opal/radio_group_selection_data_binding_expression.rb +1 -1
  48. data/lib/glimmer/dsl/opal/rgb_expression.rb +1 -1
  49. data/lib/glimmer/dsl/opal/rgba_expression.rb +1 -1
  50. data/lib/glimmer/dsl/opal/swt_expression.rb +4 -4
  51. data/lib/glimmer/dsl/opal/sync_exec_expression.rb +1 -1
  52. data/lib/glimmer/swt.rb +1 -1
  53. data/lib/glimmer/swt/color_proxy.rb +1 -1
  54. data/lib/glimmer/swt/composite_proxy.rb +16 -2
  55. data/lib/glimmer/swt/control_editor.rb +1 -1
  56. data/lib/glimmer/swt/custom/checkbox_group.rb +1 -1
  57. data/lib/glimmer/swt/custom/radio_group.rb +1 -1
  58. data/lib/glimmer/swt/dialog_proxy.rb +188 -0
  59. data/lib/glimmer/swt/display_proxy.rb +70 -10
  60. data/lib/glimmer/swt/font_proxy.rb +1 -1
  61. data/lib/glimmer/swt/grid_layout_proxy.rb +11 -16
  62. data/lib/glimmer/swt/label_proxy.rb +22 -1
  63. data/lib/{glimmer-dsl-opal/ext/struct.rb → glimmer/swt/latest_dialog_proxy.rb} +19 -12
  64. data/lib/glimmer/swt/latest_message_box_proxy.rb +25 -1
  65. data/lib/glimmer/swt/latest_shell_proxy.rb +43 -4
  66. data/lib/glimmer/swt/layout_data_proxy.rb +4 -0
  67. data/lib/glimmer/swt/layout_proxy.rb +9 -6
  68. data/lib/glimmer/swt/make_shift_shell_proxy.rb +1 -1
  69. data/lib/glimmer/swt/menu_item_proxy.rb +1 -1
  70. data/lib/glimmer/swt/menu_proxy.rb +3 -3
  71. data/lib/glimmer/swt/message_box_proxy.rb +45 -16
  72. data/lib/glimmer/swt/row_layout_proxy.rb +24 -6
  73. data/lib/glimmer/swt/shell_proxy.rb +43 -9
  74. data/lib/glimmer/swt/style_constantizable.rb +1 -1
  75. data/lib/glimmer/swt/swt_proxy.rb +1 -1
  76. data/lib/glimmer/swt/tab_folder_proxy.rb +1 -1
  77. data/lib/glimmer/swt/table_editor.rb +1 -1
  78. data/lib/glimmer/swt/table_item_proxy.rb +1 -1
  79. data/lib/glimmer/swt/table_proxy.rb +1 -1
  80. data/lib/glimmer/swt/widget_proxy.rb +50 -17
  81. data/lib/glimmer/ui/custom_shell.rb +1 -1
  82. data/lib/glimmer/ui/custom_widget.rb +1 -1
  83. data/lib/glimmer/util/proc_tracker.rb +17 -6
  84. data/lib/net/http.rb +30 -2
  85. data/lib/os.rb +1 -1
  86. metadata +28 -7
  87. data/CHANGELOG.md +0 -194
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17d97486e2535b96ec91e1cf8779eb25d7bdf2c06555a1cc3ae13c54cf4bf185
4
- data.tar.gz: 3c66f6ae88bc76892fd7c2f330715a7e4977b86be233d71c88fa0711d8f3cc77
3
+ metadata.gz: 7e5d23c66c0aec896d96111427221f61325f4239f1f45f4b5115e3a99c922c2c
4
+ data.tar.gz: cc9205606ad7d07b24bc8755190de7a763ae5aff5380d59a6280ff291e0d0d6f
5
5
  SHA512:
6
- metadata.gz: 551b4618800f75f3ace354647fc09e27a79846e02ec31756a4839759dd23db690de246c1064454056fa0039b809a7bb084b54df6785959e1b4173b251d3b9fda
7
- data.tar.gz: 947bdeaf86464c004d0a1d0e20bff91781ee1282c207197f1fd77fb2a3435c6ecf589247324e887db1ce65ec156d8826009a94da9758ebd2f92d8c77d21fecee
6
+ metadata.gz: 7c21c30a8f1c2b2601fa974bb241d1228de285429ea25df542adbb58d94100d27f953925610e21cff6629ffdd821a4084ca3fc6f1528592d0568df51d944abe7
7
+ data.tar.gz: '091ec964115f9672ef746ff7c3a5689df3a5b578acce8d32754c02c8fe193368e41e8113651452b678eb5d0d7d2d688872e79b0a35477219df61ebcf18fc3fd2'
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020 Andy Maleh
1
+ Copyright (c) 2020-2021 Andy Maleh
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
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 Opal 0.9.1 (Pure Ruby Web GUI)
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 Opal 0.10.2 (Pure Ruby Web GUI)
2
2
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-opal.svg)](http://badge.fury.io/rb/glimmer-dsl-opal)
3
3
  [![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)
4
4
 
@@ -141,118 +141,73 @@ Hello, Table! Game Booked
141
141
 
142
142
  NOTE: Glimmer DSL for Opal is an alpha project. Please help make better by contributing, adopting for small or low risk projects, and providing feedback. It is still an early alpha, so the more feedback and issues you report the better.
143
143
 
144
- **Alpha Version** 0.9.1 only supports bare-minimum capabilities for the following [samples](https://github.com/AndyObtiva/glimmer-dsl-opal#samples) (originally written in [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt)):
145
-
146
- [Hello samples](#hello-samples):
147
-
148
- - [Hello, World!](#hello-world)
149
- - [Hello, Combo!](#hello-combo)
150
- - [Hello, Computed!](#hello-computed)
151
- - [Hello, List Single Selection!](#hello-list-single-selection)
152
- - [Hello, List Multi Selection!](#hello-list-multi-selection)
153
- - [Hello, Browser!](#hello-browser)
154
- - [Hello, Tab!](#hello-tab)
155
- - [Hello, Custom Widget!](#hello-custom-widget)
156
- - [Hello, Custom Shell!](#hello-custom-shell)
157
- - [Hello, Radio!](#hello-radio)
158
- - [Hello, Radio Group!](#hello-radio-group)
159
- - [Hello, Group!](#hello-group)
160
- - [Hello, Checkbox!](#hello-checkbox)
161
- - [Hello, Checkbox Group!](#hello-checkbox-group)
162
- - [Hello, Date Time!](#hello-date-time)
163
- - [Hello, Table!](#hello-table)
164
- - [Hello, Button!](#hello-button)
165
- - [Hello, Message Box!](#hello-message-box)
166
- - [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu)
167
- - [Hello, Menu Bar!](#hello-menu-bar)
168
-
169
- [Elaborate samples](#elaborate-samples):
170
-
171
- - [Login](#login)
172
- - [Tic Tac Toe](#tic-tac-toe)
173
- - [Contact Manager](#contact-manager)
174
-
175
- External:
176
-
177
- - [Glimmer Calculator](#glimmer-calculator)
144
+ **Alpha Version** 0.10.2 only supports bare-minimum capabilities for the included [samples](https://github.com/AndyObtiva/glimmer-dsl-opal#samples) (originally written for [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt))
178
145
 
179
146
  Other [Glimmer](https://github.com/AndyObtiva/glimmer) DSL gems:
180
- - [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Library)
181
- - [glimmer-dsl-tk](https://github.com/AndyObtiva/glimmer-dsl-tk): Glimmer DSL for Tk (Ruby Desktop Development GUI Library)
147
+ - [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
182
148
  - [glimmer-dsl-xml](https://github.com/AndyObtiva/glimmer-dsl-xml): Glimmer DSL for XML (& HTML)
183
149
  - [glimmer-dsl-css](https://github.com/AndyObtiva/glimmer-dsl-css): Glimmer DSL for CSS (Cascading Style Sheets)
150
+ - [glimmer-dsl-tk](https://github.com/AndyObtiva/glimmer-dsl-tk): Glimmer DSL for Tk (Ruby Desktop Development GUI Library)
184
151
 
185
- ## Supported Glimmer DSL Keywords
186
-
187
- The following keywords from [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) have partial support in Opal:
188
-
189
- Widgets:
190
- - `button`: featured in [Hello, Checkbox!](#hello-checkbox) / [Hello, Button!](#hello-button) / [Hello, Table!](#hello-table) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Message Box!](#hello-message-box) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Hello, Group!](#hello-group) / [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Contact Manager](#contact-manager) / [Tic Tac Toe](#tic-tac-toe) / [Login](#login)
191
- - `browser`: featured in [Hello, Browser!](#hello-browser)
192
- - `calendar`: featured in [Hello, Date Time!](#hello-date-time)
193
- - `checkbox`: featured in [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox)
194
- - `checkbox_group`: featured in [Hello, Checkbox Group!](#hello-checkbox-group)
195
- - `combo`: featured in [Hello, Table!](#hello-table) / [Hello, Combo!](#hello-combo)
196
- - `composite`: featured in [Hello, Radio!](#hello-radio) / [Hello, Computed!](#hello-computed) / [Hello, Checkbox!](#hello-checkbox) / [Tic Tac Toe](#tic-tac-toe) / [Login](#login) / [Contact Manager](#contact-manager)
197
- - `date`: featured in [Hello, Table!](#hello-table) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Shell!](#hello-custom-shell) / [Tic Tac Toe](#tic-tac-toe)
198
- - `date_drop_down`: featured in [Hello, Table!](#hello-table) / [Hello, Date Time!](#hello-date-time)
199
- - `group`: featured in [Hello, Group!](#hello-group) / [Contact Manager](#contact-manager)
200
- - `label`: featured in [Hello, Computed!](#hello-computed) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Hello, World!](#hello-world) / [Hello, Table!](#hello-table) / [Hello, Tab!](#hello-tab) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Menu Bar!](#hello-menu-bar) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Custom Shell!](#hello-custom-shell) / [Contact Manager](#contact-manager) / [Login](#login)
201
- - `list` (w/ optional `:multi` SWT style): featured in [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Contact Manager](#contact-manager)
202
- - `menu`: featured in [Hello, Menu Bar!](#hello-menu-bar) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Table!](#hello-table)
203
- - `menu_bar`: featured in [Hello, Menu Bar!](#hello-menu-bar)
204
- - `menu_item`: featured in [Hello, Table!](#hello-table) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Menu Bar!](#hello-menu-bar)
205
- - `message_box`: featured in [Hello, Table!](#hello-table) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Message Box!](#hello-message-box) / [Hello, Menu Bar!](#hello-menu-bar)
206
- - `radio`: featured in [Hello, Radio!](#hello-radio) / [Hello, Group!](#hello-group)
207
- - `radio_group`: featured in [Hello, Radio Group!](#hello-radio-group)
208
- - `scrolled_composite`
209
- - `shell`: featured in [Hello, Checkbox!](#hello-checkbox) / [Hello, Button!](#hello-button) / [Hello, Table!](#hello-table) / [Hello, Tab!](#hello-tab) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Hello, Group!](#hello-group) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Shell!](#hello-custom-shell) / [Hello, Computed!](#hello-computed) / [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Contact Manager](#contact-manager) / [Tic Tac Toe](#tic-tac-toe) / [Login](#login)
210
- - `tab_folder`: featured in [Hello, Tab!](#hello-tab)
211
- - `tab_item`: featured in [Hello, Tab!](#hello-tab)
212
- - `table`: featured in [Hello, Custom Shell!](#hello-custom-shell) / [Hello, Table!](#hello-table) / [Contact Manager](#contact-manager)
213
- - `table_column`: featured in [Hello, Table!](#hello-table) / [Hello, Custom Shell!](#hello-custom-shell) / [Contact Manager](#contact-manager)
214
- - `text`: featured in [Hello, Computed!](#hello-computed) / [Login](#login) / [Contact Manager](#contact-manager)
215
- - `time`: featured in [Hello, Table!](#hello-table) / [Hello, Date Time!](#hello-date-time)
216
- - Glimmer::UI::CustomWidget: ability to define any keyword as a custom widget - featured in [Hello, Custom Widget!](#hello-custom-widget)
217
- - Glimmer::UI::CustomShell: ability to define any keyword as a custom shell (aka custom window) that opens in a new browser window (tab) automatically unless there is no shell open in the current browser window (tab) - featured in [Hello, Custom Shell!](#hello-custom-shell)
218
-
219
- Layouts:
220
- - `grid_layout`: featured in [Hello, Custom Shell!](#hello-custom-shell) / [Hello, Computed!](#hello-computed) / [Hello, Table!](#hello-table) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Menu Bar!](#hello-menu-bar) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Contact Manager](#contact-manager) / [Login](#login) / [Tic Tac Toe](#tic-tac-toe)
221
- - `row_layout`: featured in [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Group!](#hello-group) / [Hello, Date Time!](#hello-date-time) / [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Contact Manager](#contact-manager)
222
- - `fill_layout`: featured in [Hello, Custom Widget!](#hello-custom-widget)
223
- - `layout_data`: featured in [Hello, Table!](#hello-table) / [Hello, Custom Shell!](#hello-custom-shell) / [Hello, Computed!](#hello-computed) / [Tic Tac Toe](#tic-tac-toe) / [Contact Manager](#contact-manager)
224
-
225
- Graphics/Style:
226
- - `color`: featured in [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Menu Bar!](#hello-menu-bar)
227
- - `font`: featured in [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Hello, Table!](#hello-table) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Menu Bar!](#hello-menu-bar) / [Hello, Group!](#hello-group) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Custom Shell!](#hello-custom-shell) / [Contact Manager](#contact-manager) / [Tic Tac Toe](#tic-tac-toe)
228
- - `Point` class used in setting location on widgets
229
- - `swt` and `SWT` class to set SWT styles on widgets - featured in [Hello, Custom Shell!](#hello-custom-shell) / [Login](#login) / [Contact Manager](#contact-manager)
230
-
231
- Data-Binding/Observers:
232
- - `bind`: featured in [Hello, Computed!](#hello-computed) / [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Hello, Button!](#hello-button) / [Hello, Table!](#hello-table) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Hello, Group!](#hello-group) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Custom Shell!](#hello-custom-shell) / [Login](#login) / [Contact Manager](#contact-manager) / [Tic Tac Toe](#tic-tac-toe)
233
- - `observe`: featured in [Hello, Table!](#hello-table) / [Tic Tac Toe](#tic-tac-toe)
234
- - `on_widget_selected`: featured in [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Hello, Button!](#hello-button) / [Hello, Table!](#hello-table) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Message Box!](#hello-message-box) / [Hello, Menu Bar!](#hello-menu-bar) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Hello, Group!](#hello-group) / [Contact Manager](#contact-manager) / [Login](#login) / [Tic Tac Toe](#tic-tac-toe)
235
- - `on_modify_text`
236
- - `on_key_pressed` (and SWT alias `on_swt_keydown`) - featured in [Login](#login) / [Contact Manager](#contact-manager)
237
- - `on_key_released` (and SWT alias `on_swt_keyup`)
238
- - `on_mouse_down` (and SWT alias `on_swt_mousedown`)
239
- - `on_mouse_up` (and SWT alias `on_swt_mouseup`) - featured in [Hello, Custom Shell!](#hello-custom-shell) / [Contact Manager](#contact-manager)
240
-
241
- Event loop:
242
- - `display`: featured in [Tic Tac Toe](#tic-tac-toe)
243
- - `async_exec`: featured in [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Custom Shell!](#hello-custom-shell)
152
+ ## Table of Contents
153
+
154
+ - [Glimmer DSL for Opal 0.10.2 (Pure Ruby Web GUI)](#-glimmer-dsl-for-opal-0101-pure-ruby-web-gui)
155
+ - [Principles](#principles)
156
+ - [Background](#background)
157
+ - [Pre-requisites](#pre-requisites)
158
+ - [Setup](#setup)
159
+ - [Supported Glimmer DSL Keywords](#supported-glimmer-dsl-keywords)
160
+ - [Samples](#samples)
161
+ - [Hello Samples](#hello-samples)
162
+ - [Hello, World!](#hello-world)
163
+ - [Hello, Combo!](#hello-combo)
164
+ - [Hello, Computed!](#hello-computed)
165
+ - [Hello, List Single Selection!](#hello-list-single-selection)
166
+ - [Hello, List Multi Selection!](#hello-list-multi-selection)
167
+ - [Hello, Browser!](#hello-browser)
168
+ - [Hello, Tab!](#hello-tab)
169
+ - [Hello, Custom Widget!](#hello-custom-widget)
170
+ - [Hello, Custom Shell!](#hello-custom-shell)
171
+ - [Hello, Radio!](#hello-radio)
172
+ - [Hello, Radio Group!](#hello-radio-group)
173
+ - [Hello, Group!](#hello-group)
174
+ - [Hello, Checkbox!](#hello-checkbox)
175
+ - [Hello, Checkbox Group!](#hello-checkbox-group)
176
+ - [Hello, Date Time!](#hello-date-time)
177
+ - [Hello, Table!](#hello-table)
178
+ - [Hello, Button!](#hello-button)
179
+ - [Hello, Message Box!](#hello-message-box)
180
+ - [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu)
181
+ - [Hello, Menu Bar!](#hello-menu-bar)
182
+ - [Hello, Dialog!](#hello-dialog)
183
+ - [Elaborate Samples](#elaborate-samples)
184
+ - [Login](#login)
185
+ - [Tic Tac Toe](#tic-tac-toe)
186
+ - [Contact Manager](#contact-manager)
187
+ - [External Samples](#external-samples)
188
+ - [Glimmer Calculator](#glimmer-calculator)
189
+ - [Glimmer Supporting Libraries](#glimmer-supporting-libraries)
190
+ - [Glimmer Process](#glimmer-process)
191
+ - [Help](#help)
192
+ - [Issues](#issues)
193
+ - [Chat](#chat)
194
+ - [Feature Suggestions](#feature-suggestions)
195
+ - [Change Log](#change-log)
196
+ - [Contributing](#contributing)
197
+ - [Contributors](#contributors)
198
+ - [License](#license)
244
199
 
245
200
  ## Principles
246
201
 
247
- - **Live purely in Rubyland via the Glimmer GUI DSL**, completely oblivious to web browser technologies.
202
+ - **Live purely in Rubyland via the Glimmer GUI DSL**, completely oblivious to web browser technologies, thanks to [Opal](https://opalrb.com/).
248
203
  - **Forget Routers!** Glimmer DSL for Opal supports auto-routing of custom shells (windows), which are opened as separate tabs in a web browser with automatically generated routes and bookmarkable URLs.
249
204
  - **HTML is strictly made for creating documents not interactive applications**. As such, software engineers can avoid it and focus on creating web applications more productively with Glimmer DSL for Opal in pure Ruby instead (just like they do in desktop development) while content creators and web designers can be the ones responsible for creating HTML documents for web content purposes only as HTML was originally intended. That way, Glimmer web GUI is used and embedded in web pages when providing users with applications while the rest of the web pages are maintained by non-engineers as pure HTML. This achieves a correct separation of responsibilities and better productivity and maintainability.
250
- - **Approximate styles by developers via the Glimmer GUI DSL. Perfect styles by designers via pure CSS**. Developers can simply build GUI with approximate styling similar to desktop GUI without worrying about pixel-perfect aethetics. Web designers can take styling further with pure CSS since every HTML element auto-generated by Glimmer DSL for Opal has a predictable ID and CSS class. This achieves a proper separation of responsibilities between developers and designers.
205
+ - **Approximate styles by developers via the Glimmer GUI DSL. Perfect styles by designers via pure CSS**. Developers can simply build GUI with approximate styling similar to desktop GUI and mockups without worrying about pixel-perfect aesthetics. Web designers can take styling further with pure CSS since every HTML element auto-generated by Glimmer DSL for Opal has a predictable ID and CSS class. This achieves a proper separation of responsibilities between developers and designers.
251
206
  - **Web servers are used just like servers in traditional client/server architecture**, meaning they simply provide RMI services to enable centralizing some of the application logic and data in the cloud to make available everywhere and enable data-sharing with others.
252
207
 
253
208
  ## Background
254
209
 
255
- The original idea behind Glimmer DSL for Opal was that you start by having a [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) desktop app that communicates with a Rails API for any web/cloud concerns. The pure Ruby [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) is very simple, so it is more productive to build GUI in it since it does not go through a server/client request/response cycle and can be iterated on locally with a much shorter feedback cycle. Once the GUI and the rest of the app is built. You simply embed it in a Rails app as a one line require statement after adding the Glimmer DSL for Opal gem, and BOOM, it just works on the web inside a web browser with the same server/client communication you had in the desktop app (I am working on adding minimal support for net/http in Opal so that desktop apps that use it continue to work in a web browser. Until then, just use [Opal-jQuery](https://github.com/opal/opal-jquery) http support). That way, you get two apps for one: desktop and web.
210
+ The original idea behind Glimmer DSL for Opal (which later evolved) was that you start by having a [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) desktop app that communicates with a Rails API for any web/cloud concerns. The pure Ruby [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) is very simple, so it is more productive to build GUI in it since it does not go through a server/client request/response cycle and can be iterated on locally with a much shorter feedback cycle. Once the GUI and the rest of the app is built. You simply embed it in a Rails app as a one line require statement, and BOOM, it just works on the web inside a web browser with the same server/client communication you had in the desktop app (I am working on adding minimal support for net/http in Opal so that desktop apps that use it continue to work in a web browser. Until then, just use [Opal-jQuery](https://github.com/opal/opal-jquery) http support). That way, you get two apps for one: desktop and web.
256
211
 
257
212
  Part of the idea is that web browsers just render GUI widgets similar to those of a desktop app (after all a web browser is a desktop app), so whether you run your GUI on the desktop or on the web should just be a low-level concern, hopefully automated completely with Glimmer DSL for Opal.
258
213
 
@@ -294,7 +249,7 @@ Add the following to `Gemfile`:
294
249
  gem 'opal-rails', '~> 1.1.2'
295
250
  gem 'opal-async', '~> 1.2.0'
296
251
  gem 'opal-jquery', '~> 0.4.4'
297
- gem 'glimmer-dsl-opal', '~> 0.9.1'
252
+ gem 'glimmer-dsl-opal', '~> 0.10.2'
298
253
  gem 'glimmer-dsl-xml', '~> 1.1.0', require: false
299
254
  gem 'glimmer-dsl-css', '~> 1.1.0', require: false
300
255
 
@@ -353,6 +308,67 @@ shell {
353
308
  }.open
354
309
  ```
355
310
 
311
+ ## Supported Glimmer DSL Keywords
312
+
313
+ The following keywords from [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) have partial support in Opal:
314
+
315
+ Widgets:
316
+ - `button`: featured in [Hello, Checkbox!](#hello-checkbox) / [Hello, Button!](#hello-button) / [Hello, Table!](#hello-table) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Message Box!](#hello-message-box) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Hello, Group!](#hello-group) / [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Contact Manager](#contact-manager) / [Tic Tac Toe](#tic-tac-toe) / [Login](#login)
317
+ - `browser`: featured in [Hello, Browser!](#hello-browser)
318
+ - `calendar`: featured in [Hello, Date Time!](#hello-date-time)
319
+ - `checkbox`: featured in [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox)
320
+ - `checkbox_group`: featured in [Hello, Checkbox Group!](#hello-checkbox-group)
321
+ - `combo`: featured in [Hello, Table!](#hello-table) / [Hello, Combo!](#hello-combo)
322
+ - `composite`: featured in [Hello, Radio!](#hello-radio) / [Hello, Computed!](#hello-computed) / [Hello, Checkbox!](#hello-checkbox) / [Tic Tac Toe](#tic-tac-toe) / [Login](#login) / [Contact Manager](#contact-manager)
323
+ - `date`: featured in [Hello, Table!](#hello-table) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Shell!](#hello-custom-shell) / [Tic Tac Toe](#tic-tac-toe)
324
+ - `date_drop_down`: featured in [Hello, Table!](#hello-table) / [Hello, Date Time!](#hello-date-time)
325
+ - `dialog`: featured in [Hello, Dialog!](#hello-dialog)
326
+ - `group`: featured in [Hello, Group!](#hello-group) / [Contact Manager](#contact-manager)
327
+ - `label`: featured in [Hello, Computed!](#hello-computed) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Hello, World!](#hello-world) / [Hello, Table!](#hello-table) / [Hello, Tab!](#hello-tab) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Menu Bar!](#hello-menu-bar) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Custom Shell!](#hello-custom-shell) / [Contact Manager](#contact-manager) / [Login](#login)
328
+ - `list` (w/ optional `:multi` SWT style): featured in [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Contact Manager](#contact-manager)
329
+ - `menu`: featured in [Hello, Menu Bar!](#hello-menu-bar) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Table!](#hello-table)
330
+ - `menu_bar`: featured in [Hello, Menu Bar!](#hello-menu-bar)
331
+ - `menu_item`: featured in [Hello, Table!](#hello-table) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Menu Bar!](#hello-menu-bar)
332
+ - `message_box`: featured in [Hello, Table!](#hello-table) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Message Box!](#hello-message-box) / [Hello, Menu Bar!](#hello-menu-bar)
333
+ - `radio`: featured in [Hello, Radio!](#hello-radio) / [Hello, Group!](#hello-group)
334
+ - `radio_group`: featured in [Hello, Radio Group!](#hello-radio-group)
335
+ - `scrolled_composite`
336
+ - `shell`: featured in [Hello, Checkbox!](#hello-checkbox) / [Hello, Button!](#hello-button) / [Hello, Table!](#hello-table) / [Hello, Tab!](#hello-tab) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Hello, Group!](#hello-group) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Shell!](#hello-custom-shell) / [Hello, Computed!](#hello-computed) / [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Contact Manager](#contact-manager) / [Tic Tac Toe](#tic-tac-toe) / [Login](#login)
337
+ - `tab_folder`: featured in [Hello, Tab!](#hello-tab)
338
+ - `tab_item`: featured in [Hello, Tab!](#hello-tab)
339
+ - `table`: featured in [Hello, Custom Shell!](#hello-custom-shell) / [Hello, Table!](#hello-table) / [Contact Manager](#contact-manager)
340
+ - `table_column`: featured in [Hello, Table!](#hello-table) / [Hello, Custom Shell!](#hello-custom-shell) / [Contact Manager](#contact-manager)
341
+ - `text`: featured in [Hello, Computed!](#hello-computed) / [Login](#login) / [Contact Manager](#contact-manager)
342
+ - `time`: featured in [Hello, Table!](#hello-table) / [Hello, Date Time!](#hello-date-time)
343
+ - Glimmer::UI::CustomWidget: ability to define any keyword as a custom widget - featured in [Hello, Custom Widget!](#hello-custom-widget)
344
+ - Glimmer::UI::CustomShell: ability to define any keyword as a custom shell (aka custom window) that opens in a new browser window (tab) automatically unless there is no shell open in the current browser window (tab) - featured in [Hello, Custom Shell!](#hello-custom-shell)
345
+
346
+ Layouts:
347
+ - `grid_layout`: featured in [Hello, Custom Shell!](#hello-custom-shell) / [Hello, Computed!](#hello-computed) / [Hello, Table!](#hello-table) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Menu Bar!](#hello-menu-bar) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Contact Manager](#contact-manager) / [Login](#login) / [Tic Tac Toe](#tic-tac-toe)
348
+ - `row_layout`: featured in [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Group!](#hello-group) / [Hello, Date Time!](#hello-date-time) / [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Contact Manager](#contact-manager)
349
+ - `fill_layout`: featured in [Hello, Custom Widget!](#hello-custom-widget)
350
+ - `layout_data`: featured in [Hello, Table!](#hello-table) / [Hello, Custom Shell!](#hello-custom-shell) / [Hello, Computed!](#hello-computed) / [Tic Tac Toe](#tic-tac-toe) / [Contact Manager](#contact-manager)
351
+
352
+ Graphics/Style:
353
+ - `color`: featured in [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Menu Bar!](#hello-menu-bar)
354
+ - `font`: featured in [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Hello, Table!](#hello-table) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Menu Bar!](#hello-menu-bar) / [Hello, Group!](#hello-group) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Custom Shell!](#hello-custom-shell) / [Contact Manager](#contact-manager) / [Tic Tac Toe](#tic-tac-toe)
355
+ - `Point` class used in setting location on widgets
356
+ - `swt` and `SWT` class to set SWT styles on widgets - featured in [Hello, Custom Shell!](#hello-custom-shell) / [Login](#login) / [Contact Manager](#contact-manager)
357
+
358
+ Data-Binding/Observers:
359
+ - `bind`: featured in [Hello, Computed!](#hello-computed) / [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Hello, Button!](#hello-button) / [Hello, Table!](#hello-table) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Hello, Group!](#hello-group) / [Hello, Date Time!](#hello-date-time) / [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Custom Shell!](#hello-custom-shell) / [Login](#login) / [Contact Manager](#contact-manager) / [Tic Tac Toe](#tic-tac-toe)
360
+ - `observe`: featured in [Hello, Table!](#hello-table) / [Tic Tac Toe](#tic-tac-toe)
361
+ - `on_widget_selected`: featured in [Hello, Combo!](#hello-combo) / [Hello, Checkbox Group!](#hello-checkbox-group) / [Hello, Checkbox!](#hello-checkbox) / [Hello, Button!](#hello-button) / [Hello, Table!](#hello-table) / [Hello, Radio Group!](#hello-radio-group) / [Hello, Radio!](#hello-radio) / [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu) / [Hello, Message Box!](#hello-message-box) / [Hello, Menu Bar!](#hello-menu-bar) / [Hello, List Single Selection!](#hello-list-single-selection) / [Hello, List Multi Selection!](#hello-list-multi-selection) / [Hello, Group!](#hello-group) / [Contact Manager](#contact-manager) / [Login](#login) / [Tic Tac Toe](#tic-tac-toe)
362
+ - `on_modify_text`
363
+ - `on_key_pressed` (and SWT alias `on_swt_keydown`) - featured in [Login](#login) / [Contact Manager](#contact-manager)
364
+ - `on_key_released` (and SWT alias `on_swt_keyup`)
365
+ - `on_mouse_down` (and SWT alias `on_swt_mousedown`)
366
+ - `on_mouse_up` (and SWT alias `on_swt_mouseup`) - featured in [Hello, Custom Shell!](#hello-custom-shell) / [Contact Manager](#contact-manager)
367
+
368
+ Event loop:
369
+ - `display`: featured in [Tic Tac Toe](#tic-tac-toe)
370
+ - `async_exec`: featured in [Hello, Custom Widget!](#hello-custom-widget) / [Hello, Custom Shell!](#hello-custom-shell)
371
+
356
372
  ## Samples
357
373
 
358
374
  Follow the instructions below to try out [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) samples webified via [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal)
@@ -2518,6 +2534,99 @@ You should see "Hello, Menu Bar!"
2518
2534
 
2519
2535
  ![Hello Menu Bar Help Menu](images/glimmer-dsl-opal-hello-menu-bar-help-menu.png)
2520
2536
 
2537
+ #### Hello, Dialog!
2538
+
2539
+ This sample demonstrates a modal dialog similar to message_box, but allows adding arbitrary widgets, not just a message.
2540
+
2541
+ Add the following require statement to `app/assets/javascripts/application.rb`
2542
+
2543
+ ```ruby
2544
+ require 'glimmer-dsl-opal/samples/hello/hello_dialog'
2545
+ ```
2546
+
2547
+ Or add the Glimmer code directly if you prefer to play around with it:
2548
+
2549
+ ```ruby
2550
+ include Glimmer
2551
+
2552
+ shell {
2553
+ row_layout :vertical
2554
+
2555
+ text 'Hello, Dialog!'
2556
+
2557
+ 7.times { |n|
2558
+ dialog_number = n + 1
2559
+
2560
+ button {
2561
+ layout_data {
2562
+ width 200
2563
+ height 50
2564
+ }
2565
+ text "Dialog #{dialog_number}"
2566
+
2567
+ on_widget_selected {
2568
+ dialog { |dialog_proxy|
2569
+ row_layout(:vertical) {
2570
+ center true
2571
+ }
2572
+
2573
+ text "Dialog #{dialog_number}"
2574
+
2575
+ label {
2576
+ text "Given `dialog` is modal, you cannot interact with the main window till the dialog is closed."
2577
+ }
2578
+ composite {
2579
+ row_layout {
2580
+ margin_height 0
2581
+ margin_top 0
2582
+ margin_bottom 0
2583
+ }
2584
+
2585
+ label {
2586
+ text "Unlike `message_box`, `dialog` can contain arbitrary widgets:"
2587
+ }
2588
+ radio {
2589
+ text 'Radio'
2590
+ }
2591
+ checkbox {
2592
+ text 'Checkbox'
2593
+ }
2594
+ }
2595
+ button {
2596
+ text 'Close'
2597
+
2598
+ on_widget_selected {
2599
+ dialog_proxy.close
2600
+ }
2601
+ }
2602
+ }.open
2603
+ }
2604
+ }
2605
+ }
2606
+ }.open
2607
+ ```
2608
+
2609
+ Glimmer app on the desktop (using [`glimmer-dsl-swt`](https://github.com/AndyObtiva/glimmer-dsl-swt) gem):
2610
+
2611
+ ![Hello Dialog](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-hello-dialog.png)
2612
+
2613
+ ![Hello Dialog Open Dialog](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-hello-dialog-open-dialog.png)
2614
+
2615
+ Glimmer app on the web (using `glimmer-dsl-opal` gem):
2616
+
2617
+ Start the Rails server:
2618
+ ```
2619
+ rails s
2620
+ ```
2621
+
2622
+ Visit `http://localhost:3000`
2623
+
2624
+ You should see "Hello, Dialog!"
2625
+
2626
+ ![Hello Dialog](images/glimmer-dsl-opal-hello-dialog.png)
2627
+
2628
+ ![Hello Dialog Open Dialog](images/glimmer-dsl-opal-hello-dialog-open-dialog.png)
2629
+
2521
2630
  ### Elaborate Samples
2522
2631
 
2523
2632
  #### Login
@@ -3318,11 +3427,11 @@ Here is a list of notable 3rd party gems used by Glimmer DSL for Opal:
3318
3427
  - [glimmer-dsl-xml](https://github.com/AndyObtiva/glimmer-dsl-xml): Glimmer DSL for XML & HTML in pure Ruby.
3319
3428
  - [glimmer-dsl-css](https://github.com/AndyObtiva/glimmer-dsl-css): Glimmer DSL for CSS (Cascading Style Sheets) in pure Ruby.
3320
3429
  - [opal-async](https://github.com/AndyObtiva/opal-async): Non-blocking tasks and enumerators for Opal.
3321
- - [to_collection](https://github.com/AndyObtiva/opal-async): Treat an array of objects and a singular object uniformly as a collection of objects.
3430
+ - [to_collection](https://github.com/AndyObtiva/to_collection): Treat an array of objects and a singular object uniformly as a collection of objects.
3322
3431
 
3323
3432
  ## Glimmer Process
3324
3433
 
3325
- [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.
3434
+ [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](https://github.com/AndyObtiva/glimmer/blob/master/PROCESS.md) is simply made up of 7 guidelines to pick and choose as necessary until software development needs are satisfied.
3326
3435
 
3327
3436
  Learn more by reading the [GPG](https://github.com/AndyObtiva/glimmer/blob/master/PROCESS.md) (Glimmer Process Guidelines)
3328
3437
 
@@ -3362,9 +3471,9 @@ These features have been suggested. You might see them in a future version of Gl
3362
3471
 
3363
3472
  [MIT](https://opensource.org/licenses/MIT)
3364
3473
 
3365
- Copyright (c) 2020 - Andy Maleh.
3474
+ Copyright (c) 2020-2021 - Andy Maleh.
3366
3475
  See [LICENSE.txt](LICENSE.txt) for further details.
3367
3476
 
3368
3477
  --
3369
3478
 
3370
- [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built for [Glimmer](https://github.com/AndyObtiva/glimmer) (Ruby Desktop Development GUI Library).
3479
+ [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built for [Glimmer](https://github.com/AndyObtiva/glimmer) (DSL Framework).
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
1
+ 0.10.2
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020 Andy Maleh
1
+ # Copyright (c) 2020-2021 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020 Andy Maleh
1
+ # Copyright (c) 2020-2021 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -44,6 +44,7 @@ if RUBY_ENGINE == 'opal'
44
44
  require 'opal-async'
45
45
  require 'async/ext'
46
46
  require 'to_collection'
47
+ require 'pure-struct'
47
48
  require 'os'
48
49
  require 'file'
49
50
  require 'display'
@@ -59,7 +60,6 @@ if RUBY_ENGINE == 'opal'
59
60
  require 'facets/hash/symbolize_keys'
60
61
  require 'glimmer-dsl-opal/ext/class'
61
62
  require 'glimmer-dsl-opal/ext/file'
62
- require 'glimmer-dsl-opal/ext/struct'
63
63
  require 'glimmer'
64
64
  require 'glimmer-dsl-opal/ext/exception'
65
65
  require 'glimmer-dsl-opal/ext/date'
@@ -82,8 +82,9 @@ if RUBY_ENGINE == 'opal'
82
82
  require 'glimmer-dsl-css'
83
83
  Element.alias_native :replace_with, :replaceWith
84
84
  Element.alias_native :select
85
+ Element.alias_native :dialog
85
86
 
86
- # Glimmer::Config.loop_max_count = 20 # TODO disable
87
+ Glimmer::Config.loop_max_count = 10 # TODO disable
87
88
 
88
89
  original_logger_level = Glimmer::Config.logger.level
89
90
  Glimmer::Config.logger = Glimmer::Config::OpalLogger.new(STDOUT)
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020 Andy Maleh
1
+ # Copyright (c) 2020-2021 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,5 +1,28 @@
1
+ # Copyright (c) 2020-2021 Andy Maleh
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
1
22
  require 'glimmer/swt/latest_shell_proxy'
2
23
  require 'glimmer/swt/latest_message_box_proxy'
24
+ require 'glimmer/swt/latest_dialog_proxy'
25
+ require 'glimmer/swt/display_proxy'
3
26
 
4
27
  module Glimmer
5
28
  module DSL
@@ -12,8 +35,10 @@ module Glimmer
12
35
  dsl_stack.pop
13
36
  end
14
37
  end
15
- if ['shell', 'message_box'].include?(keyword) && Glimmer::SWT::DisplayProxy.instance.send("#{keyword}s").empty?
16
- Document.ready?(&work)
38
+ if ['shell', 'message_box', 'dialog'].include?(keyword) && Glimmer::SWT::DisplayProxy.instance.shells.empty?
39
+ Document.ready? do
40
+ Glimmer::SWT::DisplayProxy.instance.async_exec(&work)
41
+ end
17
42
  Glimmer::SWT.const_get("Latest#{keyword.camelcase(:upper)}Proxy").new
18
43
  else
19
44
  work.call