glimmer-dsl-swt 4.22.2.4 → 4.23.0.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +69 -15
  4. data/VERSION +1 -1
  5. data/docs/reference/GLIMMER_COMMAND.md +3 -1
  6. data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +33 -31
  7. data/docs/reference/GLIMMER_SAMPLES.md +11 -19
  8. data/glimmer-dsl-swt.gemspec +0 -0
  9. data/lib/glimmer/launcher.rb +7 -4
  10. data/lib/glimmer/rake_task/package.rb +1 -1
  11. data/lib/glimmer/rake_task/scaffold.rb +25 -13
  12. data/lib/glimmer/swt/custom/shape.rb +6 -2
  13. data/samples/elaborate/calculator.rb +12 -12
  14. data/samples/elaborate/contact_manager.rb +26 -14
  15. data/samples/elaborate/game_of_life.rb +8 -8
  16. data/samples/elaborate/klondike_solitaire/view/action_panel.rb +2 -2
  17. data/samples/elaborate/klondike_solitaire/view/klondike_solitaire_menu_bar.rb +15 -10
  18. data/samples/elaborate/login.rb +16 -10
  19. data/samples/elaborate/mandelbrot_fractal.rb +26 -20
  20. data/samples/elaborate/meta_sample.rb +6 -6
  21. data/samples/elaborate/metronome.rb +4 -4
  22. data/samples/elaborate/stock_ticker.rb +12 -12
  23. data/samples/elaborate/tetris.rb +4 -4
  24. data/samples/elaborate/timer.rb +36 -26
  25. data/samples/elaborate/user_profile.rb +53 -14
  26. data/samples/elaborate/weather.rb +2 -2
  27. data/samples/hello/hello_button.rb +3 -3
  28. data/samples/hello/hello_canvas_animation.rb +2 -2
  29. data/samples/hello/hello_color_dialog.rb +4 -4
  30. data/samples/hello/hello_custom_shell.rb +2 -2
  31. data/samples/hello/hello_dialog.rb +4 -4
  32. data/samples/hello/hello_directory_dialog.rb +2 -2
  33. data/samples/hello/hello_expand_bar.rb +4 -5
  34. data/samples/hello/hello_file_dialog.rb +2 -2
  35. data/samples/hello/hello_font_dialog.rb +2 -2
  36. data/samples/hello/hello_link.rb +5 -4
  37. data/samples/hello/hello_list_multi_selection.rb +3 -1
  38. data/samples/hello/hello_list_single_selection.rb +3 -1
  39. data/samples/hello/hello_menu_bar.rb +28 -28
  40. data/samples/hello/hello_message_box.rb +2 -2
  41. data/samples/hello/hello_pop_up_context_menu.rb +18 -8
  42. data/samples/hello/hello_shell.rb +16 -16
  43. data/samples/hello/hello_styled_text.rb +2 -2
  44. data/samples/hello/hello_table.rb +4 -4
  45. data/samples/hello/hello_tray_item.rb +2 -2
  46. data/vendor/swt/linux/swt.jar +0 -0
  47. data/vendor/swt/linux_aarch64/swt.jar +0 -0
  48. data/vendor/swt/mac/swt.jar +0 -0
  49. data/vendor/swt/mac_aarch64/swt.jar +0 -0
  50. data/vendor/swt/windows/swt.jar +0 -0
  51. metadata +2 -2
@@ -38,46 +38,56 @@ shell {
38
38
  menu {
39
39
  menu {
40
40
  text '&History'
41
+
41
42
  menu {
42
43
  text '&Recent'
44
+
43
45
  menu_item {
44
46
  text 'File 1'
45
- on_widget_selected {
47
+
48
+ on_widget_selected do
46
49
  message_box {
47
50
  text 'File 1'
48
51
  message 'File 1 Contents'
49
52
  }.open
50
- }
53
+ end
51
54
  }
55
+
52
56
  menu_item {
53
57
  text 'File 2'
54
- on_widget_selected {
58
+
59
+ on_widget_selected do
55
60
  message_box {
56
61
  text 'File 2'
57
62
  message 'File 2 Contents'
58
63
  }.open
59
- }
64
+ end
60
65
  }
61
66
  }
67
+
62
68
  menu {
63
69
  text '&Archived'
70
+
64
71
  menu_item {
65
72
  text 'File 3'
66
- on_widget_selected {
73
+
74
+ on_widget_selected do
67
75
  message_box {
68
76
  text 'File 3'
69
77
  message 'File 3 Contents'
70
78
  }.open
71
- }
79
+ end
72
80
  }
81
+
73
82
  menu_item {
74
83
  text 'File 4'
75
- on_widget_selected {
84
+
85
+ on_widget_selected do
76
86
  message_box {
77
87
  text 'File 4'
78
88
  message 'File 4 Contents'
79
89
  }.open
80
- }
90
+ end
81
91
  }
82
92
  }
83
93
  }
@@ -37,7 +37,7 @@ class HelloShell
37
37
  }
38
38
  text "Nested Shell"
39
39
 
40
- on_widget_selected {
40
+ on_widget_selected do
41
41
  # build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
42
42
  shell(root_shell_proxy) {
43
43
  # shell has fill_layout(:horizontal) by default with no margins
@@ -48,7 +48,7 @@ class HelloShell
48
48
  text "Since this shell is nested, \nyou can hit ESC to close"
49
49
  }
50
50
  }.open
51
- }
51
+ end
52
52
  }
53
53
 
54
54
  button {
@@ -58,7 +58,7 @@ class HelloShell
58
58
  }
59
59
  text "Independent Shell"
60
60
 
61
- on_widget_selected {
61
+ on_widget_selected do
62
62
  # build an independent shell, meaning a shell that is independent of its parent
63
63
  shell {
64
64
  # shell has fill_layout(:horizontal) by default with no margins
@@ -69,7 +69,7 @@ class HelloShell
69
69
  text "Since this shell is independent, \nyou cannot close by hitting ESC"
70
70
  }
71
71
  }.open
72
- }
72
+ end
73
73
  }
74
74
 
75
75
  button {
@@ -79,7 +79,7 @@ class HelloShell
79
79
  }
80
80
  text "Close-Button Shell"
81
81
 
82
- on_widget_selected {
82
+ on_widget_selected do
83
83
  shell(:close) {
84
84
  # shell has fill_layout(:horizontal) by default with no margins
85
85
  text 'Nested Shell'
@@ -89,7 +89,7 @@ class HelloShell
89
89
  text "Shell with close button only\n(varies per platform)"
90
90
  }
91
91
  }.open
92
- }
92
+ end
93
93
  }
94
94
 
95
95
  button {
@@ -99,7 +99,7 @@ class HelloShell
99
99
  }
100
100
  text "Minimize-Button Shell"
101
101
 
102
- on_widget_selected {
102
+ on_widget_selected do
103
103
  # build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
104
104
  shell(root_shell_proxy, :min) {
105
105
  # shell has fill_layout(:horizontal) by default with no margins
@@ -110,7 +110,7 @@ class HelloShell
110
110
  text "Shell with minimize button only\n(varies per platform)"
111
111
  }
112
112
  }.open
113
- }
113
+ end
114
114
  }
115
115
 
116
116
  button {
@@ -120,7 +120,7 @@ class HelloShell
120
120
  }
121
121
  text "Maximize-Button Shell"
122
122
 
123
- on_widget_selected {
123
+ on_widget_selected do
124
124
  # build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
125
125
  shell(root_shell_proxy, :max) {
126
126
  # shell has fill_layout(:horizontal) by default with no margins
@@ -131,7 +131,7 @@ class HelloShell
131
131
  text "Shell with maximize button only\n(varies per platform)"
132
132
  }
133
133
  }.open
134
- }
134
+ end
135
135
  }
136
136
 
137
137
  button {
@@ -141,7 +141,7 @@ class HelloShell
141
141
  }
142
142
  text "Buttonless Shell"
143
143
 
144
- on_widget_selected {
144
+ on_widget_selected do
145
145
  # build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
146
146
  shell(root_shell_proxy, :title) {
147
147
  # shell has fill_layout(:horizontal) by default with no margins
@@ -152,7 +152,7 @@ class HelloShell
152
152
  text "Buttonless shell (title only)\n(varies per platform)"
153
153
  }
154
154
  }.open
155
- }
155
+ end
156
156
  }
157
157
 
158
158
  button {
@@ -162,7 +162,7 @@ class HelloShell
162
162
  }
163
163
  text "No Trim Shell"
164
164
 
165
- on_widget_selected {
165
+ on_widget_selected do
166
166
  # build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
167
167
  shell(root_shell_proxy, :no_trim) {
168
168
  # shell has fill_layout(:horizontal) by default with no margins
@@ -173,7 +173,7 @@ class HelloShell
173
173
  text "No trim shell, meaning no buttons or title bar.\n(varies per platform)"
174
174
  }
175
175
  }.open
176
- }
176
+ end
177
177
  }
178
178
 
179
179
  button {
@@ -183,7 +183,7 @@ class HelloShell
183
183
  }
184
184
  text "Always On Top Shell"
185
185
 
186
- on_widget_selected {
186
+ on_widget_selected do
187
187
  # build a nested shell, meaning a shell that specifies its parent shell (root_shell_proxy)
188
188
  shell(root_shell_proxy, :on_top) {
189
189
  # shell has fill_layout(:horizontal) by default with no margins
@@ -194,7 +194,7 @@ class HelloShell
194
194
  text "Always on top shell.\n(varies per platform)"
195
195
  }
196
196
  }.open
197
- }
197
+ end
198
198
  }
199
199
 
200
200
  }
@@ -76,7 +76,7 @@ shell {
76
76
  top_pixel <=> [@presenter, :top_pixel]
77
77
 
78
78
  # This demonstrates how to set styles via a listener
79
- on_line_get_style { |line_style_event|
79
+ on_line_get_style do |line_style_event|
80
80
  line_offset = line_style_event.lineOffset
81
81
  if @presenter.line_index_for_offset(line_offset) % 52 < 13
82
82
  line_size = line_style_event.lineText.size
@@ -99,7 +99,7 @@ shell {
99
99
  style_range.strikeout = true
100
100
  line_style_event.styles = [style_range].to_java(StyleRange)
101
101
  end
102
- }
102
+ end
103
103
  }
104
104
 
105
105
  composite {
@@ -262,9 +262,9 @@ class HelloTable
262
262
  menu_item {
263
263
  text 'Book'
264
264
 
265
- on_widget_selected {
265
+ on_widget_selected do
266
266
  book_selected_game
267
- }
267
+ end
268
268
  }
269
269
  }
270
270
  }
@@ -275,9 +275,9 @@ class HelloTable
275
275
  font height: 14
276
276
  enabled <= [BaseballGame, :selected_game]
277
277
 
278
- on_widget_selected {
278
+ on_widget_selected do
279
279
  book_selected_game
280
- }
280
+ end
281
281
  }
282
282
  }
283
283
  }
@@ -98,9 +98,9 @@ class HelloTrayItem
98
98
  menu_item {
99
99
  text 'Exit'
100
100
 
101
- on_widget_selected {
101
+ on_widget_selected do
102
102
  exit(0)
103
- }
103
+ end
104
104
  }
105
105
  }
106
106
 
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.22.2.4
4
+ version: 4.23.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-06 00:00:00.000000000 Z
11
+ date: 2022-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement