glimmer 0.7.5 → 0.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: 711519083aeec2914eccf820d3c43a799b2f688f04f7ae99403bee8a1bd0985c
4
- data.tar.gz: f9121704b98f1f0186be043275873d80c15cd93427b6bfc5580473c379135d0b
3
+ metadata.gz: 94497522f529a193db5b827f739dcf4eab4a23c0c0ac583d7352cd7bd8270a83
4
+ data.tar.gz: a7a6a6ff9816f5be2422b5bd53c020f8152b47a436cd2cc805690e3af3cb5612
5
5
  SHA512:
6
- metadata.gz: cfa41f350b10c401ab3da3bcb8ddd065a53742771b09569f9502c0b57b492637a1d1333ebe8fc1123813772ed016d64130093c5f78518a196b8cf813446dc51b
7
- data.tar.gz: 85fae54ea7fdaa91f709bae749725f4b8b2bd3cd6c7c23889e1a812a0f5739f8d659e699fc8cb6d75fb6914bcde1f4ab9ff7145e60150732692d9a9d9d729773
6
+ metadata.gz: '095cae0665dbdb73713608a2b2ba9029e0693a33796e4e61ee8463f7f4dcdb385ef04f6fa5f1b3ef2cc48db11492b6bb1c6adff6eeb9de89639a7a1993c3ae1a'
7
+ data.tar.gz: 5513aac74d33b07ee14dbc430938e1f059a5a76a842d6dbbfef2b29c5fede52f2c57a3aea2053835b411da346bd3c7dca9bdddea385742363a6bf6ed8dbb7d40
@@ -1,6 +1,7 @@
1
- # Glimmer 0.7.5 Beta (Desktop Development Library for Ruby)
1
+ # Glimmer 0.7.6 Beta (Desktop Development Library for Ruby)
2
2
  [![Gem Version](https://badge.fury.io/rb/glimmer.svg)](http://badge.fury.io/rb/glimmer)
3
- [![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/glimmer/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/glimmer?branch=master)
3
+ [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer)
4
+ <!-- [![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/glimmer/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/glimmer?branch=master) -->
4
5
 
5
6
  Glimmer is a native-UI cross-platform desktop development library written in Ruby. Glimmer's main innovation is a JRuby DSL that enables productive and efficient authoring of desktop application user-interfaces while relying on the robust Eclipse SWT library. Glimmer additionally innovates by having built-in data-binding support to greatly facilitate synchronizing the UI with domain models. As a result, that achieves true decoupling of object oriented components, enabling developers to solve business problems without worrying about UI concerns, or alternatively drive development UI-first, and then write clean business models test-first afterwards.
6
7
 
@@ -73,12 +74,10 @@ NOTE: Glimmer is in beta mode. Please help make better by adopting for small or
73
74
 
74
75
  ## Table of Contents
75
76
 
76
- <!-- TOC START min:1 max:3 link:true asterisk:false update:true -->
77
- - [Glimmer 0.7.5 Beta (JRuby Desktop UI DSL + Data-Binding)](#glimmer-058-beta-jruby-desktop-ui-dsl--data-binding)
77
+ - [Glimmer 0.7.6 Beta (Desktop Development Library for Ruby)](#glimmer-075-beta-desktop-development-library-for-ruby)
78
78
  - [Examples](#examples)
79
- - [Hello World](#hello-world)
79
+ - [Hello, World!](#hello-world)
80
80
  - [Tic Tac Toe](#tic-tac-toe)
81
- - [Table of Contents](#table-of-contents)
82
81
  - [Background](#background)
83
82
  - [Platform Support](#platform-support)
84
83
  - [Pre-requisites](#pre-requisites)
@@ -88,6 +87,7 @@ NOTE: Glimmer is in beta mode. Please help make better by adopting for small or
88
87
  - [Glimmer Command](#glimmer-command)
89
88
  - [Basic Usage](#basic-usage)
90
89
  - [Advanced Usage](#advanced-usage)
90
+ - [Scaffolding](#scaffolding)
91
91
  - [Girb (Glimmer irb) Command](#girb-glimmer-irb-command)
92
92
  - [Glimmer DSL Syntax](#glimmer-dsl-syntax)
93
93
  - [Widgets](#widgets)
@@ -102,6 +102,9 @@ NOTE: Glimmer is in beta mode. Please help make better by adopting for small or
102
102
  - [Miscellaneous](#miscellaneous)
103
103
  - [Glimmer Style Guide](#glimmer-style-guide)
104
104
  - [Samples](#samples)
105
+ - [Hello Samples](#hello-samples)
106
+ - [Elaborate Samples](#elaborate-samples)
107
+ - [In Production](#in-production)
105
108
  - [SWT Reference](#swt-reference)
106
109
  - [SWT Packages](#swt-packages)
107
110
  - [Logging](#logging)
@@ -114,15 +117,14 @@ NOTE: Glimmer is in beta mode. Please help make better by adopting for small or
114
117
  - [Self Signed Certificate](#self-signed-certificate)
115
118
  - [Gotchas](#gotchas)
116
119
  - [Resources](#resources)
120
+ - [Help](#help)
121
+ - [Issues](#issues)
122
+ - [IRC Channel](#irc-channel)
117
123
  - [Feature Suggestions](#feature-suggestions)
118
124
  - [Change Log](#change-log)
119
125
  - [Contributing](#contributing)
120
126
  - [Contributors](#contributors)
121
127
  - [License](#license)
122
- <!-- TOC END -->
123
-
124
-
125
-
126
128
  ## Background
127
129
 
128
130
  Ruby is a dynamically-typed object-oriented language, which provides great productivity gains due to its powerful expressive syntax and dynamic nature. While it is proven by the Ruby on Rails framework for web development, it currently lacks a robust platform-independent framework for building desktop applications. Given that Java libraries can now be utilized in Ruby code through JRuby, Eclipse technologies, such as SWT, JFace, and RCP can help fill the gap of desktop application development with Ruby.
@@ -167,7 +169,7 @@ Please follow these instructions to make the `glimmer` command available on your
167
169
 
168
170
  Run this command to install directly:
169
171
  ```
170
- jgem install glimmer -v 0.7.5
172
+ jgem install glimmer -v 0.7.6
171
173
  ```
172
174
 
173
175
  `jgem` is JRuby's version of `gem` command.
@@ -178,7 +180,7 @@ Otherwise, you may also run `jruby -S gem install ...`
178
180
 
179
181
  Add the following to `Gemfile`:
180
182
  ```
181
- gem 'glimmer', '~> 0.7.5'
183
+ gem 'glimmer', '~> 0.7.6'
182
184
  ```
183
185
 
184
186
  And, then run:
@@ -1976,7 +1978,7 @@ glimmer samples/elaborate/contact_manager.rb # demonstrates table data-binding
1976
1978
  glimmer samples/elaborate/tic_tac_toe.rb # demonstrates a full MVC application
1977
1979
  ```
1978
1980
 
1979
- ![Gladiator](images/glimmer-gladiator.png)
1981
+ ![Gladiator](https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/v0.1.5/images/glimmer-gladiator.png)
1980
1982
 
1981
1983
  [Gladiator](https://github.com/AndyObtiva/glimmer-cs-gladiator) (short for Glimmer Editor) is a Glimmer sample project under on-going development.
1982
1984
  You may check it out to learn how to build a Glimmer Custom Shell gem.
@@ -2245,12 +2247,25 @@ Exec failed with code 2 command [[/usr/bin/SetFile, -c, icnC, /var/folders/4_/g1
2245
2247
 
2246
2248
  ## Resources
2247
2249
 
2250
+ * [Code Master Blog](http://andymaleh.blogspot.com/search/label/Glimmer)
2248
2251
  * [Eclipse Zone Tutorial](http://eclipse.dzone.com/articles/an-introduction-glimmer)
2249
2252
  * [InfoQ Article](http://www.infoq.com/news/2008/02/glimmer-jruby-swt)
2250
2253
  * [RubyConf 2008 Video](https://confreaks.tv/videos/rubyconf2008-desktop-development-with-glimmer)
2251
- * [Code Blog](http://andymaleh.blogspot.com/search/label/Glimmer)
2252
2254
  * [JRuby Cookbook by Justin Edelson & Henry Liu](http://shop.oreilly.com/product/9780596519650.do)
2253
2255
 
2256
+ ## Help
2257
+
2258
+ ### Issues
2259
+
2260
+ You may submit [issues](https://github.com/AndyObtiva/glimmer/issues) on [GitHub](https://github.com/AndyObtiva/glimmer/issues).
2261
+
2262
+ [Click here to submit an issue.](https://github.com/AndyObtiva/glimmer/issues)
2263
+
2264
+ ### IRC Channel
2265
+
2266
+ If you need live help, try the [#glimmer](http://widget.mibbit.com/?settings=7514b8a196f8f1de939a351245db7aa8&server=irc.mibbit.net&channel=%23glimmer) IRC channel on [irc.mibbit.net](http://widget.mibbit.com/?settings=7514b8a196f8f1de939a351245db7aa8&server=irc.mibbit.net&channel=%23glimmer). If no one was available, you may [leave a GitHub issue](https://github.com/AndyObtiva/glimmer/issues) to schedule a meetup on IRC.
2267
+
2268
+ [Click here to connect to #glimmer IRC channel immediately via a web interface.](http://widget.mibbit.com/?settings=7514b8a196f8f1de939a351245db7aa8&server=irc.mibbit.net&channel=%23glimmer)
2254
2269
 
2255
2270
  ## Feature Suggestions
2256
2271
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.5
1
+ 0.7.6
@@ -38,13 +38,16 @@ module Glimmer
38
38
  def populate_tree(model_tree_root_node, parent, tree_properties)
39
39
  # TODO make it change things by delta instead of removing all
40
40
  selected_tree_item_model = parent.swt_widget.getSelection.map(&:getData).first
41
- parent.all_tree_items.each do |tree_item|
41
+ old_tree_items = parent.all_tree_items
42
+ old_tree_item_expansion_by_data = old_tree_items.reduce({}) {|hash, ti| hash.merge(ti.getData => ti.getExpanded)}
43
+ old_tree_items.each do |tree_item|
42
44
  tree_item.getData('observer_registrations').each do |key, observer_registration|
43
45
  observer_registration.unregister
44
- end
45
- end
46
+ end
47
+ end
46
48
  parent.swt_widget.removeAll
47
49
  populate_tree_node(model_tree_root_node, parent.swt_widget, tree_properties)
50
+ parent.all_tree_items.each { |ti| ti.setExpanded(!!old_tree_item_expansion_by_data[ti.getData]) }
48
51
  tree_item_to_select = parent.depth_first_search {|ti| ti.getData == selected_tree_item_model}
49
52
  parent.swt_widget.setSelection(tree_item_to_select)
50
53
  end
@@ -286,8 +286,6 @@ class Scaffold
286
286
  app_view.open
287
287
  end
288
288
  end
289
-
290
- #{class_name(app_name)}.new.open
291
289
  MULTI_LINE_STRING
292
290
  end
293
291
 
@@ -307,8 +305,10 @@ class Scaffold
307
305
  def app_bin_file(app_name)
308
306
  <<~MULTI_LINE_STRING
309
307
  #!/usr/bin/env ruby
310
-
308
+
311
309
  require_relative '../app/#{file_name(app_name)}'
310
+
311
+ #{class_name(app_name)}.new.open
312
312
  MULTI_LINE_STRING
313
313
  end
314
314
 
@@ -47,7 +47,7 @@ module Glimmer
47
47
  Thread.new do
48
48
  sleep(0.25)
49
49
  async_exec do
50
- @swt_widget.setActive
50
+ @swt_widget.setActive unless @swt_widget.isDisposed
51
51
  end
52
52
  end
53
53
  end
@@ -151,6 +151,20 @@ module Glimmer
151
151
  observer.call(@swt_widget.getCaretPosition)
152
152
  }
153
153
  end,
154
+ :selection => lambda do |observer|
155
+ on_event_keydown { |event|
156
+ observer.call(@swt_widget.getSelection)
157
+ }
158
+ on_event_keyup { |event|
159
+ observer.call(@swt_widget.getSelection)
160
+ }
161
+ on_event_mousedown { |event|
162
+ observer.call(@swt_widget.getSelection)
163
+ }
164
+ on_event_mouseup { |event|
165
+ observer.call(@swt_widget.getSelection)
166
+ }
167
+ end,
154
168
  :selection_count => lambda do |observer|
155
169
  on_event_keydown { |event|
156
170
  observer.call(@swt_widget.getSelectionCount)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.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: 2020-05-22 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -192,9 +192,7 @@ dependencies:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: 0.8.1
195
- description: JRuby Desktop UI DSL + Data-Binding native-UI cross-platform library
196
- that enables productive and efficient authoring of desktop user-interfaces using
197
- the robust Eclipse SWT library
195
+ description: Desktop Development Library for Ruby
198
196
  email: andy.am@gmail.com
199
197
  executables:
200
198
  - glimmer
@@ -202,10 +200,10 @@ executables:
202
200
  extensions: []
203
201
  extra_rdoc_files:
204
202
  - LICENSE.txt
205
- - README.markdown
203
+ - README.md
206
204
  files:
207
205
  - LICENSE.txt
208
- - README.markdown
206
+ - README.md
209
207
  - RUBY_VERSION
210
208
  - VERSION
211
209
  - bin/girb
@@ -328,5 +326,5 @@ requirements: []
328
326
  rubygems_version: 3.0.6
329
327
  signing_key:
330
328
  specification_version: 4
331
- summary: Desktop development library for Ruby
329
+ summary: Desktop Development Library for Ruby
332
330
  test_files: []