glimmer-dsl-swt 4.18.7.7 → 4.19.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +18 -8
- data/RUBY_VERSION +1 -1
- data/VERSION +1 -1
- data/bin/girb +10 -9
- data/bin/girb_runner.rb +8 -3
- data/bin/glimmer +10 -1
- data/bin/glimmer-setup +58 -0
- data/bin/glimmer_runner.rb +4 -0
- data/docs/reference/GLIMMER_COMMAND.md +19 -30
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +6 -2
- data/docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md +7 -1
- data/docs/reference/GLIMMER_SAMPLES.md +25 -0
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer-dsl-swt.rb +8 -0
- data/lib/glimmer/dsl/swt/c_tab_item_expression.rb +58 -0
- data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +2 -1
- data/lib/glimmer/dsl/swt/tab_item_expression.rb +7 -3
- data/lib/glimmer/dsl/swt/widget_expression.rb +1 -1
- data/lib/glimmer/launcher.rb +27 -51
- data/lib/glimmer/rake_task.rb +1 -1
- data/lib/glimmer/rake_task/package.rb +7 -2
- data/lib/glimmer/rake_task/scaffold.rb +227 -254
- data/lib/glimmer/swt/c_tab_item_proxy.rb +53 -0
- data/lib/glimmer/swt/custom/shape.rb +15 -1
- data/lib/glimmer/swt/sash_form_proxy.rb +6 -0
- data/lib/glimmer/swt/shell_proxy.rb +3 -1
- data/lib/glimmer/swt/tab_folder_proxy.rb +1 -0
- data/lib/glimmer/swt/tab_item_proxy.rb +17 -18
- data/lib/glimmer/swt/widget_proxy.rb +9 -0
- data/samples/elaborate/mandelbrot_fractal.rb +1 -1
- data/samples/hello/hello_c_combo.rb +68 -0
- data/samples/hello/hello_c_tab.rb +271 -0
- data/samples/hello/hello_tab.rb +2 -0
- data/vendor/swt/linux/swt.jar +0 -0
- data/vendor/swt/mac/swt.jar +0 -0
- data/vendor/swt/windows/swt.jar +0 -0
- metadata +41 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a6d3f8e7bb2a7212ba94580c1293d23205f7eba98da2dacc2be280546f8a048
|
4
|
+
data.tar.gz: 56e3d8a75782146d32d3c59eecbb1528d53879c41ac5754dd3afe95809f9a566
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3ec40fd6f34affc274aab6de90f9ae7798de2292a687adca7655298b46c87130b72aabe222c7aac1b585ec3ed5675638a11fc12084900891914077aec593f74
|
7
|
+
data.tar.gz: 4d312fd5501bac1cebeeeaa04c61113be221a28cc3a812c3d9adc20b650f2c5dd3ef4c0a95d617f903bd1cdc64193b754bbde8facee2367acf7f592f0e6f8803
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.19.0.0
|
4
|
+
|
5
|
+
- Upgrade to SWT 4.19
|
6
|
+
- Upgrade to JRuby 9.2.16.0
|
7
|
+
- Speed up glimmer command startup time by not spawning a jruby a second time for handling Mac-specific options (cutting down glimmer app startup time to half)
|
8
|
+
- glimmer-setup command configures `glimmer` and `girb` for the Mac with `-X-JstartOnFirstThread` in a `JRUBY_OPTS` environment variable
|
9
|
+
- Switch all scaffolded models/views to `Model::` and `View::` namespacing instead of the namespaceless 'models' and 'views' directories (new scheme was originally introduced in the Tetris sample)
|
10
|
+
- Make sure that scaffolded shell/app uses new custom shell built-in `.launch` method instead of custom written `.open` method
|
11
|
+
- Make `scaffold:desktopify` generated app window shell fill the screen by default
|
12
|
+
- Support `c_tab_folder` and `c_tab_item`
|
13
|
+
- Support `c_combo` (`org.eclipse.swt.custom.CCombo` SWT widget) data-binding
|
14
|
+
- Hello, CCombo!
|
15
|
+
- Hello, C Tab!
|
16
|
+
- Shape#clear_shapes just like that of Drawable in WidgetProxy
|
17
|
+
- Set default background of `rgb(230, 230, 230)` on sash_form to make it more spottable to resize the sash
|
18
|
+
- Fix issue with processing arguments for the `glimmer package` command.
|
19
|
+
- Fix mandelbrot fractal sample on Windows (added missing `jruby-win32ole` gem for use with `concurrent-ruby` gem)
|
20
|
+
- Fix this `glimmer package` message, which comes out even with the right Java version: `WARNING! Glimmer Packaging Pre-Requisite Java Version 1.8.0_241 Is Not Found!`
|
21
|
+
|
3
22
|
### 4.18.7.7
|
4
23
|
|
5
24
|
- Upgrade to glimmer v1.3.0
|
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.
|
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.19.0.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)
|
@@ -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.
|
18
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.19.0.0 includes [SWT 4.19](https://download.eclipse.org/eclipse/downloads/drops4/R-4.19-202103031800/), which was released on March 3, 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.
|
19
19
|
|
20
20
|
[Glimmer DSL for SWT receives two updates per month](https://rubygems.org/gems/glimmer-dsl-swt/versions). You can trust [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) with your Ruby desktop GUI development needs! [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) brings great ideas to the table, such as declarative programming via domain specific languages, currently under-utilized in the GUI domain. That said, it may not be feature complete enough for everybody's needs, so please help make [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) even better by providing feedback and [contributing](#contributing) when possible. The project is very active, so any feature suggestions that are accepted could be implemented within weeks if not days. Also, you are welcome to [hire me](#hire-me) full-time if you want long-term development of [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) for your project needs.
|
21
21
|
|
@@ -308,14 +308,14 @@ https://www.eclipse.org/swt/faq.php
|
|
308
308
|
## Pre-requisites
|
309
309
|
|
310
310
|
- JDK 8u241 (1.8.0_241) (find at https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html / On Windows, ensure PATH includes Java bin directory like C:\Program Files\Java\jdk1.8.0_241\bin for javapackager to work during packaging Glimmer applications)
|
311
|
-
- JRuby 9.2.
|
312
|
-
- SWT 4.
|
311
|
+
- JRuby 9.2.16.0 (supporting Ruby 2.5.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux or find at [https://www.jruby.org/download](https://www.jruby.org/download) for Windows)
|
312
|
+
- SWT 4.19 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem)
|
313
313
|
- Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
|
314
314
|
|
315
315
|
To obtain JRuby through [RVM](http://rvm.io), you may run:
|
316
316
|
|
317
317
|
```bash
|
318
|
-
rvm install jruby-9.2.
|
318
|
+
rvm install jruby-9.2.16.0
|
319
319
|
```
|
320
320
|
|
321
321
|
Glimmer might still work on other versions of Java, JRuby and SWT, but there are no guarantees, so it is best to stick to the pre-requisites outlined above.
|
@@ -342,13 +342,23 @@ jgem install glimmer-dsl-swt
|
|
342
342
|
|
343
343
|
Or this command if you want a specific version:
|
344
344
|
```
|
345
|
-
jgem install glimmer-dsl-swt -v 4.
|
345
|
+
jgem install glimmer-dsl-swt -v 4.19.0.0
|
346
346
|
```
|
347
347
|
|
348
348
|
`jgem` is JRuby's version of `gem` command.
|
349
349
|
RVM allows running `gem install` directly as an alias.
|
350
350
|
Otherwise, you may also run `jruby -S gem install ...`
|
351
351
|
|
352
|
+
Afterwards, you can use `glimmer` and `girb` commands.
|
353
|
+
|
354
|
+
On the Mac, you also have to run:
|
355
|
+
|
356
|
+
```
|
357
|
+
glimmer-setup
|
358
|
+
```
|
359
|
+
|
360
|
+
This ensures configuring extra required Mac options before using `glimmer` and `girb` commands.
|
361
|
+
|
352
362
|
If you are new to Glimmer and would like to continue learning the basics, you may continue to the [Glimmer Command](https://github.com/AndyObtiva/glimmer#glimmer-command) section.
|
353
363
|
|
354
364
|
Otherwise, if you are ready to build a Glimmer app, you can jump to the [Glimmer Scaffolding](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/docs/reference/GLIMMER_COMMAND.md#scaffolding) section next.
|
@@ -360,7 +370,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
|
|
360
370
|
|
361
371
|
Add the following to `Gemfile`:
|
362
372
|
```
|
363
|
-
gem 'glimmer-dsl-swt', '~> 4.
|
373
|
+
gem 'glimmer-dsl-swt', '~> 4.19.0.0'
|
364
374
|
```
|
365
375
|
|
366
376
|
And, then run:
|
@@ -381,7 +391,7 @@ glimmer
|
|
381
391
|
```
|
382
392
|
|
383
393
|
```
|
384
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.
|
394
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.19.0.0
|
385
395
|
|
386
396
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
387
397
|
|
data/RUBY_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
jruby-9.2.
|
1
|
+
jruby-9.2.16.0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.19.0.0
|
data/bin/girb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env jruby
|
2
2
|
|
3
3
|
# Copyright (c) 2007-2021 Andy Maleh
|
4
|
-
#
|
4
|
+
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
# a copy of this software and associated documentation files (the
|
7
7
|
# "Software"), to deal in the Software without restriction, including
|
@@ -9,10 +9,10 @@
|
|
9
9
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
10
|
# permit persons to whom the Software is furnished to do so, subject to
|
11
11
|
# the following conditions:
|
12
|
-
#
|
12
|
+
#
|
13
13
|
# The above copyright notice and this permission notice shall be
|
14
14
|
# included in all copies or substantial portions of the Software.
|
15
|
-
#
|
15
|
+
#
|
16
16
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
17
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
18
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -21,11 +21,12 @@
|
|
21
21
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
22
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
23
|
|
24
|
-
|
25
|
-
# No Op for irb
|
26
|
-
end
|
24
|
+
# This script was written for Windows and Linux only
|
27
25
|
|
28
|
-
|
26
|
+
ENV['JRUBY_OPTS'] = ARGV.select {|arg| arg.start_with?('-')}.join(' ')
|
29
27
|
|
30
|
-
|
31
|
-
|
28
|
+
require_relative 'girb_runner'
|
29
|
+
|
30
|
+
require 'irb'
|
31
|
+
|
32
|
+
IRB.start('.')
|
data/bin/girb_runner.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2007-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
|
5
5
|
# "Software"), to deal in the Software without restriction, including
|
@@ -7,10 +7,10 @@
|
|
7
7
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
8
|
# permit persons to whom the Software is furnished to do so, subject to
|
9
9
|
# the following conditions:
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# The above copyright notice and this permission notice shall be
|
12
12
|
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
15
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
16
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -20,6 +20,11 @@
|
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
22
|
require 'puts_debuggerer'
|
23
|
+
require_relative '../lib/glimmer-dsl-swt'
|
24
|
+
|
25
|
+
trap "SIGINT" do
|
26
|
+
# No Op for irb
|
27
|
+
end
|
23
28
|
|
24
29
|
include Glimmer
|
25
30
|
|
data/bin/glimmer
CHANGED
@@ -21,6 +21,15 @@
|
|
21
21
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
22
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
23
|
|
24
|
+
# This script was written for Windows and Linux only
|
25
|
+
|
26
|
+
require_relative '../lib/glimmer-dsl-swt'
|
24
27
|
require_relative '../lib/glimmer/launcher'
|
25
28
|
|
26
|
-
Glimmer
|
29
|
+
# Initialize launcher, consuming ARGV args that are for Glimmer only
|
30
|
+
launcher = Glimmer::Launcher.new(ARGV)
|
31
|
+
|
32
|
+
# Set remaining ARGV args (starting with `-`) as JRuby options
|
33
|
+
ENV['JRUBY_OPTS'] = ARGV.select {|arg| arg.start_with?('-')}.join(' ')
|
34
|
+
|
35
|
+
launcher.launch
|
data/bin/glimmer-setup
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
|
3
|
+
# Copyright (c) 2020-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
|
+
require 'os'
|
25
|
+
|
26
|
+
if OS.mac?
|
27
|
+
require 'fileutils'
|
28
|
+
home_dir = `echo ~`.strip
|
29
|
+
|
30
|
+
[
|
31
|
+
['.bash_profile', '.bashrc'],
|
32
|
+
['.zprofile', '.zshrc']
|
33
|
+
].each do |profile_and_fallback|
|
34
|
+
shell_profile_file_name = profile_and_fallback.first
|
35
|
+
shell_profile_file_name = profile_and_fallback.last if !File.exist?("#{home_dir}/#{shell_profile_file_name}")
|
36
|
+
shell_profile_file = "#{home_dir}/#{shell_profile_file_name}"
|
37
|
+
FileUtils.touch(shell_profile_file)
|
38
|
+
shell_profile = File.read(shell_profile_file)
|
39
|
+
glimmer_source_statement = 'export JRUBY_OPTS="$JRUBY_OPTS -J-XstartOnFirstThread"'
|
40
|
+
unless shell_profile.split("\n").detect {|line| line.include?(glimmer_source_statement) }
|
41
|
+
File.write(shell_profile_file, "#{shell_profile}\n#{glimmer_source_statement}")
|
42
|
+
end
|
43
|
+
puts "~/#{shell_profile_file_name} has been modified"
|
44
|
+
end
|
45
|
+
|
46
|
+
puts <<~OUTPUT
|
47
|
+
|
48
|
+
Before using `glimmer` or `girb`, start a new shell session in the same directory (open a new terminal tab and go to the same directory) or run the following command:
|
49
|
+
|
50
|
+
export JRUBY_OPTS="$JRUBY_OPTS -J-XstartOnFirstThread"
|
51
|
+
|
52
|
+
Afterwards, you may run the following commands:
|
53
|
+
|
54
|
+
glimmer
|
55
|
+
girb
|
56
|
+
|
57
|
+
OUTPUT
|
58
|
+
end
|
@@ -166,15 +166,12 @@ $ glimmer scaffold[greeter]
|
|
166
166
|
create Rakefile
|
167
167
|
create Gemfile
|
168
168
|
create LICENSE.txt
|
169
|
-
create README.
|
169
|
+
create README.markdown
|
170
170
|
create .document
|
171
171
|
create lib
|
172
|
-
create lib/
|
173
|
-
create spec
|
174
|
-
create spec/spec_helper.rb
|
175
|
-
create spec/greeter_spec.rb
|
172
|
+
create lib/snowboard_utah.rb
|
176
173
|
create .rspec
|
177
|
-
Juwelier has prepared your gem in ./
|
174
|
+
Juwelier has prepared your gem in ./snowboard_utah
|
178
175
|
Created greeter/.gitignore
|
179
176
|
Created greeter/.ruby-version
|
180
177
|
Created greeter/.ruby-gemset
|
@@ -183,17 +180,19 @@ Created greeter/LICENSE.txt
|
|
183
180
|
Created greeter/Gemfile
|
184
181
|
Created greeter/Rakefile
|
185
182
|
Created greeter/app/greeter.rb
|
186
|
-
Created greeter/app/
|
187
|
-
Created greeter/package/windows/
|
188
|
-
Created greeter/package/macosx/
|
189
|
-
Created greeter/package/linux/
|
183
|
+
Created greeter/app/greeter/view/app_view.rb
|
184
|
+
Created greeter/package/windows/Snowboard Utah.ico
|
185
|
+
Created greeter/package/macosx/Snowboard Utah.icns
|
186
|
+
Created greeter/package/linux/Snowboard Utah.png
|
187
|
+
Created greeter/app/greeter/launch.rb
|
190
188
|
Created greeter/bin/greeter
|
191
|
-
Created greeter/spec/spec_helper.rb
|
192
189
|
...
|
193
190
|
```
|
194
191
|
|
195
192
|
Eventually, it will launch an advanced "Hello, World!" app window having the title of your application ("Greeter").
|
196
193
|
|
194
|
+
(note: javapackager might claim at the end "Error: Bundler "DMG Installer" (dmg) failed to produce a bundle.", but it's a false negative since it works fully anyways)
|
195
|
+
|
197
196
|
![Glimmer Scaffold App](/images/glimmer-scaffolding-app.png)
|
198
197
|
|
199
198
|
It also comes with a boilerplate Preferences dialog.
|
@@ -256,21 +255,6 @@ You should see output like the following:
|
|
256
255
|
|
257
256
|
```
|
258
257
|
$ glimmer scaffold:desktopify[snowboard_utah,https://www.brightonresort.com]
|
259
|
-
Fetching kamelcase-0.0.2.gem
|
260
|
-
Fetching github_api-0.19.0.gem
|
261
|
-
Fetching highline-2.0.3.gem
|
262
|
-
Fetching juwelier-2.4.9.gem
|
263
|
-
Fetching hashie-3.6.0.gem
|
264
|
-
Fetching nokogiri-1.10.10-java.gem
|
265
|
-
Fetching semver2-3.4.2.gem
|
266
|
-
Successfully installed semver2-3.4.2
|
267
|
-
Successfully installed kamelcase-0.0.2
|
268
|
-
Successfully installed highline-2.0.3
|
269
|
-
Successfully installed hashie-3.6.0
|
270
|
-
Successfully installed github_api-0.19.0
|
271
|
-
Successfully installed nokogiri-1.10.10-java
|
272
|
-
Successfully installed juwelier-2.4.9
|
273
|
-
7 gems installed
|
274
258
|
create .gitignore
|
275
259
|
create Rakefile
|
276
260
|
create Gemfile
|
@@ -289,16 +273,19 @@ Created snowboard_utah/LICENSE.txt
|
|
289
273
|
Created snowboard_utah/Gemfile
|
290
274
|
Created snowboard_utah/Rakefile
|
291
275
|
Created snowboard_utah/app/snowboard_utah.rb
|
292
|
-
Created snowboard_utah/app/
|
276
|
+
Created snowboard_utah/app/snowboard_utah/view/app_view.rb
|
293
277
|
Created snowboard_utah/package/windows/Snowboard Utah.ico
|
294
278
|
Created snowboard_utah/package/macosx/Snowboard Utah.icns
|
295
279
|
Created snowboard_utah/package/linux/Snowboard Utah.png
|
280
|
+
Created snowboard_utah/app/snowboard_utah/launch.rb
|
296
281
|
Created snowboard_utah/bin/snowboard_utah
|
297
282
|
...
|
298
283
|
```
|
299
284
|
|
300
285
|
Eventually, it will launch a desktopified version of "https://www.brightonresort.com" having the title of ("Snowboard Utah").
|
301
286
|
|
287
|
+
(note: javapackager might claim at the end "Error: Bundler "DMG Installer" (dmg) failed to produce a bundle.", but it's a false negative since it works fully anyways)
|
288
|
+
|
302
289
|
Desktopified App on Mac
|
303
290
|
|
304
291
|
![Glimmer Scaffold App](/images/glimmer-scaffolding-desktopify.png)
|
@@ -570,10 +557,10 @@ Output:
|
|
570
557
|
|
571
558
|
Glimmer Custom Shape Gems at rubygems.org:
|
572
559
|
|
573
|
-
Name Gem Version Author Description
|
560
|
+
Name Gem Version Author Description
|
574
561
|
|
575
|
-
Bevel glimmer-cp-bevel 0.1.1 Andy Maleh Bevel - Glimmer Custom Shape
|
576
|
-
Stickfigure glimmer-cp-stickfigure 0.1.1 Andy Maleh Stick Figure - Glimmer Custom Shape
|
562
|
+
Bevel glimmer-cp-bevel 0.1.1 Andy Maleh Bevel - Glimmer Custom Shape
|
563
|
+
Stickfigure glimmer-cp-stickfigure 0.1.1 Andy Maleh Stick Figure - Glimmer Custom Shape
|
577
564
|
|
578
565
|
```
|
579
566
|
|
@@ -631,6 +618,8 @@ Or, the following on Mac:
|
|
631
618
|
jruby -J-XstartOnFirstThread -r glimmer-dsl-swt -S application.rb
|
632
619
|
```
|
633
620
|
|
621
|
+
Unless you ran `glimmer-setup`, which adds `JRUBY_OPTS` environment variable that includes the `-J-XstartOnFirstThread` option automatically so you would not have to specify manually.
|
622
|
+
|
634
623
|
If you want to use a specific custom version of SWT, run the following on Windows/Linux:
|
635
624
|
|
636
625
|
```
|
@@ -368,7 +368,7 @@ These proxy objects have an API and provide some convenience methods, some of wh
|
|
368
368
|
|
369
369
|
Glimmer SWT proxies come with the instance method `#swt_widget`, which returns the actual SWT `Widget` object wrapped by the Glimmer widget proxy. It is useful in cases you'd like to do some custom SWT programming outside of Glimmer.
|
370
370
|
|
371
|
-
##### Shell
|
371
|
+
##### Shell Widget Proxy Methods
|
372
372
|
|
373
373
|
Shell widget proxy has extra methods specific to SWT Shell:
|
374
374
|
- `#open`: Opens the shell, making it visible and active, and starting the SWT Event Loop (you may learn more about it here: https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Display.html). If shell was already open, but hidden, it makes the shell visible.
|
@@ -1040,6 +1040,10 @@ shell(:no_resize) {
|
|
1040
1040
|
}
|
1041
1041
|
```
|
1042
1042
|
|
1043
|
+
##### Fill Screen Window
|
1044
|
+
|
1045
|
+
SWT Shell can open and fill the screen with this style `swt(:fill_screen)`. This makes it have the size of the display, thus filling the screen. Keep in mind that this is different from being maximized (which is a special window state, not just filling the screen).
|
1046
|
+
|
1043
1047
|
### Widget Properties
|
1044
1048
|
|
1045
1049
|
Widget properties such as text value, enablement, visibility, and layout details are set within the widget block using methods matching SWT widget property names in lower snakecase. You may refer to SWT widget guide for details on available widget properties:
|
@@ -3471,7 +3475,7 @@ shell { |app_shell|
|
|
3471
3475
|
}.open
|
3472
3476
|
```
|
3473
3477
|
|
3474
|
-
If you use a Custom Shell as the top-level app shell, you may invoke the class method
|
3478
|
+
If you use a Custom Shell as the top-level app shell, you may invoke the class method `.launch` instead to avoid building an app class yourself or including Glimmer into the top-level namespace (e.g. `Tetris.launch` instead of `include Glimmer; tetris.open`)
|
3475
3479
|
|
3476
3480
|
You may check out [Hello, Custom Shell!](GLIMMER_SAMPLES.md#hello-custom-shell) for another example.
|
3477
3481
|
|
@@ -20,6 +20,12 @@ You may choose to generate a specific type of packaging instead by addionally pa
|
|
20
20
|
glimmer package[msi]
|
21
21
|
```
|
22
22
|
|
23
|
+
Make sure to surround with double-quotes when running from ZShell (zsh):
|
24
|
+
|
25
|
+
```
|
26
|
+
glimmer "package[msi]"
|
27
|
+
```
|
28
|
+
|
23
29
|
- Available Mac packaging types are `dmg`, `pkg`, and `image` (image means a pure Mac `app` without a setup program). Keep in mind that the packages you produce are compatible with the same MacOS you are on or older.
|
24
30
|
- Available Windows packaging types are `msi`, `exe`, and `image` (image means a Windows application directory without a setup program). Learn more about Windows packaging are [over here](#windows-application-packaging).
|
25
31
|
|
@@ -190,7 +196,7 @@ Currently, `Glimmer::RakeTask::Package.javapackager_extra_args` is only honored
|
|
190
196
|
You can get around that in zsh by running glimmer package commands with `bash -c` prefix:
|
191
197
|
|
192
198
|
```
|
193
|
-
bash -c 'glimmer package'
|
199
|
+
bash -c 'source ~/.glimmer_source; glimmer package'
|
194
200
|
```
|
195
201
|
|
196
202
|
4. Java on Windows System PATH
|
@@ -2,7 +2,9 @@
|
|
2
2
|
- [Hello Samples](#hello-samples)
|
3
3
|
- [Hello, World!](#hello-world)
|
4
4
|
- [Hello, Tab!](#hello-tab)
|
5
|
+
- [Hello, C Tab!](#hello-c-tab)
|
5
6
|
- [Hello, Combo!](#hello-combo)
|
7
|
+
- [Hello, C Combo!](#hello-c-combo)
|
6
8
|
- [Hello, List Single Selection!](#hello-list-single-selection)
|
7
9
|
- [Hello, List Multi Selection!](#hello-list-multi-selection)
|
8
10
|
- [Hello, Computed!](#hello-computed)
|
@@ -101,6 +103,18 @@ Code:
|
|
101
103
|
![Hello Tab English](/images/glimmer-hello-tab-english.png)
|
102
104
|
![Hello Tab French](/images/glimmer-hello-tab-french.png)
|
103
105
|
|
106
|
+
#### Hello, C Tab!
|
107
|
+
|
108
|
+
This sample demonstrates custom tab widget usage (`c_tab_folder` and `c_tab_item`), which supports more customizations to tab fonts/background/foreground colors and display of extra additional tabs via a drop down.
|
109
|
+
|
110
|
+
Code:
|
111
|
+
|
112
|
+
[samples/hello/hello_c_tab.rb](/samples/hello/hello_c_tab.rb)
|
113
|
+
|
114
|
+
![Hello C Tab](/images/glimmer-hello-c-tab.png)
|
115
|
+
![Hello C Tab Extra Tabs](/images/glimmer-hello-c-tab-extra-tabs.png)
|
116
|
+
![Hello C Tab Other Tab](/images/glimmer-hello-c-tab-other-tab.png)
|
117
|
+
|
104
118
|
#### Hello, Combo!
|
105
119
|
|
106
120
|
This sample demonstrates combo data-binding.
|
@@ -112,6 +126,17 @@ Code:
|
|
112
126
|
![Hello Combo](/images/glimmer-hello-combo.png)
|
113
127
|
![Hello Combo Expanded](/images/glimmer-hello-combo-expanded.png)
|
114
128
|
|
129
|
+
#### Hello, C Combo!
|
130
|
+
|
131
|
+
This sample demonstrates the custom combo variation on combo, which allows the adjustment of the combo height based on font height or layout data.
|
132
|
+
|
133
|
+
Code:
|
134
|
+
|
135
|
+
[samples/hello/hello_c_combo.rb](/samples/hello/hello_c_combo.rb)
|
136
|
+
|
137
|
+
![Hello Combo](/images/glimmer-hello-c-combo.png)
|
138
|
+
![Hello Combo Expanded](/images/glimmer-hello-c-combo-expanded.png)
|
139
|
+
|
115
140
|
#### Hello, List Single Selection!
|
116
141
|
|
117
142
|
This sample demonstrates list single-selection data-binding.
|