glimmer-dsl-swt 4.20.5.1 → 4.20.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a60210c1736ec94c73d725fb6df34dd391cdaceaa4ede52f6a15ae3b628b4ce
4
- data.tar.gz: 8ffe09933f25b168c7ee88d175c580c5608333443c0fe101786bc839319d36fe
3
+ metadata.gz: 96f6467362290fdacff3b7ba74020595c6987cbfcf96f3aa74772eae62b97eee
4
+ data.tar.gz: 11ca90c762d11542fc349579e683400b97e86b3e48517b42b07156338c0b1ba6
5
5
  SHA512:
6
- metadata.gz: 93b73188b2812fd4322ce80a029c06a1e24aa5c68c4fac3ebc6d5b44ea41cee60d95011595c5285a1063882ddc579d85598e01879887d26574764255db410596
7
- data.tar.gz: 2e553859573f509e5121294c72450a0f5d330323096f3fd377e39ca554a5f2a2ed501b1a9cb7acc269b0d4320fbc497b8544c979aa02ae1c9ec1d81869fba3e5
6
+ metadata.gz: 9d42cc550e00628928bf483b7f27fec1c3fb57a027d5fcbcfe0bc2168e1552c32e554490eb6c05f39c63548288187435f2d484516bed77af1023c3ebd93327ec
7
+ data.tar.gz: 41397cae14bceb062ffd7cc822305a0b5407d4ab0db8ec763c5dd8d850a809e2a6d9b6693a1319f982c9231b107b4ef5357e8f7bc61d7da83e314d742dcf1a40
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.20.5.2
4
+
5
+ - Identify trimmed Canvas Shape DSL attribute `fill_rule` styles without `fill_` prefix
6
+ - Identify trimmed Canvas Shape DSL attribute `line_cap` styles without `cap_` prefix
7
+ - Identify trimmed Canvas Shape DSL attribute `line_join` styles without `join_` prefix
8
+
3
9
  ### 4.20.5.1
4
10
 
