glimmer-dsl-swt 4.18.4.8 → 4.18.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +70 -0
  3. data/README.md +24 -11
  4. data/VERSION +1 -1
  5. data/bin/glimmer +3 -3
  6. data/docs/reference/GLIMMER_CONFIGURATION.md +7 -3
  7. data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +353 -145
  8. data/docs/reference/GLIMMER_SAMPLES.md +207 -41
  9. data/glimmer-dsl-swt.gemspec +33 -15
  10. data/lib/ext/glimmer/config.rb +3 -7
  11. data/lib/glimmer/data_binding/list_selection_binding.rb +13 -7
  12. data/lib/glimmer/data_binding/table_items_binding.rb +22 -17
  13. data/lib/glimmer/data_binding/tree_items_binding.rb +19 -15
  14. data/lib/glimmer/data_binding/widget_binding.rb +13 -15
  15. data/lib/glimmer/dsl/swt/{file_dialog_expression.rb → auto_exec_expression.rb} +6 -18
  16. data/lib/glimmer/dsl/swt/checkbox_group_selection_data_binding_expression.rb +9 -6
  17. data/lib/glimmer/dsl/swt/color_expression.rb +1 -1
  18. data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +16 -14
  19. data/lib/glimmer/dsl/swt/custom_widget_expression.rb +4 -1
  20. data/lib/glimmer/dsl/swt/data_binding_expression.rb +2 -2
  21. data/lib/glimmer/dsl/swt/dialog_expression.rb +18 -9
  22. data/lib/glimmer/dsl/swt/dsl.rb +1 -0
  23. data/lib/glimmer/dsl/swt/exec_expression.rb +1 -1
  24. data/lib/glimmer/dsl/swt/font_expression.rb +1 -1
  25. data/lib/glimmer/dsl/swt/image_expression.rb +18 -3
  26. data/lib/glimmer/dsl/swt/list_selection_data_binding_expression.rb +11 -8
  27. data/lib/glimmer/dsl/swt/pixel_expression.rb +1 -1
  28. data/lib/glimmer/dsl/swt/radio_group_selection_data_binding_expression.rb +9 -5
  29. data/lib/glimmer/dsl/swt/shape_expression.rb +1 -1
  30. data/lib/glimmer/dsl/swt/shell_expression.rb +5 -2
  31. data/lib/glimmer/dsl/swt/widget_expression.rb +8 -4
  32. data/lib/glimmer/launcher.rb +3 -0
  33. data/lib/glimmer/rake_task/scaffold.rb +3 -0
  34. data/lib/glimmer/swt/color_proxy.rb +1 -1
  35. data/lib/glimmer/swt/custom/code_text.rb +33 -11
  36. data/lib/glimmer/swt/custom/drawable.rb +50 -2
  37. data/lib/glimmer/swt/custom/radio_group.rb +2 -1
  38. data/lib/glimmer/swt/custom/shape.rb +166 -34
  39. data/lib/glimmer/{dsl/swt/directory_dialog_expression.rb → swt/custom/shape/arc.rb} +15 -20
  40. data/lib/glimmer/swt/custom/shape/focus.rb +43 -0
  41. data/lib/glimmer/swt/custom/shape/image.rb +86 -0
  42. data/lib/glimmer/swt/custom/shape/line.rb +58 -0
  43. data/lib/glimmer/swt/custom/shape/oval.rb +43 -0
  44. data/lib/glimmer/swt/custom/shape/point.rb +52 -0
  45. data/lib/glimmer/swt/custom/shape/polygon.rb +73 -0
  46. data/lib/glimmer/swt/custom/shape/polyline.rb +73 -0
  47. data/lib/glimmer/swt/custom/shape/rectangle.rb +87 -0
  48. data/lib/glimmer/swt/custom/shape/text.rb +73 -0
  49. data/lib/glimmer/swt/date_time_proxy.rb +9 -3
  50. data/lib/glimmer/swt/dialog_proxy.rb +92 -0
  51. data/lib/glimmer/swt/display_proxy.rb +62 -2
  52. data/lib/glimmer/swt/expand_item_proxy.rb +18 -12
  53. data/lib/glimmer/swt/font_proxy.rb +13 -7
  54. data/lib/glimmer/swt/image_proxy.rb +16 -5
  55. data/lib/glimmer/swt/layout_data_proxy.rb +21 -15
  56. data/lib/glimmer/swt/layout_proxy.rb +19 -15
  57. data/lib/glimmer/swt/menu_proxy.rb +2 -2
  58. data/lib/glimmer/swt/message_box_proxy.rb +21 -7
  59. data/lib/glimmer/swt/properties.rb +3 -0
  60. data/lib/glimmer/swt/proxy_properties.rb +145 -0
  61. data/lib/glimmer/swt/scrolled_composite_proxy.rb +20 -7
  62. data/lib/glimmer/swt/shell_proxy.rb +96 -80
  63. data/lib/glimmer/swt/swt_proxy.rb +17 -0
  64. data/lib/glimmer/swt/tab_item_proxy.rb +6 -3
  65. data/lib/glimmer/swt/table_proxy.rb +32 -11
  66. data/lib/glimmer/swt/transform_proxy.rb +26 -38
  67. data/lib/glimmer/swt/tree_proxy.rb +11 -16
  68. data/lib/glimmer/swt/widget_listener_proxy.rb +6 -2
  69. data/lib/glimmer/swt/widget_proxy.rb +194 -137
  70. data/lib/glimmer/ui.rb +5 -0
  71. data/lib/glimmer/ui/custom_shell.rb +13 -7
  72. data/lib/glimmer/ui/custom_widget.rb +4 -5
  73. data/samples/elaborate/contact_manager.rb +7 -7
  74. data/samples/elaborate/login.rb +25 -21
  75. data/samples/elaborate/mandelbrot_fractal.rb +346 -39
  76. data/samples/elaborate/meta_sample.rb +1 -1
  77. data/samples/elaborate/tetris.rb +1 -0
  78. data/samples/elaborate/tic_tac_toe.rb +16 -14
  79. data/samples/elaborate/tic_tac_toe/board.rb +5 -5
  80. data/samples/elaborate/tic_tac_toe/cell.rb +5 -5
  81. data/samples/hello/hello_button.rb +7 -7
  82. data/samples/hello/hello_canvas.rb +145 -41
  83. data/samples/hello/hello_checkbox.rb +16 -14
  84. data/samples/hello/hello_checkbox_group.rb +11 -9
  85. data/samples/hello/hello_color_dialog.rb +66 -0
  86. data/samples/hello/hello_combo.rb +14 -12
  87. data/samples/hello/hello_computed.rb +7 -7
  88. data/samples/hello/hello_cursor.rb +58 -0
  89. data/samples/hello/hello_custom_shell.rb +17 -21
  90. data/samples/hello/hello_custom_widget.rb +4 -6
  91. data/samples/hello/hello_date_time.rb +14 -12
  92. data/samples/hello/hello_directory_dialog.rb +7 -7
  93. data/samples/hello/hello_expand_bar.rb +8 -8
  94. data/samples/hello/hello_file_dialog.rb +7 -7
  95. data/samples/hello/hello_font_dialog.rb +82 -0
  96. data/samples/hello/hello_group.rb +18 -16
  97. data/samples/hello/hello_list_multi_selection.rb +13 -11
  98. data/samples/hello/hello_list_single_selection.rb +13 -11
  99. data/samples/hello/hello_progress_bar.rb +125 -0
  100. data/samples/hello/hello_radio.rb +18 -16
  101. data/samples/hello/hello_radio_group.rb +14 -12
  102. data/samples/hello/hello_spinner.rb +7 -7
  103. data/samples/hello/hello_tab.rb +5 -5
  104. data/samples/hello/hello_table.rb +10 -5
  105. data/samples/hello/hello_tree.rb +485 -0
  106. metadata +30 -23
  107. data/lib/glimmer/swt/directory_dialog_proxy.rb +0 -65
  108. data/lib/glimmer/swt/file_dialog_proxy.rb +0 -66
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.18.4.8
4
+ version: 4.18.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-11 00:00:00.000000000 Z
11
+ date: 2021-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 1.1.1
18
+ version: 1.1.2
19
19
  name: glimmer
