glimmer-dsl-libui 0.12.7 → 0.13.0

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.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +8 -6
  5. data/VERSION +1 -1
  6. data/bin/girb +1 -1
  7. data/bin/girb_runner.rb +1 -1
  8. data/bin/glimmer +1 -1
  9. data/docs/examples/GLIMMER-DSL-LIBUI-ADVANCED-EXAMPLES.md +1 -1
  10. data/examples/button_counter.rb +8 -10
  11. data/examples/snake/model/game.rb +12 -12
  12. data/examples/tetris/model/block.rb +1 -1
  13. data/examples/tetris/model/game.rb +1 -1
  14. data/examples/tetris/model/past_game.rb +1 -1
  15. data/examples/tetris/model/tetromino.rb +1 -1
  16. data/examples/tetris.rb +1 -1
  17. data/examples/tic_tac_toe/board.rb +1 -1
  18. data/examples/tic_tac_toe/cell.rb +1 -1
  19. data/glimmer-dsl-libui.gemspec +0 -0
  20. data/lib/glimmer/dsl/libui/bind_expression.rb +1 -1
  21. data/lib/glimmer/dsl/libui/content_expression.rb +1 -1
  22. data/lib/glimmer/dsl/libui/control_expression.rb +1 -1
  23. data/lib/glimmer/dsl/libui/custom_control_expression.rb +1 -1
  24. data/lib/glimmer/dsl/libui/custom_control_slot_content_expression.rb +1 -1
  25. data/lib/glimmer/dsl/libui/custom_shape_expression.rb +1 -1
  26. data/lib/glimmer/dsl/libui/data_binding_expression.rb +1 -1
  27. data/lib/glimmer/dsl/libui/dsl.rb +1 -1
  28. data/lib/glimmer/dsl/libui/file_expression.rb +1 -1
  29. data/lib/glimmer/dsl/libui/listener_expression.rb +1 -1
  30. data/lib/glimmer/dsl/libui/observe_expression.rb +1 -1
  31. data/lib/glimmer/dsl/libui/open_file_expression.rb +1 -1
  32. data/lib/glimmer/dsl/libui/open_folder_expression.rb +1 -1
  33. data/lib/glimmer/dsl/libui/operation_expression.rb +1 -1
  34. data/lib/glimmer/dsl/libui/property_expression.rb +1 -1
  35. data/lib/glimmer/dsl/libui/save_file_expression.rb +1 -1
  36. data/lib/glimmer/dsl/libui/shape_expression.rb +1 -1
  37. data/lib/glimmer/dsl/libui/shine_data_binding_expression.rb +1 -1
  38. data/lib/glimmer/dsl/libui/string_expression.rb +1 -1
  39. data/lib/glimmer/dsl/libui/tab_item_expression.rb +1 -1
  40. data/lib/glimmer/fiddle_consumer.rb +1 -1
  41. data/lib/glimmer/libui/attributed_string.rb +1 -1
  42. data/lib/glimmer/libui/control_proxy/area_proxy/scrolling_area_proxy.rb +1 -1
  43. data/lib/glimmer/libui/control_proxy/area_proxy.rb +1 -1
  44. data/lib/glimmer/libui/control_proxy/box/horizontal_box_proxy.rb +1 -1
  45. data/lib/glimmer/libui/control_proxy/box/vertical_box_proxy.rb +1 -1
  46. data/lib/glimmer/libui/control_proxy/box.rb +1 -1
  47. data/lib/glimmer/libui/control_proxy/button_proxy.rb +1 -1
  48. data/lib/glimmer/libui/control_proxy/checkbox_proxy.rb +1 -1
  49. data/lib/glimmer/libui/control_proxy/color_button_proxy.rb +1 -1
  50. data/lib/glimmer/libui/control_proxy/column/background_color_column_proxy.rb +1 -1
  51. data/lib/glimmer/libui/control_proxy/column/button_column_proxy.rb +1 -1
  52. data/lib/glimmer/libui/control_proxy/column/checkbox_column_proxy.rb +1 -1
  53. data/lib/glimmer/libui/control_proxy/column/checkbox_text_color_column_proxy.rb +1 -1
  54. data/lib/glimmer/libui/control_proxy/column/checkbox_text_column_proxy.rb +1 -1
  55. data/lib/glimmer/libui/control_proxy/column/image_column_proxy.rb +1 -1
  56. data/lib/glimmer/libui/control_proxy/column/image_text_color_column_proxy.rb +1 -1
  57. data/lib/glimmer/libui/control_proxy/column/image_text_column_proxy.rb +1 -1
  58. data/lib/glimmer/libui/control_proxy/column/progress_bar_column_proxy.rb +1 -1
  59. data/lib/glimmer/libui/control_proxy/column/text_color_column_proxy.rb +1 -1
  60. data/lib/glimmer/libui/control_proxy/column/text_column_proxy.rb +1 -1
  61. data/lib/glimmer/libui/control_proxy/column.rb +1 -1
  62. data/lib/glimmer/libui/control_proxy/combobox_proxy.rb +16 -11
  63. data/lib/glimmer/libui/control_proxy/date_time_picker_proxy/date_picker_proxy.rb +1 -1
  64. data/lib/glimmer/libui/control_proxy/date_time_picker_proxy/time_picker_proxy.rb +1 -1
  65. data/lib/glimmer/libui/control_proxy/date_time_picker_proxy.rb +1 -1
  66. data/lib/glimmer/libui/control_proxy/dual_column.rb +1 -1
  67. data/lib/glimmer/libui/control_proxy/editable_column.rb +1 -1
  68. data/lib/glimmer/libui/control_proxy/editable_combobox_proxy.rb +10 -10
  69. data/lib/glimmer/libui/control_proxy/enableable_column.rb +1 -1
  70. data/lib/glimmer/libui/control_proxy/entry_proxy/password_entry_proxy.rb +1 -1
  71. data/lib/glimmer/libui/control_proxy/entry_proxy/search_entry_proxy.rb +1 -1
  72. data/lib/glimmer/libui/control_proxy/entry_proxy.rb +1 -1
  73. data/lib/glimmer/libui/control_proxy/font_button_proxy.rb +1 -1
  74. data/lib/glimmer/libui/control_proxy/form_proxy.rb +1 -1
  75. data/lib/glimmer/libui/control_proxy/grid_proxy.rb +1 -1
  76. data/lib/glimmer/libui/control_proxy/group_proxy.rb +1 -1
  77. data/lib/glimmer/libui/control_proxy/image_part_proxy.rb +1 -1
  78. data/lib/glimmer/libui/control_proxy/image_proxy.rb +1 -1
  79. data/lib/glimmer/libui/control_proxy/label_proxy.rb +1 -1
  80. data/lib/glimmer/libui/control_proxy/matrix_proxy.rb +1 -1
  81. data/lib/glimmer/libui/control_proxy/menu_item_proxy/about_menu_item_proxy.rb +1 -1
  82. data/lib/glimmer/libui/control_proxy/menu_item_proxy/check_menu_item_proxy.rb +1 -1
  83. data/lib/glimmer/libui/control_proxy/menu_item_proxy/preferences_menu_item_proxy.rb +1 -1
  84. data/lib/glimmer/libui/control_proxy/menu_item_proxy/quit_menu_item_proxy.rb +1 -1
  85. data/lib/glimmer/libui/control_proxy/menu_item_proxy/radio_menu_item_proxy.rb +1 -1
  86. data/lib/glimmer/libui/control_proxy/menu_item_proxy/separator_menu_item_proxy.rb +1 -1
  87. data/lib/glimmer/libui/control_proxy/menu_item_proxy.rb +1 -1
  88. data/lib/glimmer/libui/control_proxy/menu_proxy.rb +1 -1
  89. data/lib/glimmer/libui/control_proxy/message_box/msg_box_error_proxy.rb +1 -1
  90. data/lib/glimmer/libui/control_proxy/message_box/msg_box_proxy.rb +1 -1
  91. data/lib/glimmer/libui/control_proxy/message_box.rb +1 -1
  92. data/lib/glimmer/libui/control_proxy/multiline_entry_proxy/non_wrapping_multiline_entry_proxy.rb +1 -1
  93. data/lib/glimmer/libui/control_proxy/multiline_entry_proxy.rb +1 -1
  94. data/lib/glimmer/libui/control_proxy/open_type_features_proxy.rb +1 -1
  95. data/lib/glimmer/libui/control_proxy/open_type_tag_proxy.rb +1 -1
  96. data/lib/glimmer/libui/control_proxy/path_proxy.rb +1 -1
  97. data/lib/glimmer/libui/control_proxy/radio_buttons_proxy.rb +1 -1
  98. data/lib/glimmer/libui/control_proxy/slider_proxy.rb +1 -1
  99. data/lib/glimmer/libui/control_proxy/spinbox_proxy.rb +1 -1
  100. data/lib/glimmer/libui/control_proxy/tab_item_proxy.rb +1 -1
  101. data/lib/glimmer/libui/control_proxy/table_proxy.rb +1 -1
  102. data/lib/glimmer/libui/control_proxy/text_proxy.rb +1 -1
  103. data/lib/glimmer/libui/control_proxy/transformable.rb +1 -1
  104. data/lib/glimmer/libui/control_proxy/triple_column.rb +1 -1
  105. data/lib/glimmer/libui/control_proxy/window_proxy.rb +1 -1
  106. data/lib/glimmer/libui/control_proxy.rb +1 -1
  107. data/lib/glimmer/libui/custom_control/code_area.rb +1 -1
  108. data/lib/glimmer/libui/custom_control/code_entry.rb +1 -1
  109. data/lib/glimmer/libui/custom_control/refined_table.rb +2 -2
  110. data/lib/glimmer/libui/custom_control.rb +1 -1
  111. data/lib/glimmer/libui/custom_shape.rb +1 -1
  112. data/lib/glimmer/libui/custom_window.rb +1 -1
  113. data/lib/glimmer/libui/data_bindable.rb +1 -1
  114. data/lib/glimmer/libui/parent.rb +1 -1
  115. data/lib/glimmer/libui/shape/arc.rb +1 -1
  116. data/lib/glimmer/libui/shape/bezier.rb +1 -1
  117. data/lib/glimmer/libui/shape/circle.rb +1 -1
  118. data/lib/glimmer/libui/shape/figure.rb +1 -1
  119. data/lib/glimmer/libui/shape/line.rb +1 -1
  120. data/lib/glimmer/libui/shape/polybezier.rb +1 -1
  121. data/lib/glimmer/libui/shape/polygon.rb +1 -1
  122. data/lib/glimmer/libui/shape/polyline.rb +1 -1
  123. data/lib/glimmer/libui/shape/rectangle.rb +1 -1
  124. data/lib/glimmer/libui/shape/square.rb +1 -1
  125. data/lib/glimmer/libui/shape.rb +1 -1
  126. data/lib/glimmer/libui.rb +2 -2
  127. data/lib/glimmer/rake_task/package.rb +1 -1
  128. data/lib/glimmer/rake_task/scaffold.rb +1 -1
  129. data/lib/glimmer/rake_task.rb +1 -1
  130. data/lib/glimmer-dsl-libui.rb +1 -1
  131. metadata +20 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d95327be14547ec2bbc41b7d963c00a432a6ae3fbcb5b41c9b900cba967194d8
4
- data.tar.gz: 3bf11f49b498aabd0d6c2bc35a8e49be99aeb60066a3095a2ce08c866d2861c2
3
+ metadata.gz: 43ae658184be717b4516022b2233f3ecba9dca4f258b307bc81b9488b8387f70
4
+ data.tar.gz: e09b32411f1301deba1312b78f86288708dc56964e08a97165b1d55e156dfc80
5
5
  SHA512:
6
- metadata.gz: 6dca03d07a89a0c700f50509a3f1a56c8321b7b44d38de794f7a4b81d415981c35d463623294b332350517001c2f7c6f841d2d27a18ec79546f884161798799b
7
- data.tar.gz: bf843b6399671fdd87f7a6c3f60b17a45506d23477e6273dddb6263540925bc73c9ef3031ef9228e9b1d7ea4c37cf8355c5c22b6c3d3896c0ed05e0d6fbf4623
6
+ metadata.gz: 899b60f962b0df986a447353e2cd80578a1306fadee0edfefea1bf9089c8856576189dfca33a3bb2ebb8239394f9d719195cef03bbc9e31eb714ef44058b3186
7
+ data.tar.gz: bb6ec4a596ce49130190fa3870ca472965d5b958ec05c1e0d7ecdf2a3c0593ab290079d4dc60823c098f610f8bb85c8270330c5ecd3e634c0f5ecfbe11becf21
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.13.0
4
+
5
+ - Support `combobox` `items` unidirectional data-binding
6
+ - Update color gem to version 2
7
+ - Refactor/simplify examples/button_counter.rb by removing unnecessary `vertical_box` (Glimmer DSL for LibUI implicitly adds it automatically when needed)
8
+ - Fix issue of `combobox` `selected_item` bidirectional data-binding not working correctly like `selected` data-binding does
9
+
10
+ ## 0.12.8
11
+
12
+ - Fix issue with refined_table crashing when filtering by a specific column (e.g. name:john) and column is not found
13
+ - Fix broken spec/examples/snake/model/game_spec.rb due to method being made private incorrectly
14
+
3
15
  ## 0.12.7
4
16
 
5
17
  - Application Scaffolding now generates the main view as `SomeNameApplication` (with `_application` suffix in file name) to indicate clearly it is a `Glimmer::LibUI::Application` class.
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2021-2024 Andy Maleh
1
+ Copyright (c) 2021-2025 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,12 +1,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.7
2
- ## Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library ([Fukuoka Award Winning](http://www.digitalfukuoka.jp/topics/187?locale=ja))
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.13.0
2
+ ## Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library ([Fukuoka Award Winning](https://andymaleh.blogspot.com/2022/02/glimmer-dsl-for-libui-wins-fukuoka-ruby.html))
3
3
  ### The Quickest Way From Zero To GUI
4
4
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-libui.svg)](http://badge.fury.io/rb/glimmer-dsl-libui)
5
5
  [![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)
6
6
 
7
7
  **[If You Liked Shoes, You'll Love Glimmer!](https://github.com/AndyObtiva/glimmer#faq)**
8
8
 
9
- (**[Fukuoka Ruby Award Competition 2022 Special Award Winner](https://andymaleh.blogspot.com/2022/02/glimmer-dsl-for-libui-wins-fukuoka-ruby.html)** [[Award Announcement]](http://www.digitalfukuoka.jp/topics/187?locale=ja))
9
+ (**[Fukuoka Ruby Award Competition 2022 Special Award Winner](https://andymaleh.blogspot.com/2022/02/glimmer-dsl-for-libui-wins-fukuoka-ruby.html)**)
10
10
 
11
11
  (**[***RubyConf 2024 Workshop - How To Build Basic Desktop Applications in Ruby***](https://www.youtube.com/watch?v=TTSqRdTVtDY)**)
12
12
 
@@ -16,7 +16,7 @@
16
16
 
17
17
  [**(Ruby Rogues Podcast Interview - Desktop Apps in Ruby ft. Andy)**](https://andymaleh.blogspot.com/2022/05/ruby-rogues-podcast-interview-desktop.html)
18
18
 
19
- [Glimmer](https://github.com/AndyObtiva/glimmer) DSL for [LibUI](https://github.com/libui-ng/libui-ng) is a [Fukuoka Award Winning](http://www.digitalfukuoka.jp/topics/187?locale=ja) prerequisite-free [MRI Ruby](https://www.ruby-lang.org) desktop development cross-platform native GUI (Graphical User Interface) library. No need to pre-install any prerequisites. Just install the [gem](https://rubygems.org/gems/glimmer-dsl-libui) and have cross-platform native GUI that just works on Mac, Windows, and Linux!
19
+ [Glimmer](https://github.com/AndyObtiva/glimmer) DSL for [LibUI](https://github.com/libui-ng/libui-ng) is a [Fukuoka Award Winning](https://andymaleh.blogspot.com/2022/02/glimmer-dsl-for-libui-wins-fukuoka-ruby.html) prerequisite-free [MRI Ruby](https://www.ruby-lang.org) desktop development cross-platform native GUI (Graphical User Interface) library. No need to pre-install any prerequisites. Just install the [gem](https://rubygems.org/gems/glimmer-dsl-libui) and have cross-platform native GUI that just works on Mac, Windows, and Linux!
20
20
 
21
21
  Mac | Windows | Linux
22
22
  ----|---------|------
@@ -26,6 +26,8 @@ Mac | Windows | Linux
26
26
 
27
27
  The main trade-off in using [Glimmer DSL for LibUI](https://rubygems.org/gems/glimmer-dsl-libui) as opposed to [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) or [Glimmer DSL for Tk](https://github.com/AndyObtiva/glimmer-dsl-tk) is the fact that [SWT](https://www.eclipse.org/swt/) and [Tk](https://www.tcl.tk/) are more mature than mid-alpha [libui](https://github.com/libui-ng/libui-ng) as GUI toolkits. Still, if there is only a need to build a small simple application, [Glimmer DSL for LibUI](https://rubygems.org/gems/glimmer-dsl-libui) could be a good convenient choice due to having zero prerequisites (beyond Ruby and the dependencies included in the [Ruby gem](https://rubygems.org/gems/glimmer-dsl-libui)). Also, just like [Glimmer DSL for Tk](https://github.com/AndyObtiva/glimmer-dsl-tk), its apps start instantly and have a small memory footprint. [LibUI](https://github.com/kojix2/LibUI) is a promising new GUI toolkit that might prove quite worthy in the future.
28
28
 
29
+ Note that the new [Glimmer DSL for WX](https://github.com/AndyObtiva/glimmer-dsl-wx) is supporting the new wxruby3 binding for wxWidgets, which offers native GUI support just like LibUI, but with a mature toolkit. If you need to build more serious native GUI apps and prefer CRuby over JRuby, then [Glimmer DSL for WX](https://github.com/AndyObtiva/glimmer-dsl-wx) could be the best option for that.
30
+
29
31
  [Glimmer DSL for LibUI](https://rubygems.org/gems/glimmer-dsl-libui) 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:
30
32
  - [Declarative DSL syntax](#glimmer-gui-dsl-concepts) that visually maps to the GUI control hierarchy
31
33
  - [Convention over configuration](#smart-defaults-and-conventions) via smart defaults and automation of low-level details
@@ -466,7 +468,7 @@ gem install glimmer-dsl-libui
466
468
  Or install via Bundler `Gemfile`:
467
469
 
468
470
  ```ruby
469
- gem 'glimmer-dsl-libui', '~> 0.12.7'
471
+ gem 'glimmer-dsl-libui', '~> 0.13.0'
470
472
  ```
471
473
 
472
474
  Test that installation worked by running the [Glimmer Meta-Example](#examples):
@@ -4601,7 +4603,7 @@ Note that the latest development sometimes takes place in the [development](http
4601
4603
 
4602
4604
  [MIT](LICENSE.txt)
4603
4605
 
4604
- Copyright (c) 2021-2024 Andy Maleh
4606
+ Copyright (c) 2021-2025 Andy Maleh
4605
4607
 
4606
4608
  --
4607
4609
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.7
1
+ 0.13.0
data/bin/girb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # Copyright (c) 2021-2024 Andy Maleh
3
+ # Copyright (c) 2021-2025 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) 2021-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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/bin/glimmer CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # Copyright (c) 2021-2024 Andy Maleh
3
+ # Copyright (c) 2021-2025 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
@@ -2916,7 +2916,7 @@ class Tetris
2916
2916
 
2917
2917
  def show_about_dialog
2918
2918
  Glimmer::LibUI.queue_main do
2919
- msg_box('About', 'Glimmer Tetris - Glimmer DSL for LibUI Example - Copyright (c) 2021-2024 Andy Maleh')
2919
+ msg_box('About', 'Glimmer Tetris - Glimmer DSL for LibUI Example - Copyright (c) 2021-2025 Andy Maleh')
2920
2920
  end
2921
2921
  end
2922
2922
  end
@@ -17,16 +17,14 @@ class ButtonCounter
17
17
 
18
18
  body {
19
19
  window('Hello, Button!', 190, 20) {
20
- vertical_box {
21
- button {
22
- # data-bind button text to @counter count, converting to string on read from model.
23
- text <= [@counter, :count, on_read: ->(count) {"Count: #{count}"}]
24
-
25
- on_clicked do
26
- # This change will automatically propagate to button text through data-binding above
27
- @counter.count += 1
28
- end
29
- }
20
+ button {
21
+ # data-bind button text to @counter count, converting to string on read from model.
22
+ text <= [@counter, :count, on_read: ->(count) {"Count: #{count}"}]
23
+
24
+ on_clicked do
25
+ # This count change will automatically propagate to button text through data-binding above
26
+ @counter.count += 1
27
+ end
30
28
  }
31
29
  }
32
30
  }
@@ -24,18 +24,6 @@ class Snake
24
24
  @high_score = File.read(FILE_HIGH_SCORE).to_i rescue 0
25
25
  end
26
26
 
27
- def score=(new_score)
28
- @score = new_score
29
- self.high_score = @score if @score > @high_score
30
- end
31
-
32
- def high_score=(new_high_score)
33
- @high_score = new_high_score
34
- File.write(FILE_HIGH_SCORE, @high_score.to_s)
35
- rescue => e
36
- puts e.full_message
37
- end
38
-
39
27
  def start
40
28
  self.over = false
41
29
  self.score = 0
@@ -63,6 +51,18 @@ class Snake
63
51
  def inspect
64
52
  "#{super[0, 75]}... >"
65
53
  end
54
+
55
+ def score=(new_score)
56
+ @score = new_score
57
+ self.high_score = @score if @score > @high_score
58
+ end
59
+
60
+ def high_score=(new_high_score)
61
+ @high_score = new_high_score
62
+ File.write(FILE_HIGH_SCORE, @high_score.to_s)
63
+ rescue => e
64
+ puts e.full_message
65
+ end
66
66
  end
67
67
  end
68
68
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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/examples/tetris.rb CHANGED
@@ -396,7 +396,7 @@ class Tetris
396
396
 
397
397
  def show_about_dialog
398
398
  Glimmer::LibUI.queue_main do
399
- msg_box('About', 'Glimmer Tetris - Glimmer DSL for LibUI Example - Copyright (c) 2021-2024 Andy Maleh')
399
+ msg_box('About', 'Glimmer Tetris - Glimmer DSL for LibUI Example - Copyright (c) 2021-2025 Andy Maleh')
400
400
  end
401
401
  end
402
402
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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) 2021-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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
@@ -42,23 +42,28 @@ module Glimmer
42
42
  alias selected= selected
43
43
  alias set_selected selected
44
44
 
45
- def items(*values)
46
- values = values.first if values.first.is_a?(Array)
47
- if values.empty?
48
- @values
45
+ def items(*item_values)
46
+ item_values = item_values.first if item_values.first.is_a?(Array)
47
+ if item_values.empty?
48
+ @items
49
49
  else
50
- @values = values
51
- @values.each { |value| append value }
50
+ @items = item_values
51
+ clear
52
+ @items.each { |item| append(item) }
52
53
  end
53
54
  end
54
55
  alias set_items items
55
56
  alias items= items
56
57
 
57
- def selected_item(value = nil)
58
- if value.nil?
59
- items[selected]
58
+ def selected_item(item_value = nil)
59
+ if item_value.nil?
60
+ if selected == -1 # no value selected (unselected)
61
+ nil
62
+ else
63
+ items[selected]
64
+ end
60
65
  else
61
- self.selected = items.index(value)
66
+ self.selected = items.index(item_value)
62
67
  end
63
68
  end
64
69
  alias set_selected_item selected_item
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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-2024 Andy Maleh
1
+ # Copyright (c) 2021-2025 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