README.md in glimmer-dsl-swt-4.17.10.4 vs README.md in glimmer-dsl-swt-4.17.10.5
- old
+ new
@@ -1,6 +1,6 @@
-# [<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.17.10.4
+# [<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.17.10.5
## JRuby Desktop Development GUI Framework
[![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
[![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
[![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/glimmer-dsl-swt/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/glimmer-dsl-swt?branch=master)
@@ -59,12 +59,10 @@
Glimmer code (from [samples/elaborate/tic_tac_toe.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/elaborate/tic_tac_toe.rb)):
```ruby
# ...
- @tic_tac_toe_board = Board.new
-
@shell = shell {
text "Tic-Tac-Toe"
minimum_size 150, 178
composite {
grid_layout 3, true
@@ -81,15 +79,10 @@
}
}
}
}
}
-
- observe(@tic_tac_toe_board, :game_status) { |game_status|
- display_win_message if game_status == Board::WIN
- display_draw_message if game_status == Board::DRAW
- }
# ...
```
Run via `glimmer samples` or directly:
@@ -359,10 +352,11 @@
- [Hello, Directory Dialog!](#hello-directory-dialog)
- [Hello, File Dialog!](#hello-file-dialog)
- [Hello, Date Time!](#hello-date-time)
- [Hello, Spinner!](#hello-spinner)
- [Hello, Table!](#hello-table)
+ - [Hello, Button!](#hello-button)
- [Elaborate Samples](#elaborate-samples)
- [User Profile](#user-profile)
- [Login](#login)
- [Tic Tac Toe Sample](#tic-tac-toe-sample)
- [Contact Manager Sample](#contact-manager-sample)
@@ -452,11 +446,11 @@
jgem install glimmer-dsl-swt
```
Or this command if you want a specific version:
```
-jgem install glimmer-dsl-swt -v 4.17.10.4
+jgem install glimmer-dsl-swt -v 4.17.10.5
```
`jgem` is JRuby's version of `gem` command.
RVM allows running `gem install` directly as an alias.
@@ -529,11 +523,11 @@
### Advanced Usage
Below are the full usage instructions that come up when running `glimmer` without args.
```
-Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.4
+Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.5
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
Runs Glimmer applications and tasks.
@@ -707,11 +701,11 @@
glimmer bin/greeter
```
#### Desktopify
-This scaffolding mode enables you to desktopify a web app. Glimmer Scaffolding basically turns a website into a desktop application by wrapping the website with a [Browser Widget](#browser-widget).
+Desktopify basically turns a website into a desktop application by wrapping the website within a [Browser Widget](#browser-widget).
The desktopify app is similar to the standard scaffolded app. It can be extended and the [browser may even be instrumented](https://help.eclipse.org/2020-09/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html).
The app even remembers your cookies if you log into the website, close the app, and reopen again.
@@ -1007,11 +1001,11 @@
Name Gem Version Author Description
Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
Opal glimmer-dsl-opal 0.4.0 AndyMaleh Glimmer DSL for Opal
- Swt glimmer-dsl-swt 4.17.10.4
+ Swt glimmer-dsl-swt 4.17.10.5
AndyMaleh Glimmer DSL for SWT
Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
```
@@ -4018,9 +4012,25 @@
![Hello Table](images/glimmer-hello-table-game-booked.png)
Hello, Table! Context Menu
![Hello Table](images/glimmer-hello-table-context-menu.png)
+
+#### Hello, Button!
+
+This sample demonstrates the use of `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
+
+Code:
+
+[samples/hello/hello_button.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_button.rb)
+
+Hello, Button!
+
+![Hello Button](images/glimmer-hello-button.png)
+
+Hello, Button! Incremented 7 times!
+
+![Hello Button Incremented](images/glimmer-hello-button-incremented.png)
### Elaborate Samples
For more elaborate samples, check the following: