glimmer-dsl-swt 4.23.1.5 → 4.24.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
- an_oval = oval((rand*300).to_i, (rand*200).to_i, 50, 50) {
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 + 1).to_s
102
+ string (ball_count + drop_event.dragged_shape.get_data('value')).to_s
74
103
  }
75
104
  }
76
105
  drop_event.dragged_shape.dispose
@@ -105,12 +105,6 @@ class HelloTrayItem
105
105
  }
106
106
 
107
107
  # supported tray item listeners (you can try to add actions to them when needed)
108
- # on_swt_Show do
109
- # end
110
- #
111
- # on_swt_Hide do
112
- # end
113
- #
114
108
  # on_widget_selected do
115
109
  # end
116
110
  #
Binary file
Binary file
Binary file
Binary file
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.23.1.5
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-06-09 00:00:00.000000000 Z
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