20
20
  type: :runtime
21
21
  prerelease: false
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.1.1
26
+ version: 1.1.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -104,20 +104,6 @@ dependencies:
104
104
  - - "<"
105
105
  - !ruby/object:Gem::Version
106
106
  version: 2.0.0
107
- - !ruby/object:Gem::Dependency
108
- requirement: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - '='
111
- - !ruby/object:Gem::Version
112
- version: 1.8.1
113
- name: git
114
- type: :runtime
115
- prerelease: false
116
- version_requirements: !ruby/object:Gem::Requirement
117
- requirements:
118
- - - '='
119
- - !ruby/object:Gem::Version
120
- version: 1.8.1
121
107
  - !ruby/object:Gem::Dependency
122
108
  requirement: !ruby/object:Gem::Requirement
123
109
  requirements:
@@ -350,8 +336,14 @@ executables:
350
336
  - girb
351
337
  extensions: []
352
338
  extra_rdoc_files:
353
- - LICENSE.txt
354
339
  - README.md
340
+ - docs/reference/GLIMMER_COMMAND.md
341
+ - docs/reference/GLIMMER_CONFIGURATION.md
342
+ - docs/reference/GLIMMER_GIRB.md
343
+ - docs/reference/GLIMMER_GUI_DSL_SYNTAX.md
344
+ - docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md
345
+ - docs/reference/GLIMMER_SAMPLES.md
346
+ - docs/reference/GLIMMER_STYLE_GUIDE.md
355
347
  files:
356
348
  - CHANGELOG.md
357
349
  - LICENSE.txt
@@ -385,6 +377,7 @@ files:
385
377
  - lib/glimmer/data_binding/widget_binding.rb
386
378
  - lib/glimmer/dsl/swt/animation_expression.rb
387
379
  - lib/glimmer/dsl/swt/async_exec_expression.rb
380
+ - lib/glimmer/dsl/swt/auto_exec_expression.rb
388
381
  - lib/glimmer/dsl/swt/bind_expression.rb
389
382
  - lib/glimmer/dsl/swt/block_property_expression.rb
390
383
  - lib/glimmer/dsl/swt/checkbox_group_selection_data_binding_expression.rb
@@ -395,13 +388,11 @@ files:
395
388
  - lib/glimmer/dsl/swt/custom_widget_expression.rb
396
389
  - lib/glimmer/dsl/swt/data_binding_expression.rb
397
390
  - lib/glimmer/dsl/swt/dialog_expression.rb
398
- - lib/glimmer/dsl/swt/directory_dialog_expression.rb
399
391
  - lib/glimmer/dsl/swt/display_expression.rb
400
392
  - lib/glimmer/dsl/swt/dnd_expression.rb
401
393
  - lib/glimmer/dsl/swt/dsl.rb
402
394
  - lib/glimmer/dsl/swt/exec_expression.rb
403
395
  - lib/glimmer/dsl/swt/expand_item_expression.rb
404
- - lib/glimmer/dsl/swt/file_dialog_expression.rb
405
396
  - lib/glimmer/dsl/swt/font_expression.rb
406
397
  - lib/glimmer/dsl/swt/image_expression.rb
407
398
  - lib/glimmer/dsl/swt/layout_data_expression.rb
@@ -442,12 +433,21 @@ files:
442
433
  - lib/glimmer/swt/custom/drawable.rb
443
434
  - lib/glimmer/swt/custom/radio_group.rb
444
435
  - lib/glimmer/swt/custom/shape.rb
436
+ - lib/glimmer/swt/custom/shape/arc.rb
437
+ - lib/glimmer/swt/custom/shape/focus.rb
438
+ - lib/glimmer/swt/custom/shape/image.rb
439
+ - lib/glimmer/swt/custom/shape/line.rb
440
+ - lib/glimmer/swt/custom/shape/oval.rb
441
+ - lib/glimmer/swt/custom/shape/point.rb
442
+ - lib/glimmer/swt/custom/shape/polygon.rb
443
+ - lib/glimmer/swt/custom/shape/polyline.rb
444
+ - lib/glimmer/swt/custom/shape/rectangle.rb
445
+ - lib/glimmer/swt/custom/shape/text.rb
445
446
  - lib/glimmer/swt/date_time_proxy.rb
