glimmer-dsl-tk 0.0.51 → 0.0.55

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +316 -32
  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/labelframe_proxy.rb +39 -0
  33. data/lib/glimmer/tk/lbl_proxy.rb +1 -1
  34. data/lib/glimmer/tk/list_proxy.rb +1 -1
  35. data/lib/glimmer/tk/menu_item_proxy.rb +10 -2
  36. data/lib/glimmer/tk/menu_proxy.rb +1 -1
  37. data/lib/glimmer/tk/notebook_proxy.rb +1 -1
  38. data/lib/glimmer/tk/os.rb +1 -1
  39. data/lib/glimmer/tk/radiobutton_proxy.rb +1 -1
  40. data/lib/glimmer/tk/root_proxy.rb +1 -1
  41. data/lib/glimmer/tk/scale_proxy.rb +48 -0
  42. data/lib/glimmer/tk/scrollbar_frame_proxy.rb +1 -1
  43. data/lib/glimmer/tk/spinbox_proxy.rb +1 -1
  44. data/lib/glimmer/tk/text_proxy.rb +1 -1
  45. data/lib/glimmer/tk/text_variable_owner.rb +1 -1
  46. data/lib/glimmer/tk/toplevel_proxy.rb +2 -2
  47. data/lib/glimmer/tk/treeview_proxy.rb +1 -1
  48. data/lib/glimmer/tk/variable_owner.rb +1 -1
  49. data/lib/glimmer/tk/widget.rb +1 -1
  50. data/lib/glimmer/tk/widget_proxy.rb +21 -3
  51. data/lib/glimmer-dsl-tk.rb +1 -1
  52. data/samples/elaborate/meta_sample.rb +1 -1
  53. data/samples/hello/hello_built_in_dialog.rb +1 -1
  54. data/samples/hello/hello_button.rb +1 -1
  55. data/samples/hello/hello_checkbutton.rb +1 -1
  56. data/samples/hello/hello_combobox.rb +1 -2
  57. data/samples/hello/hello_computed.rb +1 -1
  58. data/samples/hello/hello_contextual_menu.rb +1 -1
  59. data/samples/hello/hello_drag_and_drop.rb +1 -1
  60. data/samples/hello/hello_entry.rb +1 -1
  61. data/samples/hello/hello_frame.rb +1 -1
  62. data/samples/hello/hello_label.rb +1 -1
  63. data/samples/hello/hello_labelframe.rb +161 -0
  64. data/samples/hello/hello_list_multi_selection.rb +1 -1
  65. data/samples/hello/hello_list_single_selection.rb +1 -1
  66. data/samples/hello/hello_menu_bar.rb +5 -2
  67. data/samples/hello/hello_message_box.rb +1 -1
  68. data/samples/hello/hello_notebook.rb +1 -1
  69. data/samples/hello/hello_radiobutton.rb +1 -1
  70. data/samples/hello/hello_root.rb +1 -1
  71. data/samples/hello/hello_scale.rb +53 -0
  72. data/samples/hello/hello_scrollbar.rb +1 -1
  73. data/samples/hello/hello_scrollbar_frame.rb +1 -1
  74. data/samples/hello/hello_separator.rb +1 -1
  75. data/samples/hello/hello_spinbox.rb +1 -1
  76. data/samples/hello/hello_text.rb +1 -1
  77. data/samples/hello/hello_toplevel.rb +1 -1
  78. data/samples/hello/hello_world.rb +1 -1
  79. metadata +9 -5
@@ -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
@@ -41,7 +41,8 @@ root { |r|
41
41
  # Mac-specific application menu (right next to the Apple menu)
42
42
  if OS.mac?
43
43
  menu(:application) {
44
- menu_item(:about, label: 'About My Application') {
44
+ # menu_item(:about, label: 'About My Application') {
45
+ menu_item(:about) {
45
46
  accelerator 'Command+A'
46
47
 
47
48
  on('command') do
@@ -99,6 +100,8 @@ root { |r|
99
100
  menu_item(:separator)
100
101
 
101
102
  menu_item(label: 'Exit', underline: 1) {
103
+ accelerator 'Alt+F4'
104
+
102
105
  on('command') do
103
106
  exit(0)
104
107
  end
@@ -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
@@ -0,0 +1,53 @@
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
+
22
+ require 'glimmer-dsl-tk'
23
+
24
+ class HelloScale
25
+ include Glimmer
26
+
27
+ attr_accessor :scale_value
28
+
29
+ def initialize
30
+ self.scale_value = 50
31
+ end
32
+
33
+ def launch
34
+ root {
35
+ text 'Hello, Scale!'
36
+
37
+ label {
38
+ anchor 'center'
39
+ text <= [self, :scale_value]
40
+ }
41
+
42
+ scale {
43
+ orient 'horizontal' # can be 'vertical' too
44
+ length 200
45
+ from 0.0
46
+ to 100.0
47
+ variable <=> [self, :scale_value, on_write: ->(val) {val.to_i}]
48
+ }
49
+ }.open
50
+ end
51
+ end
52
+
53
+ HelloScale.new.launch
@@ -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.55
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-02-20 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
@@ -213,6 +213,7 @@ files:
213
213
  - lib/glimmer/tk/entry_proxy.rb
214
214
  - lib/glimmer/tk/frame_proxy.rb
215
215
  - lib/glimmer/tk/label_proxy.rb
216
+ - lib/glimmer/tk/labelframe_proxy.rb
216
217
  - lib/glimmer/tk/lbl_proxy.rb
217
218
  - lib/glimmer/tk/list_proxy.rb
218
219
  - lib/glimmer/tk/menu_item_proxy.rb
@@ -221,6 +222,7 @@ files:
221
222
  - lib/glimmer/tk/os.rb
222
223
  - lib/glimmer/tk/radiobutton_proxy.rb
223
224
  - lib/glimmer/tk/root_proxy.rb
225
+ - lib/glimmer/tk/scale_proxy.rb
224
226
  - lib/glimmer/tk/scrollbar_frame_proxy.rb
225
227
  - lib/glimmer/tk/spinbox_proxy.rb
226
228
  - lib/glimmer/tk/text_proxy.rb
@@ -242,6 +244,7 @@ files:
242
244
  - samples/hello/hello_entry.rb
243
245
  - samples/hello/hello_frame.rb
244
246
  - samples/hello/hello_label.rb
247
+ - samples/hello/hello_labelframe.rb
245
248
  - samples/hello/hello_list_multi_selection.rb
246
249
  - samples/hello/hello_list_single_selection.rb
247
250
  - samples/hello/hello_menu_bar.rb
@@ -249,6 +252,7 @@ files:
249
252
  - samples/hello/hello_notebook.rb
250
253
  - samples/hello/hello_radiobutton.rb
251
254
  - samples/hello/hello_root.rb
255
+ - samples/hello/hello_scale.rb
252
256
  - samples/hello/hello_scrollbar.rb
253
257
  - samples/hello/hello_scrollbar_frame.rb
254
258
  - samples/hello/hello_separator.rb
@@ -295,7 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
295
299
  - !ruby/object:Gem::Version
296
300
  version: '0'
297
301
  requirements: []
298
- rubygems_version: 3.2.31
302
+ rubygems_version: 3.3.1
299
303
  signing_key:
300
304
  specification_version: 4
301
305
  summary: Glimmer DSL for Tk