glimmer-dsl-tk 0.0.5 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/LICENSE.txt +1 -1
- data/README.md +114 -41
- data/VERSION +1 -1
- data/bin/girb +27 -7
- data/icons/glimmer.png +0 -0
- data/lib/glimmer/data_binding/tk/list_selection_binding.rb +6 -6
- data/lib/glimmer/data_binding/tk/widget_binding.rb +22 -1
- data/lib/glimmer/dsl/tk/attribute_expression.rb +4 -4
- data/lib/glimmer/dsl/tk/bind_expression.rb +21 -0
- data/lib/glimmer/dsl/tk/block_attribute_expression.rb +4 -4
- data/lib/glimmer/dsl/tk/data_binding_expression.rb +22 -1
- data/lib/glimmer/dsl/tk/dsl.rb +4 -4
- data/lib/glimmer/dsl/tk/list_selection_data_binding_expression.rb +4 -4
- data/lib/glimmer/dsl/tk/root_expression.rb +9 -4
- data/lib/glimmer/dsl/tk/widget_expression.rb +5 -5
- data/lib/glimmer/tk/button_proxy.rb +5 -5
- data/lib/glimmer/tk/entry_proxy.rb +5 -5
- data/lib/glimmer/tk/frame_proxy.rb +5 -5
- data/lib/glimmer/tk/label_proxy.rb +6 -6
- data/lib/glimmer/tk/list_proxy.rb +8 -8
- data/lib/glimmer/tk/notebook_proxy.rb +5 -5
- data/lib/glimmer/tk/root_proxy.rb +19 -5
- data/lib/glimmer/tk/widget_proxy.rb +25 -33
- data/lib/glimmer-dsl-tk.rb +4 -4
- data/samples/hello/hello_combo.rb +9 -9
- data/samples/hello/hello_computed.rb +22 -1
- data/samples/hello/hello_list_multi_selection.rb +4 -4
- data/samples/hello/hello_list_single_selection.rb +6 -6
- data/samples/hello/hello_tab.rb +5 -5
- data/samples/hello/hello_world.rb +4 -4
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f60c7beb9a2127b33ef8089bb0d910a0db9bd66ab359e81a90f964d3f368d2d1
|
4
|
+
data.tar.gz: 95369859cfa851e2687a5e9ed419b7dcff46e83960ac733614b6355c0021f94a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3e3aedafe8bbfbd79ed47b89ee884bf7f45d73f78f5e3d2cb72886b7452b9db48ac6f05aa9b005d1aa90c19ec30b3df36d5b6e3d3d5e878874761bd683cd216
|
7
|
+
data.tar.gz: de842cf08e505ccc28d35098c96aa64e4572d46413ea7e4edc02785dd82c5648b08ba1294334153ce67693b6bf2fa5536686c57eada94f91dba0eba52b57eec2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.0.9
|
4
|
+
|
5
|
+
- Upgrade to glimmer 2.1.2
|
6
|
+
|
7
|
+
## 0.0.8
|
8
|
+
|
9
|
+
- Fix issue #5 (https://github.com/AndyObtiva/glimmer-dsl-tk/issues/5)
|
10
|
+
- Support `iconphoto` attribute on `root` widget, intelligently accepting a direct image path or `TkPhotoImage` object
|
11
|
+
- Set `root` `iconphoto` attribute to Glimmer icon by default if not set in an application.
|
12
|
+
- Provide `iconphoto` code example in README
|
13
|
+
- Upgrade to glimmer 2.1.1
|
14
|
+
|
15
|
+
## 0.0.7
|
16
|
+
|
17
|
+
- Upgraded to tk 0.4.0
|
18
|
+
- Fixed `girb` by changing to a pure Ruby script
|
19
|
+
|
20
|
+
## 0.0.6
|
21
|
+
|
22
|
+
- Upgraded to tk 0.3.0
|
23
|
+
|
3
24
|
## 0.0.5
|
4
25
|
|
5
26
|
- Label text data-binding
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,26 +1,28 @@
|
|
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 Tk 0.0.
|
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 Tk 0.0.9
|
2
|
+
## MRI Ruby Desktop Development GUI Library
|
2
3
|
[![Gem Version](https://badge.fury.io/rb/glimmer-dsl-tk.svg)](http://badge.fury.io/rb/glimmer-dsl-tk)
|
3
|
-
[![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-tk.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-tk)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/glimmer-dsl-tk/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/glimmer-dsl-tk?branch=master)
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/ce2853efdbecf6ebdc73/maintainability)](https://codeclimate.com/github/AndyObtiva/glimmer-dsl-tk/maintainability)
|
6
6
|
[![Join the chat at https://gitter.im/AndyObtiva/glimmer](https://badges.gitter.im/AndyObtiva/glimmer.svg)](https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
7
7
|
|
8
|
+
**[Contributors Wanted! (Submit a Glimmer App Sample to Get Started)](CONTRIBUTING.md)**
|
9
|
+
|
8
10
|
[Glimmer](https://github.com/AndyObtiva/glimmer) DSL for [Tk](https://www.tcl.tk/) enables desktop development with [Glimmer](https://github.com/AndyObtiva/glimmer) in [Ruby](https://github.com/ruby/ruby).
|
9
11
|
|
10
|
-
[Tcl/Tk](https://www.tcl.tk/) has evolved into a practical desktop GUI toolkit due to gaining
|
12
|
+
[Tcl/Tk](https://www.tcl.tk/) has evolved into a practical desktop GUI toolkit due to gaining truly native looking themed widgets on Mac, Windows, and Linux in [Tk version 8.5](https://www.tcl.tk/software/tcltk/8.5.html#:~:text=Highlights%20of%20Tk%208.5&text=Font%20rendering%3A%20Now%20uses%20anti,and%20window%20layout%2C%20and%20more.).
|
11
13
|
|
12
14
|
Additionally, [Ruby](https://www.ruby-lang.org/en/) 3.0 Ractor (formerly known as [Guilds](https://olivierlacan.com/posts/concurrency-in-ruby-3-with-guilds/)) supports truly parallel multi-threading, making both [MRI](https://github.com/ruby/ruby) and [Tk](https://www.tcl.tk/) finally viable for support in [Glimmer](https://github.com/AndyObtiva/glimmer) (Ruby Desktop Development GUI Library) as an alternative to [JRuby on SWT](https://github.com/AndyObtiva/glimmer-dsl-swt).
|
13
15
|
|
14
|
-
The trade-off is that while [SWT](https://www.eclipse.org/swt/) provides a plethora of high quality reusable widgets for the Enterprise (such as [Nebula](https://www.eclipse.org/nebula/)), [Tk](https://www.tcl.tk/) enables very fast app startup time via [MRI Ruby](https://www.ruby-lang.org/en/).
|
16
|
+
The trade-off is that while [SWT](https://www.eclipse.org/swt/) provides a plethora of high quality reusable widgets for the Enterprise (such as [Nebula](https://www.eclipse.org/nebula/)), [Tk](https://www.tcl.tk/) enables very fast app startup time and a small memory footprint via [MRI Ruby](https://www.ruby-lang.org/en/).
|
15
17
|
|
16
|
-
[Glimmer](https://github.com/AndyObtiva/glimmer)
|
18
|
+
[Glimmer](https://github.com/AndyObtiva/glimmer) aims to provide a DSL similar to the [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) to enable more productive desktop development in Ruby with:
|
17
19
|
- Declarative DSL syntax that visually maps to the GUI widget hierarchy
|
18
20
|
- Convention over configuration via smart defaults and automation of low-level details
|
19
21
|
- Requiring the least amount of syntax possible to build GUI
|
20
22
|
- Bidirectional Data-Binding to declaratively wire and automatically synchronize GUI with Business Models
|
23
|
+
- Custom Widget support
|
21
24
|
- Scaffolding for new custom widgets, apps, and gems
|
22
25
|
- Native-Executable packaging on Mac, Windows, and Linux
|
23
|
-
- Custom Widget support
|
24
26
|
|
25
27
|
**Hello, World!**
|
26
28
|
|
@@ -34,21 +36,21 @@ root {
|
|
34
36
|
}.open
|
35
37
|
```
|
36
38
|
|
37
|
-
Run
|
39
|
+
Run with [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
38
40
|
|
39
41
|
```
|
40
|
-
ruby -r glimmer-dsl-tk -e "require '
|
42
|
+
ruby -r glimmer-dsl-tk -e "require 'samples/hello/hello_world'"
|
41
43
|
```
|
42
44
|
|
43
45
|
Glimmer app:
|
44
46
|
|
45
47
|
![glimmer dsl tk screenshot sample hello world](images/glimmer-dsl-tk-screenshot-sample-hello-world.png)
|
46
48
|
|
47
|
-
NOTE: Glimmer DSL for Tk is in alpha mode. Please help make better by contributing, adopting for small or low risk projects, and providing feedback. It is
|
49
|
+
NOTE: Glimmer DSL for Tk is in alpha mode. Please help make better by contributing, adopting for small or low risk projects, and providing feedback. It is still an early alpha, so the more feedback and issues you report the better.
|
48
50
|
|
49
51
|
Other [Glimmer](https://github.com/AndyObtiva/glimmer) DSL gems:
|
50
|
-
- [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop GUI)
|
51
|
-
- [glimmer-dsl-opal](https://github.com/AndyObtiva/glimmer-dsl-opal): Glimmer DSL for Opal (Web GUI
|
52
|
+
- [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
|
53
|
+
- [glimmer-dsl-opal](https://github.com/AndyObtiva/glimmer-dsl-opal): Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)
|
52
54
|
- [glimmer-dsl-xml](https://github.com/AndyObtiva/glimmer-dsl-xml): Glimmer DSL for XML (& HTML)
|
53
55
|
- [glimmer-dsl-css](https://github.com/AndyObtiva/glimmer-dsl-css): Glimmer DSL for CSS (Cascading Style Sheets)
|
54
56
|
|
@@ -57,10 +59,11 @@ Other [Glimmer](https://github.com/AndyObtiva/glimmer) DSL gems:
|
|
57
59
|
- [Tcl/Tk](https://www.tcl.tk/): Follow the [install instructions](https://tkdocs.com/tutorial/install.html)
|
58
60
|
- [Ruby](https://www.ruby-lang.org/en/): On Windows, obtain from the Ruby [download page](https://www.ruby-lang.org/en/downloads/). On the Mac and Linux, it is more convenient to just use [RVM](http://rvm.io) and follow the [RVM Tk instructions](https://rvm.io/integration/tk).
|
59
61
|
|
60
|
-
For example, on the Mac, you can:
|
61
|
-
- Install the ActiveTcl Mac package from [ActiveState.com](
|
62
|
+
For example, on the Mac, you can:
|
63
|
+
- Install the ActiveTcl Mac package from [ActiveState.com](https://activestate.com)
|
62
64
|
- Install [RVM](https://rvm.io/) by running `\curl -sSL https://get.rvm.io | bash -s stable` (and run `curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -` if needed for mentioned security reasons)
|
63
65
|
- Run: `rvm install 2.7.1 --enable-shared --enable-pthread --with-tk --with-tcl`
|
66
|
+
- Run: `gem install tk -v0.4.0`
|
64
67
|
|
65
68
|
Afterwards, if you open `irb`, you should be able to run `require 'tk'` successfully.
|
66
69
|
|
@@ -73,11 +76,11 @@ Run this command to install directly:
|
|
73
76
|
gem install glimmer-dsl-tk
|
74
77
|
```
|
75
78
|
|
76
|
-
### Option 2: Bundler
|
79
|
+
### Option 2: Bundler
|
77
80
|
|
78
81
|
Add the following to `Gemfile`:
|
79
82
|
```
|
80
|
-
gem 'glimmer-dsl-tk', '~> 0.0.
|
83
|
+
gem 'glimmer-dsl-tk', '~> 0.0.9'
|
81
84
|
```
|
82
85
|
|
83
86
|
And, then run:
|
@@ -144,7 +147,7 @@ root.mainloop
|
|
144
147
|
Example of the same app written in [Glimmer](https://github.com/AndyObtiva/glimmer) declarative syntax:
|
145
148
|
|
146
149
|
```ruby
|
147
|
-
root {
|
150
|
+
root {
|
148
151
|
title 'Hello, Tab!'
|
149
152
|
|
150
153
|
notebook {
|
@@ -163,6 +166,36 @@ root {
|
|
163
166
|
}.open
|
164
167
|
```
|
165
168
|
|
169
|
+
### Smart Defaults and Convensions
|
170
|
+
|
171
|
+
#### Grid Layout
|
172
|
+
|
173
|
+
`grid` layout is the default on most widgets (which support it).
|
174
|
+
|
175
|
+
#### Icon Photo
|
176
|
+
|
177
|
+
The `iconphoto` attribute on `root` is set to the Glimmer icon by default if no icon photo is supplied.
|
178
|
+
|
179
|
+
Otherwise, [Glimmer DSL for Tk](https://rubygems.org/gems/glimmer-dsl-tk) is smart enough to accept an image path directly (no need to wrap with `TkPhotoImage`)
|
180
|
+
|
181
|
+
Example with direct image path (you may copy/paste in [`girb`](#girb-glimmer-irb)):
|
182
|
+
|
183
|
+
```ruby
|
184
|
+
root {
|
185
|
+
title 'Title'
|
186
|
+
iconphoto 'icons/glimmer.png'
|
187
|
+
}.open
|
188
|
+
```
|
189
|
+
|
190
|
+
Example with `TkPhotoImage` object (you may copy/paste in [`girb`](#girb-glimmer-irb)):
|
191
|
+
|
192
|
+
```ruby
|
193
|
+
root {
|
194
|
+
title 'Title'
|
195
|
+
iconphoto TkPhotoImage.new(file: 'icons/glimmer.png')
|
196
|
+
}.open
|
197
|
+
```
|
198
|
+
|
166
199
|
## The Grid Geometry Manager
|
167
200
|
|
168
201
|
The Grid Geometry Manager is supported via the `grid` keyword just as per the [Tk documentation](https://tkdocs.com/tutorial/grid.html), except by nesting under the widget it concerns.
|
@@ -194,8 +227,8 @@ Example:
|
|
194
227
|
This assumes a `Person` model with a `country` attribute representing their current country and a `country_options` attribute representing available options for the country attribute.
|
195
228
|
|
196
229
|
```ruby
|
197
|
-
combobox {
|
198
|
-
state 'readonly'
|
230
|
+
combobox {
|
231
|
+
state 'readonly'
|
199
232
|
text bind(person, :country)
|
200
233
|
}
|
201
234
|
```
|
@@ -217,7 +250,7 @@ This assumes a `Person` model with a `country` attribute representing their curr
|
|
217
250
|
|
218
251
|
```ruby
|
219
252
|
list {
|
220
|
-
selectmode 'browse'
|
253
|
+
selectmode 'browse'
|
221
254
|
text bind(person, :country)
|
222
255
|
}
|
223
256
|
```
|
@@ -243,8 +276,8 @@ This assumes a `Person` model with a `provinces` attribute representing their cu
|
|
243
276
|
}
|
244
277
|
```
|
245
278
|
|
246
|
-
That code binds the `items` text of the `list` to the `provinces_options` property on the `person` model (data-binding attribute + "_options" by convention)
|
247
|
-
|
279
|
+
That code binds the `items` text of the `list` to the `provinces_options` property on the `person` model (data-binding attribute + "_options" by convention).
|
280
|
+
It also binds the `selection` text of the `list` to the `provinces` property on the `person` model.
|
248
281
|
|
249
282
|
It automatically handles all the Tk plumbing behind the scenes.
|
250
283
|
|
@@ -321,10 +354,16 @@ root {
|
|
321
354
|
}.open
|
322
355
|
```
|
323
356
|
|
324
|
-
Run
|
357
|
+
Run with [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
325
358
|
|
326
359
|
```
|
327
|
-
ruby -r glimmer-dsl-tk -e "require '
|
360
|
+
ruby -r glimmer-dsl-tk -e "require 'samples/hello/hello_world'"
|
361
|
+
```
|
362
|
+
|
363
|
+
Alternatively, run from cloned project without [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
364
|
+
|
365
|
+
```
|
366
|
+
ruby -e "require './lib/glimmer-dsl-tk'; require './samples/hello/hello_world'"
|
328
367
|
```
|
329
368
|
|
330
369
|
Glimmer app:
|
@@ -338,7 +377,7 @@ Glimmer code (from [samples/hello/hello_tab.rb](samples/hello/hello_tab.rb)):
|
|
338
377
|
```ruby
|
339
378
|
include Glimmer
|
340
379
|
|
341
|
-
root {
|
380
|
+
root {
|
342
381
|
title 'Hello, Tab!'
|
343
382
|
|
344
383
|
notebook {
|
@@ -357,10 +396,16 @@ root {
|
|
357
396
|
}.open
|
358
397
|
```
|
359
398
|
|
360
|
-
Run
|
399
|
+
Run with [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
361
400
|
|
362
401
|
```
|
363
|
-
ruby -r glimmer-dsl-tk -e "require '
|
402
|
+
ruby -r glimmer-dsl-tk -e "require 'samples/hello/hello_tab'"
|
403
|
+
```
|
404
|
+
|
405
|
+
Alternatively, run from cloned project without [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
406
|
+
|
407
|
+
```
|
408
|
+
ruby -e "require './lib/glimmer-dsl-tk'; require './samples/hello/hello_tab'"
|
364
409
|
```
|
365
410
|
|
366
411
|
Glimmer app:
|
@@ -378,7 +423,7 @@ root {
|
|
378
423
|
title 'Hello, Combo!'
|
379
424
|
|
380
425
|
combobox { |proxy|
|
381
|
-
state 'readonly'
|
426
|
+
state 'readonly'
|
382
427
|
text bind(person, :country)
|
383
428
|
}
|
384
429
|
|
@@ -392,10 +437,16 @@ root {
|
|
392
437
|
# ... more code follows
|
393
438
|
```
|
394
439
|
|
395
|
-
Run
|
440
|
+
Run with [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
396
441
|
|
397
442
|
```
|
398
|
-
ruby -r glimmer-dsl-tk -e "require '
|
443
|
+
ruby -r glimmer-dsl-tk -e "require 'samples/hello/hello_combo'"
|
444
|
+
```
|
445
|
+
|
446
|
+
Alternatively, run from cloned project without [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
447
|
+
|
448
|
+
```
|
449
|
+
ruby -e "require './lib/glimmer-dsl-tk'; require './samples/hello/hello_combo'"
|
399
450
|
```
|
400
451
|
|
401
452
|
Glimmer app:
|
@@ -409,7 +460,7 @@ Glimmer code (from [samples/hello/hello_list_single_selection.rb](samples/hello/
|
|
409
460
|
|
410
461
|
```ruby
|
411
462
|
# ... more code precedes
|
412
|
-
root {
|
463
|
+
root {
|
413
464
|
title 'Hello, List Single Selection!'
|
414
465
|
|
415
466
|
list {
|
@@ -426,10 +477,16 @@ root {
|
|
426
477
|
# ... more code follows
|
427
478
|
```
|
428
479
|
|
429
|
-
Run
|
480
|
+
Run with [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
481
|
+
|
482
|
+
```
|
483
|
+
ruby -r glimmer-dsl-tk -e "require 'samples/hello/hello_list_single_selection'"
|
484
|
+
```
|
485
|
+
|
486
|
+
Alternatively, run from cloned project without [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
430
487
|
|
431
488
|
```
|
432
|
-
ruby -
|
489
|
+
ruby -e "require './lib/glimmer-dsl-tk'; require './samples/hello/hello_list_single_selection'"
|
433
490
|
```
|
434
491
|
|
435
492
|
Glimmer app:
|
@@ -458,12 +515,22 @@ root {
|
|
458
515
|
# ... more code follows
|
459
516
|
```
|
460
517
|
|
461
|
-
Run
|
518
|
+
Run with [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
462
519
|
|
463
520
|
```
|
464
|
-
ruby -r glimmer-dsl-tk -e "require '
|
521
|
+
ruby -r glimmer-dsl-tk -e "require 'samples/hello/hello_list_multi_selection'"
|
465
522
|
```
|
466
523
|
|
524
|
+
Alternatively, run from cloned project without [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
525
|
+
|
526
|
+
```
|
527
|
+
ruby -e "require './lib/glimmer-dsl-tk'; require './samples/hello/hello_list_multi_selection'"
|
528
|
+
```
|
529
|
+
|
530
|
+
Glimmer app:
|
531
|
+
|
532
|
+
![glimmer dsl tk screenshot sample hello list multi selection](images/glimmer-dsl-tk-screenshot-sample-hello-list-multi-selection.png)
|
533
|
+
|
467
534
|
### Hello, Computed!
|
468
535
|
|
469
536
|
Glimmer code (from [samples/hello/hello_computed.rb](samples/hello/hello_computed.rb)):
|
@@ -473,7 +540,7 @@ Glimmer code (from [samples/hello/hello_computed.rb](samples/hello/hello_compute
|
|
473
540
|
root {
|
474
541
|
title 'Hello, Computed!'
|
475
542
|
|
476
|
-
frame {
|
543
|
+
frame {
|
477
544
|
grid column: 0, row: 0, padx: 5, pady: 5
|
478
545
|
|
479
546
|
label {
|
@@ -528,10 +595,16 @@ Glimmer code (from [samples/hello/hello_computed.rb](samples/hello/hello_compute
|
|
528
595
|
# ... more code follows
|
529
596
|
```
|
530
597
|
|
531
|
-
Run
|
598
|
+
Run with [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
599
|
+
|
600
|
+
```
|
601
|
+
ruby -r glimmer-dsl-tk -e "require 'samples/hello/hello_computed'"
|
602
|
+
```
|
603
|
+
|
604
|
+
Alternatively, run from cloned project without [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
|
532
605
|
|
533
606
|
```
|
534
|
-
ruby -
|
607
|
+
ruby -e "require './lib/glimmer-dsl-tk'; require './samples/hello/hello_computed'"
|
535
608
|
```
|
536
609
|
|
537
610
|
Glimmer app:
|
@@ -554,9 +627,9 @@ If you need live help, try to [![Join the chat at https://gitter.im/AndyObtiva/g
|
|
554
627
|
|
555
628
|
[Glimmer Process](https://github.com/AndyObtiva/glimmer/blob/master/PROCESS.md)
|
556
629
|
|
557
|
-
## Feature Suggestions
|
630
|
+
## Planned Features and Feature Suggestions
|
558
631
|
|
559
|
-
These features have been suggested. You might see them in a future version of Glimmer DSL for Tk. You are welcome to contribute more feature suggestions.
|
632
|
+
These features have been planned or suggested. You might see them in a future version of Glimmer DSL for Tk. You are welcome to contribute more feature suggestions.
|
560
633
|
|
561
634
|
[TODO.md](TODO.md)
|
562
635
|
|
@@ -578,8 +651,8 @@ These features have been suggested. You might see them in a future version of Gl
|
|
578
651
|
|
579
652
|
[MIT](LICENSE.txt)
|
580
653
|
|
581
|
-
Copyright (c) 2020 - Andy Maleh.
|
654
|
+
Copyright (c) 2020-2021 - Andy Maleh.
|
582
655
|
|
583
656
|
--
|
584
657
|
|
585
|
-
[<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built for [Glimmer](https://github.com/AndyObtiva/glimmer) (
|
658
|
+
[<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built for [Glimmer](https://github.com/AndyObtiva/glimmer) (DSL Framework).
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
data/bin/girb
CHANGED
@@ -1,10 +1,30 @@
|
|
1
|
-
#!/usr/bin/env
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
# Copyright (c) 2007-2021 Andy Maleh
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
# a copy of this software and associated documentation files (the
|
7
|
+
# "Software"), to deal in the Software without restriction, including
|
8
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
# the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be
|
14
|
+
# included in all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
4
23
|
|
5
|
-
|
24
|
+
# This script was written for Windows and Linux only
|
6
25
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
26
|
+
require_relative 'girb_runner'
|
27
|
+
|
28
|
+
require 'irb'
|
29
|
+
|
30
|
+
IRB.start('.')
|
data/icons/glimmer.png
ADDED
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# Copyright (c) 2020 Andy Maleh
|
2
|
-
#
|
1
|
+
# Copyright (c) 2020-2021 Andy Maleh
|
2
|
+
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
5
5
|
# "Software"), to deal in the Software without restriction, including
|
@@ -7,10 +7,10 @@
|
|
7
7
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
8
|
# permit persons to whom the Software is furnished to do so, subject to
|
9
9
|
# the following conditions:
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# The above copyright notice and this permission notice shall be
|
12
12
|
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
15
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
16
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -34,10 +34,10 @@ module Glimmer
|
|
34
34
|
attr_reader :widget_proxy
|
35
35
|
|
36
36
|
PROPERTY_TYPE_UPDATERS = {
|
37
|
-
:string => lambda do |widget_proxy, value|
|
37
|
+
:string => lambda do |widget_proxy, value|
|
38
38
|
widget_proxy.selection = value.to_s
|
39
39
|
end,
|
40
|
-
:array => lambda do |widget_proxy, value|
|
40
|
+
:array => lambda do |widget_proxy, value|
|
41
41
|
widget_proxy.selection = (value || [])
|
42
42
|
end
|
43
43
|
}
|