glimmer-dsl-opal 0.28.3 → 0.29.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 (167) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +172 -27
  5. data/VERSION +1 -1
  6. data/app/assets/images/glimmer/images/ui-icons_444444_256x240.png +0 -0
  7. data/app/assets/images/glimmer/images/ui-icons_555555_256x240.png +0 -0
  8. data/app/assets/images/glimmer/images/ui-icons_777620_256x240.png +0 -0
  9. data/app/assets/images/glimmer/images/ui-icons_777777_256x240.png +0 -0
  10. data/app/assets/images/glimmer/images/ui-icons_cc0000_256x240.png +0 -0
  11. data/app/assets/images/glimmer/images/ui-icons_ffffff_256x240.png +0 -0
  12. data/app/assets/stylesheets/glimmer/jquery-ui.css +109 -106
  13. data/app/assets/stylesheets/glimmer/jquery-ui.structure.css +91 -91
  14. data/app/assets/stylesheets/glimmer/jquery-ui.theme.css +18 -15
  15. data/app/controllers/glimmer/image_paths_controller.rb +0 -1
  16. data/config/routes.rb +1 -1
  17. data/lib/display.rb +1 -1
  18. data/lib/glimmer/data_binding/table_items_binding.rb +1 -1
  19. data/lib/glimmer/dsl/opal/async_exec_expression.rb +1 -1
  20. data/lib/glimmer/dsl/opal/bind_expression.rb +1 -1
  21. data/lib/glimmer/dsl/opal/block_property_expression.rb +1 -1
  22. data/lib/glimmer/dsl/opal/checkbox_group_selection_data_binding_expression.rb +1 -1
  23. data/lib/glimmer/dsl/opal/color_expression.rb +1 -1
  24. data/lib/glimmer/dsl/opal/custom_widget_expression.rb +3 -3
  25. data/lib/glimmer/dsl/opal/data_binding_expression.rb +1 -1
  26. data/lib/glimmer/dsl/opal/dialog_expression.rb +1 -1
  27. data/lib/glimmer/dsl/opal/display_expression.rb +1 -1
  28. data/lib/glimmer/dsl/opal/exec_expression.rb +1 -1
  29. data/lib/glimmer/dsl/opal/font_expression.rb +1 -1
  30. data/lib/glimmer/dsl/opal/image_expression.rb +2 -2
  31. data/lib/glimmer/dsl/opal/menu_bar_expression.rb +1 -1
  32. data/lib/glimmer/dsl/opal/menu_expression.rb +2 -2
  33. data/lib/glimmer/dsl/opal/message_box_expression.rb +1 -1
  34. data/lib/glimmer/dsl/opal/property_expression.rb +1 -1
  35. data/lib/glimmer/dsl/opal/radio_group_selection_data_binding_expression.rb +1 -1
  36. data/lib/glimmer/dsl/opal/rgb_expression.rb +1 -1
  37. data/lib/glimmer/dsl/opal/rgba_expression.rb +1 -1
  38. data/lib/glimmer/dsl/opal/shape_expression.rb +2 -1
  39. data/lib/glimmer/dsl/opal/shell_expression.rb +2 -2
  40. data/lib/glimmer/dsl/opal/shine_data_binding_expression.rb +1 -1
  41. data/lib/glimmer/dsl/opal/swt_expression.rb +1 -1
  42. data/lib/glimmer/dsl/opal/sync_exec_expression.rb +1 -1
  43. data/lib/glimmer/dsl/opal/widget_expression.rb +1 -1
  44. data/lib/glimmer/engine.rb +1 -1
  45. data/lib/glimmer/swt/arrow_proxy.rb +7 -1
  46. data/lib/glimmer/swt/button_proxy.rb +4 -3
  47. data/lib/glimmer/swt/c_combo_proxy.rb +1 -1
  48. data/lib/glimmer/swt/c_tab_folder_proxy.rb +1 -1
  49. data/lib/glimmer/swt/c_tab_item_proxy.rb +1 -1
  50. data/lib/glimmer/swt/checkbox_proxy.rb +3 -2
  51. data/lib/glimmer/swt/color_proxy.rb +1 -1
  52. data/lib/glimmer/swt/composite_proxy.rb +1 -1
  53. data/lib/glimmer/swt/control_editor.rb +1 -1
  54. data/lib/glimmer/swt/custom/checkbox_group.rb +1 -1
  55. data/lib/glimmer/swt/custom/radio_group.rb +1 -1
  56. data/lib/glimmer/swt/custom/shape/arc.rb +1 -1
  57. data/lib/glimmer/swt/custom/shape/image.rb +1 -1
  58. data/lib/glimmer/swt/custom/shape/line.rb +1 -1
  59. data/lib/glimmer/swt/custom/shape/oval.rb +1 -1
  60. data/lib/glimmer/swt/custom/shape/point.rb +1 -1
  61. data/lib/glimmer/swt/custom/shape/polygon.rb +1 -1
  62. data/lib/glimmer/swt/custom/shape/polyline.rb +1 -1
  63. data/lib/glimmer/swt/custom/shape/rectangle.rb +1 -1
  64. data/lib/glimmer/swt/custom/shape/text.rb +1 -1
  65. data/lib/glimmer/swt/custom/shape.rb +4 -4
  66. data/lib/glimmer/swt/date_time_proxy.rb +2 -2
  67. data/lib/glimmer/swt/dialog_proxy.rb +1 -1
  68. data/lib/glimmer/swt/font_proxy.rb +1 -1
  69. data/lib/glimmer/swt/label_proxy.rb +1 -1
  70. data/lib/glimmer/swt/latest_dialog_proxy.rb +1 -1
  71. data/lib/glimmer/swt/latest_message_box_proxy.rb +1 -1
  72. data/lib/glimmer/swt/latest_shell_proxy.rb +4 -4
  73. data/lib/glimmer/swt/layout_proxy.rb +1 -1
  74. data/lib/glimmer/swt/make_shift_shell_proxy.rb +1 -1
  75. data/lib/glimmer/swt/menu_item_proxy.rb +3 -3
  76. data/lib/glimmer/swt/menu_proxy.rb +22 -16
  77. data/lib/glimmer/swt/message_box_proxy.rb +1 -1
  78. data/lib/glimmer/swt/progress_bar_proxy.rb +1 -1
  79. data/lib/glimmer/swt/scale_proxy.rb +7 -1
  80. data/lib/glimmer/swt/shell_proxy.rb +1 -1
  81. data/lib/glimmer/swt/slider_proxy.rb +6 -0
  82. data/lib/glimmer/swt/spinner_proxy.rb +4 -3
  83. data/lib/glimmer/swt/style_constantizable.rb +1 -1
  84. data/lib/glimmer/swt/swt_proxy.rb +1 -1
  85. data/lib/glimmer/swt/tab_folder_proxy.rb +1 -1
  86. data/lib/glimmer/swt/tab_item_proxy.rb +1 -1
  87. data/lib/glimmer/swt/table_editor.rb +1 -1
  88. data/lib/glimmer/swt/table_item_proxy.rb +3 -3
  89. data/lib/glimmer/swt/table_proxy.rb +1 -1
  90. data/lib/glimmer/swt/widget_proxy.rb +28 -28
  91. data/lib/glimmer/swt.rb +1 -1
  92. data/lib/glimmer/ui/custom_shell.rb +1 -5
  93. data/lib/glimmer/ui/custom_widget.rb +5 -5
  94. data/lib/glimmer/util/proc_tracker.rb +3 -3
  95. data/lib/glimmer-dsl-opal/ext/date.rb +8 -8
  96. data/lib/glimmer-dsl-opal/ext/file.rb +1 -1
  97. data/lib/glimmer-dsl-opal/ext/glimmer/dsl/engine.rb +1 -1
  98. data/lib/glimmer-dsl-opal/samples/elaborate/contact_manager/contact_repository.rb +1 -1
  99. data/lib/glimmer-dsl-opal/samples/elaborate/login.rb +1 -1
  100. data/lib/glimmer-dsl-opal/samples/elaborate/tetris/model/block.rb +1 -1
  101. data/lib/glimmer-dsl-opal/samples/elaborate/tetris/model/game.rb +1 -1
  102. data/lib/glimmer-dsl-opal/samples/elaborate/tetris/model/past_game.rb +1 -1
  103. data/lib/glimmer-dsl-opal/samples/elaborate/tetris/model/tetromino.rb +1 -1
  104. data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/block.rb +1 -1
  105. data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/high_score_dialog.rb +1 -1
  106. data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/playfield.rb +1 -1
  107. data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/score_lane.rb +1 -1
  108. data/lib/glimmer-dsl-opal/samples/elaborate/tetris/view/tetris_menu_bar.rb +1 -1
  109. data/lib/glimmer-dsl-opal/samples/elaborate/tetris.rb +2 -2
  110. data/lib/glimmer-dsl-opal/samples/elaborate/tic_tac_toe.rb +1 -1
  111. data/lib/glimmer-dsl-opal/samples/elaborate/user_profile.rb +1 -1
  112. data/lib/glimmer-dsl-opal/samples/elaborate/weather.rb +1 -1
  113. data/lib/glimmer-dsl-opal/samples/hello/hello_arrow.rb +1 -1
  114. data/lib/glimmer-dsl-opal/samples/hello/hello_browser.rb +1 -1
  115. data/lib/glimmer-dsl-opal/samples/hello/hello_button.rb +1 -1
  116. data/lib/glimmer-dsl-opal/samples/hello/hello_c_combo.rb +1 -1
  117. data/lib/glimmer-dsl-opal/samples/hello/hello_c_tab.rb +1 -1
  118. data/lib/glimmer-dsl-opal/samples/hello/hello_canvas.rb +1 -1
  119. data/lib/glimmer-dsl-opal/samples/hello/hello_checkbox.rb +1 -1
  120. data/lib/glimmer-dsl-opal/samples/hello/hello_checkbox_group.rb +1 -1
  121. data/lib/glimmer-dsl-opal/samples/hello/hello_combo.rb +1 -1
  122. data/lib/glimmer-dsl-opal/samples/hello/hello_composite.rb +1 -1
  123. data/lib/glimmer-dsl-opal/samples/hello/hello_computed.rb +1 -1
  124. data/lib/glimmer-dsl-opal/samples/hello/hello_cursor.rb +1 -1
  125. data/lib/glimmer-dsl-opal/samples/hello/hello_custom_shell.rb +1 -1
  126. data/lib/glimmer-dsl-opal/samples/hello/hello_custom_widget.rb +1 -1
  127. data/lib/glimmer-dsl-opal/samples/hello/hello_date_time.rb +1 -1
  128. data/lib/glimmer-dsl-opal/samples/hello/hello_dialog.rb +1 -1
  129. data/lib/glimmer-dsl-opal/samples/hello/hello_group.rb +1 -1
  130. data/lib/glimmer-dsl-opal/samples/hello/hello_label.rb +1 -1
  131. data/lib/glimmer-dsl-opal/samples/hello/hello_layout.rb +1 -1
  132. data/lib/glimmer-dsl-opal/samples/hello/hello_list_multi_selection.rb +1 -1
  133. data/lib/glimmer-dsl-opal/samples/hello/hello_list_single_selection.rb +1 -1
  134. data/lib/glimmer-dsl-opal/samples/hello/hello_menu_bar.rb +1 -1
  135. data/lib/glimmer-dsl-opal/samples/hello/hello_message_box.rb +1 -1
  136. data/lib/glimmer-dsl-opal/samples/hello/hello_pop_up_context_menu.rb +1 -1
  137. data/lib/glimmer-dsl-opal/samples/hello/hello_print.rb +1 -1
  138. data/lib/glimmer-dsl-opal/samples/hello/hello_progress_bar.rb +1 -1
  139. data/lib/glimmer-dsl-opal/samples/hello/hello_radio.rb +1 -1
  140. data/lib/glimmer-dsl-opal/samples/hello/hello_radio_group.rb +1 -1
  141. data/lib/glimmer-dsl-opal/samples/hello/hello_scale.rb +1 -1
  142. data/lib/glimmer-dsl-opal/samples/hello/hello_slider.rb +1 -1
  143. data/lib/glimmer-dsl-opal/samples/hello/hello_spinner.rb +1 -1
  144. data/lib/glimmer-dsl-opal/samples/hello/hello_tab.rb +1 -1
  145. data/lib/glimmer-dsl-opal/samples/hello/hello_table.rb +1 -1
  146. data/lib/glimmer-dsl-opal/samples/hello/hello_text.rb +1 -1
  147. data/lib/glimmer-dsl-opal/samples/hello/hello_world.rb +1 -1
  148. data/lib/glimmer-dsl-opal/vendor/jquery-ui/AUTHORS.txt +35 -1
  149. data/lib/glimmer-dsl-opal/vendor/jquery-ui/index.html +503 -0
  150. data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.min.css +4 -4
  151. data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.min.js +3 -10
  152. data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.structure.min.css +2 -2
  153. data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.theme.min.css +2 -2
  154. data/lib/glimmer-dsl-opal/vendor/jquery-ui/package.json +26 -26
  155. data/lib/glimmer-dsl-opal/vendor/jquery.js +10881 -2
  156. data/lib/glimmer-dsl-opal.rb +1 -1
  157. data/lib/glimmer-dsl-swt.rb +1 -1
  158. data/lib/net/http.rb +1 -1
  159. data/lib/os.rb +1 -1
  160. metadata +10 -16
  161. data/app/assets/images/glimmer/images/ui-icons_222222_256x240.png +0 -0
  162. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_444444_256x240.png +0 -0
  163. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_555555_256x240.png +0 -0
  164. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_777620_256x240.png +0 -0
  165. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_777777_256x240.png +0 -0
  166. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_cc0000_256x240.png +0 -0
  167. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