446
- - lib/glimmer/swt/directory_dialog_proxy.rb
447
+ - lib/glimmer/swt/dialog_proxy.rb
447
448
  - lib/glimmer/swt/display_proxy.rb
448
449
  - lib/glimmer/swt/dnd_proxy.rb
449
450
  - lib/glimmer/swt/expand_item_proxy.rb
450
- - lib/glimmer/swt/file_dialog_proxy.rb
451
451
  - lib/glimmer/swt/font_proxy.rb
452
452
  - lib/glimmer/swt/image_proxy.rb
453
453
  - lib/glimmer/swt/layout_data_proxy.rb
@@ -456,6 +456,7 @@ files:
456
456
  - lib/glimmer/swt/message_box_proxy.rb
457
457
  - lib/glimmer/swt/packages.rb
458
458
  - lib/glimmer/swt/properties.rb
459
+ - lib/glimmer/swt/proxy_properties.rb
459
460
  - lib/glimmer/swt/sash_form_proxy.rb
460
461
  - lib/glimmer/swt/scrolled_composite_proxy.rb
461
462
  - lib/glimmer/swt/shell_proxy.rb
@@ -469,6 +470,7 @@ files:
469
470
  - lib/glimmer/swt/tree_proxy.rb
470
471
  - lib/glimmer/swt/widget_listener_proxy.rb
471
472
  - lib/glimmer/swt/widget_proxy.rb
473
+ - lib/glimmer/ui.rb
472
474
  - lib/glimmer/ui/custom_shell.rb
473
475
  - lib/glimmer/ui/custom_widget.rb
474
476
  - lib/glimmer/util/proc_tracker.rb
@@ -501,9 +503,11 @@ files:
501
503
  - samples/hello/hello_checkbox.rb
502
504
  - samples/hello/hello_checkbox_group.rb
503
505
  - samples/hello/hello_code_text.rb
506
+ - samples/hello/hello_color_dialog.rb
504
507
  - samples/hello/hello_combo.rb
505
508
  - samples/hello/hello_computed.rb
506
509
  - samples/hello/hello_computed/contact.rb
510
+ - samples/hello/hello_cursor.rb
507
511
  - samples/hello/hello_custom_shell.rb
508
512
  - samples/hello/hello_custom_widget.rb
509
513
  - samples/hello/hello_date_time.rb
@@ -512,6 +516,7 @@ files:
512
516
  - samples/hello/hello_drag_and_drop.rb
513
517
  - samples/hello/hello_expand_bar.rb
514
518
  - samples/hello/hello_file_dialog.rb
519
+ - samples/hello/hello_font_dialog.rb
515
520
  - samples/hello/hello_group.rb
516
521
  - samples/hello/hello_link.rb
517
522
  - samples/hello/hello_list_multi_selection.rb
@@ -519,6 +524,7 @@ files:
519
524
  - samples/hello/hello_menu_bar.rb
520
525
  - samples/hello/hello_message_box.rb
521
526
  - samples/hello/hello_pop_up_context_menu.rb
527
+ - samples/hello/hello_progress_bar.rb
522
528
  - samples/hello/hello_radio.rb
523
529
  - samples/hello/hello_radio_group.rb
524
530
  - samples/hello/hello_sash_form.rb
@@ -527,6 +533,7 @@ files:
527
533
  - samples/hello/hello_tab.rb
528
534
  - samples/hello/hello_table.rb
529
535
  - samples/hello/hello_table/baseball_park.png
536
+ - samples/hello/hello_tree.rb
530
537
  - samples/hello/hello_world.rb
531
538
  - vendor/swt/linux/swt.jar
532
539
  - vendor/swt/mac/swt.jar
