glimmer-dsl-swt 4.23.0.1 → 4.23.1.0

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: 9aabbb159eb1d27e98f8d8a51a9068c43e33a91e4bf249f44d0a965af81a4d8a
4
- data.tar.gz: b4e45c49a1347c57ff6e7c8a5798dec9dba7d591e1f8aaf26f773b2708908c97
3
+ metadata.gz: 56654c61fc60401e8b1924bb81f474e5694ab7fc5c2c4a3b592932ccd348e0cb
4
+ data.tar.gz: daa2b79e4a10af9b093f21c6358eaaba1bb93e4dc7fbc8520c7c658ccc2b20f2
5
5
  SHA512:
6
- metadata.gz: 64fb826450b35b43049a31b8f36bbdceb9d24c28e3b193e0d73322ca81f4d0f429a0a678ebd6c61c1d23ad3bd4e04618dabd95b0d6462ee32ec202a24be66842
7
- data.tar.gz: 9cc1a23579587dd4694a496052a83a4f886ec7762622526595831784c4531fa1c9345d2c6ccc67f8cb93b8fef1e69a510e5b0aa471641db7f4746fd0f83e0e04
6
+ metadata.gz: a02f5c3157fdd1805902042d154f7f452258f56129905b7641ed7ea88a7178c6de64e36e07c8a99608a2db8f26094e90775ecc1ce1d1ed55062b573704a3f46e
7
+ data.tar.gz: 568739a4d7954ef9d12515dbe9e4a0b1ae60bb06887067a7636247e173da6dbe9ee0c9765c1e63a3d7be261ef552ad3cff7eae90be8317cac7a9f70634e98e39
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.23.1.0
4
+
5
+ - Upgrade to JRuby 9.3.4.0
6
+ - Upgrade to glimmer 2.7.3
7
+ - Add "Tutorial" button to Hello, Meta Sample! to show Youtube Video Tutorial
8
+
3
9
  ## 4.23.0.1
4
10
 
5
11
  - Add "Speed" menu to the Tetris sample
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.23.0.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.23.1.0
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)
@@ -19,7 +19,7 @@ Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) an
19
19
 
20
20
  ![Eclipse SWT RCP NASA Mars Rover](/images/glimmer-eclipse-swt-rcp-nasa-mars-rover.png)
21
21
 
