glimmer-dsl-tk 0.0.51 → 0.0.52

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +58 -22
  5. data/VERSION +1 -1
  6. data/bin/girb +1 -1
  7. data/bin/girb_runner.rb +1 -1
  8. data/glimmer-dsl-tk.gemspec +0 -0
  9. data/lib/glimmer/data_binding/tk/list_selection_binding.rb +1 -1
  10. data/lib/glimmer/data_binding/tk/one_time_observer.rb +1 -1
  11. data/lib/glimmer/data_binding/tk/widget_binding.rb +1 -1
  12. data/lib/glimmer/dsl/tk/attribute_expression.rb +1 -1
  13. data/lib/glimmer/dsl/tk/bind_expression.rb +1 -1
  14. data/lib/glimmer/dsl/tk/block_attribute_expression.rb +1 -1
  15. data/lib/glimmer/dsl/tk/built_in_dialog_expression.rb +1 -1
  16. data/lib/glimmer/dsl/tk/data_binding_expression.rb +1 -1
  17. data/lib/glimmer/dsl/tk/dsl.rb +1 -1
  18. data/lib/glimmer/dsl/tk/format_expression.rb +1 -1
  19. data/lib/glimmer/dsl/tk/list_selection_data_binding_expression.rb +1 -1
  20. data/lib/glimmer/dsl/tk/message_box_expression.rb +1 -1
  21. data/lib/glimmer/dsl/tk/on_expression.rb +1 -1
  22. data/lib/glimmer/dsl/tk/root_expression.rb +1 -1
  23. data/lib/glimmer/dsl/tk/shine_data_binding_expression.rb +1 -1
  24. data/lib/glimmer/dsl/tk/widget_expression.rb +1 -1
  25. data/lib/glimmer/tk/checkbutton_proxy.rb +1 -1
  26. data/lib/glimmer/tk/combobox_proxy.rb +1 -1
  27. data/lib/glimmer/tk/drag_and_drop_event.rb +21 -0
  28. data/lib/glimmer/tk/draggable_and_droppable.rb +1 -1
  29. data/lib/glimmer/tk/entry_proxy.rb +1 -1
  30. data/lib/glimmer/tk/frame_proxy.rb +1 -1
  31. data/lib/glimmer/tk/label_proxy.rb +1 -1
  32. data/lib/glimmer/tk/lbl_proxy.rb +1 -1
  33. data/lib/glimmer/tk/list_proxy.rb +1 -1
  34. data/lib/glimmer/tk/menu_item_proxy.rb +1 -1
  35. data/lib/glimmer/tk/menu_proxy.rb +1 -1
  36. data/lib/glimmer/tk/notebook_proxy.rb +1 -1
  37. data/lib/glimmer/tk/os.rb +1 -1
  38. data/lib/glimmer/tk/radiobutton_proxy.rb +1 -1
  39. data/lib/glimmer/tk/root_proxy.rb +1 -1
  40. data/lib/glimmer/tk/scrollbar_frame_proxy.rb +1 -1
  41. data/lib/glimmer/tk/spinbox_proxy.rb +1 -1
  42. data/lib/glimmer/tk/text_proxy.rb +1 -1
  43. data/lib/glimmer/tk/text_variable_owner.rb +1 -1
  44. data/lib/glimmer/tk/toplevel_proxy.rb +2 -2
  45. data/lib/glimmer/tk/treeview_proxy.rb +1 -1
  46. data/lib/glimmer/tk/variable_owner.rb +1 -1
  47. data/lib/glimmer/tk/widget.rb +1 -1
  48. data/lib/glimmer/tk/widget_proxy.rb +8 -3
  49. data/lib/glimmer-dsl-tk.rb +1 -1
  50. data/samples/elaborate/meta_sample.rb +1 -1
  51. data/samples/hello/hello_built_in_dialog.rb +1 -1
  52. data/samples/hello/hello_button.rb +1 -1
  53. data/samples/hello/hello_checkbutton.rb +1 -1
  54. data/samples/hello/hello_combobox.rb +1 -2
  55. data/samples/hello/hello_computed.rb +1 -1
  56. data/samples/hello/hello_contextual_menu.rb +1 -1
  57. data/samples/hello/hello_drag_and_drop.rb +1 -1
  58. data/samples/hello/hello_entry.rb +1 -1
  59. data/samples/hello/hello_frame.rb +1 -1
  60. data/samples/hello/hello_label.rb +1 -1
  61. data/samples/hello/hello_list_multi_selection.rb +1 -1
  62. data/samples/hello/hello_list_single_selection.rb +1 -1
  63. data/samples/hello/hello_menu_bar.rb +1 -1
  64. data/samples/hello/hello_message_box.rb +1 -1
  65. data/samples/hello/hello_notebook.rb +1 -1
  66. data/samples/hello/hello_radiobutton.rb +1 -1
  67. data/samples/hello/hello_root.rb +1 -1
  68. data/samples/hello/hello_scrollbar.rb +1 -1
  69. data/samples/hello/hello_scrollbar_frame.rb +1 -1
  70. data/samples/hello/hello_separator.rb +1 -1
  71. data/samples/hello/hello_spinbox.rb +1 -1
  72. data/samples/hello/hello_text.rb +1 -1
  73. data/samples/hello/hello_toplevel.rb +1 -1
  74. data/samples/hello/hello_world.rb +1 -1
  75. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e73712c604d4ac237f122877e2c4a558570b212fcbf0c192b3c3cccf760cd10
4
- data.tar.gz: 6bf3e67c3cebdd497c2775d2a7f72cc5efefb68c2116bf61e0511a3fa4c54161
3
+ metadata.gz: bb2ccf0557cc7810f711f841873b281e3ffe57e67355e61825feedc287769102
4
+ data.tar.gz: 16e760a663bb0982542089d46c5ca3d959d354bb566929367cf2bde7909f29cc
5
5
  SHA512:
6
- metadata.gz: ffe9c7c5fb555f4419828d34cca5a86aca6c98756afa37d7b83d2c46086e6ca964651b5f256e092a7c1622bb30f86b52c9e3168529f6bc45426ff5cbb9fceb37
7
- data.tar.gz: aca17f0b69b67fa68ef13ac707a96416a3a88d16bf3607190c8cba553763fc9bebf7054a25db310dd5dd0975746f3f5e0717cba899fe8e9f0eaf0f4870fd2870
6
+ metadata.gz: 7906ab4bdc15f6a9c6cbe184f70ae9929adec99879091789395a9386d7e7a6572fc5b65d83c492514bdff332c29cc6cd192ac6b1d5f562e52aa15157db2a3f34
7
+ data.tar.gz: 84ea229d1961c7385b6aac6dcea591fea7db0731e99a6e5d65bcae114eed2b1218cb0665cf8762d2abad0560c1510feb347ac7eecde8a69612ce22fc98eede82
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.0.52
4
+
5
+ - Upgrade to glimmer 2.6.0
6
+ - Remove default height for root/toplevel (automatically calculated from children)
7
+ - Support data-binding `_options` method items on `combobox` (not just main value), thus making options update if `notify_observers(:some_attr_options)` is called
8
+
3
9
  ## 0.0.51
4
10
 
5
11
  - Center application root/toplevel within screen by default (if x or y are specified, they are respected instead)
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020-2021 Andy Maleh
1
+ Copyright (c) 2020-2022 Andy Maleh
2
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
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 Tk 0.0.51
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.52
2
2
  ## MRI Ruby Desktop Development GUI Library
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-tk.svg)](http://badge.fury.io/rb/glimmer-dsl-tk)
4
4
  [![Ruby](https://github.com/AndyObtiva/glimmer-dsl-tk/actions/workflows/ruby.yml/badge.svg)](https://github.com/AndyObtiva/glimmer-dsl-tk/actions/workflows/ruby.yml)
@@ -19,9 +19,9 @@ The trade-off is that while [SWT](https://www.eclipse.org/swt/) provides a pleth
19
19
  - Convention over configuration via smart defaults and automation of low-level details
20
20
  - Requiring the least amount of syntax possible to build GUI
21
21
  - Bidirectional Data-Binding to declaratively wire and automatically synchronize GUI with Business Models
22
- - Custom Widget support
23
- - Scaffolding for new custom widgets, apps, and gems
24
- - Native-Executable packaging on Mac, Windows, and Linux
22
+ - (Future Plan) Custom Widget support
23
+ - (Future Plan) Scaffolding for new custom widgets, apps, and gems
24
+ - (Future Plan) Native-Executable packaging on Mac, Windows, and Linux
25
25
 
26
26
  **Hello, World!**
27
27
 
@@ -51,7 +51,7 @@ Glimmer app:
51
51
 
52
52
  ![glimmer dsl tk screenshot sample hello world](images/glimmer-dsl-tk-screenshot-sample-hello-world.png)
53
53
 
54
- NOTE: Glimmer DSL for Tk is currently in early alpha mode (incomplete). 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.
54
+ NOTE: Glimmer DSL for Tk is currently in early alpha mode (only about 44% complete). If you want it developed faster, then [open an issue report](https://github.com/AndyObtiva/glimmer-dsl-tk/issues/new). I have completed some features much faster before due to [issue reports](https://github.com/AndyObtiva/glimmer-dsl-tk/issues) and [pull requests](https://github.com/AndyObtiva/glimmer-dsl-tk/pulls). 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.
55
55
 
56
56
  Other [Glimmer](https://github.com/AndyObtiva/glimmer) DSL gems you might be interested in:
57
57
  - [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
@@ -145,24 +145,24 @@ Other [Glimmer](https://github.com/AndyObtiva/glimmer) DSL gems you might be int
145
145
 
146
146
  ## Pre-requisites
147
147
 
148
- - [Tcl/Tk](https://www.tcl.tk/): Follow the [install instructions](https://tkdocs.com/tutorial/install.html)
148
+ - [Tcl/Tk 8.6](https://www.tcl.tk/): Follow the exact instructions below (if a further reference is needed, here are the [official install instructions](https://tkdocs.com/tutorial/install.html))
149
149
  - [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).
150
150
 
151
- For example, on the Mac, you can:
152
- - Install the ActiveTcl Mac package from [ActiveState.com](https://activestate.com)
151
+ **Mac:**
152
+ - Install the ActiveTcl 8.6 Mac package from [ActiveState.com](https://activestate.com)
153
153
  - 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)
154
154
  - Run: `rvm install 3.0.2 --enable-shared --enable-pthread --with-tk --with-tcl`
155
155
  - Run: `gem install tk -v0.4.0`
156
156
 
157
- For example, on Windows, you can follow the [instructions over here](https://tkdocs.com/tutorial/install.html), specifically the following:
157
+ **Windows:**
158
158
  - Install Ruby+Devkit (including MSYS/MINGW toolchains) through Windows Installer: https://rubyinstaller.org/downloads/
159
- - Install the ActiveTcl Windows package from [ActiveState.com](https://activestate.com)
159
+ - Install the ActiveTcl 8.6 Windows package from [ActiveState.com](https://activestate.com)
160
160
  - Follow this instruction: "First, Ruby needs to find the tcl86t.dll and tk86t.dll shared libraries. These are located in C:\ActiveTcl\bin. Make a copy of them somewhere Ruby can find them, e.g. C:\Ruby26\bin."
161
161
  - Setup environment variables TCL_LIBRARY=C:\ActiveTcl\lib\tcl8.6 & TK_LIBRARY=C:\ActiveTcl\lib\tk8.6
162
162
  - Run: `gem install tk -v0.4.0`
163
163
 
164
- For example, on Linux, you can:
165
- - Download the ActiveTcl Linux package from [ActiveState.com](https://activestate.com)
164
+ **Linux:**
165
+ - Download the ActiveTcl 8.6 Linux package from [ActiveState.com](https://activestate.com)
166
166
  - Extract the tar gz file using command `tar zxvf ActiveTcl-version-number.tar.gz`
167
167
  - Run included install shell script `./ActiveTcl-version-number/install.sh`
168
168
  - 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)
@@ -173,6 +173,8 @@ Afterwards, if you open `irb`, you should be able to run `require 'tk'` successf
173
173
 
174
174
  ## Setup
175
175
 
176
+ Assuming you have all [Pre-Requisites](#pre-requisites) ready, follow these instructions to setup the [Ruby gem](https://rubygems.org/gems/glimmer-dsl-tk).
177
+
176
178
  ### Option 1: Install
177
179
 
178
180
  Run this command to install directly:
@@ -184,7 +186,7 @@ gem install glimmer-dsl-tk
184
186
 
185
187
  Add the following to `Gemfile`:
186
188
  ```
187
- gem 'glimmer-dsl-tk', '0.0.51'
189
+ gem 'glimmer-dsl-tk', '0.0.52'
188
190
  ```
189
191
 
190
192
  And, then run:
@@ -484,13 +486,13 @@ Check out the [Hello, Scrollbar!](#hello-scrollbar) sample for a `text` demo wit
484
486
 
485
487
  #### Drag and Drop API
486
488
 
487
- Drag and drop works by simply designating a widget as a drag source with attribute `drag_source true` and another widget as a drop target with attribute `drop_target true`.
489
+ Thanks to the vision of [vin1antme](https://github.com/vin1antme) (contributor), drag and drop works by simply designating a widget as a draggable with attribute `drag_source true` and another widget as a droppable with attribute `drop_target true`.
488
490
 
489
- Alternatively, add listeners on the drag source:
491
+ Alternatively, for advanced customization, add listeners on the draggable:
490
492
  - `on('drag_start') {|event| ...}`: fires on drag start receiving an `event` arg to set `data` and configure `source`
491
493
  - `on('drag_motion') {|event| ...}`: fires on drag motion receiving an `event` arg to check `event#drop_accepted`, and configure `source` and `tooltip`
492
494
 
493
- And on the drop target, add listener:
495
+ And, add a listener on the droppable:
494
496
  - `on('drop') { |event| ...}`: fires on drop, receiving an `event` arg with `event#target` and `event#data` (set during drag). You can even destroy the `event#source` if you want to get rid of the dragged widget.
495
497
 
496
498
  These are all the available attributes on event, which is of type `DragAndDropEvent`:
@@ -624,7 +626,25 @@ More details can be found in the [Hello, Computed!](#hello-computed) sample belo
624
626
 
625
627
  ## Data-Binding
626
628
 
627
- Glimmer supports Shine syntax bidirectional data-binding via the `<=>` operator (read-write) and unidirectional data-binding via the `<=` operator (read-only), which takes a model and an attribute (the `bind` keyword may also be used as the old-style of data-binding).
629
+ Glimmer supports Shine syntax bidirectional data-binding via the `<=>` operator (read-write) and unidirectional data-binding via the `<=` operator (read-only), which takes a model and an attribute (the `bind(model, attribute, *options)` keyword may also be used as the old-style of data-binding).
630
+
631
+ To summarize the data-binding API:
632
+ - `view_property <=> [model, attribute, *read_or_write_options]`: Bidirectional (two-way) data-binding to Model attribute accessor
633
+ - `view_property <= [model, attribute, *read_only_options]`: Unidirectional (one-way) data-binding to Model attribute reader
634
+
635
+ Data-bound model attribute can be:
636
+ - **Direct:** `Symbol` representing attribute reader/writer (e.g. `[person, :name`])
637
+ - **Nested:** `String` representing nested attribute path (e.g. `[company, 'address.street']`). That results in "nested data-binding"
638
+ - **Indexed:** `String` containing array attribute index (e.g. `[customer, 'addresses[0].street']`). That results in "indexed data-binding"
639
+
640
+ Data-binding options include:
641
+ - `before_read {|value| ...}`: performs an operation before reading data from Model to update View.
642
+ - `on_read {|value| ...}`: converts value read from Model to update the View.
643
+ - `after_read {|converted_value| ...}`: performs an operation after read from Model to update View.
644
+ - `before_write {|value| ...}`: performs an operation before writing data to Model from View.
645
+ - `on_write {|value| ...}`: converts value read from View to update the Model.
646
+ - `after_write {|converted_value| ...}`: performs an operation after writing to Model from View.
647
+ - `computed_by attribute` or `computed_by [attribute1, attribute2, ...]`: indicates model attribute is computed from specified attribute(s), thus updated when they are updated. That is known as "computed data-binding".
628
648
 
629
649
  ### Label Data-Binding
630
650
 
@@ -3365,16 +3385,24 @@ root { |r|
3365
3385
  menu_item(:radiobutton, label: image_name.capitalize) {
3366
3386
  selection image_name == 'usa'
3367
3387
  image File.expand_path("images/#{image_name}.png", __dir__)
3388
+
3389
+ on('command') do
3390
+ message_box(parent: r, title: 'Language Selection', message: "You selected the language of #{image_name.capitalize}!")
3391
+ end
3368
3392
  }
3369
3393
  end
3370
3394
  }
3371
3395
 
3372
- menu(label: 'Country', underline: 3) {
3396
+ menu(label: 'Country', underline: 0) {
3373
3397
  ['denmark', 'finland', 'france', 'germany', 'italy', 'mexico', 'netherlands', 'norway', 'usa'].each do |image_name|
3374
3398
  menu_item(:radiobutton, label: image_name.capitalize) {
3375
3399
  selection image_name == 'usa'
3376
3400
  image File.expand_path("images/#{image_name}.png", __dir__)
3377
3401
  compound 'left'
3402
+
3403
+ on('command') do
3404
+ message_box(parent: r, title: 'Country Selection', message: "You selected the country of #{image_name.capitalize}!")
3405
+ end
3378
3406
  }
3379
3407
  end
3380
3408
  }
@@ -3582,6 +3610,10 @@ root { |r|
3582
3610
  menu_item(:radiobutton, label: image_name.capitalize) {
3583
3611
  selection image_name == 'usa'
3584
3612
  image File.expand_path("images/#{image_name}.png", __dir__)
3613
+
3614
+ on('command') do
3615
+ message_box(parent: r, title: 'Language Selection', message: "You selected the language of #{image_name.capitalize}!")
3616
+ end
3585
3617
  }
3586
3618
  end
3587
3619
  }
@@ -3592,10 +3624,14 @@ root { |r|
3592
3624
  selection image_name == 'usa'
3593
3625
  image File.expand_path("images/#{image_name}.png", __dir__)
3594
3626
  compound 'left'
3627
+
3628
+ on('command') do
3629
+ message_box(parent: r, title: 'Country Selection', message: "You selected the country of #{image_name.capitalize}!")
3630
+ end
3595
3631
  }
3596
3632
  end
3597
3633
  }
3598
-
3634
+
3599
3635
  menu(label: 'Format', underline: 3) {
3600
3636
  menu(label: 'Background Color', underline: 0) {
3601
3637
  COLORS.each { |color_style|
@@ -3716,10 +3752,10 @@ https://github.com/cryptopunksnotdead/cryptopunks-gui
3716
3752
 
3717
3753
  Generate an icon of overlapping circles derived from a hash.
3718
3754
 
3719
- https://gitlab.com/fjc/circule
3720
-
3721
3755
  [Demo Video](https://gitlab.com/fjc/circule/-/raw/master/circule-demo.mp4)
3722
3756
 
3757
+ https://gitlab.com/fjc/circule
3758
+
3723
3759
  ## Process
3724
3760
 
3725
3761
  [Glimmer Process](https://github.com/AndyObtiva/glimmer/blob/master/PROCESS.md)
@@ -3764,7 +3800,7 @@ These features have been planned or suggested. You might see them in a future ve
3764
3800
 
3765
3801
  [MIT](LICENSE.txt)
3766
3802
 
3767
- Copyright (c) 2020-2021 - Andy Maleh.
3803
+ Copyright (c) 2020-2022 - Andy Maleh.
3768
3804
 
3769
3805
  --
3770
3806
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.51
1
+ 0.0.52
data/bin/girb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # Copyright (c) 2020-2021 Andy Maleh
3
+ # Copyright (c) 2020-2022 Andy Maleh
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining
6
6
  # a copy of this software and associated documentation files (the
data/bin/girb_runner.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
Binary file
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,3 +1,24 @@
1
+ # Copyright (c) 2020-2022 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
+
1
22
  module Glimmer
2
23
  module Tk
3
24
  DragAndDropEvent = Struct.new(:source, :target, :tooltip, :x_root, :y_root, :data, :drop_accepted) do
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
data/lib/glimmer/tk/os.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -29,7 +29,7 @@ module Glimmer
29
29
  class ToplevelProxy < WidgetProxy
30
30
  REGEX_GEOMETRY = /[x+-]/
31
31
  DEFAULT_WIDTH = 190
32
- DEFAULT_HEIGHT = 95
32
+ DEFAULT_HEIGHT = 0
33
33
 
34
34
  attr_reader :tk
35
35
  attr_accessor :escapable
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -393,8 +393,13 @@ module Glimmer
393
393
  if observer.is_a?(Glimmer::DataBinding::ModelBinding)
394
394
  model = observer.model
395
395
  options_model_property = observer.property_name + '_options'
396
- # TODO perform data-binding to values too
397
- @tk.values = model.send(options_model_property) if model.respond_to?(options_model_property)
396
+ if model.respond_to?(options_model_property)
397
+ options_observer = Glimmer::DataBinding::Observer.proc do
398
+ @tk.values = model.send(options_model_property)
399
+ end
400
+ options_observer.observe(model, options_model_property)
401
+ options_observer.call
402
+ end
398
403
  end
399
404
  @tk.bind('<ComboboxSelected>') {
400
405
  observer.call(@tk.textvariable.value)
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,5 +1,4 @@
1
-
2
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
3
2
  #
4
3
  # Permission is hereby granted, free of charge, to any person obtaining
5
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020-2021 Andy Maleh
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
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
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-tk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.51
4
+ version: 0.0.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-13 00:00:00.000000000 Z
11
+ date: 2022-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glimmer
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.5.1
19
+ version: 2.6.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.5.1
26
+ version: 2.6.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: puts_debuggerer
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -295,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
295
295
  - !ruby/object:Gem::Version
296
296
  version: '0'
297
297
  requirements: []
298
- rubygems_version: 3.2.31
298
+ rubygems_version: 3.3.1
299
299
  signing_key:
300
300
  specification_version: 4
301
301
  summary: Glimmer DSL for Tk