glimmer-dsl-libui 0.12.5 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/VERSION +1 -1
- data/glimmer-dsl-libui.gemspec +0 -0
- data/lib/glimmer/libui/content_bindable.rb +19 -0
- data/lib/glimmer/libui/control_proxy.rb +2 -14
- data/lib/glimmer/libui/shape.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b904f97a0c6ac0f1ab428f1e000325a9ddfee1dfdd5a4d5be71592039ed0c2e0
|
4
|
+
data.tar.gz: 7479c1ca847c105939752122ab0fa8a6319f14e9c68a38ab7a241dbec5947a38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a0ca4e301ce0a7edc45af0fb66933ca397c6b653af49688fd86276bb205d90e930a27949abf09e499fc92e66685baa26780a02565059ff26d43fd74a1605fdd
|
7
|
+
data.tar.gz: 02ee7881c7ef54310b5c7a977a63f4fb03ec57f481c7b0c5659846e916e5846e659061a2de66815f69ffa88d2c58f6dc2e332568e07f1d080dace48eb3598e53
|
data/CHANGELOG.md
CHANGED
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 LibUI 0.12.
|
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 LibUI 0.12.6
|
2
2
|
## Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library ([Fukuoka Award Winning](http://www.digitalfukuoka.jp/topics/187?locale=ja))
|
3
3
|
### The Quickest Way From Zero To GUI
|
4
4
|
[](http://badge.fury.io/rb/glimmer-dsl-libui)
|
@@ -464,7 +464,7 @@ gem install glimmer-dsl-libui
|
|
464
464
|
Or install via Bundler `Gemfile`:
|
465
465
|
|
466
466
|
```ruby
|
467
|
-
gem 'glimmer-dsl-libui', '~> 0.12.
|
467
|
+
gem 'glimmer-dsl-libui', '~> 0.12.6'
|
468
468
|
```
|
469
469
|
|
470
470
|
Test that installation worked by running the [Glimmer Meta-Example](#examples):
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.12.
|
1
|
+
0.12.6
|
data/glimmer-dsl-libui.gemspec
CHANGED
Binary file
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Glimmer
|
2
|
+
module LibUI
|
3
|
+
module ContentBindable
|
4
|
+
# Data-binds the generation of nested content to a model/property (in binding args)
|
5
|
+
# consider providing an option to avoid initial rendering without any changes happening
|
6
|
+
def bind_content(*binding_args, &content_block)
|
7
|
+
# TODO in the future, consider optimizing code by diffing content if that makes sense
|
8
|
+
content_binding_work = proc do |*values|
|
9
|
+
children.dup.each { |child| child.destroy }
|
10
|
+
content(&content_block)
|
11
|
+
end
|
12
|
+
model_binding_observer = Glimmer::DataBinding::ModelBinding.new(*binding_args)
|
13
|
+
content_binding_observer = Glimmer::DataBinding::Observer.proc(&content_binding_work)
|
14
|
+
content_binding_observer.observe(model_binding_observer)
|
15
|
+
content_binding_work.call # TODO inspect if we need to pass args here (from observed attributes) [but it's simpler not to pass anything at first]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -20,6 +20,7 @@
|
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
22
|
require 'glimmer/libui/data_bindable'
|
23
|
+
require 'glimmer/libui/content_bindable'
|
23
24
|
require 'glimmer/libui/parent'
|
24
25
|
|
25
26
|
module Glimmer
|
@@ -105,6 +106,7 @@ module Glimmer
|
|
105
106
|
end
|
106
107
|
|
107
108
|
include DataBindable
|
109
|
+
include ContentBindable
|
108
110
|
prepend Parent
|
109
111
|
|
110
112
|
KEYWORD_ALIASES = {
|
@@ -395,20 +397,6 @@ module Glimmer
|
|
395
397
|
Glimmer::DSL::Engine.add_content(self, Glimmer::DSL::Libui::ControlExpression.new, @keyword, {post_add_content: @content_added}, &block)
|
396
398
|
end
|
397
399
|
|
398
|
-
# Data-binds the generation of nested content to a model/property (in binding args)
|
399
|
-
# consider providing an option to avoid initial rendering without any changes happening
|
400
|
-
def bind_content(*binding_args, &content_block)
|
401
|
-
# TODO in the future, consider optimizing code by diffing content if that makes sense
|
402
|
-
content_binding_work = proc do |*values|
|
403
|
-
children.dup.each { |child| child.destroy }
|
404
|
-
content(&content_block)
|
405
|
-
end
|
406
|
-
model_binding_observer = Glimmer::DataBinding::ModelBinding.new(*binding_args)
|
407
|
-
content_binding_observer = Glimmer::DataBinding::Observer.proc(&content_binding_work)
|
408
|
-
content_binding_observer.observe(model_binding_observer)
|
409
|
-
content_binding_work.call # TODO inspect if we need to pass args here (from observed attributes) [but it's simpler not to pass anything at first]
|
410
|
-
end
|
411
|
-
|
412
400
|
private
|
413
401
|
|
414
402
|
def build_control
|
data/lib/glimmer/libui/shape.rb
CHANGED
@@ -23,6 +23,7 @@ require 'glimmer/libui/parent'
|
|
23
23
|
require 'glimmer/libui/control_proxy/area_proxy'
|
24
24
|
require 'glimmer/libui/control_proxy/path_proxy'
|
25
25
|
require 'glimmer/libui/data_bindable'
|
26
|
+
require 'glimmer/libui/content_bindable'
|
26
27
|
require 'glimmer/libui/perfect_shaped'
|
27
28
|
|
28
29
|
module Glimmer
|
@@ -72,6 +73,7 @@ module Glimmer
|
|
72
73
|
include Parent
|
73
74
|
include PerfectShaped
|
74
75
|
include DataBindable
|
76
|
+
include ContentBindable
|
75
77
|
|
76
78
|
KEYWORD_ALIASES = {
|
77
79
|
'shape' => 'composite_shape',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-dsl-libui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: glimmer
|
@@ -526,6 +526,7 @@ files:
|
|
526
526
|
- lib/glimmer/launcher.rb
|
527
527
|
- lib/glimmer/libui.rb
|
528
528
|
- lib/glimmer/libui/attributed_string.rb
|
529
|
+
- lib/glimmer/libui/content_bindable.rb
|
529
530
|
- lib/glimmer/libui/control_proxy.rb
|
530
531
|
- lib/glimmer/libui/control_proxy/area_proxy.rb
|
531
532
|
- lib/glimmer/libui/control_proxy/area_proxy/scrolling_area_proxy.rb
|