glimmer-dsl-libui 0.11.6 → 0.11.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -3
  3. data/LICENSE.txt +1 -1
  4. data/README.md +55 -8
  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/docs/examples/GLIMMER-DSL-LIBUI-BASIC-EXAMPLES.md +13 -689
  11. data/examples/basic_area.rb +3 -5
  12. data/examples/basic_area2.rb +6 -8
  13. data/examples/basic_area3.rb +5 -7
  14. data/examples/basic_area4.rb +8 -10
  15. data/examples/basic_table_button.rb +20 -22
  16. data/examples/basic_table_button2.rb +13 -15
  17. data/examples/basic_table_checkbox.rb +17 -19
  18. data/examples/basic_table_checkbox_text.rb +17 -19
  19. data/examples/basic_table_color.rb +8 -10
  20. data/examples/basic_table_color2.rb +7 -9
  21. data/examples/basic_table_color3.rb +7 -9
  22. data/examples/basic_table_image_text.rb +6 -8
  23. data/examples/basic_table_image_text2.rb +6 -8
  24. data/examples/basic_table_image_text3.rb +6 -8
  25. data/examples/date_time_picker.rb +17 -17
  26. data/examples/date_time_picker2.rb +5 -13
  27. data/examples/lazy_table.rb +8 -10
  28. data/examples/lazy_table2.rb +8 -10
  29. data/examples/lazy_table3.rb +8 -10
  30. data/examples/lazy_table4.rb +8 -10
  31. data/examples/simple_notepad.rb +1 -7
  32. data/examples/tetris/model/block.rb +1 -1
  33. data/examples/tetris/model/game.rb +1 -1
  34. data/examples/tetris/model/past_game.rb +1 -1
  35. data/examples/tetris/model/tetromino.rb +1 -1
  36. data/examples/tetris.rb +1 -1
  37. data/examples/tic_tac_toe/board.rb +1 -1
  38. data/examples/tic_tac_toe/cell.rb +1 -1
  39. data/glimmer-dsl-libui.gemspec +0 -0
  40. data/lib/glimmer/dsl/libui/bind_expression.rb +1 -1
  41. data/lib/glimmer/dsl/libui/content_expression.rb +1 -1
  42. data/lib/glimmer/dsl/libui/control_expression.rb +1 -1
  43. data/lib/glimmer/dsl/libui/custom_control_expression.rb +1 -1
  44. data/lib/glimmer/dsl/libui/custom_shape_expression.rb +1 -1
  45. data/lib/glimmer/dsl/libui/data_binding_expression.rb +1 -1
  46. data/lib/glimmer/dsl/libui/dsl.rb +1 -1
  47. data/lib/glimmer/dsl/libui/file_expression.rb +1 -1
  48. data/lib/glimmer/dsl/libui/listener_expression.rb +1 -1
  49. data/lib/glimmer/dsl/libui/observe_expression.rb +2 -1
  50. data/lib/glimmer/dsl/libui/open_file_expression.rb +1 -1
  51. data/lib/glimmer/dsl/libui/open_folder_expression.rb +1 -1
  52. data/lib/glimmer/dsl/libui/operation_expression.rb +1 -1
  53. data/lib/glimmer/dsl/libui/property_expression.rb +1 -1
  54. data/lib/glimmer/dsl/libui/save_file_expression.rb +1 -1
  55. data/lib/glimmer/dsl/libui/shape_expression.rb +1 -1
  56. data/lib/glimmer/dsl/libui/shine_data_binding_expression.rb +1 -1
  57. data/lib/glimmer/dsl/libui/string_expression.rb +1 -1
  58. data/lib/glimmer/dsl/libui/tab_item_expression.rb +1 -1
  59. data/lib/glimmer/fiddle_consumer.rb +1 -1
  60. data/lib/glimmer/libui/attributed_string.rb +1 -1
  61. data/lib/glimmer/libui/control_proxy/area_proxy/scrolling_area_proxy.rb +1 -1
  62. data/lib/glimmer/libui/control_proxy/area_proxy.rb +1 -1
  63. data/lib/glimmer/libui/control_proxy/box/horizontal_box_proxy.rb +1 -1
  64. data/lib/glimmer/libui/control_proxy/box/vertical_box_proxy.rb +1 -1
  65. data/lib/glimmer/libui/control_proxy/box.rb +1 -1
  66. data/lib/glimmer/libui/control_proxy/button_proxy.rb +1 -1
  67. data/lib/glimmer/libui/control_proxy/checkbox_proxy.rb +1 -1
  68. data/lib/glimmer/libui/control_proxy/color_button_proxy.rb +1 -1
  69. data/lib/glimmer/libui/control_proxy/column/background_color_column_proxy.rb +1 -1
  70. data/lib/glimmer/libui/control_proxy/column/button_column_proxy.rb +1 -1
  71. data/lib/glimmer/libui/control_proxy/column/checkbox_column_proxy.rb +1 -1
  72. data/lib/glimmer/libui/control_proxy/column/checkbox_text_color_column_proxy.rb +1 -1
  73. data/lib/glimmer/libui/control_proxy/column/checkbox_text_column_proxy.rb +1 -1
  74. data/lib/glimmer/libui/control_proxy/column/image_column_proxy.rb +1 -1
  75. data/lib/glimmer/libui/control_proxy/column/image_text_color_column_proxy.rb +1 -1
  76. data/lib/glimmer/libui/control_proxy/column/image_text_column_proxy.rb +1 -1
  77. data/lib/glimmer/libui/control_proxy/column/progress_bar_column_proxy.rb +1 -1
  78. data/lib/glimmer/libui/control_proxy/column/text_color_column_proxy.rb +1 -1
  79. data/lib/glimmer/libui/control_proxy/column/text_column_proxy.rb +1 -1
  80. data/lib/glimmer/libui/control_proxy/column.rb +1 -1
  81. data/lib/glimmer/libui/control_proxy/combobox_proxy.rb +1 -1
  82. data/lib/glimmer/libui/control_proxy/date_time_picker_proxy/date_picker_proxy.rb +1 -1
  83. data/lib/glimmer/libui/control_proxy/date_time_picker_proxy/time_picker_proxy.rb +1 -1
  84. data/lib/glimmer/libui/control_proxy/date_time_picker_proxy.rb +1 -1
  85. data/lib/glimmer/libui/control_proxy/dual_column.rb +1 -1
  86. data/lib/glimmer/libui/control_proxy/editable_column.rb +1 -1
  87. data/lib/glimmer/libui/control_proxy/editable_combobox_proxy.rb +1 -1
  88. data/lib/glimmer/libui/control_proxy/enableable_column.rb +1 -1
  89. data/lib/glimmer/libui/control_proxy/entry_proxy/password_entry_proxy.rb +1 -1
  90. data/lib/glimmer/libui/control_proxy/entry_proxy/search_entry_proxy.rb +1 -1
  91. data/lib/glimmer/libui/control_proxy/entry_proxy.rb +1 -1
  92. data/lib/glimmer/libui/control_proxy/font_button_proxy.rb +1 -1
  93. data/lib/glimmer/libui/control_proxy/form_proxy.rb +1 -1
  94. data/lib/glimmer/libui/control_proxy/grid_proxy.rb +1 -1
  95. data/lib/glimmer/libui/control_proxy/group_proxy.rb +1 -1
  96. data/lib/glimmer/libui/control_proxy/image_part_proxy.rb +1 -1
  97. data/lib/glimmer/libui/control_proxy/image_proxy.rb +1 -1
  98. data/lib/glimmer/libui/control_proxy/label_proxy.rb +1 -1
  99. data/lib/glimmer/libui/control_proxy/matrix_proxy.rb +1 -1
  100. data/lib/glimmer/libui/control_proxy/menu_item_proxy/about_menu_item_proxy.rb +1 -1
  101. data/lib/glimmer/libui/control_proxy/menu_item_proxy/check_menu_item_proxy.rb +1 -1
  102. data/lib/glimmer/libui/control_proxy/menu_item_proxy/preferences_menu_item_proxy.rb +1 -1
  103. data/lib/glimmer/libui/control_proxy/menu_item_proxy/quit_menu_item_proxy.rb +1 -1
  104. data/lib/glimmer/libui/control_proxy/menu_item_proxy/radio_menu_item_proxy.rb +1 -1
  105. data/lib/glimmer/libui/control_proxy/menu_item_proxy/separator_menu_item_proxy.rb +1 -1
  106. data/lib/glimmer/libui/control_proxy/menu_item_proxy.rb +1 -1
  107. data/lib/glimmer/libui/control_proxy/menu_proxy.rb +1 -1
  108. data/lib/glimmer/libui/control_proxy/message_box/msg_box_error_proxy.rb +1 -1
  109. data/lib/glimmer/libui/control_proxy/message_box/msg_box_proxy.rb +1 -1
  110. data/lib/glimmer/libui/control_proxy/message_box.rb +1 -1
  111. data/lib/glimmer/libui/control_proxy/multiline_entry_proxy/non_wrapping_multiline_entry_proxy.rb +1 -1
  112. data/lib/glimmer/libui/control_proxy/multiline_entry_proxy.rb +1 -1
  113. data/lib/glimmer/libui/control_proxy/open_type_features_proxy.rb +1 -1
  114. data/lib/glimmer/libui/control_proxy/open_type_tag_proxy.rb +1 -1
  115. data/lib/glimmer/libui/control_proxy/path_proxy.rb +1 -1
  116. data/lib/glimmer/libui/control_proxy/radio_buttons_proxy.rb +1 -1
  117. data/lib/glimmer/libui/control_proxy/slider_proxy.rb +1 -1
  118. data/lib/glimmer/libui/control_proxy/spinbox_proxy.rb +1 -1
  119. data/lib/glimmer/libui/control_proxy/tab_item_proxy.rb +1 -1
  120. data/lib/glimmer/libui/control_proxy/table_proxy.rb +7 -2
  121. data/lib/glimmer/libui/control_proxy/text_proxy.rb +1 -1
  122. data/lib/glimmer/libui/control_proxy/transformable.rb +7 -3
  123. data/lib/glimmer/libui/control_proxy/triple_column.rb +1 -1
  124. data/lib/glimmer/libui/control_proxy/window_proxy.rb +1 -1
  125. data/lib/glimmer/libui/control_proxy.rb +1 -1
  126. data/lib/glimmer/libui/custom_control/code_area.rb +1 -1
  127. data/lib/glimmer/libui/custom_control/refined_table.rb +1 -1
  128. data/lib/glimmer/libui/custom_control.rb +1 -1
  129. data/lib/glimmer/libui/custom_shape.rb +1 -1
  130. data/lib/glimmer/libui/custom_window.rb +1 -1
  131. data/lib/glimmer/libui/data_bindable.rb +1 -1
  132. data/lib/glimmer/libui/parent.rb +1 -1
  133. data/lib/glimmer/libui/shape/arc.rb +1 -1
  134. data/lib/glimmer/libui/shape/bezier.rb +1 -1
  135. data/lib/glimmer/libui/shape/circle.rb +1 -1
  136. data/lib/glimmer/libui/shape/figure.rb +1 -1
  137. data/lib/glimmer/libui/shape/line.rb +1 -1
  138. data/lib/glimmer/libui/shape/polybezier.rb +1 -1
  139. data/lib/glimmer/libui/shape/polygon.rb +1 -1
  140. data/lib/glimmer/libui/shape/polyline.rb +1 -1
  141. data/lib/glimmer/libui/shape/rectangle.rb +1 -1
  142. data/lib/glimmer/libui/shape/square.rb +1 -1
  143. data/lib/glimmer/libui/shape.rb +3 -3
  144. data/lib/glimmer/libui.rb +1 -1
  145. data/lib/glimmer/rake_task/package.rb +1 -1
  146. data/lib/glimmer/rake_task/scaffold.rb +1 -1
  147. data/lib/glimmer/rake_task.rb +1 -1
  148. data/lib/glimmer-dsl-libui.rb +1 -1
  149. metadata +5 -5
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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
@@ -39,9 +39,13 @@ module Glimmer
39
39
  end
40
40
 
41
41
  # Returns transform or sets it. Expects transformable to implement redraw method (delegating work to area).
42
- def transform(matrix = nil)
42
+ def transform(matrix = nil, &transform_body_block)
43
43
  if matrix.nil?
44
- @transform
44
+ if transform_body_block
45
+ Glimmer::DSL::Engine.interpret_expression(Glimmer::DSL::Libui::ControlExpression.new, 'transform', &transform_body_block)
46
+ else
47
+ @transform
48
+ end
45
49
  else
46
50
  @transform = matrix
47
51
  redraw
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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
@@ -282,11 +282,11 @@ module Glimmer
282
282
  end
283
283
 
284
284
  def can_handle_listener?(listener_name)
285
- area_proxy.can_handle_listener?(listener_name)
285
+ area_proxy&.can_handle_listener?(listener_name)
286
286
  end
287
287
 
288
288
  def handle_listener(listener_name, &listener)
289
- area_proxy.handle_listener(listener_name) do |event|
289
+ area_proxy&.handle_listener(listener_name) do |event|
290
290
  listener.call(event) if include?(event[:x], event[:y])
291
291
  end
292
292
  end
data/lib/glimmer/libui.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-2023 Andy Maleh
1
+ # Copyright (c) 2021-2024 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-libui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.6
4
+ version: 0.11.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-01 00:00:00.000000000 Z
11
+ date: 2024-01-01 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.7.3
19
+ version: 2.7.4
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.7.3
26
+ version: 2.7.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: perfect-shape
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -640,7 +640,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
640
640
  - !ruby/object:Gem::Version
641
641
  version: '0'
642
642
  requirements: []
643
- rubygems_version: 3.4.6
643
+ rubygems_version: 3.5.3
644
644
  signing_key:
645
645
  specification_version: 4
646
646
  summary: Glimmer DSL for LibUI (Fukuoka Award Winning Prerequisite-Free Ruby Desktop