glimmer-dsl-swt 4.21.1.0 → 4.21.2.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.
@@ -42,33 +42,31 @@ class HelloToolBar
42
42
  }
43
43
 
44
44
  text 'Hello, Tool Bar!'
45
+ minimum_size 280, 50
45
46
 
46
47
  tool_bar { # optionally takes a :flat style, :wrap style if you need wrapping upon shrinking window, and :vertical style if you need vertical layout
47
48
  tool_item {
48
- image cut_image # alternatively you can pass an image file path
49
+ image File.expand_path('./images/cut.png', __dir__), height: 16
49
50
 
50
51
  on_widget_selected do
51
52
  self.operation = 'Cut'
52
53
  end
53
54
  }
54
55
  tool_item {
55
- image copy_image # alternatively you can pass an image file path
56
+ image File.expand_path('./images/copy.png', __dir__), height: 16
56
57
 
57
58
  on_widget_selected do
58
59
  self.operation = 'Copy'
59
60
  end
60
61
  }
61
62
  tool_item {
62
- image paste_image # alternatively you can pass an image file path
63
+ image File.expand_path('./images/paste.png', __dir__), height: 16
63
64
 
64
65
  on_widget_selected do
65
66
  self.operation = 'Paste'
66
67
  end
67
68
  }
68
69
  tool_item(:separator)
69
- tool_item {
70
- text 'Font Size'
71
- }
72
70
  # a combo can be nested in a tool_bar (it auto-generates a tool_item for itself behind the scenes)
73
71
  combo {
74
72
  selection <=> [self, :font_size]
@@ -84,59 +82,15 @@ class HelloToolBar
84
82
  }
85
83
 
86
84
  def cut_image
87
- # building image on the fly with Canvas Shape DSL
88
- image(25, 25) {
89
- rectangle(0, 0, 25, 25) {
90
- background_pattern 0, 0, 0, 25, :white, :gray
91
- line(20, 2, 9, 15) {
92
- line_width 2
93
- }
94
- line(5, 2, 16, 15) {
95
- line_width 2
96
- }
97
- oval(2, 15, 8, 8) {
98
- line_width 2
99
- }
100
- oval(16, 15, 8, 8) {
101
- line_width 2
102
- }
103
- }
104
- }
85
+ File.expand_path('./images/cut.png', __dir__)
105
86
  end
106
87
 
107
88
  def copy_image
108
- # building image on the fly with Canvas Shape DSL
109
- image(25, 25) {
110
- rectangle(0, 0, 25, 25) {
111
- background_pattern 0, 0, 0, 25, :white, :gray
112
- rectangle([:default, 2], [:default, -2], 14, 14, 5, 5) {
113
- line_width 2
114
- }
115
- rectangle([:default, -2], [:default, 2], 14, 14, 5, 5) {
116
- line_width 2
117
- }
118
- }
119
- }
89
+ File.expand_path('./images/copy.png', __dir__)
120
90
  end
121
91
 
122
92
  def paste_image
123
- image(25, 25) {
124
- rectangle(0, 0, 25, 25) {
125
- background_pattern 0, 0, 0, 25, :white, :gray
126
- rectangle(:default, [:default, 1], 15, 20, 5, 5) {
127
- line_width 2
128
- }
129
- line(7, 8, 18, 8) {
130
- line_width 2
131
- }
132
- line(7, 13, 18, 13) {
133
- line_width 2
134
- }
135
- line(7, 18, 18, 18) {
136
- line_width 2
137
- }
138
- }
139
- }
93
+ File.expand_path('./images/paste.png', __dir__)
140
94
  end
141
95
  end
142
96
 
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.21.1.0
4
+ version: 4.21.2.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: 2021-10-24 00:00:00.000000000 Z
11
+ date: 2021-11-19 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: 2.4.0
18
+ version: 2.5.0
19
19
  name: glimmer
20
20
  prerelease: false
21
21
  type: :runtime
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.4.0
26
+ version: 2.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -376,9 +376,9 @@ description: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) is a
376
376
  started quickly, Glimmer offers scaffolding options for Apps, Gems, and Custom Widgets.
377
377
  Glimmer also includes native-executable packaging support, sorely lacking in other
378
378
  libraries, thus enabling the delivery of desktop apps written in Ruby as truly native
379
- DMG/PKG/APP files on the Mac, MSI/EXE files on Windows, and Gem Packaged Shell Scripts
380
- on Linux. Glimmer was the first Ruby gem to bring SWT (Standard Widget Toolkit)
381
- to Ruby, thanks to creator Andy Maleh, EclipseCon/EclipseWorld/RubyConf speaker.
379
+ DMG/PKG/APP files on the Mac, MSI/EXE files on Windows, and DEB/RPM files on Linux.
380
+ Glimmer was the first Ruby gem to bring SWT (Standard Widget Toolkit) to Ruby, thanks
381
+ to creator Andy Maleh, EclipseCon/EclipseWorld/RubyConf speaker.
382
382
  email: andy.am@gmail.com
383
383
  executables:
384
384
  - glimmer
@@ -681,6 +681,8 @@ files:
681
681
  - samples/hello/hello_tray_item.rb
682
682
  - samples/hello/hello_tree.rb
683
683
  - samples/hello/hello_world.rb
684
+ - samples/hello/images/copy.png
685
+ - samples/hello/images/cut.png
684
686
  - samples/hello/images/denmark.png
685
687
  - samples/hello/images/finland.png
686
688
  - samples/hello/images/france.png
@@ -689,6 +691,7 @@ files:
689
691
  - samples/hello/images/mexico.png
690
692
  - samples/hello/images/netherlands.png
691
693
  - samples/hello/images/norway.png
694
+ - samples/hello/images/paste.png
692
695
  - samples/hello/images/usa.png
693
696
  - sounds/metronome-down.wav
694
697
  - sounds/metronome-up.wav