22
- [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.23.0.1 includes [SWT 4.23](https://download.eclipse.org/eclipse/downloads/drops4/R-4.23-202203080310/), which was released on March 8, 2022. 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.
22
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.23.1.0 includes [SWT 4.23](https://download.eclipse.org/eclipse/downloads/drops4/R-4.23-202203080310/), which was released on March 8, 2022. 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.
23
23
 
24
24
  **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.
25
25
 
@@ -203,7 +203,7 @@ Glimmer app:
203
203
 
204
204
  ### Desktop Apps Built with Glimmer DSL for SWT
205
205
 
206
- [<img alt="Are We There Yet Logo" src="https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-logo.svg" width="40" />Are We There Yet?](https://github.com/AndyObtiva/are-we-there-yet) - Small Project Tracking App
206
+ [<img alt="Are We There Yet Logo" src="https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-logo.svg" width="40" />Are We There Yet?](https://github.com/AndyObtiva/are-we-there-yet) - Small Project Tracking App (leveraging [ActiveRecord](https://rubygems.org/gems/activerecord) and [SQLite](https://www.sqlite.org/index.html))
207
207
 
208
208
  [![Are We There Yet? App Screenshot](https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-screenshot-windows.png)](https://github.com/AndyObtiva/are-we-there-yet)
209
209
 
@@ -303,7 +303,7 @@ https://www.eclipse.org/swt/faq.php
303
303
 
304
304
  - JDK 18 (find at https://www.oracle.com/java/technologies/downloads / Ensure `PATH` env var includes Java bin directory for `jpackage` command to work when packaging Glimmer applications / Preferably setup `JAVA_HOME` env var too to point to JDK home directory before installing JRuby)
305
305
  - [RVM](http://rvm.io) on Mac & Linux (not needed on Windows)
306
- - JRuby 9.3.3.0 (supporting Ruby 2.6.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.3.3.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
306
+ - JRuby 9.3.4.0 (supporting Ruby 2.6.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.3.4.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
307
307
  - SWT 4.23 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem). Note that SWT supports ARM64/AARCH64 on Mac and Linux since version 4.20
308
308
  - Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
309
309
 
@@ -333,7 +333,7 @@ jgem install glimmer-dsl-swt
333
333
 
334
334
  Or this command if you want a specific version:
335
335
  ```
336
- jgem install glimmer-dsl-swt -v 4.23.0.1
336
+ jgem install glimmer-dsl-swt -v 4.23.1.0
337
337
  ```
338
338
 
339
339
  `jgem` is JRuby's version of `gem` command.
@@ -361,7 +361,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
361
361
 
362
362
  Add the following to `Gemfile`:
363
363
  ```
364
- gem 'glimmer-dsl-swt', '~> 4.23.0.1'
364
+ gem 'glimmer-dsl-swt', '~> 4.23.1.0'
365
365
  ```
366
366
 
367
367
  And, then run:
@@ -384,7 +384,7 @@ glimmer
384
384
  ```
385
385
 
386
386
  ```
387
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.23.0.1
387
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.23.1.0
388
388
 
389
389
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
390
390
 
@@ -567,13 +567,13 @@ If you have a Glimmer app you would like referenced here, please mention in a Pu
567
567
 
568
568
  ### Are We There Yet?
569
569
 
570
- This [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) application connects to a database using [ActiveRecord](https://rubygems.org/gems/activerecord).
570
+ This [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) application connects to a [SQLite](https://www.sqlite.org/index.html) database using [ActiveRecord](https://rubygems.org/gems/activerecord).
571
571
 
572
572
  [<img alt="Are We There Yet Logo" src="https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-logo.svg" width="40" />Are We There Yet?](https://github.com/AndyObtiva/are-we-there-yet): A tool that helps you learn when your small projects will finish
573
573
 
574
574
  ### Garderie Rainbow Daily Agenda
575
575
 
576
- This [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) application connects to a [Rails](https://rubyonrails.org/) server to submit an application.
576
+ This [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) application connects to a [Rails](https://rubyonrails.org/) server to submit a nursery child daily agenda via a REST API, storing data in [PostgreSQL](https://www.postgresql.org/).
577
577
 
578
578
  [<img alt="Garderie Rainbow Daily Agenda Logo" src="https://github.com/AndyObtiva/garderie_rainbow_daily_agenda/raw/master/images/garderie_rainbow_daily_agenda_logo.png" width="40" />Garderie Rainbow Daily Agenda](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda): A child nursery daily agenda reporting desktop app
579
579
 
data/RUBY_VERSION CHANGED
@@ -1 +1 @@
1
- jruby-9.3.3.0
1
+ jruby-9.3.4.0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.23.0.1
1
+ 4.23.1.0
@@ -940,6 +940,8 @@ The system tray allows showing icons for various apps that need to stay on for e
940
940
 
941
941
  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.
942
942
 
943
+ Note that if you would like to display notifications, you can use the [Nebula Notifier custom widget](https://github.com/AndyObtiva/glimmer-cw-nebula#notifier). Alternatively, you can look into the [Two Slices](https://github.com/sshtools/two-slices) Java library.
944
+
943
945
  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.
944
946
 
945
947
  Example code:
@@ -3574,8 +3576,8 @@ Example:
3574
3576
  ```ruby
3575
3577
  shell {
3576
3578
  @tree = tree {
3577
- items bind(company, :owner), tree_properties(children: :coworkers, text: :name)
3578
- selection bind(company, :selected_coworker)
3579
+ items <= [company, :owner, tree_properties: {children: :coworkers, text: :name}]
3580
+ selection <=> [company, :selected_coworker]
3579
3581
  }
3580
3582
  }
3581
3583
  ```
@@ -1082,7 +1082,7 @@ Hello, Cool Bar!
1082
1082
 
1083
1083
  #### Hello, Tray Item!
1084
1084
 
1085
- This sample demonstrates the use of `tray_item`, which enables hiding an app (sending to background) and showing again on top of all other apps. It can also show an About Message Box and exit completely if needed.
1085
+ This sample demonstrates the use of [`tray_item`](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#tray-item), which enables hiding an app (sending to background) and showing again on top of all other apps. It can also show an About Message Box and exit completely if needed.
1086
1086
 
1087
1087
  Code:
1088
1088
 
Binary file
@@ -44,6 +44,22 @@ class Sample
44
44
  include Glimmer::DataBinding::ObservableModel
45
45
 
46
46
  UNEDITABLE = ['meta_sample.rb'] + (OS.windows? ? ['calculator.rb', 'weather.rb'] : []) # Windows StyledText does not support unicode characters found in certain samples
47
+
48
+ TEACHABLE = {
49
+ 'Hello, World!' => 'Mi5phsSdNAA',
50
+ 'Hello, Message Box!' => 'N0sDcr0xp40',
51
+ 'Hello, Tab!' => 'cMwlYZ78uaQ',
52
+ 'Hello, Layout!' => 'dAVFR9Y_thY',
53
+ 'Hello, File Dialog!' => 'HwZRgdvKIDo',
54
+ 'Hello, Label!' => 'i1PFHr-F8fQ',
55
+ 'Hello, Text!' => 'pOaYB43G2pg',
56
+ 'Login' => 'C_vSvXH9ISw',
57
+ 'Hello, Canvas Shape Listeners!' => 'PV13YE-43M4',
58
+ 'Hello, Styled Text!' => 'ahs54DPmmso',
59
+ 'Hello, Code Text!' => 'y0rNzMURnHY',
60
+ 'Hello, Tree!' => 'M-ZOFyzbEKo',
61
+ 'Hello, Table!' => '3zyyXq7WJwc',
62
+ }
47
63
 
48
64
  attr_accessor :sample_directory, :file, :selected
49
65
 
@@ -84,6 +100,14 @@ class Sample
84
100
  File.basename(file) != 'meta_sample.rb'
85
101
  end
86
102
 
103
+ def teachable
104
+ !!tutorial
105
+ end
106
+
107
+ def tutorial
108
+ TEACHABLE[name]
109
+ end
110
+
87
111
  def file_relative_path
88
112
  file.sub(self.class.glimmer_directory, '')
89
113
  end
@@ -244,6 +268,7 @@ class MetaSampleApplication
244
268
 
245
269
  composite {
246
270
  fill_layout
271
+
247
272
  layout_data(:fill, :center, true, false) {
248
273
  height_hint 96
249
274
  }
@@ -261,6 +286,23 @@ class MetaSampleApplication
261
286
  end
262
287
  end
263
288
  }
289
+
290
+ button {
291
+ text 'Tutorial'
292
+ font height: 25
293
+ enabled <= [SampleDirectory, 'selected_sample.teachable']
294
+
295
+ on_widget_selected do
296
+ shell(:fill_screen) {
297
+ text "Glimmer DSL for SWT Video Tutorial - #{SampleDirectory.selected_sample.name}"
298
+
299
+ browser {
300
+ text "<iframe src='https://www.youtube.com/embed/#{SampleDirectory.selected_sample.tutorial}?autoplay=1' title='YouTube video player' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen style='width: 100%; height: 100%;'></iframe>"
301
+ }
302
+ }.open
303
+ end
304
+ }
305
+
264
306
  button {
265
307
  text 'Reset'
266
308
  font height: 25
@@ -83,30 +83,41 @@ class HelloCodeText
83
83
  tab_folder {
84
84
  tab_item {
85
85
  fill_layout
86
+
86
87
  text 'Ruby (glimmer theme)'
88
+
87
89
  code_text(language: 'ruby', theme: 'glimmer', lines: true) {
88
90
  text <=> [self, :ruby_code]
89
91
  }
90
92
  }
93
+
91
94
  tab_item {
92
95
  fill_layout
96
+
93
97
  text 'JavaScript (pastie theme)'
98
+
94
99
  code_text(:multi, :h_scroll, :v_scroll, language: 'javascript', theme: 'pastie', lines: {width: 2}) {
95
100
  root {
96
101
  grid_layout(2, false) {
97
102
  margin_width 2
98
103
  }
104
+
99
105
  background :white
100
106
  }
107
+
101
108
  line_numbers {
102
109
  background :white
103
110
  }
111
+
104
112
  text <=> [self, :js_code]
105
113
  }
106
114
  }
115
+
107
116
  tab_item {
108
117
  fill_layout
118
+
109
119
  text 'HTML (github theme)'
120
+
110
121
  code_text(language: 'html', theme: 'github') { # default is lines: false
111
122
  text <=> [self, :html_code]
112
123
  }
@@ -82,22 +82,22 @@ shell {
82
82
  line_size = line_style_event.lineText.size
83
83
  style_range = StyleRange.new(line_offset, line_size, color(:blue).swt_color, nil, swt(:italic))
84
84
  style_range.font = Font.new(display.swt_display, 'Times New Roman', 18, swt(:normal))
85
- line_style_event.styles = [style_range].to_java(StyleRange)
85
+ line_style_event.styles = [style_range]
86
86
  elsif @presenter.line_index_for_offset(line_offset) % 52 < 26
87
87
  line_size = line_style_event.lineText.size
88
88
  style_range = StyleRange.new(line_offset, line_size, color(:dark_green).swt_color, color(:yellow).swt_color, swt(:bold))
89
- line_style_event.styles = [style_range].to_java(StyleRange)
89
+ line_style_event.styles = [style_range]
90
90
  elsif @presenter.line_index_for_offset(line_offset) % 52 < 39
91
91
  line_size = line_style_event.lineText.size
92
92
  style_range = StyleRange.new(line_offset, line_size, color(:red).swt_color, nil, swt(:normal))
93
93
  style_range.underline = true
94
94
  style_range.font = Font.new(display.swt_display, 'Arial', 16, swt(:normal))
95
- line_style_event.styles = [style_range].to_java(StyleRange)
95
+ line_style_event.styles = [style_range]
96
96
  else
97
97
  line_size = line_style_event.lineText.size
98
98
  style_range = StyleRange.new(line_offset, line_size, color(:dark_magenta).swt_color, color(:cyan).swt_color, swt(:normal))
99
99
  style_range.strikeout = true
100
- line_style_event.styles = [style_range].to_java(StyleRange)
100
+ line_style_event.styles = [style_range]
101
101
  end
102
102
  end
103
103
  }
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.23.0.1
4
+ version: 4.23.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-31 00:00:00.000000000 Z
11
+ date: 2022-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 2.6.0
18
+ version: 2.7.3
19
19
  name: glimmer
20
20
  prerelease: false
21
21
  type: :runtime
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.6.0
26
+ version: 2.7.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements: