glimmer-dsl-swt 4.18.4.3 → 4.18.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/LICENSE.txt +20 -20
  4. data/README.md +76 -60
  5. data/RUBY_VERSION +1 -1
  6. data/VERSION +1 -1
  7. data/bin/girb +31 -31
  8. data/bin/girb_runner.rb +34 -34
  9. data/bin/glimmer +26 -26
  10. data/glimmer-dsl-swt.gemspec +9 -9
  11. data/lib/ext/glimmer.rb +41 -41
  12. data/lib/ext/glimmer/config.rb +167 -167
  13. data/lib/ext/rouge/themes/glimmer.rb +29 -29
  14. data/lib/glimmer-dsl-swt.rb +44 -44
  15. data/lib/glimmer/Rakefile +26 -26
  16. data/lib/glimmer/data_binding/list_selection_binding.rb +72 -72
  17. data/lib/glimmer/data_binding/observable_widget.rb +38 -38
  18. data/lib/glimmer/data_binding/shine.rb +44 -44
  19. data/lib/glimmer/data_binding/table_items_binding.rb +89 -89
  20. data/lib/glimmer/data_binding/tree_items_binding.rb +108 -108
  21. data/lib/glimmer/data_binding/widget_binding.rb +73 -73
  22. data/lib/glimmer/dsl/swt/animation_expression.rb +43 -43
  23. data/lib/glimmer/dsl/swt/async_exec_expression.rb +35 -35
  24. data/lib/glimmer/dsl/swt/bind_expression.rb +58 -58
  25. data/lib/glimmer/dsl/swt/block_property_expression.rb +41 -41
  26. data/lib/glimmer/dsl/swt/checkbox_group_selection_data_binding_expression.rb +61 -61
  27. data/lib/glimmer/dsl/swt/color_expression.rb +40 -40
  28. data/lib/glimmer/dsl/swt/column_properties_expression.rb +45 -45
  29. data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +67 -67
  30. data/lib/glimmer/dsl/swt/cursor_expression.rb +44 -44
  31. data/lib/glimmer/dsl/swt/custom_widget_expression.rb +63 -63
  32. data/lib/glimmer/dsl/swt/data_binding_expression.rb +55 -55
  33. data/lib/glimmer/dsl/swt/dialog_expression.rb +48 -48
  34. data/lib/glimmer/dsl/swt/directory_dialog_expression.rb +48 -48
  35. data/lib/glimmer/dsl/swt/display_expression.rb +40 -40
  36. data/lib/glimmer/dsl/swt/dnd_expression.rb +46 -46
  37. data/lib/glimmer/dsl/swt/dsl.rb +63 -63
  38. data/lib/glimmer/dsl/swt/exec_expression.rb +55 -55
  39. data/lib/glimmer/dsl/swt/expand_item_expression.rb +60 -60
  40. data/lib/glimmer/dsl/swt/file_dialog_expression.rb +48 -48
  41. data/lib/glimmer/dsl/swt/font_expression.rb +49 -49
  42. data/lib/glimmer/dsl/swt/image_expression.rb +50 -50
  43. data/lib/glimmer/dsl/swt/layout_data_expression.rb +46 -46
  44. data/lib/glimmer/dsl/swt/layout_expression.rb +50 -50
  45. data/lib/glimmer/dsl/swt/list_selection_data_binding_expression.rb +65 -65
  46. data/lib/glimmer/dsl/swt/menu_bar_expression.rb +54 -54
  47. data/lib/glimmer/dsl/swt/menu_expression.rb +53 -53
  48. data/lib/glimmer/dsl/swt/message_box_expression.rb +54 -54
  49. data/lib/glimmer/dsl/swt/multiply_expression.rb +53 -53
  50. data/lib/glimmer/dsl/swt/observe_expression.rb +53 -53
  51. data/lib/glimmer/dsl/swt/property_expression.rb +46 -46
  52. data/lib/glimmer/dsl/swt/radio_group_selection_data_binding_expression.rb +61 -61
  53. data/lib/glimmer/dsl/swt/rgb_expression.rb +33 -33
  54. data/lib/glimmer/dsl/swt/rgba_expression.rb +33 -33
  55. data/lib/glimmer/dsl/swt/shape_expression.rb +54 -54
  56. data/lib/glimmer/dsl/swt/shell_expression.rb +46 -46
  57. data/lib/glimmer/dsl/swt/swt_expression.rb +46 -46
  58. data/lib/glimmer/dsl/swt/sync_exec_expression.rb +36 -36
  59. data/lib/glimmer/dsl/swt/tab_item_expression.rb +54 -54
  60. data/lib/glimmer/dsl/swt/table_items_data_binding_expression.rb +52 -52
  61. data/lib/glimmer/dsl/swt/timer_exec_expression.rb +35 -0
  62. data/lib/glimmer/dsl/swt/transform_expression.rb +55 -55
  63. data/lib/glimmer/dsl/swt/tree_items_data_binding_expression.rb +52 -52
  64. data/lib/glimmer/dsl/swt/tree_properties_expression.rb +47 -47
  65. data/lib/glimmer/dsl/swt/widget_expression.rb +66 -66
  66. data/lib/glimmer/dsl/swt/widget_listener_expression.rb +53 -53
  67. data/lib/glimmer/rake_task.rb +220 -220
  68. data/lib/glimmer/rake_task/list.rb +97 -97
  69. data/lib/glimmer/rake_task/package.rb +139 -139
  70. data/lib/glimmer/rake_task/scaffold.rb +765 -765
  71. data/lib/glimmer/swt/color_proxy.rb +107 -107
  72. data/lib/glimmer/swt/cursor_proxy.rb +66 -66
  73. data/lib/glimmer/swt/custom/animation.rb +243 -243
  74. data/lib/glimmer/swt/custom/checkbox_group.rb +181 -181
  75. data/lib/glimmer/swt/custom/code_text.rb +23 -20
  76. data/lib/glimmer/swt/custom/drawable.rb +49 -49
  77. data/lib/glimmer/swt/custom/radio_group.rb +176 -176
  78. data/lib/glimmer/swt/custom/shape.rb +297 -297
  79. data/lib/glimmer/swt/date_time_proxy.rb +85 -85
  80. data/lib/glimmer/swt/directory_dialog_proxy.rb +65 -65
  81. data/lib/glimmer/swt/display_proxy.rb +166 -166
  82. data/lib/glimmer/swt/dnd_proxy.rb +51 -51
  83. data/lib/glimmer/swt/expand_item_proxy.rb +97 -97
  84. data/lib/glimmer/swt/file_dialog_proxy.rb +66 -66
  85. data/lib/glimmer/swt/font_proxy.rb +94 -94
  86. data/lib/glimmer/swt/image_proxy.rb +184 -184
  87. data/lib/glimmer/swt/layout_data_proxy.rb +105 -105
  88. data/lib/glimmer/swt/layout_proxy.rb +112 -112
  89. data/lib/glimmer/swt/menu_proxy.rb +126 -126
  90. data/lib/glimmer/swt/message_box_proxy.rb +89 -89
  91. data/lib/glimmer/swt/packages.rb +37 -37
  92. data/lib/glimmer/swt/properties.rb +49 -49
  93. data/lib/glimmer/swt/sash_form_proxy.rb +53 -53
  94. data/lib/glimmer/swt/scrolled_composite_proxy.rb +37 -37
  95. data/lib/glimmer/swt/style_constantizable.rb +157 -157
  96. data/lib/glimmer/swt/styled_text_proxy.rb +38 -38
  97. data/lib/glimmer/swt/swt_proxy.rb +59 -59
  98. data/lib/glimmer/swt/tab_item_proxy.rb +91 -91
  99. data/lib/glimmer/swt/table_column_proxy.rb +57 -57
  100. data/lib/glimmer/swt/transform_proxy.rb +109 -109
  101. data/lib/glimmer/swt/tree_proxy.rb +145 -145
  102. data/lib/glimmer/swt/widget_listener_proxy.rb +64 -64
  103. data/lib/glimmer/swt/widget_proxy.rb +957 -957
  104. data/lib/glimmer/ui/custom_shell.rb +82 -82
  105. data/lib/glimmer/ui/custom_widget.rb +315 -315
  106. data/lib/glimmer/util/proc_tracker.rb +39 -39
  107. data/samples/elaborate/contact_manager.rb +142 -142
  108. data/samples/elaborate/contact_manager/contact.rb +32 -32
  109. data/samples/elaborate/contact_manager/contact_manager_presenter.rb +47 -47
  110. data/samples/elaborate/contact_manager/contact_repository.rb +169 -169
  111. data/samples/elaborate/login.rb +123 -123
  112. data/samples/elaborate/meta_sample.rb +1 -1
  113. data/samples/elaborate/tetris/model/block.rb +48 -48
  114. data/samples/elaborate/tetris/model/past_game.rb +39 -39
  115. data/samples/elaborate/tic_tac_toe.rb +76 -76
  116. data/samples/elaborate/tic_tac_toe/board.rb +145 -145
  117. data/samples/elaborate/tic_tac_toe/cell.rb +48 -48
  118. data/samples/elaborate/user_profile.rb +76 -76
  119. data/samples/hello/hello_browser.rb +31 -31
  120. data/samples/hello/hello_button.rb +46 -46
  121. data/samples/hello/hello_canvas.rb +64 -64
  122. data/samples/hello/hello_canvas_transform.rb +1 -1
  123. data/samples/hello/hello_checkbox.rb +85 -85
  124. data/samples/hello/hello_checkbox_group.rb +71 -71
  125. data/samples/hello/hello_code_text.rb +104 -104
  126. data/samples/hello/hello_combo.rb +63 -63
  127. data/samples/hello/hello_computed.rb +96 -96
  128. data/samples/hello/hello_computed/contact.rb +42 -42
  129. data/samples/hello/hello_custom_shell.rb +155 -155
  130. data/samples/hello/hello_custom_widget.rb +86 -86
  131. data/samples/hello/hello_date_time.rb +63 -63
  132. data/samples/hello/hello_dialog.rb +78 -78
  133. data/samples/hello/hello_directory_dialog.rb +60 -60
  134. data/samples/hello/hello_drag_and_drop.rb +50 -50
  135. data/samples/hello/hello_expand_bar.rb +110 -110
  136. data/samples/hello/hello_file_dialog.rb +60 -60
  137. data/samples/hello/hello_group.rb +104 -104
  138. data/samples/hello/hello_link.rb +80 -80
  139. data/samples/hello/hello_list_multi_selection.rb +74 -74
  140. data/samples/hello/hello_list_single_selection.rb +59 -59
  141. data/samples/hello/hello_menu_bar.rb +241 -241
  142. data/samples/hello/hello_message_box.rb +37 -37
  143. data/samples/hello/hello_pop_up_context_menu.rb +84 -84
  144. data/samples/hello/hello_radio.rb +108 -108
  145. data/samples/hello/hello_radio_group.rb +87 -87
  146. data/samples/hello/hello_sash_form.rb +137 -137
  147. data/samples/hello/hello_spinner.rb +69 -69
  148. data/samples/hello/hello_styled_text.rb +138 -138
  149. data/samples/hello/hello_tab.rb +50 -50
  150. data/samples/hello/hello_world.rb +29 -29
  151. metadata +6 -6
  152. data/samples/elaborate/meta_sample/meta_sample_logo.png +0 -0
  153. data/samples/hello/hello_canvas_transform/hello_canvas_transform_image.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 961d9ddec901003644771059d3e3914ec041fe72e6d551ea1aa89c0f755725ee
4
- data.tar.gz: 5dc835b1580c1f5125531f80efb9620cf39b8ccb905dc991bf771c38bcac1816
3
+ metadata.gz: e3ffed4c3ed197bc87d7305ccd7420ff3e69629fc76ea72155f1168ecafb811d
4
+ data.tar.gz: 534c6db1da7ce8da7fc2f5f3f989dfefc11ce614514eb3dd5729cea8544cf8ce
5
5
  SHA512:
6
- metadata.gz: b21c2e5bc842dd1ef9d937b37fa72567d76b8c3ee4ae823952d982a2e80d078b50f383738b70f40655c241d1c697a5ce10ae74c9b43dce7685ca6d9d4683ebe9
7
- data.tar.gz: 1862c2516f8237a426cbddb6a331d74bc5112950491abb9d78a5086df8e9343408146d17c05e0c10613f68828d1a9081ec54ba118f8d4b8ab80d25b567d4c1b5
6
+ metadata.gz: 4284f7f88a78ad3395a220f557818d55ef712f0f6a7b612a6f1e2dca927eaad188c7ea876ee480c78023f54bc99bec68551fc83086b959d56ad51050f3b66c22
7
+ data.tar.gz: 6de15b00ed4116774eb028c796f5d5b545e019bdafcd20bce1667a6b04618f2c7ac0fb88bf86d475f32ce6b05d725f15a622a3382d6f9ef34cdf90f533f53c63
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.18.4.4
4
+
5
+ - Ensure code_text line numbers text font matches that of the actual styled_text widget
6
+ - Use after_read data binding option to update top pixel in code text line numbers after updating text (ensuring top_pixel remains in sync after text changes)
7
+ - Remove unnecessary image copies in hello canvas transform and meta-sample samples
8
+
3
9
  ### 4.18.4.3
4
10
 
5
11
  - Fix flashing issue when using ShellProxy#pack_same_size on Windows
data/LICENSE.txt CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2007-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.
1
+ Copyright (c) 2007-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.
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.18.4.3
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.18.4.4
2
2
  ## JRuby Desktop Development GUI Framework
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
4
4
  [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
@@ -71,6 +71,7 @@ shell {
71
71
  layout_data :center, :center, true, false
72
72
 
73
73
  text 'BASEBALL PLAYOFF SCHEDULE'
74
+ background :transparent
74
75
  foreground rgb(94, 107, 103)
75
76
  font name: 'Optima', height: 38, style: :bold
76
77
  }
@@ -328,7 +329,6 @@ If you see anything that needs to be improved, please do not hesitate to contact
328
329
  - [excluded_keyword_checkers](#excludedkeywordcheckers)
329
330
  - [log_excluded_keywords](#logexcludedkeywords)
330
331
  - [Glimmer Style Guide](#glimmer-style-guide)
331
- - [SWT Reference](#swt-reference)
332
332
  - [Samples](#samples)
333
333
  - [Hello Samples](#hello-samples)
334
334
  - [Hello, World! Sample](#hello-world-sample)
@@ -391,6 +391,7 @@ If you see anything that needs to be improved, please do not hesitate to contact
391
391
  - [Glimmer Supporting Libraries](#glimmer-supporting-libraries)
392
392
  - [Glimmer Process](#glimmer-process)
393
393
  - [Resources](#resources)
394
+ - [SWT Reference](#swt-reference)
394
395
  - [Help](#help)
395
396
  - [Issues](#issues)
396
397
  - [Chat](#chat)
@@ -491,7 +492,7 @@ jgem install glimmer-dsl-swt
491
492
 
492
493
  Or this command if you want a specific version:
493
494
  ```
494
- jgem install glimmer-dsl-swt -v 4.18.4.3
495
+ jgem install glimmer-dsl-swt -v 4.18.4.4
495
496
  ```
496
497
 
497
498
  `jgem` is JRuby's version of `gem` command.
@@ -509,7 +510,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
509
510
 
510
511
  Add the following to `Gemfile`:
511
512
  ```
512
- gem 'glimmer-dsl-swt', '~> 4.18.4.3'
513
+ gem 'glimmer-dsl-swt', '~> 4.18.4.4'
513
514
  ```
514
515
 
515
516
  And, then run:
@@ -567,7 +568,7 @@ bin/glimmer samples
567
568
  Below are the full usage instructions that come up when running `glimmer` without args.
568
569
 
569
570
  ```
570
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.18.4.3
571
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.18.4.4
571
572
 
572
573
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
573
574
 
@@ -1046,7 +1047,7 @@ Output:
1046
1047
 
1047
1048
  Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
1048
1049
  Opal glimmer-dsl-opal 0.10.2 AndyMaleh Glimmer DSL for Opal
1049
- Swt glimmer-dsl-swt 4.18.4.3 AndyMaleh Glimmer DSL for SWT
1050
+ Swt glimmer-dsl-swt 4.18.4.4 AndyMaleh Glimmer DSL for SWT
1050
1051
  Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
1051
1052
  Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
1052
1053
  ```
@@ -1131,6 +1132,8 @@ If you need a more GUI interactive option to experiement with Glimmer GUI DSL Sy
1131
1132
 
1132
1133
  ## Glimmer GUI DSL Syntax
1133
1134
 
1135
+ This guide should help you get started with Glimmer DSL for SWT. For more advanced SWT details, please refer to the [SWT Reference](#swt-reference).
1136
+
1134
1137
  Glimmer's core is a GUI DSL with a lightweight visual syntax that makes it easy to visualize the nesting of widgets in the GUI hierarchy tree.
1135
1138
 
1136
1139
  It is available through mixing in the `Glimmer` module, which makes [Glimmer GUI DSL Keywords](#glimmer-gui-dsl-keywords) available to both the instance scope and class scope:
@@ -2410,17 +2413,17 @@ Glimmer supports drawing graphics directly on a `canvas` widget via SWT (or any
2410
2413
  This is accomplished via the Shape DSL a sub-DSL of the Glimmer GUI DSL, which makes it possible to draw graphics declaratively with very understandable and maintainable syntax.
2411
2414
 
2412
2415
  Shape keywords and their args (including defaults) are listed below (they basically match method names and arguments on [org.eclipse.swt.graphics.GC](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/graphics/GC.html) minus the `draw` or `fill` prefix in downcase):
2413
- - `arc​(x, y, width, height, startAngle, arcAngle, fill: false)` arc is part of a circle within an oval area, denoted by start angle (degrees) and end angle (degrees)
2414
- - `focus​(x, y, width, height)` this is just like rectangle but its foreground color is always that of the OS widget focus color (useful when capturing user interaction via a shape)
2416
+ - `arc(x, y, width, height, startAngle, arcAngle, fill: false)` arc is part of a circle within an oval area, denoted by start angle (degrees) and end angle (degrees)
2417
+ - `focus(x, y, width, height)` this is just like rectangle but its foreground color is always that of the OS widget focus color (useful when capturing user interaction via a shape)
2415
2418
  - `image(image, x, y)` [image](#image)
2416
2419
  - `line(x1, y1, x2, y2)` line
2417
2420
  - `oval(x, y, width, height, fill: false)` oval if width does not match heigh and circle if width matches height. Can be optionally filled.
2418
- - `point​(x, y)` point
2421
+ - `point(x, y)` point
2419
2422
  - `polygon(pointArray, fill: false)` polygon consisting of points, which close automatically to form a shape that can be optionally filled (when points only form a line, it does not show up as filled)
2420
2423
  - `polyline(pointArray)` polyline is just like a polygon, but it does not close up to form a shape, remaining open (unless the points close themselves by having the last point or an intermediate point match the first)
2421
2424
  - `rectangle(x, y, width, height, fill: false)` standard rectangle, which can be optionally filled
2422
2425
  - `rectangle(x, y, width, height, arcWidth = 60, arcHeight = 60, fill: false, round: true)` round rectangle, which can be optionally filled, and takes optional extra round angle arguments
2423
- - `rectangle​(x, y, width, height, vertical = true, fill: true, gradient: true)` gradient rectangle, which is always filled, and takes an optional extra argument to specify true for vertical gradient (default) and false for horizontal gradient
2426
+ - `rectangle(x, y, width, height, vertical = true, fill: true, gradient: true)` gradient rectangle, which is always filled, and takes an optional extra argument to specify true for vertical gradient (default) and false for horizontal gradient
2424
2427
  - `text(string, x, y, flags = nil)` text with optional flags (flag format is `swt(comma_separated_flags)` where flags can be :draw_delimiter (i.e. new lines), :draw_tab, :draw_mnemonic, and :draw_transparent as explained in [GC API](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/graphics/GC.html))
2425
2428
 
2426
2429
  Shape keywords that can be filled with color can take an keyword argument `fill: true`. Defaults to false when not specified unless background is set with no foreground (or foreground is set with no background), in which case a smart default is applied.
@@ -2434,7 +2437,7 @@ Here is a list of supported attributes nestable within a block under shapes:
2434
2437
  - `antialias` enables antialiasing (SWT style value of `:default`, `:off`, `:on` whereby `:default` applies OS default, which varies per OS)
2435
2438
  - `background` sets fill color for fillable shapes (standard color symbol (e.g. `:red`), `rgb(red_integer, green_integer, blue_integer)` color, or Color/ColorProxy object directly)
2436
2439
  - `background_pattern` sets fill gradient/image pattern for fillable shape background (takes the same arguments as the SWT [Pattern](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/graphics/Pattern.html) class [e.g. `background_pattern 2.3, 4.2, 5.4, 7.2, :red, :blue`] / note: this feature isn't extensively tested yet)
2437
- - `clipping` clips area of painting (​numeric values for `(x, y, width, height)`)
2440
+ - `clipping` clips area of painting (numeric values for `(x, y, width, height)`)
2438
2441
  - `fill_rule` sets filling rule (SWT style value of `:fill_even_odd` or `:fill_winding`)
2439
2442
  - `font` sets font (Hash of `:name`, `:height`, and `:style` just like standard widget font property, or Font/FontProxy object directly)
2440
2443
  - `foreground` sets draw color for drawable shapes (standard color symbol (e.g. `:red`), `rgb(red_integer, green_integer, blue_integer)` color, or Color/ColorProxy object directly)
@@ -3290,7 +3293,7 @@ https://help.eclipse.org/2019-12/index.jsp?topic=%2Forg.eclipse.platform.doc.isv
3290
3293
 
3291
3294
  It has `addSelectionListener`. Additionally, under its `Control` super class, it has `addControlListener`, `addDragDetectListener`, `addFocusListener`, `addGestureListener`, `addHelpListener`, `addKeyListener`, `addMenuDetectListener`, `addMouseListener`, `addMouseMoveListener`, `addMouseTrackListener`, `addMouseWheelListener`, `addPaintListener`, `addTouchListener`, and `addTraverseListener`
3292
3295
 
3293
- Suppose, we select `addSelectionListener`, which is responsible for what happens when a user selects a button (clicks it). Then, open its argument `SelectionListener` SWT API, and you find the event (instance) methods: `widgetDefaultSelected` and `widgetSelected​`. Let's select the second one, which is what gets invoked when a button is clicked.
3296
+ Suppose, we select `addSelectionListener`, which is responsible for what happens when a user selects a button (clicks it). Then, open its argument `SelectionListener` SWT API, and you find the event (instance) methods: `widgetDefaultSelected` and `widgetSelected`. Let's select the second one, which is what gets invoked when a button is clicked.
3294
3297
 
3295
3298
  Now, Glimmer simplifies the process of hooking into that listener (observer) by neither requiring you to call the `addSelectionListener` method nor requiring you to implement/extend the `SelectionListener` API.
3296
3299
 
@@ -3688,6 +3691,8 @@ You may see another example at the [Hello, Radio Group!](#hello-radio-group) sam
3688
3691
 
3689
3692
  ##### Code Text Custom Widget
3690
3693
 
3694
+ **(BETA FEATURE)**
3695
+
3691
3696
  `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.
3692
3697
 
3693
3698
  It is used in the [Glimmer Meta-Sample (The Sample of Samples)](#samples):
@@ -3710,15 +3715,16 @@ To use, simply use `code_text` in place of the `text` or `styled_text` widget. I
3710
3715
  ###### Options
3711
3716
 
3712
3717
  **lines**
3713
- (default: false)
3714
- **(ALPHA OPTION)**
3718
+ (default: `false`)
3715
3719
 
3716
3720
  Shows line numbers when set to true.
3717
3721
 
3718
- If set to a hash like `{width: 4}`, it sets the width of the line numbers lane in character count (default: 4)
3722
+ If set to a hash like `{width: 4}`, it sets the initial width of the line numbers lane in character count (default: 4)
3723
+
3724
+ Keep in mind that if the text grows and required a wider line numbers area, it grows automatically regardless of initial width.
3719
3725
 
3720
3726
  **theme**
3721
- (default: 'glimmer')
3727
+ (default: `'glimmer'`)
3722
3728
 
3723
3729
  Changes syntax color highlighting theme. Can be one of the following:
3724
3730
  - glimmer
@@ -3934,6 +3940,16 @@ Sets the code language, which can be one of the following [rouge gem](#https://r
3934
3940
  - yang
3935
3941
  - zig
3936
3942
 
3943
+ **default_behavior**
3944
+ (default: true)
3945
+
3946
+ This adds some default keyboard shortcuts:
3947
+ - CMD+A (CTRL+A on Windows/Linux) to select all
3948
+ - CTRL+A on Mac to jump to beginning of line
3949
+ - CTRL+E on Mac to jump to end of line
3950
+
3951
+ If you prefer it to be vanilla with no default key event listeners, then pass the `default_behavior: false` option.
3952
+
3937
3953
  Learn more at [Hello, Code Text!](#hello-code-text)
3938
3954
 
3939
3955
  ##### Video Custom Custom Widget
@@ -4547,50 +4563,6 @@ Keep in mind the caveat that it would force redraws on every minor changein the
4547
4563
  - Custom widget body, before_body, and after_body blocks open their blocks and close them with curly braces.
4548
4564
  - Custom widgets receive additional arguments to SWT style called options. These are passed as the last argument inside the parentheses, a hash of option names pointing to values.
4549
4565
 
4550
- ## SWT Reference
4551
-
4552
- https://www.eclipse.org/swt/docs.php
4553
-
4554
- Here is the SWT API:
4555
-
4556
- https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/index.html
4557
-
4558
- Here is a visual list of SWT widgets:
4559
-
4560
- https://www.eclipse.org/swt/widgets/
4561
-
4562
- Here is a textual list of SWT widgets:
4563
-
4564
- https://help.eclipse.org/2019-12/topic/org.eclipse.platform.doc.isv/guide/swt_widgets_controls.htm?cp=2_0_7_0_0
4565
-
4566
- Here is a list of SWT style bits as used in widget declaration:
4567
-
4568
- https://wiki.eclipse.org/SWT_Widget_Style_Bits
4569
-
4570
- Here is a SWT style bit constant reference:
4571
-
4572
- https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/SWT.html
4573
-
4574
- Here is an SWT Drag and Drop guide:
4575
-
4576
- https://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html
4577
-
4578
- Here is an SWT Custom Widget guide:
4579
-
4580
- https://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm
4581
-
4582
- Here is an SWT Image guide:
4583
-
4584
- https://www.eclipse.org/articles/Article-SWT-images/graphics-resources.html
4585
-
4586
- Here is an SWT Graphics / Canvas-Drawing guide:
4587
-
4588
- https://www.eclipse.org/articles/Article-SWT-graphics/SWT_graphics.html
4589
-
4590
- Here is the Nebula Project (custom widget library) homepage:
4591
-
4592
- https://www.eclipse.org/nebula/
4593
-
4594
4566
  ## Samples
4595
4567
 
4596
4568
  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`).
@@ -5517,6 +5489,50 @@ Learn more by reading the [GPG](https://github.com/AndyObtiva/glimmer/blob/maste
5517
5489
  * [MountainWest RubyConf 2011 Video](https://confreaks.tv/videos/mwrc2011-whatever-happened-to-desktop-development-in-ruby)
5518
5490
  * [RubyConf 2008 Video](https://confreaks.tv/videos/rubyconf2008-desktop-development-with-glimmer)
5519
5491
 
5492
+ ### SWT Reference
5493
+
5494
+ https://www.eclipse.org/swt/docs.php
5495
+
5496
+ Here is the SWT API:
5497
+
5498
+ https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/index.html
5499
+
5500
+ Here is a visual list of SWT widgets:
5501
+
5502
+ https://www.eclipse.org/swt/widgets/
5503
+
5504
+ Here is a textual list of SWT widgets:
5505
+
5506
+ https://help.eclipse.org/2019-12/topic/org.eclipse.platform.doc.isv/guide/swt_widgets_controls.htm?cp=2_0_7_0_0
5507
+
5508
+ Here is a list of SWT style bits as used in widget declaration:
5509
+
5510
+ https://wiki.eclipse.org/SWT_Widget_Style_Bits
5511
+
5512
+ Here is a SWT style bit constant reference:
5513
+
5514
+ https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/SWT.html
5515
+
5516
+ Here is an SWT Drag and Drop guide:
5517
+
5518
+ https://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html
5519
+
5520
+ Here is an SWT Custom Widget guide:
5521
+
5522
+ https://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm
5523
+
5524
+ Here is an SWT Image guide:
5525
+
5526
+ https://www.eclipse.org/articles/Article-SWT-images/graphics-resources.html
5527
+
5528
+ Here is an SWT Graphics / Canvas-Drawing guide:
5529
+
5530
+ https://www.eclipse.org/articles/Article-SWT-graphics/SWT_graphics.html
5531
+
5532
+ Here is the Nebula Project (custom widget library) homepage:
5533
+
5534
+ https://www.eclipse.org/nebula/
5535
+
5520
5536
  ## Help
5521
5537
 
5522
5538
  ### Issues
data/RUBY_VERSION CHANGED
@@ -1 +1 @@
1
- jruby-9.2.14.0
1
+ jruby-9.2.14.0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.18.4.3
1
+ 4.18.4.4
data/bin/girb CHANGED
@@ -1,31 +1,31 @@
1
- #!/usr/bin/env jruby
2
-
3
- # Copyright (c) 2007-2021 Andy Maleh
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining
6
- # a copy of this software and associated documentation files (the
7
- # "Software"), to deal in the Software without restriction, including
8
- # without limitation the rights to use, copy, modify, merge, publish,
9
- # distribute, sublicense, and/or sell copies of the Software, and to
10
- # permit persons to whom the Software is furnished to do so, subject to
11
- # the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be
14
- # included in all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
-
24
- trap "SIGINT" do
25
- # No Op for irb
26
- end
27
-
28
- require_relative '../lib/glimmer/launcher'
29
-
30
- girb_runner = File.expand_path('../girb_runner.rb', __FILE__)
31
- Glimmer::Launcher.new(["irb -r #{girb_runner}"] + ARGV).launch
1
+ #!/usr/bin/env jruby
2
+
3
+ # Copyright (c) 2007-2021 Andy Maleh
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the
7
+ # "Software"), to deal in the Software without restriction, including
8
+ # without limitation the rights to use, copy, modify, merge, publish,
9
+ # distribute, sublicense, and/or sell copies of the Software, and to
10
+ # permit persons to whom the Software is furnished to do so, subject to
11
+ # the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be
14
+ # included in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ trap "SIGINT" do
25
+ # No Op for irb
26
+ end
27
+
28
+ require_relative '../lib/glimmer/launcher'
29
+
30
+ girb_runner = File.expand_path('../girb_runner.rb', __FILE__)
31
+ Glimmer::Launcher.new(["irb -r #{girb_runner}"] + ARGV).launch
data/bin/girb_runner.rb CHANGED
@@ -1,34 +1,34 @@
1
- # Copyright (c) 2007-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
-
22
- require 'puts_debuggerer'
23
-
24
- include Glimmer
25
-
26
- # Hijack Shell#start_event_loop default behavior to ensure disposing a display upon closing a shell inside girb
27
-
28
- Glimmer::SWT::ShellProxy.class_eval do
29
- alias start_event_loop_original start_event_loop
30
- def start_event_loop
31
- start_event_loop_original
32
- Glimmer::SWT::DisplayProxy.instance.dispose
33
- end
34
- end
1
+ # Copyright (c) 2007-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
+
22
+ require 'puts_debuggerer'
23
+
24
+ include Glimmer
25
+
26
+ # Hijack Shell#start_event_loop default behavior to ensure disposing a display upon closing a shell inside girb
27
+
28
+ Glimmer::SWT::ShellProxy.class_eval do
29
+ alias start_event_loop_original start_event_loop
30
+ def start_event_loop
31
+ start_event_loop_original
32
+ Glimmer::SWT::DisplayProxy.instance.dispose
33
+ end
34
+ end