@@ -1,65 +0,0 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining
4
- # a copy of this software and associated documentation files (the
5
- # "Software"), to deal in the Software without restriction, including
6
- # without limitation the rights to use, copy, modify, merge, publish,
7
- # distribute, sublicense, and/or sell copies of the Software, and to
8
- # permit persons to whom the Software is furnished to do so, subject to
9
- # the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be
12
- # included in all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-
22
- require 'glimmer/swt/swt_proxy'
23
- require 'glimmer/swt/widget_proxy'
24
- require 'glimmer/swt/display_proxy'
25
-
26
- module Glimmer
27
- module SWT
28
- # Proxy for org.eclipse.swt.widgets.DirectoryDialog
29
- #
30
- # Automatically uses the current shell if one is open.
31
- # Otherwise, it instantiates a new shell parent
32
- #
33
- # Optionally takes a shell as an argument
34
- #
35
- # Follows the Proxy Design Pattern
36
- class DirectoryDialogProxy < WidgetProxy
37
- # TODO write rspec tests
38
- include_package 'org.eclipse.swt.widgets'
39
-
40
- def initialize(*args, swt_widget: nil)
41
- if swt_widget
42
- @swt_widget = swt_widget
43
- else
44
- style_args = args.select {|arg| arg.is_a?(Symbol) || arg.is_a?(String)}
45
- if style_args.any?
46
- style_arg_start_index = args.index(style_args.first)
47
- style_arg_last_index = args.index(style_args.last)
48
- args[style_arg_start_index..style_arg_last_index] = SWTProxy[style_args]
49
- end
50
- if args.first.respond_to?(:swt_widget) && args.first.swt_widget.is_a?(Shell)
51
- args[0] = args[0].swt_widget
52
- end
53
- if !args.first.is_a?(Shell)
54
- current_shell = DisplayProxy.instance.swt_display.shells.first
55
- args.unshift(current_shell.nil? ? ShellProxy.new : current_shell)
56
- end
57
- parent = args[0]
58
- @parent_proxy = parent.is_a?(Shell) ? ShellProxy.new(swt_widget: parent) : parent
59
- @swt_widget = DirectoryDialog.new(*args)
60
- end
61
- end
62
-
63
- end
64
- end
65
- end
@@ -1,66 +0,0 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining
4
- # a copy of this software and associated documentation files (the
5
- # "Software"), to deal in the Software without restriction, including
6
- # without limitation the rights to use, copy, modify, merge, publish,
7
- # distribute, sublicense, and/or sell copies of the Software, and to
8
- # permit persons to whom the Software is furnished to do so, subject to
9
- # the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be
12
- # included in all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-
22
- require 'glimmer/swt/swt_proxy'
23
- require 'glimmer/swt/widget_proxy'
24
- require 'glimmer/swt/display_proxy'
25
-
26
- module Glimmer
27
- module SWT
28
- # Proxy for org.eclipse.swt.widgets.FileDialog
29
- #
30
- # Automatically uses the current shell if one is open.
31
- # Otherwise, it instantiates a new shell parent
32
- #
33
- # Optionally takes a shell as an argument
34
- #
35
- # Follows the Proxy Design Pattern
36
- class FileDialogProxy < WidgetProxy
37
- # TODO write rspec tests
38
- # TODO consider refactoring and sharing code with DirectoryDialogProxy (and do the same with their expressions)
39
- include_package 'org.eclipse.swt.widgets'
40
-
41
- def initialize(*args, swt_widget: nil)
42
- if swt_widget
43
- @swt_widget = swt_widget
44
- else
45
- style_args = args.select {|arg| arg.is_a?(Symbol) || arg.is_a?(String)}
46
- if style_args.any?
47
- style_arg_start_index = args.index(style_args.first)
48
- style_arg_last_index = args.index(style_args.last)
49
- args[style_arg_start_index..style_arg_last_index] = SWTProxy[style_args]
50
- end
51
- if args.first.respond_to?(:swt_widget) && args.first.swt_widget.is_a?(Shell)
52
- args[0] = args[0].swt_widget
53
- end
54
- if !args.first.is_a?(Shell)
55
- current_shell = DisplayProxy.instance.swt_display.shells.first
56
- args.unshift(current_shell.nil? ? ShellProxy.new : current_shell)
57
- end
58
- parent = args[0]
59
- @parent_proxy = parent.is_a?(Shell) ? ShellProxy.new(swt_widget: parent) : parent
60
- @swt_widget = FileDialog.new(*args)
61
- end
62
- end
63
-
64
- end
65
- end
66
- end