glimmer-dsl-swt 4.18.5.2 → 4.18.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -0
- data/README.md +8 -10
- data/VERSION +1 -1
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +93 -16
- data/docs/reference/GLIMMER_SAMPLES.md +32 -0
- data/glimmer-dsl-swt.gemspec +9 -3
- data/lib/glimmer/swt/custom/drawable.rb +8 -7
- data/lib/glimmer/swt/custom/shape.rb +416 -37
- data/lib/glimmer/swt/custom/shape/arc.rb +22 -4
- data/lib/glimmer/swt/custom/shape/cubic.rb +117 -0
- data/lib/glimmer/swt/custom/shape/image.rb +19 -6
- data/lib/glimmer/swt/custom/shape/line.rb +119 -1
- data/lib/glimmer/swt/custom/shape/oval.rb +3 -3
- data/lib/glimmer/swt/custom/shape/path.rb +211 -0
- data/lib/glimmer/swt/custom/shape/path_segment.rb +111 -0
- data/lib/glimmer/swt/custom/shape/point.rb +40 -4
- data/lib/glimmer/swt/custom/shape/polygon.rb +93 -3
- data/lib/glimmer/swt/custom/shape/polyline.rb +76 -4
- data/lib/glimmer/swt/custom/shape/quad.rb +113 -0
- data/lib/glimmer/swt/custom/shape/rectangle.rb +7 -2
- data/lib/glimmer/swt/custom/shape/text.rb +2 -4
- data/lib/glimmer/swt/dialog_proxy.rb +4 -0
- data/lib/glimmer/swt/proxy_properties.rb +1 -1
- data/lib/glimmer/swt/widget_proxy.rb +16 -0
- data/samples/elaborate/contact_manager.rb +2 -0
- data/samples/elaborate/login.rb +2 -0
- data/samples/elaborate/mandelbrot_fractal.rb +2 -1
- data/samples/elaborate/meta_sample.rb +1 -0
- data/samples/elaborate/stock_ticker.rb +229 -0
- data/samples/elaborate/tetris.rb +2 -1
- data/samples/elaborate/tic_tac_toe.rb +2 -0
- data/samples/elaborate/user_profile.rb +10 -8
- data/samples/hello/hello_browser.rb +2 -0
- data/samples/hello/hello_button.rb +2 -0
- data/samples/hello/hello_canvas.rb +40 -21
- data/samples/hello/hello_canvas_animation.rb +2 -0
- data/samples/hello/hello_canvas_path.rb +66 -0
- data/samples/hello/hello_canvas_transform.rb +2 -0
- data/samples/hello/hello_checkbox.rb +2 -0
- data/samples/hello/hello_checkbox_group.rb +2 -0
- data/samples/hello/hello_code_text.rb +2 -0
- data/samples/hello/hello_color_dialog.rb +2 -0
- data/samples/hello/hello_combo.rb +2 -0
- data/samples/hello/hello_computed.rb +2 -0
- data/samples/hello/hello_cursor.rb +2 -0
- data/samples/hello/hello_custom_shell.rb +1 -0
- data/samples/hello/hello_custom_widget.rb +2 -0
- data/samples/hello/hello_date_time.rb +2 -0
- data/samples/hello/hello_dialog.rb +2 -0
- data/samples/hello/hello_directory_dialog.rb +2 -0
- data/samples/hello/hello_drag_and_drop.rb +5 -3
- data/samples/hello/hello_expand_bar.rb +2 -0
- data/samples/hello/hello_file_dialog.rb +2 -0
- data/samples/hello/hello_font_dialog.rb +2 -0
- data/samples/hello/hello_group.rb +2 -0
- data/samples/hello/hello_link.rb +2 -0
- data/samples/hello/hello_list_multi_selection.rb +2 -0
- data/samples/hello/hello_list_single_selection.rb +2 -0
- data/samples/hello/hello_menu_bar.rb +2 -0
- data/samples/hello/hello_message_box.rb +2 -0
- data/samples/hello/hello_pop_up_context_menu.rb +2 -0
- data/samples/hello/hello_progress_bar.rb +2 -0
- data/samples/hello/hello_radio.rb +2 -0
- data/samples/hello/hello_radio_group.rb +2 -0
- data/samples/hello/hello_sash_form.rb +2 -0
- data/samples/hello/hello_spinner.rb +2 -0
- data/samples/hello/hello_styled_text.rb +19 -17
- data/samples/hello/hello_tab.rb +2 -0
- data/samples/hello/hello_table.rb +2 -0
- data/samples/hello/hello_world.rb +2 -0
- metadata +8 -2
@@ -19,6 +19,8 @@
|
|
19
19
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
|
+
require 'glimmer-dsl-swt'
|
23
|
+
|
22
24
|
class HelloRadio
|
23
25
|
class Person
|
24
26
|
attr_accessor :male, :female, :child, :teen, :adult, :senior
|
@@ -19,6 +19,8 @@
|
|
19
19
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
|
+
require 'glimmer-dsl-swt'
|
23
|
+
|
22
24
|
# This sample demonstrates the use of a `radio_group` in Glimmer, which provides terser syntax
|
23
25
|
# than HelloRadio for representing multiple radio buttons by relying on data-binding to
|
24
26
|
# automatically spawn the `radio` widgets based on available options on the model.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2007-2021 Andy Maleh
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
5
5
|
# "Software"), to deal in the Software without restriction, including
|
@@ -7,10 +7,10 @@
|
|
7
7
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
8
|
# permit persons to whom the Software is furnished to do so, subject to
|
9
9
|
# the following conditions:
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# The above copyright notice and this permission notice shall be
|
12
12
|
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
15
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
16
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -19,18 +19,20 @@
|
|
19
19
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
|
+
require 'glimmer-dsl-swt'
|
23
|
+
|
22
24
|
verbiage = <<-MULTI_LINE_STRING
|
23
25
|
|
24
|
-
Glimmer DSL for SWT is a native-GUI cross-platform desktop development library written in JRuby,
|
25
|
-
an OS-threaded faster version of Ruby.
|
26
|
-
Glimmer's main innovation is a declarative Ruby DSL that enables productive and efficient authoring
|
27
|
-
of desktop application user-interfaces while relying on the robust Eclipse SWT library.
|
28
|
-
Glimmer additionally innovates by having built-in data-binding support, which greatly facilitates
|
29
|
-
synchronizing the GUI with domain models, thus achieving true decoupling of object oriented components
|
30
|
-
and enabling developers to solve business problems (test-first) without worrying about GUI concerns.
|
31
|
-
To get started quickly, Glimmer offers scaffolding options for Apps, Gems, and Custom Widgets.
|
32
|
-
Glimmer also includes native-executable packaging support, sorely lacking in other libraries,
|
33
|
-
thus enabling the delivery of desktop apps written in Ruby as truly native DMG/PKG/APP files on
|
26
|
+
Glimmer DSL for SWT is a native-GUI cross-platform desktop development library written in JRuby,
|
27
|
+
an OS-threaded faster version of Ruby.
|
28
|
+
Glimmer's main innovation is a declarative Ruby DSL that enables productive and efficient authoring
|
29
|
+
of desktop application user-interfaces while relying on the robust Eclipse SWT library.
|
30
|
+
Glimmer additionally innovates by having built-in data-binding support, which greatly facilitates
|
31
|
+
synchronizing the GUI with domain models, thus achieving true decoupling of object oriented components
|
32
|
+
and enabling developers to solve business problems (test-first) without worrying about GUI concerns.
|
33
|
+
To get started quickly, Glimmer offers scaffolding options for Apps, Gems, and Custom Widgets.
|
34
|
+
Glimmer also includes native-executable packaging support, sorely lacking in other libraries,
|
35
|
+
thus enabling the delivery of desktop apps written in Ruby as truly native DMG/PKG/APP files on
|
34
36
|
the Mac + App Store, MSI/EXE files on Windows, and Gem Packaged Shell Scripts on Linux.
|
35
37
|
|
36
38
|
MULTI_LINE_STRING
|
@@ -74,7 +76,7 @@ shell {
|
|
74
76
|
top_pixel bind(@presenter, :top_pixel)
|
75
77
|
|
76
78
|
# This demonstrates how to set styles via a listener
|
77
|
-
on_line_get_style { |line_style_event|
|
79
|
+
on_line_get_style { |line_style_event|
|
78
80
|
line_offset = line_style_event.lineOffset
|
79
81
|
if @presenter.line_index_for_offset(line_offset) % 52 < 13
|
80
82
|
line_size = line_style_event.lineText.size
|
@@ -95,7 +97,7 @@ shell {
|
|
95
97
|
line_size = line_style_event.lineText.size
|
96
98
|
style_range = StyleRange.new(line_offset, line_size, color(:dark_magenta).swt_color, color(:cyan).swt_color, swt(:normal))
|
97
99
|
style_range.strikeout = true
|
98
|
-
line_style_event.styles = [style_range].to_java(StyleRange)
|
100
|
+
line_style_event.styles = [style_range].to_java(StyleRange)
|
99
101
|
end
|
100
102
|
}
|
101
103
|
}
|
@@ -132,7 +134,7 @@ shell {
|
|
132
134
|
}
|
133
135
|
text {
|
134
136
|
text bind(@presenter, :top_pixel, on_read: ->(o) {"%04d" % [o] })
|
135
|
-
}
|
136
|
-
}
|
137
|
+
}
|
138
|
+
}
|
137
139
|
}
|
138
140
|
}.open
|
data/samples/hello/hello_tab.rb
CHANGED
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.6.1
|
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-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -434,13 +434,17 @@ files:
|
|
434
434
|
- lib/glimmer/swt/custom/radio_group.rb
|
435
435
|
- lib/glimmer/swt/custom/shape.rb
|
436
436
|
- lib/glimmer/swt/custom/shape/arc.rb
|
437
|
+
- lib/glimmer/swt/custom/shape/cubic.rb
|
437
438
|
- lib/glimmer/swt/custom/shape/focus.rb
|
438
439
|
- lib/glimmer/swt/custom/shape/image.rb
|
439
440
|
- lib/glimmer/swt/custom/shape/line.rb
|
440
441
|
- lib/glimmer/swt/custom/shape/oval.rb
|
442
|
+
- lib/glimmer/swt/custom/shape/path.rb
|
443
|
+
- lib/glimmer/swt/custom/shape/path_segment.rb
|
441
444
|
- lib/glimmer/swt/custom/shape/point.rb
|
442
445
|
- lib/glimmer/swt/custom/shape/polygon.rb
|
443
446
|
- lib/glimmer/swt/custom/shape/polyline.rb
|
447
|
+
- lib/glimmer/swt/custom/shape/quad.rb
|
444
448
|
- lib/glimmer/swt/custom/shape/rectangle.rb
|
445
449
|
- lib/glimmer/swt/custom/shape/text.rb
|
446
450
|
- lib/glimmer/swt/date_time_proxy.rb
|
@@ -481,6 +485,7 @@ files:
|
|
481
485
|
- samples/elaborate/login.rb
|
482
486
|
- samples/elaborate/mandelbrot_fractal.rb
|
483
487
|
- samples/elaborate/meta_sample.rb
|
488
|
+
- samples/elaborate/stock_ticker.rb
|
484
489
|
- samples/elaborate/tetris.rb
|
485
490
|
- samples/elaborate/tetris/model/block.rb
|
486
491
|
- samples/elaborate/tetris/model/game.rb
|
@@ -499,6 +504,7 @@ files:
|
|
499
504
|
- samples/hello/hello_button.rb
|
500
505
|
- samples/hello/hello_canvas.rb
|
501
506
|
- samples/hello/hello_canvas_animation.rb
|
507
|
+
- samples/hello/hello_canvas_path.rb
|
502
508
|
- samples/hello/hello_canvas_transform.rb
|
503
509
|
- samples/hello/hello_checkbox.rb
|
504
510
|
- samples/hello/hello_checkbox_group.rb
|