glimmer-dsl-swt 4.17.10.4 → 4.17.10.5

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: 1fb2ca2da3bc7253db8416bc1395423988fee5296324c89fa06d380cb568f28e
4
- data.tar.gz: 3924772c16691aafe3a8cdcdc05ef0e9aa566a6843642a987e7ac0e7348c63ec
3
+ metadata.gz: 811cbe738d6049291f6f00f32234ebef5af6d334009136314a309bf96807d863
4
+ data.tar.gz: f2618026dc2b90cd076a75ffde44334aac013dc412afd23368cc0f072c4b5ed5
5
5
  SHA512:
6
- metadata.gz: 38e692d156d993f29e9b362e8beb34c03eeb933b0d89a1d29c957e033da6f2356408032c03a2e3cfb69d66c0feb1f5c1b863705c40e2ddf55f2282efdf2d18d0
7
- data.tar.gz: f9c23c58000fc174b8e6c83b430f117b4ed08ab305510a1f3ee7e1262af6ddb5105e60208be95a92d2bf5adb38501822fe9a8d1bde8fb25f3ee4b70047643858
6
+ metadata.gz: ad40ab20b33c48f575ac525b88e1c6c3fd38a5db937416afa748b6d4700f0b0930a3dbf000b69c3ac03cbdc092510762aeacc8a1588616679db6a783ce26fbfc
7
+ data.tar.gz: 6bc20ea164c4fda7e35e5400ceb6e864205dc6be59eefc98a296f3df3fd795594b2f054988cbdd55ac6d0bbf555546dfdcad8231906a810ef099212420749aae
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.17.10.5
4
+
5
+ - Hello, Button! Sample
6
+
3
7
  ### 4.17.10.4
4
8
 
5
9
  - Do not select first row in a table by default (keep unselected)
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.17.10.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.17.10.5
2
2
 
3
3
  ## JRuby Desktop Development GUI Framework
