glimmer-dsl-swt 4.18.7.3 → 4.19.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -0
  3. data/README.md +126 -20
  4. data/RUBY_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/bin/girb +10 -9
  7. data/bin/girb_runner.rb +8 -3
  8. data/bin/glimmer +10 -1
  9. data/bin/glimmer-setup +58 -0
  10. data/bin/glimmer_runner.rb +4 -0
  11. data/docs/reference/GLIMMER_COMMAND.md +98 -32
  12. data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +9 -7
  13. data/docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md +7 -1
  14. data/docs/reference/GLIMMER_SAMPLES.md +25 -0
  15. data/glimmer-dsl-swt.gemspec +0 -0
  16. data/lib/glimmer-dsl-swt.rb +8 -0
  17. data/lib/glimmer/data_binding/widget_binding.rb +1 -1
  18. data/lib/glimmer/dsl/swt/c_tab_item_expression.rb +58 -0
  19. data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +2 -1
  20. data/lib/glimmer/dsl/swt/tab_item_expression.rb +7 -3
  21. data/lib/glimmer/dsl/swt/widget_expression.rb +1 -1
  22. data/lib/glimmer/launcher.rb +27 -51
  23. data/lib/glimmer/rake_task.rb +37 -7
  24. data/lib/glimmer/rake_task/list.rb +8 -0
  25. data/lib/glimmer/rake_task/package.rb +7 -2
  26. data/lib/glimmer/rake_task/scaffold.rb +283 -207
  27. data/lib/glimmer/swt/c_tab_item_proxy.rb +53 -0
  28. data/lib/glimmer/swt/custom/code_text.rb +19 -3
  29. data/lib/glimmer/swt/custom/shape.rb +22 -4
  30. data/lib/glimmer/swt/image_proxy.rb +5 -1
  31. data/lib/glimmer/swt/sash_form_proxy.rb +6 -0
  32. data/lib/glimmer/swt/shell_proxy.rb +3 -1
  33. data/lib/glimmer/swt/tab_folder_proxy.rb +1 -0
  34. data/lib/glimmer/swt/tab_item_proxy.rb +17 -18
  35. data/lib/glimmer/swt/widget_proxy.rb +9 -0
  36. data/samples/elaborate/mandelbrot_fractal.rb +1 -1
  37. data/samples/elaborate/tetris.rb +1 -4
  38. data/samples/elaborate/tetris/view/bevel.rb +4 -1
  39. data/samples/elaborate/tetris/view/block.rb +1 -3
  40. data/samples/hello/hello_c_combo.rb +68 -0
  41. data/samples/hello/hello_c_tab.rb +271 -0
  42. data/samples/hello/hello_code_text.rb +141 -73
  43. data/samples/hello/hello_tab.rb +2 -0
  44. data/vendor/swt/linux/swt.jar +0 -0
  45. data/vendor/swt/mac/swt.jar +0 -0
  46. data/vendor/swt/windows/swt.jar +0 -0
  47. metadata +45 -15
@@ -21,86 +21,154 @@
21
21
 
22
22
  require 'glimmer-dsl-swt'
23
23
 
24
- include Glimmer
25
-
26
- shell {
27
- minimum_size 640, 480
28
- text 'Hello, Code Text!'
24
+ class HelloCodeText
25
+ include Glimmer::UI::CustomShell
29
26
 
30
- tab_folder {
31
- tab_item {
32
- fill_layout
33
- text 'Ruby (glimmer theme)'
34
- code_text(language: 'ruby', theme: 'glimmer', lines: true) {
35
- text <<~CODE
36
- greeting = 'Hello, World!'
37
-
38
- include Glimmer
39
-
40
- shell {
41
- text 'Glimmer'
42
-
43
- label {
44
- text greeting
45
- font height: 30, style: :bold
46
- }
47
- }.open
48
- CODE
27
+ attr_accessor :ruby_code, :js_code, :html_code
28
+
29
+ before_body {
30
+ self.ruby_code = <<~RUBY
31
+ greeting = 'Hello, World!'
32
+
33
+ include Glimmer
34
+
35
+ shell {
36
+ text 'Glimmer'
37
+
38
+ label {
39
+ text greeting
40
+ font height: 30, style: :bold
41
+ }
42
+ }.open
43
+ RUBY
44
+
45
+ self.js_code = <<~JS
46
+ function greet(greeting) {
47
+ alert(greeting);
49
48
  }
50
- }
51
- tab_item {
52
- fill_layout
53
- text 'JavaScript (pastie theme)'
54
- # No border (SWT styles are passed explicitly)
55
- code_text(:multi, :h_scroll, :v_scroll, language: 'javascript', theme: 'pastie', lines: {width: 2}) {
56
- # With lines, the custom widget has a root composite, which can be configured separately
57
- root {
58
- grid_layout(2, false) {
59
- margin_width 2
49
+
50
+ var greetingString = 'Hello, World!';
51
+
52
+ greet(greetingString);
53
+
54
+ var moreGreetings = ['Howdy!', 'Aloha!', 'Hey!']
55
+
56
+ for(var greeting of moreGreetings) {
57
+ greet(greeting)
58
+ }
59
+ JS
60
+
61
+ self.html_code = <<~HTML
62
+ <html>
63
+ <body>
64
+ <section class="accordion">
65
+ <form method="post" id="name">
66
+ <label for="name">
67
+ Name
68
+ </label>
69
+ <input name="name" type="text" />
70
+ <input type="submit" />
71
+ </form>
72
+ </section>
73
+ </body>
74
+ </html>
75
+ HTML
76
+ }
77
+
78
+ body {
79
+ shell {
80
+ minimum_size 640, 480
81
+ text 'Hello, Code Text!'
82
+
83
+ tab_folder {
84
+ tab_item {
85
+ fill_layout
86
+ text 'Ruby (glimmer)'
87
+ code_text(language: 'ruby', theme: 'glimmer', lines: true) {
88
+ text bind(self, :ruby_code)
60
89
  }
61
- background :white
62
90
  }
63
- # With lines, the line numbers widget can be configured separately
64
- line_numbers {
65
- background :white
91
+ tab_item {
92
+ fill_layout
93
+ text 'Ruby (pastie)'
94
+ code_text(language: 'ruby', theme: 'pastie', lines: {width: 2}) {
95
+ text bind(self, :ruby_code)
96
+ }
66
97
  }
67
- text <<~CODE
68
- function greet(greeting) {
69
- alert(greeting);
98
+ tab_item {
99
+ fill_layout
100
+ text 'Ruby (github)'
101
+ code_text(language: 'ruby', theme: 'github', lines: false) {
102
+ text bind(self, :ruby_code)
70
103
  }
71
-
72
- var greetingString = 'Hello, World!';
73
-
74
- greet(greetingString);
75
-
76
- var moreGreetings = ['Howdy!', 'Aloha!', 'Hey!']
77
-
78
- for(var greeting of moreGreetings) {
79
- greet(greeting)
104
+ }
105
+ tab_item {
106
+ fill_layout
107
+ text 'JavaScript (glimmer)'
108
+ # No border (SWT styles are passed explicitly)
109
+ code_text(:multi, :h_scroll, :v_scroll, language: 'javascript', theme: 'glimmer', lines: true) {
110
+ # With lines, the custom widget has a root composite, which can be configured separately
111
+ root {
112
+ grid_layout(2, false) {
113
+ margin_width 2
114
+ }
115
+ background :white
116
+ }
117
+ # With lines, the line numbers widget can be configured separately
118
+ line_numbers {
119
+ background :white
120
+ }
121
+ text bind(self, :js_code)
80
122
  }
81
- CODE
82
- }
83
- }
84
- tab_item {
85
- fill_layout
86
- text 'HTML (github theme)'
87
- code_text(language: 'html', theme: 'github') {
88
- text <<~CODE
89
- <html>
90
- <body>
91
- <section class="accordion">
92
- <form method="post" id="name">
93
- <label for="name">
94
- Name
95
- </label>
96
- <input name="name" type="text" />
97
- <input type="submit" />
98
- </form>
99
- </section>
100
- </body>
101
- </html>
102
- CODE
123
+ }
124
+ tab_item {
125
+ fill_layout
126
+ text 'JavaScript (pastie)'
127
+ code_text(:multi, :h_scroll, :v_scroll, language: 'javascript', theme: 'pastie', lines: {width: 2}) {
128
+ root {
129
+ grid_layout(2, false) {
130
+ margin_width 2
131
+ }
132
+ background :white
133
+ }
134
+ line_numbers {
135
+ background :white
136
+ }
137
+ text bind(self, :js_code)
138
+ }
139
+ }
140
+ tab_item {
141
+ fill_layout
142
+ text 'JavaScript (github)'
143
+ code_text(:multi, :h_scroll, :v_scroll, language: 'javascript', theme: 'github') { # default is lines: false
144
+ text bind(self, :js_code)
145
+ }
146
+ }
147
+ tab_item {
148
+ fill_layout
149
+ text 'HTML (glimmer)'
150
+ code_text(language: 'html', theme: 'glimmer', lines: true) {
151
+ text bind(self, :html_code)
152
+ }
153
+ }
154
+ tab_item {
155
+ fill_layout
156
+ text 'HTML (pastie)'
157
+ code_text(language: 'html', theme: 'pastie', lines: {width: 2}) {
158
+ text bind(self, :html_code)
159
+ }
160
+ }
161
+ tab_item {
162
+ fill_layout
163
+ text 'HTML (github)'
164
+ code_text(language: 'html', theme: 'github') { # default is lines: false
165
+ text bind(self, :html_code)
166
+ }
167
+ }
103
168
  }
104
169
  }
105
170
  }
106
- }.open
171
+
172
+ end
173
+
174
+ HelloCodeText.launch
@@ -31,6 +31,7 @@ class HelloTab
31
31
  tab_folder {
32
32
  tab_item {
33
33
  text 'English'
34
+ tool_tip_text 'English Greeting'
34
35
 
35
36
  label {
36
37
  text 'Hello, World!'
@@ -39,6 +40,7 @@ class HelloTab
39
40
 
40
41
  tab_item {
41
42
  text 'French'
43
+ tool_tip_text 'French Greeting'
42
44
 
43
45
  label {
44
46
  text 'Bonjour, Univers!'
Binary file
Binary file
Binary file
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.7.3
4
+ version: 4.19.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - AndyMaleh
7
+ - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-03-28 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.2.0
18
+ version: 1.3.1
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.2.0
26
+ version: 1.3.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -69,7 +69,7 @@ dependencies:
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 0.11.0
72
+ version: 0.12.0
73
73
  - - "<"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.0.0
@@ -80,7 +80,7 @@ dependencies:
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 0.11.0
83
+ version: 0.12.0
84
84
  - - "<"
85
85
  - !ruby/object:Gem::Version
86
86
  version: 2.0.0
@@ -149,10 +149,7 @@ dependencies:
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 10.1.0
153
- - - "<"
154
- - !ruby/object:Gem::Version
155
- version: 14.0.0
152
+ version: 13.0.0
156
153
  name: rake
157
154
  type: :runtime
158
155
  prerelease: false
@@ -160,10 +157,7 @@ dependencies:
160
157
  requirements:
161
158
  - - ">="
162
159
  - !ruby/object:Gem::Version
163
- version: 10.1.0
164
- - - "<"
165
- - !ruby/object:Gem::Version
166
- version: 14.0.0
160
+ version: 13.0.0
167
161
  - !ruby/object:Gem::Dependency
168
162
  requirement: !ruby/object:Gem::Requirement
169
163
  requirements:
@@ -204,6 +198,26 @@ dependencies:
204
198
  - - "<"
205
199
  - !ruby/object:Gem::Version
206
200
  version: 4.0.0
201
+ - !ruby/object:Gem::Dependency
202
+ requirement: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - ">="
205
+ - !ruby/object:Gem::Version
206
+ version: 0.8.5
207
+ - - "<"
208
+ - !ruby/object:Gem::Version
209
+ version: 2.0.0
210
+ name: jruby-win32ole
211
+ type: :runtime
212
+ prerelease: false
213
+ version_requirements: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - ">="
216
+ - !ruby/object:Gem::Version
217
+ version: 0.8.5
218
+ - - "<"
219
+ - !ruby/object:Gem::Version
220
+ version: 2.0.0
207
221
  - !ruby/object:Gem::Dependency
208
222
  requirement: !ruby/object:Gem::Requirement
209
223
  requirements:
@@ -334,6 +348,7 @@ email: andy.am@gmail.com
334
348
  executables:
335
349
  - glimmer
336
350
  - girb
351
+ - glimmer-setup
337
352
  extensions: []
338
353
  extra_rdoc_files:
339
354
  - README.md
@@ -353,6 +368,8 @@ files:
353
368
  - bin/girb
354
369
  - bin/girb_runner.rb
355
370
  - bin/glimmer
371
+ - bin/glimmer-setup
372
+ - bin/glimmer_runner.rb
356
373
  - docs/reference/GLIMMER_COMMAND.md
357
374
  - docs/reference/GLIMMER_CONFIGURATION.md
358
375
  - docs/reference/GLIMMER_GIRB.md
@@ -380,6 +397,7 @@ files:
380
397
  - lib/glimmer/dsl/swt/auto_exec_expression.rb
381
398
  - lib/glimmer/dsl/swt/bind_expression.rb
382
399
  - lib/glimmer/dsl/swt/block_property_expression.rb
400
+ - lib/glimmer/dsl/swt/c_tab_item_expression.rb
383
401
  - lib/glimmer/dsl/swt/checkbox_group_selection_data_binding_expression.rb
384
402
  - lib/glimmer/dsl/swt/color_expression.rb
385
403
  - lib/glimmer/dsl/swt/column_properties_expression.rb
@@ -426,6 +444,7 @@ files:
426
444
  - lib/glimmer/rake_task/list.rb
427
445
  - lib/glimmer/rake_task/package.rb
428
446
  - lib/glimmer/rake_task/scaffold.rb
447
+ - lib/glimmer/swt/c_tab_item_proxy.rb
429
448
  - lib/glimmer/swt/color_proxy.rb
430
449
  - lib/glimmer/swt/cursor_proxy.rb
431
450
  - lib/glimmer/swt/custom/animation.rb
@@ -507,6 +526,8 @@ files:
507
526
  - samples/elaborate/user_profile.rb
508
527
  - samples/hello/hello_browser.rb
509
528
  - samples/hello/hello_button.rb
529
+ - samples/hello/hello_c_combo.rb
530
+ - samples/hello/hello_c_tab.rb
510
531
  - samples/hello/hello_canvas.rb
511
532
  - samples/hello/hello_canvas_animation.rb
512
533
  - samples/hello/hello_canvas_animation_data_binding.rb
@@ -560,9 +581,18 @@ licenses:
560
581
  - MIT
561
582
  metadata: {}
562
583
  post_install_message:
584
+ - |2+
585
+
586
+ You are ready to use `glimmer` and `girb` commands on Windows and Linux.
587
+
588
+ On the Mac, run `glimmer-setup` command to complete setup of Glimmer DSL for SWT, making `glimmer` and `girb` commands ready for use:
589
+
590
+ glimmer-setup
591
+
563
592
  rdoc_options: []
564
593
  require_paths:
565
594
  - lib
595
+ - bin
566
596
  required_ruby_version: !ruby/object:Gem::Requirement
567
597
  requirements:
568
598
  - - ">="