glimmer-dsl-swt 4.23.1.5 → 4.24.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +52 -13
- data/VERSION +1 -1
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +698 -41
- data/docs/reference/GLIMMER_SAMPLES.md +2 -22
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer/swt/custom/shape/path_segment.rb +1 -0
- data/lib/glimmer/swt/custom/shape.rb +5 -2
- data/lib/glimmer/swt/menu_proxy.rb +0 -3
- data/samples/elaborate/game_of_life/model/grid.rb +1 -1
- data/samples/elaborate/game_of_life.rb +13 -1
- data/samples/elaborate/meta_sample/tutorials.yml +5 -0
- data/samples/hello/hello_canvas_data_binding.rb +695 -38
- data/samples/hello/hello_canvas_drag_and_drop.rb +31 -2
- data/samples/hello/hello_tray_item.rb +0 -6
- data/vendor/swt/linux/swt.jar +0 -0
- data/vendor/swt/linux_aarch64/swt.jar +0 -0
- data/vendor/swt/mac/swt.jar +0 -0
- data/vendor/swt/mac_aarch64/swt.jar +0 -0
- data/vendor/swt/windows/swt.jar +0 -0
- metadata +16 -2
@@ -1,3 +1,24 @@
|
|
1
|
+
# Copyright (c) 2007-2022 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
|
+
|
1
22
|
require 'glimmer-dsl-swt'
|
2
23
|
|
3
24
|
class HelloCanvasDragAndDrop
|
@@ -27,7 +48,9 @@ class HelloCanvasDragAndDrop
|
|
27
48
|
background :white
|
28
49
|
|
29
50
|
10.times do |n|
|
30
|
-
|
51
|
+
value = rand(10)
|
52
|
+
oval((rand*300).to_i, (rand*200).to_i, 50, 50) {
|
53
|
+
data 'value', value
|
31
54
|
background rgb(255, 165, 0)
|
32
55
|
|
33
56
|
# declare shape as a drag source, which unlike `drag_and_move true`, it means the shape now
|
@@ -38,6 +61,12 @@ class HelloCanvasDragAndDrop
|
|
38
61
|
oval(0, 0) {
|
39
62
|
foreground :black
|
40
63
|
}
|
64
|
+
|
65
|
+
text {
|
66
|
+
x :default
|
67
|
+
y :default
|
68
|
+
string value.to_s
|
69
|
+
}
|
41
70
|
}
|
42
71
|
end
|
43
72
|
|
@@ -70,7 +99,7 @@ class HelloCanvasDragAndDrop
|
|
70
99
|
@number_shape = text {
|
71
100
|
x :default
|
72
101
|
y :default
|
73
|
-
string (ball_count +
|
102
|
+
string (ball_count + drop_event.dragged_shape.get_data('value')).to_s
|
74
103
|
}
|
75
104
|
}
|
76
105
|
drop_event.dragged_shape.dispose
|
data/vendor/swt/linux/swt.jar
CHANGED
Binary file
|
Binary file
|
data/vendor/swt/mac/swt.jar
CHANGED
Binary file
|
Binary file
|
data/vendor/swt/windows/swt.jar
CHANGED
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.
|
4
|
+
version: 4.24.0.2
|
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-
|
11
|
+
date: 2022-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -328,6 +328,20 @@ dependencies:
|
|
328
328
|
- - "~>"
|
329
329
|
- !ruby/object:Gem::Version
|
330
330
|
version: 0.7.0
|
331
|
+
- !ruby/object:Gem::Dependency
|
332
|
+
requirement: !ruby/object:Gem::Requirement
|
333
|
+
requirements:
|
334
|
+
- - ">="
|
335
|
+
- !ruby/object:Gem::Version
|
336
|
+
version: 0.14.1.cr2
|
337
|
+
name: jruby-openssl
|
338
|
+
prerelease: false
|
339
|
+
type: :development
|
340
|
+
version_requirements: !ruby/object:Gem::Requirement
|
341
|
+
requirements:
|
342
|
+
- - ">="
|
343
|
+
- !ruby/object:Gem::Version
|
344
|
+
version: 0.14.1.cr2
|
331
345
|
description: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) is a native-GUI
|
332
346
|
cross-platform desktop development library written in JRuby, an OS-threaded faster
|
333
347
|
JVM version of Ruby. It includes SWT 4.22 (released November 24, 2021). Glimmer's
|