glimmer-dsl-swt 4.18.3.1 → 4.18.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +55 -1
- data/README.md +739 -324
- data/VERSION +1 -1
- data/glimmer-dsl-swt.gemspec +9 -4
- data/lib/ext/rouge/themes/glimmer.rb +29 -0
- data/lib/glimmer-dsl-swt.rb +0 -1
- data/lib/glimmer/data_binding/table_items_binding.rb +8 -5
- data/lib/glimmer/data_binding/widget_binding.rb +9 -1
- data/lib/glimmer/dsl/swt/image_expression.rb +14 -6
- data/lib/glimmer/dsl/swt/layout_data_expression.rb +4 -4
- data/lib/glimmer/dsl/swt/layout_expression.rb +5 -3
- data/lib/glimmer/swt/custom/code_text.rb +171 -53
- data/lib/glimmer/swt/custom/drawable.rb +4 -6
- data/lib/glimmer/swt/custom/shape.rb +69 -12
- data/lib/glimmer/swt/date_time_proxy.rb +1 -3
- data/lib/glimmer/swt/display_proxy.rb +12 -1
- data/lib/glimmer/swt/font_proxy.rb +1 -0
- data/lib/glimmer/swt/image_proxy.rb +79 -1
- data/lib/glimmer/swt/shell_proxy.rb +13 -1
- data/lib/glimmer/swt/table_proxy.rb +43 -15
- data/lib/glimmer/swt/widget_proxy.rb +11 -2
- data/lib/glimmer/ui/custom_shell.rb +1 -0
- data/lib/glimmer/ui/custom_widget.rb +10 -3
- data/samples/elaborate/meta_sample.rb +1 -1
- data/samples/elaborate/meta_sample/meta_sample_logo.png +0 -0
- data/samples/elaborate/tetris.rb +90 -17
- data/samples/elaborate/tetris/model/game.rb +89 -8
- data/samples/elaborate/tetris/{view/game_over_dialog.rb → model/past_game.rb} +12 -41
- data/samples/elaborate/tetris/model/tetromino.rb +18 -5
- data/samples/elaborate/tetris/view/block.rb +8 -13
- data/samples/elaborate/tetris/view/high_score_dialog.rb +131 -0
- data/samples/elaborate/tetris/view/playfield.rb +1 -1
- data/samples/elaborate/tetris/view/score_lane.rb +6 -6
- data/samples/elaborate/tetris/view/tetris_menu_bar.rb +70 -3
- data/samples/hello/hello_canvas.rb +10 -9
- data/samples/hello/hello_canvas_animation.rb +5 -5
- data/samples/hello/hello_code_text.rb +92 -0
- data/samples/hello/hello_table.rb +6 -4
- data/samples/hello/hello_table/baseball_park.png +0 -0
- metadata +8 -3
@@ -0,0 +1,92 @@
|
|
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
|
+
include Glimmer
|
23
|
+
|
24
|
+
shell {
|
25
|
+
minimum_size 640, 480
|
26
|
+
text 'Hello, Code Text!'
|
27
|
+
|
28
|
+
tab_folder {
|
29
|
+
tab_item {
|
30
|
+
fill_layout
|
31
|
+
text 'Ruby (glimmer theme)'
|
32
|
+
code_text(language: 'ruby', theme: 'glimmer', lines: true) {
|
33
|
+
text <<~CODE
|
34
|
+
greeting = 'Hello, World!'
|
35
|
+
|
36
|
+
include Glimmer
|
37
|
+
|
38
|
+
shell {
|
39
|
+
text 'Glimmer'
|
40
|
+
|
41
|
+
label {
|
42
|
+
text greeting
|
43
|
+
font height: 30, style: :bold
|
44
|
+
}
|
45
|
+
}.open
|
46
|
+
CODE
|
47
|
+
}
|
48
|
+
}
|
49
|
+
tab_item {
|
50
|
+
fill_layout
|
51
|
+
text 'JavaScript (pastie theme)'
|
52
|
+
code_text(language: 'javascript', theme: 'pastie', lines: {width: 2}) {
|
53
|
+
text <<~CODE
|
54
|
+
function greet(greeting) {
|
55
|
+
alert(greeting);
|
56
|
+
}
|
57
|
+
|
58
|
+
var greetingString = 'Hello, World!';
|
59
|
+
|
60
|
+
greet(greetingString);
|
61
|
+
|
62
|
+
var moreGreetings = ['Howdy!', 'Aloha!', 'Hey!']
|
63
|
+
|
64
|
+
for(var greeting of moreGreetings) {
|
65
|
+
greet(greeting)
|
66
|
+
}
|
67
|
+
CODE
|
68
|
+
}
|
69
|
+
}
|
70
|
+
tab_item {
|
71
|
+
fill_layout
|
72
|
+
text 'HTML (github theme)'
|
73
|
+
code_text(language: 'html', theme: 'github') {
|
74
|
+
text <<~CODE
|
75
|
+
<html>
|
76
|
+
<body>
|
77
|
+
<section class="accordion">
|
78
|
+
<form method="post" id="name">
|
79
|
+
<label for="name">
|
80
|
+
Name
|
81
|
+
</label>
|
82
|
+
<input name="name" type="text" />
|
83
|
+
<input type="submit" />
|
84
|
+
</form>
|
85
|
+
</section>
|
86
|
+
</body>
|
87
|
+
</html>
|
88
|
+
CODE
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}.open
|
@@ -186,18 +186,20 @@ class HelloTable
|
|
186
186
|
grid_layout
|
187
187
|
|
188
188
|
text 'Hello, Table!'
|
189
|
+
background_image File.expand_path('hello_table/baseball_park.png', __dir__)
|
189
190
|
|
190
191
|
label {
|
191
192
|
layout_data :center, :center, true, false
|
192
193
|
|
193
|
-
text '
|
194
|
-
|
194
|
+
text 'BASEBALL PLAYOFF SCHEDULE'
|
195
|
+
foreground rgb(94, 107, 103)
|
196
|
+
font name: 'Optima', height: 38, style: :bold
|
195
197
|
}
|
196
198
|
|
197
199
|
combo(:read_only) {
|
198
200
|
layout_data :center, :center, true, false
|
199
201
|
selection bind(BaseballGame, :playoff_type)
|
200
|
-
font height:
|
202
|
+
font height: 14
|
201
203
|
}
|
202
204
|
|
203
205
|
table(:editable) { |table_proxy|
|
@@ -262,7 +264,7 @@ class HelloTable
|
|
262
264
|
button {
|
263
265
|
text 'Book Selected Game'
|
264
266
|
layout_data :center, :center, true, false
|
265
|
-
font height:
|
267
|
+
font height: 14
|
266
268
|
enabled bind(BaseballGame, :selected_game)
|
267
269
|
|
268
270
|
on_widget_selected {
|
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.18.
|
4
|
+
version: 4.18.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyMaleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -367,6 +367,7 @@ files:
|
|
367
367
|
- icons/scaffold_app.png
|
368
368
|
- lib/ext/glimmer.rb
|
369
369
|
- lib/ext/glimmer/config.rb
|
370
|
+
- lib/ext/rouge/themes/glimmer.rb
|
370
371
|
- lib/glimmer-dsl-swt.rb
|
371
372
|
- lib/glimmer/Rakefile
|
372
373
|
- lib/glimmer/data_binding/list_selection_binding.rb
|
@@ -468,12 +469,14 @@ files:
|
|
468
469
|
- samples/elaborate/contact_manager/contact_repository.rb
|
469
470
|
- samples/elaborate/login.rb
|
470
471
|
- samples/elaborate/meta_sample.rb
|
472
|
+
- samples/elaborate/meta_sample/meta_sample_logo.png
|
471
473
|
- samples/elaborate/tetris.rb
|
472
474
|
- samples/elaborate/tetris/model/block.rb
|
473
475
|
- samples/elaborate/tetris/model/game.rb
|
476
|
+
- samples/elaborate/tetris/model/past_game.rb
|
474
477
|
- samples/elaborate/tetris/model/tetromino.rb
|
475
478
|
- samples/elaborate/tetris/view/block.rb
|
476
|
-
- samples/elaborate/tetris/view/
|
479
|
+
- samples/elaborate/tetris/view/high_score_dialog.rb
|
477
480
|
- samples/elaborate/tetris/view/playfield.rb
|
478
481
|
- samples/elaborate/tetris/view/score_lane.rb
|
479
482
|
- samples/elaborate/tetris/view/tetris_menu_bar.rb
|
@@ -488,6 +491,7 @@ files:
|
|
488
491
|
- samples/hello/hello_canvas_transform.rb
|
489
492
|
- samples/hello/hello_checkbox.rb
|
490
493
|
- samples/hello/hello_checkbox_group.rb
|
494
|
+
- samples/hello/hello_code_text.rb
|
491
495
|
- samples/hello/hello_combo.rb
|
492
496
|
- samples/hello/hello_computed.rb
|
493
497
|
- samples/hello/hello_computed/contact.rb
|
@@ -513,6 +517,7 @@ files:
|
|
513
517
|
- samples/hello/hello_styled_text.rb
|
514
518
|
- samples/hello/hello_tab.rb
|
515
519
|
- samples/hello/hello_table.rb
|
520
|
+
- samples/hello/hello_table/baseball_park.png
|
516
521
|
- samples/hello/hello_world.rb
|
517
522
|
- vendor/swt/linux/swt.jar
|
518
523
|
- vendor/swt/mac/swt.jar
|