5
11
  - Fix issue with Namespace is required always showing up when buildling a custom widget gem or custom shape gem
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.20.5.1
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.20.5.2
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)
@@ -15,7 +15,7 @@
15
15
  [<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
16
16
  Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) and [Chalmers/Gothenburg University Software Engineering Master's Lecture Material](http://www.cse.chalmers.se/~bergert/slides/guest_lecture_DSLs.pdf)
17
17
 
18
- [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.5.1 includes [SWT 4.20](https://download.eclipse.org/eclipse/downloads/drops4/R-4.20-202106111600/), which was released on June 11, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (report any issues you may encounter).
18
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.5.2 includes [SWT 4.20](https://download.eclipse.org/eclipse/downloads/drops4/R-4.20-202106111600/), which was released on June 11, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (report any issues you may encounter).
19
19
 
20
20
  **Starting in version 4.20.0.0, [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) comes with the new [***Shine***](/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#shine) syntax** for highly intuitive and visually expressive View/Model Attribute Mapping, relying on `<=>` for bidirectional (two-way) data-binding and `<=` for unidirectional (one-way) data-binding, providing an alternative to the `bind` keyword (keep in mind that it is still a beta, so default back to `bind` whenever needed).
21
21
 
@@ -347,7 +347,7 @@ jgem install glimmer-dsl-swt
347
347
 
348
348
  Or this command if you want a specific version:
349
349
  ```
350
- jgem install glimmer-dsl-swt -v 4.20.5.1
350
+ jgem install glimmer-dsl-swt -v 4.20.5.2
351
351
  ```
352
352
 
353
353
  `jgem` is JRuby's version of `gem` command.
@@ -375,7 +375,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
375
375
 
376
376
  Add the following to `Gemfile`:
377
377
  ```
378
- gem 'glimmer-dsl-swt', '~> 4.20.5.1'
378
+ gem 'glimmer-dsl-swt', '~> 4.20.5.2'
379
379
  ```
380
380
 
381
381
  And, then run:
@@ -396,7 +396,7 @@ glimmer
396
396
  ```
397
397
 
398
398
  ```
399
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.5.1
399
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.5.2
400
400
 
401
401
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
402
402
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.20.5.1
1
+ 4.20.5.2
@@ -18,6 +18,7 @@ This guide should help you get started with Glimmer DSL for SWT. For more advanc
18
18
  - [sync_exec](#sync_exec)
19
19
  - [timer_exec](#timer_exec)
20
20
  - [Menus](#menus)
21
+ - [Tray Item](#tray-item)
21
22
  - [ScrolledComposite](#scrolledcomposite)
22
23
  - [Sash Form Widget](#sash-form-widget)
23
24
  - [Browser Widget](#browser-widget)
@@ -872,6 +873,101 @@ shell {
872
873
  }.open
873
874
  ```
874
875
 
876
+ #### Tray Item
877
+
878
+ ![Hello Tray Item Icon](/images/glimmer-hello-tray-item.png)
879
+
880
+ The system tray allows showing icons for various apps that need to stay on for extended periods of time and provide quick access.
881
+
882
+ In Glimmer DSL for SWT, generating tray items is automated via the `tray_item` keyword, which can be nested under `shell` and then have a child `menu` underneath that pops up when the user clicks on its icon in the system tray.
883
+
884
+ Note how the shell was declared with the `:on_top` style (in addition to the default, which is `:shell_trim`) to ensure it opens above all apps when the "Show Application" menu item is selected.
885
+
886
+ Example code:
887
+
888
+ ```ruby
889
+ shell(:shell_trim, :on_top) { # make it always appear on top of everything
890
+ row_layout(:vertical) {
891
+ center true
892
+ }
893
+ text 'Hello, Tray Item!'
894
+
895
+ on_shell_closed do |event|
896
+ # do not perform event that closes app when shell is closed
897
+ event.doit = false
898
+ # body_root is the root shell
899
+ body_root.hide
900
+ self.show_application = false # updates Show Application checkbox menu item indirectly
901
+ end
902
+
903
+ tray_item {
904
+ tool_tip_text 'Glimmer'
905
+ image @image # could use an image path instead
906
+
907
+ menu {
908
+ menu_item {
909
+ text 'About'
910
+
911
+ on_widget_selected do
912
+ message_box {
913
+ text 'Glimmer - About'
914
+ message 'This is a Glimmer DSL for SWT Tray Item'
915
+ }.open
916
+ end
917
+ }
918
+ menu_item(:separator)
919
+ menu_item(:check) {
920
+ text 'Show Application'
921
+ selection <=> [self, :show_application]
922
+
923
+ on_widget_selected do
924
+ # body_root is the root shell
925
+ if body_root.visible?
926
+ body_root.hide
927
+ else
928
+ body_root.show
929
+ end
930
+ end
931
+ }
932
+ menu_item(:separator)
933
+ menu_item {
934
+ text 'Exit'
935
+
936
+ on_widget_selected {
937
+ exit(0)
938
+ }
939
+ }
940
+ }
941
+
942
+ # supported tray item listeners (you can try to add actions to them when needed)
943
+ # on_swt_Show {
944
+ # }
945
+ #
946
+ # on_swt_Hide {
947
+ # }
948
+ #
949
+ # on_widget_selected {
950
+ # }
951
+ #
952
+ # on_menu_detected {
953
+ # }
954
+ }
955
+
956
+ label(:center) {
957
+ text 'This is the application'
958
+ font height: 30
959
+ }
960
+ label {
961
+ text 'Click on the tray item (circles icon) to open its menu'
962
+ }
963
+ label {
964
+ text 'Uncheck Show Application to hide the app and recheck it to show the app'
965
+ }
966
+ }
967
+ ```
968
+
969
+ Learn more at [Hello, Tray Item!](/docs/reference/GLIMMER_SAMPLES.md#hello-tray-item)
970
+
875
971
  #### ScrolledComposite
876
972
 
877
973
  Glimmer provides smart defaults for the `scrolled_composite` widget by:
Binary file
@@ -295,6 +295,15 @@ module Glimmer
295
295
  if method_name.to_s == 'setLineStyle'
296
296
  args[0] = "line_#{args[0]}" if !args[0].to_s.downcase.start_with?('line_')
297
297
  end
298
+ if method_name.to_s == 'setFillRule'
299
+ args[0] = "fill_#{args[0]}" if !args[0].to_s.downcase.start_with?('fill_')
300
+ end
301
+ if method_name.to_s == 'setLineCap'
302
+ args[0] = "cap_#{args[0]}" if !args[0].to_s.downcase.start_with?('cap_')
303
+ end
304
+ if method_name.to_s == 'setLineJoin'
305
+ args[0] = "join_#{args[0]}" if !args[0].to_s.downcase.start_with?('join_')
306
+ end
298
307
  if the_java_method.parameter_types.first == Java::int.java_class
299
308
  args[0] = SWTProxy.constant(args[0])
300
309
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.5.1
4
+ version: 4.20.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh