glimmer-dsl-swt 4.18.7.5 → 4.18.7.6

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: 624d10930b3ed1e17b60131a6e42825b58c8b997e04ec3169099bc10f994e3e4
4
- data.tar.gz: d05163b01c26b519866d831cd54d849632367270582c25e8237455cb18e2ed69
3
+ metadata.gz: f9004ad05389af266956ee36a467e07fa97845f64d8717e0c24b716ae81420ac
4
+ data.tar.gz: f78e73a1b5708769a03e5ad4747df729e7cbe93e9922845d35c5ae0cdba98bc5
5
5
  SHA512:
6
- metadata.gz: 424f2c3aeecef6728ea5b2cfe1c00c6afda10b11f04bd14fa59150bc6e2fb07f4738c3deb681882431f13a2b0a8d6cbf292ef1f00ac2b5732f253830e13f00df
7
- data.tar.gz: b0e44958872f55f23301191105dce94b4b59ecd60a4349a07caf0b4191bd37ba075d0f9dc1ff988598cfb922ebf5e133c589a3c693368e6d656c5ecf37691d57
6
+ metadata.gz: 6496f86ebe9ddd173de6d9d3853e6ea4bb39e069eed9951c0c4756647cc518cce4fe174918f18f6f05d18bd6a74fb474824e92c29bb0f57db9bcc9f72357e732
7
+ data.tar.gz: b78d493257309b1cf703b0e6894cd1158b1101be393cf85362ab210a6ce23cdd07ca254ab50f92d7e0251eb309dccf1478b77e71e06dccfbd2dc1b23cfee0bdb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.18.7.6
4
+
5
+ - Update the Hello, Code Text! sample to use data-binding
6
+ - Fix issue with `code_text` data-binding
7
+
3
8
  ### 4.18.7.5
4
9
 
5
10
  - Update `ImageProxy` with missing methods `#size`, `#parent_proxy`, and `#parent`, needed for a better "Shapes in an Image" support.
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.18.7.5
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.18.7.6
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.7.5 includes [SWT 4.18](https://download.eclipse.org/eclipse/downloads/drops4/R-4.18-202012021800/), which was released on December 2, 2020. 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.
18
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.18.7.6 includes [SWT 4.18](https://download.eclipse.org/eclipse/downloads/drops4/R-4.18-202012021800/), which was released on December 2, 2020. 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
 
@@ -342,7 +342,7 @@ 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.18.7.5
345
+ jgem install glimmer-dsl-swt -v 4.18.7.6
346
346
  ```
347
347
 
348
348
  `jgem` is JRuby's version of `gem` command.
@@ -360,7 +360,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
360
360
 
361
361
  Add the following to `Gemfile`:
362
362
  ```
363
- gem 'glimmer-dsl-swt', '~> 4.18.7.5'
363
+ gem 'glimmer-dsl-swt', '~> 4.18.7.6'
364
364
  ```
365
365
 
366
366
  And, then run:
@@ -381,7 +381,7 @@ glimmer
381
381
  ```
382
382
 
383
383
  ```
384
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.18.7.5
384
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.18.7.6
385
385
 
386
386
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
387
387
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.18.7.5
1
+ 4.18.7.6
@@ -569,10 +569,11 @@ Output:
569
569
  ```
570
570
 
571
571
  Glimmer Custom Shape Gems at rubygems.org:
572
-
573
- Name Gem Version Author Description
574
-
575
- Bevel glimmer-cp-bevel 0.1.0 Andy Maleh Bevel - Glimmer Custom Shape
572
+
573
+ Name Gem Version Author Description
574
+
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
576
577
 
577
578
  ```
578
579
 
@@ -2,16 +2,16 @@
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.18.7.5 ruby lib
5
+ # stub: glimmer-dsl-swt 4.18.7.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer-dsl-swt".freeze
9
- s.version = "4.18.7.5"
9
+ s.version = "4.18.7.6"
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 = "2021-03-13"
14
+ s.date = "2021-03-15"
15
15
  s.description = "Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) is a native-GUI cross-platform desktop development library written in JRuby, an OS-threaded faster JVM version of Ruby. Glimmer's main innovation is a declarative Ruby DSL that enables productive and efficient authoring of desktop application user-interfaces by relying on the robust Eclipse SWT library. Glimmer additionally innovates by having built-in data-binding support, which greatly facilitates synchronizing the GUI with domain models, thus achieving true decoupling of object oriented components and enabling developers to solve business problems (test-first) without worrying about GUI concerns, or alternatively drive development GUI-first, and then write clean business models (test-first) afterwards. Not only does Glimmer provide a large set of GUI widgets, but it also supports drawing Canvas Graphics like Shapes and Animations. To get started quickly, Glimmer offers scaffolding options for Apps, Gems, and Custom Widgets. Glimmer also includes native-executable packaging support, sorely lacking in other libraries, thus enabling the delivery of desktop apps written in Ruby as truly native DMG/PKG/APP files on the Mac + App Store, MSI/EXE files on Windows, and Gem Packaged Shell Scripts on Linux.".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.executables = ["glimmer".freeze, "girb".freeze]
@@ -250,7 +250,7 @@ Gem::Specification.new do |s|
250
250
  s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.2.0"])
251
251
  s.add_runtime_dependency(%q<super_module>.freeze, [">= 1.4.1", "< 2.0.0"])
252
252
  s.add_runtime_dependency(%q<nested_inherited_jruby_include_package>.freeze, [">= 0.3.0", "< 2.0.0"])
253
- s.add_runtime_dependency(%q<puts_debuggerer>.freeze, [">= 0.11.0", "< 2.0.0"])
253
+ s.add_runtime_dependency(%q<puts_debuggerer>.freeze, [">= 0.12.0", "< 2.0.0"])
254
254
  s.add_runtime_dependency(%q<rake-tui>.freeze, [">= 0.2.3", "< 2.0.0"])
255
255
  s.add_runtime_dependency(%q<logging>.freeze, [">= 2.3.0", "< 3.0.0"])
256
256
  s.add_runtime_dependency(%q<os>.freeze, [">= 1.0.0", "< 2.0.0"])
@@ -268,7 +268,7 @@ Gem::Specification.new do |s|
268
268
  s.add_dependency(%q<glimmer>.freeze, ["~> 1.2.0"])
269
269
  s.add_dependency(%q<super_module>.freeze, [">= 1.4.1", "< 2.0.0"])
270
270
  s.add_dependency(%q<nested_inherited_jruby_include_package>.freeze, [">= 0.3.0", "< 2.0.0"])
271
- s.add_dependency(%q<puts_debuggerer>.freeze, [">= 0.11.0", "< 2.0.0"])
271
+ s.add_dependency(%q<puts_debuggerer>.freeze, [">= 0.12.0", "< 2.0.0"])
272
272
  s.add_dependency(%q<rake-tui>.freeze, [">= 0.2.3", "< 2.0.0"])
273
273
  s.add_dependency(%q<logging>.freeze, [">= 2.3.0", "< 3.0.0"])
274
274
  s.add_dependency(%q<os>.freeze, [">= 1.0.0", "< 2.0.0"])
@@ -287,7 +287,7 @@ Gem::Specification.new do |s|
287
287
  s.add_dependency(%q<glimmer>.freeze, ["~> 1.2.0"])
288
288
  s.add_dependency(%q<super_module>.freeze, [">= 1.4.1", "< 2.0.0"])
289
289
  s.add_dependency(%q<nested_inherited_jruby_include_package>.freeze, [">= 0.3.0", "< 2.0.0"])
290
- s.add_dependency(%q<puts_debuggerer>.freeze, [">= 0.11.0", "< 2.0.0"])
290
+ s.add_dependency(%q<puts_debuggerer>.freeze, [">= 0.12.0", "< 2.0.0"])
291
291
  s.add_dependency(%q<rake-tui>.freeze, [">= 0.2.3", "< 2.0.0"])
292
292
  s.add_dependency(%q<logging>.freeze, [">= 2.3.0", "< 3.0.0"])
293
293
  s.add_dependency(%q<os>.freeze, [">= 1.0.0", "< 2.0.0"])
@@ -64,16 +64,28 @@ module Glimmer
64
64
  respond_to?(method_name)
65
65
  end
66
66
 
67
+ def can_add_observer?(attribute_name)
68
+ @styled_text_proxy&.can_add_observer?(attribute_name) || super
69
+ end
70
+
71
+ def add_observer(observer, attribute_name)
72
+ if @styled_text_proxy&.can_add_observer?(attribute_name)
73
+ @styled_text_proxy.add_observer(observer, attribute_name)
74
+ else
75
+ super
76
+ end
77
+ end
78
+
67
79
  def can_handle_observation_request?(observation_request)
68
- @styled_text_proxy.can_handle_observation_request?(observation_request)
69
- rescue
70
- super
80
+ @styled_text_proxy&.can_handle_observation_request?(observation_request) || super
71
81
  end
72
-
82
+
73
83
  def handle_observation_request(observation_request, &block)
74
- @styled_text_proxy.handle_observation_request(observation_request, &block)
75
- rescue
76
- super
84
+ if @styled_text_proxy&.can_handle_observation_request?(observation_request)
85
+ @styled_text_proxy.handle_observation_request(observation_request, &block)
86
+ else
87
+ super
88
+ end
77
89
  end
78
90
 
79
91
  def root_block=(block)
@@ -21,86 +21,154 @@
21
21
 
22
22
  require 'glimmer-dsl-swt'
23
23
 
24
- include Glimmer
25
-
26
- shell {
27
- minimum_size 640, 480
28
- text 'Hello, Code Text!'
24
+ class HelloCodeText
25
+ include Glimmer::UI::CustomShell
29
26
 
30
- tab_folder {
31
- tab_item {
32
- fill_layout
33
- text 'Ruby (glimmer theme)'
34
- code_text(language: 'ruby', theme: 'glimmer', lines: true) {
35
- text <<~CODE
36
- greeting = 'Hello, World!'
37
-
38
- include Glimmer
39
-
40
- shell {
41
- text 'Glimmer'
42
-
43
- label {
44
- text greeting
45
- font height: 30, style: :bold
46
- }
47
- }.open
48
- CODE
27
+ attr_accessor :ruby_code, :js_code, :html_code
28
+
29
+ before_body {
30
+ self.ruby_code = <<~RUBY
31
+ greeting = 'Hello, World!'
32
+
33
+ include Glimmer
34
+
35
+ shell {
36
+ text 'Glimmer'
37
+
38
+ label {
39
+ text greeting
40
+ font height: 30, style: :bold
41
+ }
42
+ }.open
43
+ RUBY
44
+
45
+ self.js_code = <<~JS
46
+ function greet(greeting) {
47
+ alert(greeting);
49
48
  }
50
- }
51
- tab_item {
52
- fill_layout
53
- text 'JavaScript (pastie theme)'
54
- # No border (SWT styles are passed explicitly)
55
- code_text(:multi, :h_scroll, :v_scroll, language: 'javascript', theme: 'pastie', lines: {width: 2}) {
56
- # With lines, the custom widget has a root composite, which can be configured separately
57
- root {
58
- grid_layout(2, false) {
59
- margin_width 2
49
+
50
+ var greetingString = 'Hello, World!';
51
+
52
+ greet(greetingString);
53
+
54
+ var moreGreetings = ['Howdy!', 'Aloha!', 'Hey!']
55
+
56
+ for(var greeting of moreGreetings) {
57
+ greet(greeting)
58
+ }
59
+ JS
60
+
61
+ self.html_code = <<~HTML
62
+ <html>
63
+ <body>
64
+ <section class="accordion">
65
+ <form method="post" id="name">
66
+ <label for="name">
67
+ Name
68
+ </label>
69
+ <input name="name" type="text" />
70
+ <input type="submit" />
71
+ </form>
72
+ </section>
73
+ </body>
74
+ </html>
75
+ HTML
76
+ }
77
+
78
+ body {
79
+ shell {
80
+ minimum_size 640, 480
81
+ text 'Hello, Code Text!'
82
+
83
+ tab_folder {
84
+ tab_item {
85
+ fill_layout
86
+ text 'Ruby (glimmer)'
87
+ code_text(language: 'ruby', theme: 'glimmer', lines: true) {
88
+ text bind(self, :ruby_code)
60
89
  }
61
- background :white
62
90
  }
63
- # With lines, the line numbers widget can be configured separately
64
- line_numbers {
65
- background :white
91
+ tab_item {
92
+ fill_layout
93
+ text 'Ruby (pastie)'
94
+ code_text(language: 'ruby', theme: 'pastie', lines: {width: 2}) {
95
+ text bind(self, :ruby_code)
96
+ }
66
97
  }
67
- text <<~CODE
68
- function greet(greeting) {
69
- alert(greeting);
98
+ tab_item {
99
+ fill_layout
100
+ text 'Ruby (github)'
101
+ code_text(language: 'ruby', theme: 'github', lines: false) {
102
+ text bind(self, :ruby_code)
70
103
  }
71
-
72
- var greetingString = 'Hello, World!';
73
-
74
- greet(greetingString);
75
-
76
- var moreGreetings = ['Howdy!', 'Aloha!', 'Hey!']
77
-
78
- for(var greeting of moreGreetings) {
79
- greet(greeting)
104
+ }
105
+ tab_item {
106
+ fill_layout
107
+ text 'JavaScript (glimmer)'
108
+ # No border (SWT styles are passed explicitly)
109
+ code_text(:multi, :h_scroll, :v_scroll, language: 'javascript', theme: 'glimmer', lines: true) {
110
+ # With lines, the custom widget has a root composite, which can be configured separately
111
+ root {
112
+ grid_layout(2, false) {
113
+ margin_width 2
114
+ }
115
+ background :white
116
+ }
117
+ # With lines, the line numbers widget can be configured separately
118
+ line_numbers {
119
+ background :white
120
+ }
121
+ text bind(self, :js_code)
80
122
  }
81
- CODE
82
- }
83
- }
84
- tab_item {
85
- fill_layout
86
- text 'HTML (github theme)'
87
- code_text(language: 'html', theme: 'github') {
88
- text <<~CODE
89
- <html>
90
- <body>
91
- <section class="accordion">
92
- <form method="post" id="name">
93
- <label for="name">
94
- Name
95
- </label>
96
- <input name="name" type="text" />
97
- <input type="submit" />
98
- </form>
99
- </section>
100
- </body>
101
- </html>
102
- CODE
123
+ }
124
+ tab_item {
125
+ fill_layout
126
+ text 'JavaScript (pastie)'
127
+ code_text(:multi, :h_scroll, :v_scroll, language: 'javascript', theme: 'pastie', lines: {width: 2}) {
128
+ root {
129
+ grid_layout(2, false) {
130
+ margin_width 2
131
+ }
132
+ background :white
133
+ }
134
+ line_numbers {
135
+ background :white
136
+ }
137
+ text bind(self, :js_code)
138
+ }
139
+ }
140
+ tab_item {
141
+ fill_layout
142
+ text 'JavaScript (github)'
143
+ code_text(:multi, :h_scroll, :v_scroll, language: 'javascript', theme: 'github') { # default is lines: false
144
+ text bind(self, :js_code)
145
+ }
146
+ }
147
+ tab_item {
148
+ fill_layout
149
+ text 'HTML (glimmer)'
150
+ code_text(language: 'html', theme: 'glimmer', lines: true) {
151
+ text bind(self, :html_code)
152
+ }
153
+ }
154
+ tab_item {
155
+ fill_layout
156
+ text 'HTML (pastie)'
157
+ code_text(language: 'html', theme: 'pastie', lines: {width: 2}) {
158
+ text bind(self, :html_code)
159
+ }
160
+ }
161
+ tab_item {
162
+ fill_layout
163
+ text 'HTML (github)'
164
+ code_text(language: 'html', theme: 'github') { # default is lines: false
165
+ text bind(self, :html_code)
166
+ }
167
+ }
103
168
  }
104
169
  }
105
170
  }
106
- }.open
171
+
172
+ end
173
+
174
+ HelloCodeText.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.18.7.5
4
+ version: 4.18.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-13 00:00:00.000000000 Z
11
+ date: 2021-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 0.11.0
72
+ version: 0.12.0
73
73
  - - "<"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.0.0
@@ -80,7 +80,7 @@ dependencies:
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 0.11.0
83
+ version: 0.12.0
84
84
  - - "<"
85
85
  - !ruby/object:Gem::Version
86
86
  version: 2.0.0