@@ -56,7 +56,7 @@ module Glimmer
56
56
  old_item_ids_per_model = old_items.reduce({}) {|hash, item| hash.merge(item.get_data.hash => item.id) }
57
57
  parent.remove_all
58
58
  model_collection.each do |model|
59
- table_item = Glimmer::SWT::TableItemProxy.new(parent)
59
+ table_item = Glimmer::SWT::TableItemProxy.new(parent, [], nil)
60
60
  for index in 0..(column_properties.size-1)
61
61
  table_item.set_text(index, model.send(column_properties[index]).to_s)
62
62
  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
@@ -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
@@ -52,7 +52,7 @@ module Glimmer
52
52
  # TODO clean code by extracting methods into CustomShell
53
53
  if !Glimmer::UI::CustomShell.requested? && custom_widget_class&.ancestors&.to_a.include?(Glimmer::UI::CustomShell)
54
54
  if Glimmer::SWT::DisplayProxy.instance.shells.empty? || Glimmer::SWT::DisplayProxy.open_custom_shells_in_current_window?
55
- custom_widget_class.new(parent, *args, {}, &block)
55
+ custom_widget_class.new(parent, args, {}, &block)
56
56
  else
57
57
  options = args.last.is_a?(Hash) ? args.pop : {}
58
58
  options = options.merge('swt_style' => args.join(',')) unless args.join(',').empty?
@@ -75,7 +75,7 @@ module Glimmer
75
75
  # just a placeholder that has an open method # TODO return an actual CustomShell in the future that does the work happening above in the #open method
76
76
  Glimmer::SWT::MakeShiftShellProxy.new
77
77
  else
78
- custom_widget_class&.new(parent, *args, {}, &block)
78
+ custom_widget_class&.new(parent, args, {}, &block)
79
79
  end
80
80
  end
81
81
  end
@@ -26,7 +26,7 @@ module Glimmer
26
26
  #TODO make this options observer dependent and all similar observers in element specific data binding handlers
27
27
  element_binding.observe(model_binding)
28
28
  # TODO simplify this logic and put it where it belongs
29
- parent.add_observer(model_binding, keyword) if parent.respond_to?(:add_observer, [model_binding, keyword])
29
+ parent.add_observer(model_binding, keyword) if parent.respond_to?(:add_observer)
30
30
  end
31
31
  end
32
32
  end
@@ -12,7 +12,7 @@ module Glimmer
12
12
 
13
13
  def interpret(parent, keyword, *args, &block)
14
14
  parent = args.delete_at(0)
15
- Glimmer::SWT::DialogProxy.new(parent, args)
15
+ Glimmer::SWT::DialogProxy.new(parent, args, block)
16
16
  end
17
17
  end
18
18
  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
@@ -55,7 +55,7 @@ module Glimmer
55
55
 
56
56
  def add_content(parent, keyword, *args, &block)
57
57
  return if @create_pixel_by_pixel || block&.parameters&.count == 2
58
- super
58
+ super(parent, keyword, *args, &block)
59
59
  parent.post_add_content
60
60
  end
61
61
  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
@@ -48,7 +48,7 @@ module Glimmer
48
48
  end
49
49
 
50
50
  def add_content(parent, keyword, *args, &block)
51
- super(parent, &block)
51
+ super(parent, keyword, *args, &block)
52
52
  parent.post_add_content
53
53
  end
54
54
 
@@ -12,7 +12,7 @@ module Glimmer
12
12
 
13
13
  def interpret(parent, keyword, *args, &block)
14
14
  parent = args.delete_at(0) if !textual?(args.first)
15
- Glimmer::SWT::MessageBoxProxy.new(parent, args)
15
+ Glimmer::SWT::MessageBoxProxy.new(parent, args, block)
16
16
  end
17
17
  end
18
18
  end
@@ -9,7 +9,7 @@ module Glimmer
9
9
  parent and
10
10
  (!args.empty?) and
11
11
  parent.respond_to?(:set_attribute) and
12
- parent.respond_to?(keyword, *args) and
12
+ parent.respond_to?(keyword) and
13
13
  keyword and
14
14
  block.nil?
15
15
  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
@@ -32,6 +32,7 @@ module Glimmer
32
32
  include ParentExpression
33
33
 
34
34
  def can_interpret?(parent, keyword, *args, &block)
35
+ # TODO consider parent as WidgetProxy too just like SWT
35
36
  (parent.is_a?(Glimmer::SWT::CanvasProxy) or parent.is_a?(Glimmer::SWT::Custom::Shape)) and
36
37
  Glimmer::SWT::Custom::Shape.valid?(parent, keyword, args, &block) and
37
38
  ((keyword != 'text' && keyword != 'image') || args.size >= 3 || (args.empty? && block_given?))
@@ -23,12 +23,12 @@ module Glimmer
23
23
  # just a placeholder that has an open method # TODO return an actual CustomShell in the future that does the work happening above in the #open method
24
24
  Glimmer::SWT::MakeShiftShellProxy.new
25
25
  else
26
- Glimmer::SWT::ShellProxy.new(*args)
26
+ Glimmer::SWT::ShellProxy.new(args)
27
27
  end
28
28
  end
29
29
 
30
30
  def add_content(parent, keyword, *args, &block)
31
- super(parent, &block)
31
+ super(parent, keyword, *args, &block)
32
32
  parent.post_add_content
33
33
  end
34
34
  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
@@ -22,7 +22,7 @@ module Glimmer
22
22
 
23
23
  def add_content(parent, keyword, *args, &block)
24
24
  if parent.rendered? || parent.skip_content_on_render_blocks?
25
- super(parent, &block)
25
+ super(parent, keyword, *args, &block)
26
26
  parent.post_add_content
27
27
  else
28
28
  parent.add_content_on_render(&block)
@@ -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
@@ -25,6 +25,12 @@ require 'glimmer/swt/button_proxy'
25
25
  module Glimmer
26
26
  module SWT
27
27
  class ArrowProxy < ButtonProxy
28
+ STYLE = <<~CSS
29
+ .arrow {
30
+ position: relative;
31
+ }
32
+ CSS
33
+
28
34
  def initialize(parent, args, block)
29
35
  if args.to_a.include?(:left)
30
36
  @text = '<'
@@ -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
@@ -79,12 +79,13 @@ module Glimmer
79
79
  def dom
80
80
  input_text = @text
81
81
  input_id = id
82
- input_style = css
82
+ input_style = "min-width: 32px; min-height: 32px; #{css}"
83
83
  input_args = {}
84
84
  input_disabled = @enabled ? {} : {'disabled': 'disabled'}
85
85
  input_args = input_args.merge(type: 'password') if has_style?(:password)
86
86
  @dom ||= html {
87
- button(input_args.merge(id: input_id, class: name, style: input_style, style: 'min-width: 32px; min-height: 32px;').merge(input_disabled)) {
87
+ # TODO `:style` key is duplicated twice
88
+ button(input_args.merge(id: input_id, class: name, style: input_style).merge(input_disabled)) {
88
89
  input_text.to_s == '' ? '&nbsp;' : input_text
89
90
  }
90
91
  }.to_s
@@ -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
@@ -57,10 +57,11 @@ module Glimmer
57
57
  def dom
58
58
  check_text = @text
59
59
  check_id = id
60
- check_style = css
60
+ check_style = "min-width: 27px; #{css}"
61
61
  check_class = name
62
62
  check_selection = @selection
63
- options = {type: 'checkbox', id: check_id, name: parent.id, style: check_style, class: check_class, value: check_text, style: 'min-width: 27px;'}
63
+ # TODO `:style` key is duplicated twice
64
+ options = {type: 'checkbox', id: check_id, name: parent.id, style: check_style, class: check_class, value: check_text}
64
65
  options[checked: 'checked'] if check_selection
65
66
  @dom ||= html {
66
67
  span {
@@ -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) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-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
@@ -40,9 +40,9 @@ module Glimmer
40
40
  def create(parent, keyword, args, &property_block)
41
41
  potential_shape_class_name = keyword.to_s.camelcase(:upper).to_sym
42
42
  if constants.include?(potential_shape_class_name)
43
- const_get(potential_shape_class_name).new(parent, args, &property_block)
43
+ const_get(potential_shape_class_name).new(parent, args, property_block)
44
44
  else
45
- new(parent, args, &property_block)
45
+ new(parent, args, property_block)
46
46
  end
47
47
  end
48
48
 
@@ -163,7 +163,7 @@ module Glimmer
163
163
  if !super_invocation && has_attribute?(method_name)
164
164
  true
165
165
  else
166
- super(method_name, *args, &block)
166
+ super(method_name, (args.first if args.first == true), &block)
167
167
  end
168
168
  end
169
169
 
@@ -34,10 +34,10 @@ module Glimmer
34
34
  showNowButton: true,
35
35
  showCloseButton: true,
36
36
  button: "##{time_button_id}",
37
- onClose: ->(v) {
37
+ onClose: proc do |v|
38
38
  @timepicker_done = true
39
39
  dom_element.trigger('change')
40
- },
40
+ end,
41
41
  })
42
42
  else
43
43
  options = {}
@@ -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
@@ -24,7 +24,7 @@ require 'glimmer/swt/shell_proxy'
24
24
  module Glimmer
25
25
  module SWT
26
26
  class LatestShellProxy < ShellProxy
27
- def initialize(parent, args, block)
27
+ def initialize
28
28
  # No Op
29
29
  end
30
30
 
@@ -36,8 +36,8 @@ module Glimmer
36
36
  end
37
37
  end
38
38
 
39
- def respond_to?(method, *args, &block)
40
- super || latest_shell&.respond_to?(method, *args, &block)
39
+ def respond_to?(method_name, include_private = false)
40
+ super(method_name, include_private) || latest_shell&.respond_to?(method_name, include_private)
41
41
  end
42
42
 
43
43
  def open
@@ -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
@@ -43,9 +43,9 @@ module Glimmer
43
43
 
44
44
  attr_accessor :accelerator # TODO consider doing something with it
45
45
 
46
- def initialize(parent, args)
46
+ def initialize(parent, args, block)
47
47
  args.push(:push) if args.empty?
48
- super(parent, args)
48
+ super(parent, args, block)
49
49
  # TODO do not add the following event till post_add_content to avoid adding if already one on_widget_selected event existed
50
50
  on_widget_selected {
51
51
  # No Op, just trigger selection