glimmer-dsl-swt 0.6.2 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/VERSION +1 -1
- data/bin/girb +1 -1
- data/bin/glimmer +5 -1
- data/icons/scaffold_app.png +0 -0
- data/lib/ext/glimmer/config.rb +13 -1
- data/lib/glimmer-dsl-swt.rb +5 -9
- data/lib/glimmer/Rakefile +5 -0
- data/lib/glimmer/data_binding/table_items_binding.rb +4 -1
- data/lib/glimmer/dsl/swt/message_box_expression.rb +9 -1
- data/lib/glimmer/dsl/swt/widget_expression.rb +1 -7
- data/lib/glimmer/launcher.rb +59 -20
- data/lib/glimmer/package.rb +26 -9
- data/lib/glimmer/rake_task.rb +115 -5
- data/lib/glimmer/scaffold.rb +66 -33
- data/lib/glimmer/swt/display_proxy.rb +13 -2
- data/lib/glimmer/swt/message_box_proxy.rb +23 -5
- data/lib/glimmer/swt/shell_proxy.rb +0 -1
- data/lib/glimmer/swt/table_proxy.rb +60 -2
- data/lib/glimmer/swt/widget_proxy.rb +44 -19
- data/samples/elaborate/contact_manager.rb +121 -0
- data/samples/elaborate/contact_manager/contact.rb +11 -0
- data/samples/elaborate/contact_manager/contact_manager_presenter.rb +26 -0
- data/samples/elaborate/contact_manager/contact_repository.rb +244 -0
- data/samples/elaborate/login.rb +108 -0
- data/samples/elaborate/tic_tac_toe.rb +55 -0
- data/samples/elaborate/tic_tac_toe/board.rb +124 -0
- data/samples/elaborate/tic_tac_toe/cell.rb +27 -0
- data/samples/elaborate/user_profile.rb +55 -0
- data/samples/hello/hello_browser.rb +8 -0
- data/samples/hello/hello_combo.rb +38 -0
- data/samples/hello/hello_computed.rb +69 -0
- data/samples/hello/hello_computed/contact.rb +21 -0
- data/samples/hello/hello_drag_and_drop.rb +29 -0
- data/samples/hello/hello_list_multi_selection.rb +48 -0
- data/samples/hello/hello_list_single_selection.rb +37 -0
- data/samples/hello/hello_menu_bar.rb +64 -0
- data/samples/hello/hello_message_box.rb +15 -0
- data/samples/hello/hello_pop_up_context_menu.rb +36 -0
- data/samples/hello/hello_tab.rb +24 -0
- data/samples/hello/hello_world.rb +8 -0
- metadata +65 -8
@@ -0,0 +1,37 @@
|
|
1
|
+
class Person
|
2
|
+
attr_accessor :country, :country_options
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
self.country_options=["", "Canada", "US", "Mexico"]
|
6
|
+
self.country = "Canada"
|
7
|
+
end
|
8
|
+
|
9
|
+
def reset_country
|
10
|
+
self.country = "Canada"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class HelloListSingleSelection
|
15
|
+
include Glimmer
|
16
|
+
def launch
|
17
|
+
person = Person.new
|
18
|
+
|
19
|
+
shell {
|
20
|
+
grid_layout
|
21
|
+
|
22
|
+
text 'Hello, List Single Selection!'
|
23
|
+
|
24
|
+
list {
|
25
|
+
selection bind(person, :country)
|
26
|
+
}
|
27
|
+
|
28
|
+
button {
|
29
|
+
text "Reset Selection To Default Value"
|
30
|
+
|
31
|
+
on_widget_selected { person.reset_country }
|
32
|
+
}
|
33
|
+
}.open
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
HelloListSingleSelection.new.launch
|
@@ -0,0 +1,64 @@
|
|
1
|
+
include Glimmer
|
2
|
+
|
3
|
+
shell { |shell_proxy|
|
4
|
+
text 'Hello, Menu Bar!'
|
5
|
+
grid_layout
|
6
|
+
label(:center) {
|
7
|
+
font height: 16
|
8
|
+
text 'Check Out The File Menu and History Menu in The Menu Bar Above!'
|
9
|
+
}
|
10
|
+
menu_bar {
|
11
|
+
menu {
|
12
|
+
text '&File'
|
13
|
+
menu_item {
|
14
|
+
text 'E&xit'
|
15
|
+
on_widget_selected {
|
16
|
+
exit(0)
|
17
|
+
}
|
18
|
+
}
|
19
|
+
menu_item(0) {
|
20
|
+
text '&New'
|
21
|
+
on_widget_selected {
|
22
|
+
message_box(shell_proxy) {
|
23
|
+
text 'New File'
|
24
|
+
message 'New File Contents'
|
25
|
+
}.open
|
26
|
+
}
|
27
|
+
}
|
28
|
+
menu(1) {
|
29
|
+
text '&Options'
|
30
|
+
menu_item(:radio) {
|
31
|
+
text 'Option 1'
|
32
|
+
}
|
33
|
+
menu_item(:separator)
|
34
|
+
menu_item(:check) {
|
35
|
+
text 'Option 3'
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
menu {
|
40
|
+
text '&History'
|
41
|
+
menu {
|
42
|
+
text '&Recent'
|
43
|
+
menu_item {
|
44
|
+
text 'File 1'
|
45
|
+
on_widget_selected {
|
46
|
+
message_box(shell_proxy) {
|
47
|
+
text 'File 1'
|
48
|
+
message 'File 1 Contents'
|
49
|
+
}.open
|
50
|
+
}
|
51
|
+
}
|
52
|
+
menu_item {
|
53
|
+
text 'File 2'
|
54
|
+
on_widget_selected {
|
55
|
+
message_box(shell_proxy) {
|
56
|
+
text 'File 2'
|
57
|
+
message 'File 2 Contents'
|
58
|
+
}.open
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}.open
|
@@ -0,0 +1,15 @@
|
|
1
|
+
include Glimmer
|
2
|
+
|
3
|
+
@shell = shell {
|
4
|
+
text 'Hello, Message Box!'
|
5
|
+
button {
|
6
|
+
text 'Please Click To Win a Surprise'
|
7
|
+
on_widget_selected {
|
8
|
+
message_box(@shell) {
|
9
|
+
text 'Surprise'
|
10
|
+
message "Congratulations!\n\nYou have won $1,000,000!"
|
11
|
+
}.open
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
@shell.open
|
@@ -0,0 +1,36 @@
|
|
1
|
+
include Glimmer
|
2
|
+
|
3
|
+
shell { |shell_proxy|
|
4
|
+
text 'Hello, Pop Up Context Menu!'
|
5
|
+
grid_layout
|
6
|
+
label {
|
7
|
+
font height: 16
|
8
|
+
text 'Right-Click To Pop Up a Context Menu'
|
9
|
+
menu {
|
10
|
+
menu {
|
11
|
+
text '&History'
|
12
|
+
menu {
|
13
|
+
text '&Recent'
|
14
|
+
menu_item {
|
15
|
+
text 'File 1'
|
16
|
+
on_widget_selected {
|
17
|
+
message_box(shell_proxy) {
|
18
|
+
text 'File 1'
|
19
|
+
message 'File 1 Contents'
|
20
|
+
}.open
|
21
|
+
}
|
22
|
+
}
|
23
|
+
menu_item {
|
24
|
+
text 'File 2'
|
25
|
+
on_widget_selected {
|
26
|
+
message_box(shell_proxy) {
|
27
|
+
text 'File 2'
|
28
|
+
message 'File 2 Contents'
|
29
|
+
}.open
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}.open
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class HelloTab
|
2
|
+
include Glimmer
|
3
|
+
def launch
|
4
|
+
shell {
|
5
|
+
text "Hello, Tab!"
|
6
|
+
tab_folder {
|
7
|
+
tab_item {
|
8
|
+
text "English"
|
9
|
+
label {
|
10
|
+
text "Hello, World!"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
tab_item {
|
14
|
+
text "French"
|
15
|
+
label {
|
16
|
+
text "Bonjour, Univers!"
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}.open
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
HelloTab.new.launch
|
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: 0.6.
|
4
|
+
version: 0.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyMaleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-15 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: 0.10.
|
18
|
+
version: 0.10.4
|
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: 0.10.
|
26
|
+
version: 0.10.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 0.
|
60
|
+
version: 0.10.1
|
61
61
|
name: puts_debuggerer
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
@@ -65,7 +65,21 @@ dependencies:
|
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.10.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 0.2.1
|
75
|
+
name: rake-tui
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.2.1
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
requirement: !ruby/object:Gem::Requirement
|
71
85
|
requirements:
|
@@ -200,6 +214,26 @@ dependencies:
|
|
200
214
|
- - "<"
|
201
215
|
- !ruby/object:Gem::Version
|
202
216
|
version: 2.0.0
|
217
|
+
- !ruby/object:Gem::Dependency
|
218
|
+
requirement: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 0.7.0
|
223
|
+
- - "<"
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: 2.0.0
|
226
|
+
name: tty-markdown
|
227
|
+
type: :runtime
|
228
|
+
prerelease: false
|
229
|
+
version_requirements: !ruby/object:Gem::Requirement
|
230
|
+
requirements:
|
231
|
+
- - ">="
|
232
|
+
- !ruby/object:Gem::Version
|
233
|
+
version: 0.7.0
|
234
|
+
- - "<"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 2.0.0
|
203
237
|
- !ruby/object:Gem::Dependency
|
204
238
|
requirement: !ruby/object:Gem::Requirement
|
205
239
|
requirements:
|
@@ -290,7 +324,7 @@ dependencies:
|
|
290
324
|
- - "~>"
|
291
325
|
- !ruby/object:Gem::Version
|
292
326
|
version: 0.7.0
|
293
|
-
description: Glimmer DSL for SWT (Desktop GUI)
|
327
|
+
description: Glimmer DSL for SWT (JRuby Desktop GUI)
|
294
328
|
email: andy.am@gmail.com
|
295
329
|
executables:
|
296
330
|
- glimmer
|
@@ -309,9 +343,11 @@ files:
|
|
309
343
|
- bin/glimmer
|
310
344
|
- icons/scaffold_app.icns
|
311
345
|
- icons/scaffold_app.ico
|
346
|
+
- icons/scaffold_app.png
|
312
347
|
- lib/ext/glimmer.rb
|
313
348
|
- lib/ext/glimmer/config.rb
|
314
349
|
- lib/glimmer-dsl-swt.rb
|
350
|
+
- lib/glimmer/Rakefile
|
315
351
|
- lib/glimmer/data_binding/list_selection_binding.rb
|
316
352
|
- lib/glimmer/data_binding/observable_widget.rb
|
317
353
|
- lib/glimmer/data_binding/shine.rb
|
@@ -382,6 +418,27 @@ files:
|
|
382
418
|
- lib/glimmer/ui/custom_shell.rb
|
383
419
|
- lib/glimmer/ui/custom_widget.rb
|
384
420
|
- lib/glimmer/util/proc_tracker.rb
|
421
|
+
- samples/elaborate/contact_manager.rb
|
422
|
+
- samples/elaborate/contact_manager/contact.rb
|
423
|
+
- samples/elaborate/contact_manager/contact_manager_presenter.rb
|
424
|
+
- samples/elaborate/contact_manager/contact_repository.rb
|
425
|
+
- samples/elaborate/login.rb
|
426
|
+
- samples/elaborate/tic_tac_toe.rb
|
427
|
+
- samples/elaborate/tic_tac_toe/board.rb
|
428
|
+
- samples/elaborate/tic_tac_toe/cell.rb
|
429
|
+
- samples/elaborate/user_profile.rb
|
430
|
+
- samples/hello/hello_browser.rb
|
431
|
+
- samples/hello/hello_combo.rb
|
432
|
+
- samples/hello/hello_computed.rb
|
433
|
+
- samples/hello/hello_computed/contact.rb
|
434
|
+
- samples/hello/hello_drag_and_drop.rb
|
435
|
+
- samples/hello/hello_list_multi_selection.rb
|
436
|
+
- samples/hello/hello_list_single_selection.rb
|
437
|
+
- samples/hello/hello_menu_bar.rb
|
438
|
+
- samples/hello/hello_message_box.rb
|
439
|
+
- samples/hello/hello_pop_up_context_menu.rb
|
440
|
+
- samples/hello/hello_tab.rb
|
441
|
+
- samples/hello/hello_world.rb
|
385
442
|
- vendor/swt/linux/swt.jar
|
386
443
|
- vendor/swt/mac/swt.jar
|
387
444
|
- vendor/swt/windows/swt.jar
|
@@ -397,7 +454,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
397
454
|
requirements:
|
398
455
|
- - ">="
|
399
456
|
- !ruby/object:Gem::Version
|
400
|
-
version:
|
457
|
+
version: 2.5.3
|
401
458
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
402
459
|
requirements:
|
403
460
|
- - ">="
|