4
4
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
@@ -61,8 +61,6 @@ Glimmer code (from [samples/elaborate/tic_tac_toe.rb](https://github.com/AndyObt
61
61
 
62
62
  ```ruby
63
63
  # ...
64
- @tic_tac_toe_board = Board.new
65
-
66
64
  @shell = shell {
67
65
  text "Tic-Tac-Toe"
68
66
  minimum_size 150, 178
@@ -83,11 +81,6 @@ Glimmer code (from [samples/elaborate/tic_tac_toe.rb](https://github.com/AndyObt
83
81
  }
84
82
  }
85
83
  }
86
-
87
- observe(@tic_tac_toe_board, :game_status) { |game_status|
88
- display_win_message if game_status == Board::WIN
89
- display_draw_message if game_status == Board::DRAW
90
- }
91
84
  # ...
92
85
  ```
93
86
 
@@ -361,6 +354,7 @@ Glimmer App:
361
354
  - [Hello, Date Time!](#hello-date-time)
362
355
  - [Hello, Spinner!](#hello-spinner)
363
356
  - [Hello, Table!](#hello-table)
357
+ - [Hello, Button!](#hello-button)
364
358
  - [Elaborate Samples](#elaborate-samples)
365
359
  - [User Profile](#user-profile)
366
360
  - [Login](#login)
@@ -454,7 +448,7 @@ jgem install glimmer-dsl-swt
454
448
 
455
449
  Or this command if you want a specific version:
456
450
  ```
457
- jgem install glimmer-dsl-swt -v 4.17.10.4
451
+ jgem install glimmer-dsl-swt -v 4.17.10.5
458
452
 
459
453
  ```
460
454
 
@@ -531,7 +525,7 @@ bin/glimmer samples
531
525
  Below are the full usage instructions that come up when running `glimmer` without args.
532
526
 
533
527
  ```
534
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.4
528
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.5
535
529
 
536
530
 
537
531
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
@@ -709,7 +703,7 @@ glimmer bin/greeter
709
703
 
710
704
  #### Desktopify
711
705
 
712
- 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).
706
+ Desktopify basically turns a website into a desktop application by wrapping the website within a [Browser Widget](#browser-widget).
713
707
 
714
708
  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).
715
709
 
@@ -1009,7 +1003,7 @@ Output:
1009
1003
 
1010
1004
  Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
1011
1005
  Opal glimmer-dsl-opal 0.4.0 AndyMaleh Glimmer DSL for Opal
1012
- Swt glimmer-dsl-swt 4.17.10.4
1006
+ Swt glimmer-dsl-swt 4.17.10.5
1013
1007
  AndyMaleh Glimmer DSL for SWT
1014
1008
  Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
1015
1009
  Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
@@ -4021,6 +4015,22 @@ Hello, Table! Context Menu
4021
4015
 
4022
4016
  ![Hello Table](images/glimmer-hello-table-context-menu.png)
4023
4017
 
4018
+ #### Hello, Button!
4019
+
4020
+ This sample demonstrates the use of `button` widget in Glimmer, including data-binding and click event triggering via `on_widget_selected`.
4021
+
4022
+ Code:
4023
+
4024
+ [samples/hello/hello_button.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_button.rb)
4025
+
4026
+ Hello, Button!
4027
+
4028
+ ![Hello Button](images/glimmer-hello-button.png)
4029
+
4030
+ Hello, Button! Incremented 7 times!
4031
+
4032
+ ![Hello Button Incremented](images/glimmer-hello-button-incremented.png)
4033
+
4024
4034
  ### Elaborate Samples
4025
4035
 
4026
4036
  For more elaborate samples, check the following:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.17.10.4
1
+ 4.17.10.5
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer-dsl-swt 4.17.10.4 ruby lib
5
+ # stub: glimmer-dsl-swt 4.17.10.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer-dsl-swt".freeze
9
- s.version = "4.17.10.4"
9
+ s.version = "4.17.10.5"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["AndyMaleh".freeze]
14
- s.date = "2020-12-02"
15
- s.description = "Glimmer DSL for SWT (JRuby Desktop Development GUI Library)".freeze
14
+ s.date = "2020-12-09"
15
+ s.description = "Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.executables = ["glimmer".freeze, "girb".freeze]
18
18
  s.extra_rdoc_files = [
@@ -131,6 +131,7 @@ Gem::Specification.new do |s|
131
131
  "samples/elaborate/tic_tac_toe/cell.rb",
132
132
  "samples/elaborate/user_profile.rb",
133
133
  "samples/hello/hello_browser.rb",
134
+ "samples/hello/hello_button.rb",
134
135
  "samples/hello/hello_checkbox.rb",
135
136
  "samples/hello/hello_checkbox_group.rb",
136
137
  "samples/hello/hello_combo.rb",
@@ -0,0 +1,46 @@
1
+ # Copyright (c) 2007-2020 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
+ class HelloButton
23
+ include Glimmer
24
+
25
+ attr_accessor :count
26
+
27
+ def initialize
28
+ @count = 0
29
+ end
30
+
31
+ def launch
32
+ shell {
33
+ text 'Hello, Button!'
34
+
35
+ button {
36
+ text bind(self, :count) {|value| "Click To Increment: #{value} "}
37
+
38
+ on_widget_selected {
39
+ self.count += 1
40
+ }
41
+ }
42
+ }.open
43
+ end
44
+ end
45
+
46
+ HelloButton.new.launch
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.17.10.4
4
+ version: 4.17.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-02 00:00:00.000000000 Z
11
+ date: 2020-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -310,7 +310,7 @@ dependencies:
310
310
  - - "~>"
311
311
  - !ruby/object:Gem::Version
312
312
  version: 0.7.0
313
- description: Glimmer DSL for SWT (JRuby Desktop Development GUI Library)
313
+ description: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
314
314
  email: andy.am@gmail.com
315
315
  executables:
316
316
  - glimmer
@@ -431,6 +431,7 @@ files:
431
431
  - samples/elaborate/tic_tac_toe/cell.rb
432
432
  - samples/elaborate/user_profile.rb
433
433
  - samples/hello/hello_browser.rb
434
+ - samples/hello/hello_button.rb
434
435
  - samples/hello/hello_checkbox.rb
435
436
  - samples/hello/hello_checkbox_group.rb
436
437
  - samples/hello/hello_combo.rb