glimmer-dsl-swt 4.18.7.7 → 4.19.0.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 +19 -0
- data/README.md +18 -8
- data/RUBY_VERSION +1 -1
- data/VERSION +1 -1
- data/bin/girb +10 -9
- data/bin/girb_runner.rb +8 -3
- data/bin/glimmer +10 -1
- data/bin/glimmer-setup +58 -0
- data/bin/glimmer_runner.rb +4 -0
- data/docs/reference/GLIMMER_COMMAND.md +19 -30
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +6 -2
- data/docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md +7 -1
- data/docs/reference/GLIMMER_SAMPLES.md +25 -0
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer-dsl-swt.rb +8 -0
- data/lib/glimmer/dsl/swt/c_tab_item_expression.rb +58 -0
- data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +2 -1
- data/lib/glimmer/dsl/swt/tab_item_expression.rb +7 -3
- data/lib/glimmer/dsl/swt/widget_expression.rb +1 -1
- data/lib/glimmer/launcher.rb +27 -51
- data/lib/glimmer/rake_task.rb +1 -1
- data/lib/glimmer/rake_task/package.rb +7 -2
- data/lib/glimmer/rake_task/scaffold.rb +227 -254
- data/lib/glimmer/swt/c_tab_item_proxy.rb +53 -0
- data/lib/glimmer/swt/custom/shape.rb +15 -1
- data/lib/glimmer/swt/sash_form_proxy.rb +6 -0
- data/lib/glimmer/swt/shell_proxy.rb +3 -1
- data/lib/glimmer/swt/tab_folder_proxy.rb +1 -0
- data/lib/glimmer/swt/tab_item_proxy.rb +17 -18
- data/lib/glimmer/swt/widget_proxy.rb +9 -0
- data/samples/elaborate/mandelbrot_fractal.rb +1 -1
- data/samples/hello/hello_c_combo.rb +68 -0
- data/samples/hello/hello_c_tab.rb +271 -0
- data/samples/hello/hello_tab.rb +2 -0
- data/vendor/swt/linux/swt.jar +0 -0
- data/vendor/swt/mac/swt.jar +0 -0
- data/vendor/swt/windows/swt.jar +0 -0
- metadata +41 -11
@@ -0,0 +1,53 @@
|
|
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
|
+
require 'glimmer/swt/widget_proxy'
|
23
|
+
require 'glimmer/swt/tab_item_proxy'
|
24
|
+
|
25
|
+
module Glimmer
|
26
|
+
module SWT
|
27
|
+
# Proxy for org.eclipse.swt.custom.CTabItem
|
28
|
+
#
|
29
|
+
# Functions differently from other widget proxies.
|
30
|
+
#
|
31
|
+
# Glimmer instantiates an SWT Composite alongside the SWT TabItem
|
32
|
+
# and returns it for `#swt_widget` to allow adding widgets into it.
|
33
|
+
#
|
34
|
+
# In order to get the SWT TabItem object, one must call `#swt_tab_item`.
|
35
|
+
#
|
36
|
+
# Behind the scenes, this creates a tab item widget proxy separately from a composite that
|
37
|
+
# is set as the control of the tab item and `#swt_widget`.
|
38
|
+
#
|
39
|
+
# In order to retrieve the tab item widget proxy, one must call `#widget_proxy`
|
40
|
+
#
|
41
|
+
# Follows the Proxy Design Pattern
|
42
|
+
class CTabItemProxy < TabItemProxy
|
43
|
+
ATTRIBUTES = TabItemProxy::ATTRIBUTES + %w[foreground selection_foreground show_close font]
|
44
|
+
|
45
|
+
def attributes
|
46
|
+
ATTRIBUTES
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
@@ -572,7 +572,7 @@ module Glimmer
|
|
572
572
|
end
|
573
573
|
|
574
574
|
def dispose(dispose_images: true, dispose_patterns: true, redraw: true)
|
575
|
-
shapes.each { |shape| shape.is_a?(Shape::Path) && shape.dispose }
|
575
|
+
shapes.each { |shape| shape.is_a?(Shape::Path) && shape.dispose } # TODO look into why I'm only disposing paths
|
576
576
|
if dispose_patterns
|
577
577
|
@background_pattern&.dispose
|
578
578
|
@background_pattern = nil
|
@@ -587,6 +587,20 @@ module Glimmer
|
|
587
587
|
drawable.redraw if redraw && !drawable.is_a?(ImageProxy)
|
588
588
|
end
|
589
589
|
|
590
|
+
# clear all shapes
|
591
|
+
# indicate whether to dispose images, dispose patterns, and redraw after clearing shapes.
|
592
|
+
# redraw can be `:all` or `true` to mean redraw after all shapes are disposed, `:each` to mean redraw after each shape is disposed, or `false` to avoid redraw altogether
|
593
|
+
def clear_shapes(dispose_images: true, dispose_patterns: true, redraw: :all)
|
594
|
+
if redraw == true || redraw == :all
|
595
|
+
shapes.dup.each {|shape| shape.dispose(dispose_images: dispose_images, dispose_patterns: dispose_patterns, redraw: false) }
|
596
|
+
drawable.redraw if redraw && !drawable.is_a?(ImageProxy)
|
597
|
+
elsif redraw == :each
|
598
|
+
shapes.dup.each {|shape| shape.dispose(dispose_images: dispose_images, dispose_patterns: dispose_patterns, redraw: true) }
|
599
|
+
else
|
600
|
+
shapes.dup.each {|shape| shape.dispose(dispose_images: dispose_images, dispose_patterns: dispose_patterns, redraw: false) }
|
601
|
+
end
|
602
|
+
end
|
603
|
+
|
590
604
|
# Indicate if this is a container shape (meaning a shape bag that is just there to contain nested shapes, but doesn't render anything of its own)
|
591
605
|
def container?
|
592
606
|
@name == 'shape'
|
@@ -20,6 +20,7 @@
|
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
22
|
require 'glimmer/swt/widget_proxy'
|
23
|
+
require 'glimmer/swt/color_proxy'
|
23
24
|
|
24
25
|
module Glimmer
|
25
26
|
module SWT
|
@@ -27,6 +28,11 @@ module Glimmer
|
|
27
28
|
#
|
28
29
|
# Follows the Proxy Design Pattern
|
29
30
|
class SashFormProxy < WidgetProxy
|
31
|
+
def initialize(*args, &block)
|
32
|
+
super
|
33
|
+
self.background = ColorProxy.new(230, 230, 230).swt_color
|
34
|
+
end
|
35
|
+
|
30
36
|
def post_add_content
|
31
37
|
self.weights = @weights unless @weights.nil?
|
32
38
|
end
|
@@ -74,7 +74,9 @@ module Glimmer
|
|
74
74
|
# TODO make this an option not the default
|
75
75
|
shell_swt_display = Glimmer::SWT::DisplayProxy.instance.swt_display
|
76
76
|
on_swt_show do
|
77
|
-
|
77
|
+
if @filled_screen.nil? && fill_screen # only the first time
|
78
|
+
@swt_widget.set_size(@display.bounds.width, @display.bounds.height)
|
79
|
+
end
|
78
80
|
Thread.new do
|
79
81
|
sleep(0.25)
|
80
82
|
shell_swt_display.async_exec do
|
@@ -39,44 +39,40 @@ module Glimmer
|
|
39
39
|
#
|
40
40
|
# Follows the Proxy Design Pattern
|
41
41
|
class TabItemProxy < WidgetProxy
|
42
|
-
ATTRIBUTES = %w[text image]
|
42
|
+
ATTRIBUTES = %w[text image tool_tip_text]
|
43
43
|
include_package 'org.eclipse.swt.widgets'
|
44
44
|
|
45
45
|
attr_reader :widget_proxy, :swt_tab_item
|
46
46
|
|
47
47
|
def initialize(parent, style, &contents)
|
48
48
|
super("composite", parent, style, &contents)
|
49
|
-
|
49
|
+
keyword = self.class.name.split('::').last.underscore.sub('_proxy', '')
|
50
|
+
@widget_proxy = SWT::WidgetProxy.new(keyword, parent, style)
|
50
51
|
@swt_tab_item = @widget_proxy.swt_widget
|
51
52
|
@swt_tab_item.control = swt_widget
|
52
|
-
|
53
|
+
end
|
54
|
+
|
55
|
+
def attributes
|
56
|
+
ATTRIBUTES
|
53
57
|
end
|
54
58
|
|
55
59
|
def has_attribute?(attribute_name, *args)
|
56
|
-
|
57
|
-
true
|
58
|
-
else
|
59
|
-
super(attribute_name, *args)
|
60
|
-
end
|
60
|
+
attributes.include?(attribute_name.to_s) || super(attribute_name, *args)
|
61
61
|
end
|
62
62
|
|
63
63
|
def set_attribute(attribute_name, *args)
|
64
|
-
attribute_name
|
65
|
-
if attribute_name
|
66
|
-
|
67
|
-
@swt_tab_item.setText text_value
|
68
|
-
elsif attribute_name.to_s == "image"
|
69
|
-
widget_proxy.set_attribute('image', *args)
|
64
|
+
attribute_name = attribute_name.to_s
|
65
|
+
if attributes.include?(attribute_name)
|
66
|
+
widget_proxy.set_attribute(attribute_name, *args)
|
70
67
|
else
|
71
68
|
super(attribute_name, *args)
|
72
69
|
end
|
73
70
|
end
|
74
71
|
|
75
72
|
def get_attribute(attribute_name)
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
widget_proxy.get_attribute('image')
|
73
|
+
attribute_name = attribute_name.to_s
|
74
|
+
if attributes.include?(attribute_name)
|
75
|
+
widget_proxy.get_attribute(attribute_name)
|
80
76
|
else
|
81
77
|
super(attribute_name)
|
82
78
|
end
|
@@ -89,6 +85,9 @@ module Glimmer
|
|
89
85
|
swt_tab_item.dispose
|
90
86
|
end
|
91
87
|
end
|
88
|
+
|
92
89
|
end
|
90
|
+
|
93
91
|
end
|
92
|
+
|
94
93
|
end
|
@@ -51,6 +51,7 @@ module Glimmer
|
|
51
51
|
'arrow' => [:arrow],
|
52
52
|
'button' => [:push],
|
53
53
|
'canvas' => ([:double_buffered] unless OS.mac?),
|
54
|
+
'ccombo' => [:border],
|
54
55
|
'checkbox' => [:check],
|
55
56
|
'check' => [:check],
|
56
57
|
'drag_source' => [:drop_copy],
|
@@ -339,6 +340,13 @@ module Glimmer
|
|
339
340
|
}
|
340
341
|
end,
|
341
342
|
},
|
343
|
+
Java::OrgEclipseSwtCustom::CCombo => {
|
344
|
+
:text => lambda do |observer|
|
345
|
+
on_modify_text { |modify_event|
|
346
|
+
observer.call(@swt_widget.getText)
|
347
|
+
}
|
348
|
+
end,
|
349
|
+
},
|
342
350
|
Java::OrgEclipseSwtWidgets::Table => {
|
343
351
|
:selection => lambda do |observer|
|
344
352
|
on_widget_selected { |selection_event|
|
@@ -985,6 +993,7 @@ module Glimmer
|
|
985
993
|
!!value
|
986
994
|
end,
|
987
995
|
foreground: color_converter,
|
996
|
+
selection_foreground: color_converter,
|
988
997
|
link_foreground: color_converter,
|
989
998
|
font: lambda do |value|
|
990
999
|
if value.is_a?(Hash) || value.is_a?(FontData)
|
@@ -0,0 +1,68 @@
|
|
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
|
+
require 'glimmer-dsl-swt'
|
23
|
+
|
24
|
+
class HelloCCombo
|
25
|
+
class Person
|
26
|
+
attr_accessor :country, :country_options
|
27
|
+
|
28
|
+
def initialize
|
29
|
+
self.country_options = ['', 'Canada', 'US', 'Mexico']
|
30
|
+
reset_country!
|
31
|
+
end
|
32
|
+
|
33
|
+
def reset_country!
|
34
|
+
self.country = 'Canada'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
include Glimmer::UI::CustomShell
|
39
|
+
|
40
|
+
before_body {
|
41
|
+
@person = Person.new
|
42
|
+
}
|
43
|
+
|
44
|
+
body {
|
45
|
+
shell {
|
46
|
+
row_layout(:vertical) {
|
47
|
+
fill true
|
48
|
+
}
|
49
|
+
|
50
|
+
text 'Hello, CCombo!'
|
51
|
+
|
52
|
+
c_combo(:read_only) {
|
53
|
+
selection bind(@person, :country) # also binds to country_options by convention
|
54
|
+
font height: 45 # unlike `combo`, `c_combo` changes height when setting the font height
|
55
|
+
}
|
56
|
+
|
57
|
+
button {
|
58
|
+
text 'Reset Selection'
|
59
|
+
|
60
|
+
on_widget_selected do
|
61
|
+
@person.reset_country!
|
62
|
+
end
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
HelloCCombo.launch
|
@@ -0,0 +1,271 @@
|
|
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
|
+
require 'glimmer-dsl-swt'
|
23
|
+
|
24
|
+
class HelloCTab
|
25
|
+
include Glimmer::UI::CustomShell
|
26
|
+
|
27
|
+
body {
|
28
|
+
shell {
|
29
|
+
row_layout
|
30
|
+
text 'Hello, C Tab!'
|
31
|
+
minimum_size 200, 200
|
32
|
+
|
33
|
+
c_tab_folder { # accepts styles: :close, :top, :bottom, :flat, :border, :single, :multi
|
34
|
+
layout_data {
|
35
|
+
width 1024
|
36
|
+
height 200
|
37
|
+
}
|
38
|
+
c_tab_item(:close) {
|
39
|
+
text 'English'
|
40
|
+
tool_tip_text 'English Greeting'
|
41
|
+
foreground :blue
|
42
|
+
selection_foreground :dark_blue
|
43
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
44
|
+
image image(30, 30) {
|
45
|
+
### building image on the fly with Canvas Shape DSL text shape flag emoji
|
46
|
+
text('🇺🇸', 0, 0) {
|
47
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
label {
|
52
|
+
text 'Hello, World!'
|
53
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
c_tab_item(:close) {
|
58
|
+
text 'French'
|
59
|
+
tool_tip_text 'French Greeting'
|
60
|
+
foreground :blue
|
61
|
+
selection_foreground :dark_blue
|
62
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
63
|
+
image image(30, 30) {
|
64
|
+
### building image on the fly with Canvas Shape DSL text shape flag emoji
|
65
|
+
text('🇫🇷', 0, 0) {
|
66
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
label {
|
71
|
+
text 'Bonjour, Univers!'
|
72
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
c_tab_item(:close) {
|
77
|
+
text 'Spanish'
|
78
|
+
tool_tip_text 'Spanish Greeting'
|
79
|
+
foreground :blue
|
80
|
+
selection_foreground :dark_blue
|
81
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
82
|
+
image image(30, 30) {
|
83
|
+
### building image on the fly with Canvas Shape DSL text shape flag emoji
|
84
|
+
text('🇪🇸', 0, 0) {
|
85
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
label {
|
90
|
+
text 'Hola, Mundo!'
|
91
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
c_tab_item(:close) {
|
96
|
+
text 'German'
|
97
|
+
tool_tip_text 'German Greeting'
|
98
|
+
foreground :blue
|
99
|
+
selection_foreground :dark_blue
|
100
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
101
|
+
image image(30, 30) {
|
102
|
+
# building image on the fly with Canvas Shape DSL text shape flag emoji
|
103
|
+
text('🇩🇪', 0, 0) {
|
104
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
label {
|
109
|
+
text 'Hallo, Welt!'
|
110
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
c_tab_item(:close) {
|
115
|
+
text 'Italian'
|
116
|
+
tool_tip_text 'Italian Greeting'
|
117
|
+
foreground :blue
|
118
|
+
selection_foreground :dark_blue
|
119
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
120
|
+
image image(30, 30) {
|
121
|
+
# building image on the fly with Canvas Shape DSL text shape flag emoji
|
122
|
+
text('🇮🇹', 0, 0) {
|
123
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
label {
|
128
|
+
text 'Ciao, Mondo!'
|
129
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
c_tab_item(:close) {
|
134
|
+
text 'Dutch'
|
135
|
+
tool_tip_text 'Dutch Greeting'
|
136
|
+
foreground :blue
|
137
|
+
selection_foreground :dark_blue
|
138
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
139
|
+
image image(30, 30) {
|
140
|
+
# building image on the fly with Canvas Shape DSL text shape flag emoji
|
141
|
+
text('🇳🇱', 0, 0) {
|
142
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
label {
|
147
|
+
text 'Hallo, Wereld!'
|
148
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
c_tab_item(:close) {
|
153
|
+
text 'Portuguese'
|
154
|
+
tool_tip_text 'Portuguese Greeting'
|
155
|
+
foreground :blue
|
156
|
+
selection_foreground :dark_blue
|
157
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
158
|
+
image image(30, 30) {
|
159
|
+
# building image on the fly with Canvas Shape DSL text shape flag emoji
|
160
|
+
text('🇧🇷', 0, 0) {
|
161
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
label {
|
166
|
+
text 'Olá, Mundo!'
|
167
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
c_tab_item(:close) {
|
172
|
+
text 'Danish'
|
173
|
+
tool_tip_text 'Danish Greeting'
|
174
|
+
foreground :blue
|
175
|
+
selection_foreground :dark_blue
|
176
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
177
|
+
image image(30, 30) {
|
178
|
+
# building image on the fly with Canvas Shape DSL text shape flag emoji
|
179
|
+
text('🇩🇰', 0, 0) {
|
180
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
181
|
+
}
|
182
|
+
}
|
183
|
+
|
184
|
+
label {
|
185
|
+
text 'Hej, Verden!'
|
186
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
c_tab_item(:close) {
|
191
|
+
text 'Finnish'
|
192
|
+
tool_tip_text 'Finnish Greeting'
|
193
|
+
foreground :blue
|
194
|
+
selection_foreground :dark_blue
|
195
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
196
|
+
image image(30, 30) {
|
197
|
+
# building image on the fly with Canvas Shape DSL text shape flag emoji
|
198
|
+
text('🇫🇮', 0, 0) {
|
199
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
200
|
+
}
|
201
|
+
}
|
202
|
+
|
203
|
+
label {
|
204
|
+
text 'Hei, Maailma!'
|
205
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
c_tab_item(:close) {
|
210
|
+
text 'Swedish'
|
211
|
+
tool_tip_text 'Swedish Greeting'
|
212
|
+
foreground :blue
|
213
|
+
selection_foreground :dark_blue
|
214
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
215
|
+
image image(30, 30) {
|
216
|
+
# building image on the fly with Canvas Shape DSL text shape flag emoji
|
217
|
+
text('🇸🇪', 0, 0) {
|
218
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
label {
|
223
|
+
text 'Hej, Världen!'
|
224
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
228
|
+
c_tab_item(:close) {
|
229
|
+
text 'Norwegian'
|
230
|
+
tool_tip_text 'Norwegian Greeting'
|
231
|
+
foreground :blue
|
232
|
+
selection_foreground :dark_blue
|
233
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
234
|
+
image image(30, 30) {
|
235
|
+
# building image on the fly with Canvas Shape DSL text shape flag emoji
|
236
|
+
text('🇳🇴', 0, 0) {
|
237
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
238
|
+
}
|
239
|
+
}
|
240
|
+
|
241
|
+
label {
|
242
|
+
text 'Hei, Verden!'
|
243
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
c_tab_item(:close) {
|
248
|
+
text 'Russian'
|
249
|
+
tool_tip_text 'Russian Greeting'
|
250
|
+
foreground :blue
|
251
|
+
selection_foreground :dark_blue
|
252
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
253
|
+
image image(30, 30) {
|
254
|
+
# building image on the fly with Canvas Shape DSL text shape flag emoji
|
255
|
+
text('🇷🇺', 0, 0) {
|
256
|
+
font name: 'Times New Roman', height: 30, style: [:bold, :italic]
|
257
|
+
}
|
258
|
+
}
|
259
|
+
|
260
|
+
label {
|
261
|
+
text 'Привет, мир!'
|
262
|
+
font name: 'Times New Roman', height: 90, style: [:bold, :italic]
|
263
|
+
}
|
264
|
+
}
|
265
|
+
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
269
|
+
end
|
270
|
+
|
271
|
+
HelloCTab.launch
|