vedeu 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/TODO.md +4 -0
- data/docs/dsl.md +1 -11
- data/docs/dsl/by_method/geometry/align.md +1 -0
- data/docs/dsl/by_method/geometry/align_bottom.md +40 -0
- data/docs/dsl/by_method/geometry/align_centre.md +40 -0
- data/docs/dsl/by_method/geometry/align_left.md +40 -0
- data/docs/dsl/by_method/geometry/align_middle.md +40 -0
- data/docs/dsl/by_method/geometry/align_right.md +40 -0
- data/docs/dsl/by_method/geometry/align_top.md +40 -0
- data/docs/dsl/by_method/geometry/columns.md +1 -0
- data/docs/dsl/by_method/geometry/height.md +0 -0
- data/docs/dsl/by_method/geometry/horizontal_alignment.md +1 -0
- data/docs/dsl/by_method/geometry/rows.md +1 -0
- data/docs/dsl/by_method/geometry/vertical_alignment.md +1 -0
- data/docs/dsl/by_method/geometry/width.md +0 -0
- data/docs/dsl/by_method/geometry/x.md +1 -0
- data/docs/dsl/by_method/geometry/xn.md +1 -0
- data/docs/dsl/by_method/geometry/y.md +1 -0
- data/docs/dsl/by_method/geometry/yn.md +1 -0
- data/docs/dsl/by_method/render.md +5 -1
- data/docs/dsl/by_method/renders.md +31 -1
- data/docs/dsl/by_method/view.md +26 -0
- data/docs/dsl/by_method/view/stream.md +18 -0
- data/docs/dsl/by_method/views.md +32 -1
- data/docs/events/by_name/set_border_caption.md +2 -4
- data/docs/events/by_name/set_border_title.md +2 -4
- data/examples/views/empty_template.rb +0 -4
- data/examples/views/full_screen.rb +30 -5
- data/examples/views/misc_view.rb +464 -0
- data/examples/views/wordwrap.rb +72 -0
- data/examples/views/wordwrap.txt +8 -0
- data/integrations/dsl_app_021.rb +127 -0
- data/integrations/dsl_app_022.rb +133 -0
- data/integrations/expected/342_streams.out +1 -1
- data/integrations/expected/dsl_app_001.out +1 -1
- data/integrations/expected/dsl_app_002.out +1 -1
- data/integrations/expected/dsl_app_003.out +1 -1
- data/integrations/expected/dsl_app_004.out +1 -1
- data/integrations/expected/dsl_app_005.out +1 -1
- data/integrations/expected/dsl_app_006.out +1 -1
- data/integrations/expected/dsl_app_007.out +1 -1
- data/integrations/expected/dsl_app_008.out +1 -1
- data/integrations/expected/dsl_app_009.out +1 -1
- data/integrations/expected/dsl_app_010.out +1 -1
- data/integrations/expected/dsl_app_011.out +1 -1
- data/integrations/expected/dsl_app_012.out +1 -1
- data/integrations/expected/dsl_app_013.out +1 -1
- data/integrations/expected/dsl_app_014.out +1 -1
- data/integrations/expected/dsl_app_015.out +1 -1
- data/integrations/expected/dsl_app_016.out +1 -1
- data/integrations/expected/dsl_app_021.out +1 -0
- data/integrations/expected/dsl_app_022.out +1 -0
- data/integrations/support/test_interface_021.rb +7 -0
- data/integrations/support/test_interface_022.rb +15 -0
- data/lib/vedeu/all.rb +4 -2
- data/lib/vedeu/borders/border.rb +22 -6
- data/lib/vedeu/borders/repository.rb +4 -8
- data/lib/vedeu/buffers/buffer.rb +9 -6
- data/lib/vedeu/buffers/empty.rb +26 -23
- data/lib/vedeu/buffers/view.rb +44 -41
- data/lib/vedeu/cells/cursor.rb +0 -2
- data/lib/vedeu/cells/empty.rb +0 -1
- data/lib/vedeu/cells/escape.rb +0 -2
- data/lib/vedeu/coercers/alignment.rb +58 -8
- data/lib/vedeu/coercers/horizontal_alignment.rb +13 -9
- data/lib/vedeu/coercers/vertical_alignment.rb +13 -8
- data/lib/vedeu/common.rb +1 -1
- data/lib/vedeu/configuration/configuration.rb +41 -3
- data/lib/vedeu/cursors/coordinate.rb +1 -3
- data/lib/vedeu/cursors/cursor.rb +2 -6
- data/lib/vedeu/dsl/all.rb +1 -2
- data/lib/vedeu/dsl/border.rb +6 -6
- data/lib/vedeu/dsl/elements.rb +2 -2
- data/lib/vedeu/dsl/geometry.rb +7 -7
- data/lib/vedeu/dsl/{string → helpers}/align.rb +0 -0
- data/lib/vedeu/dsl/helpers/all.rb +17 -0
- data/lib/vedeu/dsl/{attributes.rb → helpers/attributes.rb} +0 -0
- data/lib/vedeu/dsl/{string → helpers}/text.rb +0 -0
- data/lib/vedeu/dsl/{string → helpers}/truncate.rb +0 -0
- data/lib/vedeu/dsl/{string → helpers}/wordwrap.rb +0 -0
- data/lib/vedeu/dsl/view.rb +11 -19
- data/lib/vedeu/dsl/views.rb +16 -106
- data/lib/vedeu/geometries/all.rb +0 -1
- data/lib/vedeu/geometries/area/area.rb +6 -12
- data/lib/vedeu/geometries/area/dimension.rb +21 -44
- data/lib/vedeu/geometries/dsl/all.rb +0 -1
- data/lib/vedeu/geometries/dsl/dsl.rb +22 -31
- data/lib/vedeu/geometries/geometry.rb +6 -0
- data/lib/vedeu/geometries/position.rb +6 -3
- data/lib/vedeu/geometries/repository.rb +1 -1
- data/lib/vedeu/input/mouse.rb +1 -0
- data/lib/vedeu/logging/log.rb +3 -6
- data/lib/vedeu/menus/dsl.rb +4 -5
- data/lib/vedeu/output/compressor.rb +11 -1
- data/lib/vedeu/output/viewport.rb +59 -59
- data/lib/vedeu/presentation/all.rb +1 -2
- data/lib/vedeu/presentation/colour.rb +75 -3
- data/lib/vedeu/{geometries/positionable.rb → presentation/position.rb} +4 -4
- data/lib/vedeu/presentation/presentation.rb +1 -3
- data/lib/vedeu/presentation/styles.rb +16 -1
- data/lib/vedeu/repositories/all.rb +0 -1
- data/lib/vedeu/sentence.rb +91 -0
- data/lib/vedeu/support/point.rb +72 -0
- data/lib/vedeu/terminal/terminal.rb +11 -53
- data/lib/vedeu/version.rb +1 -1
- data/lib/vedeu/views/composition.rb +11 -1
- data/lib/vedeu/views/default_attributes.rb +2 -0
- data/lib/vedeu/views/line.rb +16 -1
- data/lib/vedeu/views/stream.rb +16 -1
- data/lib/vedeu/views/view.rb +25 -17
- data/test/lib/vedeu/borders/border_test.rb +20 -2
- data/test/lib/vedeu/buffers/buffer_test.rb +15 -2
- data/test/lib/vedeu/buffers/empty_test.rb +51 -18
- data/test/lib/vedeu/buffers/view_test.rb +2 -2
- data/test/lib/vedeu/coercers/alignment_test.rb +32 -0
- data/test/lib/vedeu/coercers/horizontal_alignment_test.rb +16 -0
- data/test/lib/vedeu/coercers/vertical_alignment_test.rb +16 -0
- data/test/lib/vedeu/cursors/cursor_test.rb +4 -4
- data/test/lib/vedeu/cursors/dsl_test.rb +35 -21
- data/test/lib/vedeu/dsl/elements_test.rb +94 -2
- data/test/lib/vedeu/dsl/{string → helpers}/align_test.rb +0 -0
- data/test/lib/vedeu/dsl/{attributes_test.rb → helpers/attributes_test.rb} +0 -0
- data/test/lib/vedeu/dsl/{string → helpers}/text_test.rb +0 -0
- data/test/lib/vedeu/dsl/{string → helpers}/truncate_test.rb +0 -0
- data/test/lib/vedeu/dsl/{string → helpers}/wordwrap_test.rb +0 -0
- data/test/lib/vedeu/dsl/view_test.rb +22 -4
- data/test/lib/vedeu/dsl/views_test.rb +8 -5
- data/test/lib/vedeu/geometries/dsl/dsl_test.rb +2 -159
- data/test/lib/vedeu/geometries/position_test.rb +118 -60
- data/test/lib/vedeu/input/mouse_test.rb +1 -6
- data/test/lib/vedeu/logging/log_test.rb +14 -3
- data/test/lib/vedeu/presentation/colour_test.rb +77 -0
- data/test/lib/vedeu/{geometries/positionable_test.rb → presentation/position_test.rb} +4 -4
- data/test/lib/vedeu/sentence_test.rb +49 -0
- data/test/lib/vedeu/support/point_test.rb +139 -0
- data/test/lib/vedeu/terminal/terminal_test.rb +3 -44
- data/test/lib/vedeu/views/composition_test.rb +24 -4
- data/test/lib/vedeu/views/default_attributes_test.rb +10 -2
- data/test/lib/vedeu/views/view_test.rb +8 -15
- data/test/support/examples/material_colours_app.rb +0 -6
- data/vedeu.gemspec +1 -1
- metadata +58 -38
- data/examples/views/lines_line_stream.rb +0 -95
- data/examples/views/lines_line_streams.rb +0 -75
- data/examples/views/lines_line_streams_stream.rb +0 -78
- data/examples/views/lines_line_streams_stream_stream.rb +0 -50
- data/examples/views/lines_streams.rb +0 -93
- data/lib/vedeu/dsl/string/all.rb +0 -16
- data/lib/vedeu/geometries/dsl/validator.rb +0 -62
- data/lib/vedeu/presentation/background.rb +0 -54
- data/lib/vedeu/presentation/foreground.rb +0 -54
- data/lib/vedeu/repositories/parent.rb +0 -34
- data/test/lib/vedeu/geometries/dsl/validator_test.rb +0 -85
- data/test/lib/vedeu/presentation/background_test.rb +0 -74
- data/test/lib/vedeu/presentation/foreground_test.rb +0 -75
@@ -7,7 +7,5 @@ value given.
|
|
7
7
|
- The caption must be a string or nil.
|
8
8
|
- If the caption is an empty string or nil, then the caption will not
|
9
9
|
be shown, and an existing caption will be removed.
|
10
|
-
- If the name is nil,
|
11
|
-
|
12
|
-
refreshed, unless the view does not have a border, or the border is
|
13
|
-
not enabled, or the bottom border is set not to be shown.
|
10
|
+
- If the name is nil, or references a border that does not exist, then
|
11
|
+
the caption will be silently discarded.
|
@@ -7,7 +7,5 @@ value given.
|
|
7
7
|
- The title must be a string or nil.
|
8
8
|
- If the title is an empty string or nil, then the title will not be
|
9
9
|
shown, and an existing title will be removed.
|
10
|
-
- If the name is nil,
|
11
|
-
|
12
|
-
refreshed, unless the view does not have a border, or the border is
|
13
|
-
not enabled, or the top border is set not to be shown.
|
10
|
+
- If the name is nil, or references a border that does not exist, then
|
11
|
+
the caption will be silently discarded.
|
@@ -22,8 +22,6 @@ class DSLApp
|
|
22
22
|
debug!
|
23
23
|
run_once!
|
24
24
|
standalone!
|
25
|
-
width 100
|
26
|
-
height 50
|
27
25
|
end
|
28
26
|
|
29
27
|
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
@@ -47,10 +45,27 @@ class DSLApp
|
|
47
45
|
Vedeu.render do
|
48
46
|
view(:test1_interface) do
|
49
47
|
line do
|
50
|
-
stream '--------1---------2---------3---------4---------5'
|
51
|
-
|
48
|
+
stream '--------1---------2---------3---------4---------5', {
|
49
|
+
foreground: '#ff0000'
|
50
|
+
}
|
51
|
+
stream '---------6---------7---------8---------9---------', {
|
52
|
+
foreground: '#ff0000'
|
53
|
+
}
|
54
|
+
stream '0', { foreground: '#ffff00' }
|
55
|
+
stream '---------1---------2---------3---------4---------5', {
|
56
|
+
foreground: '#00ff00'
|
57
|
+
}
|
58
|
+
stream '---------6---------7---------8---------9---------', {
|
59
|
+
foreground: '#00ff00'
|
60
|
+
}
|
61
|
+
stream '0', { foreground: '#ffff00' }
|
62
|
+
stream '-2-4-6-8-1-2-4-----2---------3---------4---------5', {
|
63
|
+
foreground: '#0077ff'
|
64
|
+
}
|
65
|
+
end
|
66
|
+
line do
|
67
|
+
stream '- '
|
52
68
|
end
|
53
|
-
line '-'
|
54
69
|
line '-'
|
55
70
|
line '-'
|
56
71
|
line '-'
|
@@ -98,6 +113,16 @@ class DSLApp
|
|
98
113
|
line '-'
|
99
114
|
line '-'
|
100
115
|
line '50'
|
116
|
+
line '-'
|
117
|
+
line '-'
|
118
|
+
line '-'
|
119
|
+
line '-'
|
120
|
+
line '-'
|
121
|
+
line '-'
|
122
|
+
line '-'
|
123
|
+
line '-'
|
124
|
+
line '-'
|
125
|
+
line '60'
|
101
126
|
end
|
102
127
|
end
|
103
128
|
|
@@ -0,0 +1,464 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'vedeu'
|
5
|
+
|
6
|
+
class DSLApp
|
7
|
+
|
8
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
9
|
+
|
10
|
+
Vedeu.configure do
|
11
|
+
log '/tmp/vedeu_views_dsl.log'
|
12
|
+
debug!
|
13
|
+
run_once!
|
14
|
+
standalone!
|
15
|
+
renderers(Vedeu::Renderers::Terminal.new,
|
16
|
+
Vedeu::Renderers::File.new(filename: '/tmp/misc_view.out'))
|
17
|
+
height 40
|
18
|
+
end
|
19
|
+
|
20
|
+
Vedeu.border 'no_bottom' do
|
21
|
+
background '#000000'
|
22
|
+
foreground '#ffffff'
|
23
|
+
show_bottom false
|
24
|
+
end
|
25
|
+
Vedeu.border 'no_left' do
|
26
|
+
background '#000000'
|
27
|
+
foreground '#ffffff'
|
28
|
+
show_left false
|
29
|
+
end
|
30
|
+
Vedeu.border 'no_right' do
|
31
|
+
background '#000000'
|
32
|
+
foreground '#ffffff'
|
33
|
+
show_right false
|
34
|
+
end
|
35
|
+
Vedeu.border 'no_top' do
|
36
|
+
background '#000000'
|
37
|
+
foreground '#ffffff'
|
38
|
+
show_top false
|
39
|
+
end
|
40
|
+
|
41
|
+
Vedeu.interface 'horiz_ruler' do
|
42
|
+
foreground '#ffffff'
|
43
|
+
geometry do
|
44
|
+
x 1
|
45
|
+
width 80
|
46
|
+
y 1
|
47
|
+
height 1
|
48
|
+
end
|
49
|
+
end
|
50
|
+
Vedeu.interface 'vert_ruler' do
|
51
|
+
foreground '#ffffff'
|
52
|
+
geometry do
|
53
|
+
x 1
|
54
|
+
width 1
|
55
|
+
y 2
|
56
|
+
height 48
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
Vedeu.interface 'main_interface' do
|
61
|
+
border 'main_interface' do
|
62
|
+
colour foreground: '#ffffff', background: :default
|
63
|
+
title 'Rainbow!'
|
64
|
+
caption('Unicorns!')
|
65
|
+
end
|
66
|
+
colour foreground: '#ffffff', background: :default
|
67
|
+
cursor!
|
68
|
+
geometry 'main_interface' do
|
69
|
+
x 3
|
70
|
+
xn 24
|
71
|
+
y 4
|
72
|
+
yn 15
|
73
|
+
end
|
74
|
+
group :my_group
|
75
|
+
zindex 2
|
76
|
+
end
|
77
|
+
|
78
|
+
Vedeu.interface 'other_interface' do
|
79
|
+
border 'other_interface' do
|
80
|
+
colour(foreground: '#ffffff', background: :default)
|
81
|
+
title('Wow!')
|
82
|
+
caption('Shiny!')
|
83
|
+
horizontal('-')
|
84
|
+
top_right('+')
|
85
|
+
top_left('+')
|
86
|
+
bottom_right('+')
|
87
|
+
bottom_left('+')
|
88
|
+
end
|
89
|
+
colour(foreground: '#ffffff', background: :default)
|
90
|
+
cursor!
|
91
|
+
geometry do
|
92
|
+
x(27)
|
93
|
+
xn(47)
|
94
|
+
y(5)
|
95
|
+
yn(15)
|
96
|
+
end
|
97
|
+
zindex(1)
|
98
|
+
end
|
99
|
+
|
100
|
+
Vedeu.interface 'default_border' do
|
101
|
+
geometry do
|
102
|
+
x 50
|
103
|
+
y 4
|
104
|
+
height 4
|
105
|
+
width 10
|
106
|
+
end
|
107
|
+
colour foreground: '#ffffff', background: '#f44336'
|
108
|
+
end
|
109
|
+
|
110
|
+
Vedeu.interface 'border_off' do
|
111
|
+
geometry do
|
112
|
+
x 62
|
113
|
+
y 4
|
114
|
+
height 4
|
115
|
+
width 10
|
116
|
+
end
|
117
|
+
colour foreground: '#ffffff', background: '#e91e63'
|
118
|
+
end
|
119
|
+
|
120
|
+
Vedeu.interface 'no_top' do
|
121
|
+
geometry do
|
122
|
+
x 50
|
123
|
+
y 9
|
124
|
+
height 4
|
125
|
+
width 10
|
126
|
+
end
|
127
|
+
colour foreground: '#ffffff', background: '#9c27b0'
|
128
|
+
end
|
129
|
+
|
130
|
+
Vedeu.interface 'no_bottom' do
|
131
|
+
geometry do
|
132
|
+
x 62
|
133
|
+
y 9
|
134
|
+
height 4
|
135
|
+
width 10
|
136
|
+
end
|
137
|
+
colour foreground: '#ffffff', background: '#673ab7'
|
138
|
+
end
|
139
|
+
|
140
|
+
Vedeu.interface 'no_left' do
|
141
|
+
geometry do
|
142
|
+
x 50
|
143
|
+
y 14
|
144
|
+
height 4
|
145
|
+
width 10
|
146
|
+
end
|
147
|
+
colour foreground: '#ffffff', background: '#3f51b5'
|
148
|
+
end
|
149
|
+
|
150
|
+
Vedeu.interface 'no_right' do
|
151
|
+
geometry do
|
152
|
+
x 62
|
153
|
+
y 14
|
154
|
+
height 4
|
155
|
+
width 10
|
156
|
+
end
|
157
|
+
colour foreground: '#ffffff', background: '#2196f3'
|
158
|
+
end
|
159
|
+
|
160
|
+
Vedeu.interface 'custom_corners' do
|
161
|
+
geometry do
|
162
|
+
x 3
|
163
|
+
y 17
|
164
|
+
height 4
|
165
|
+
width 10
|
166
|
+
end
|
167
|
+
colour foreground: '#ffffff', background: '#03a9f4'
|
168
|
+
end
|
169
|
+
|
170
|
+
Vedeu.interface 'custom_sides' do
|
171
|
+
geometry do
|
172
|
+
x 15
|
173
|
+
y 17
|
174
|
+
height 4
|
175
|
+
width 10
|
176
|
+
end
|
177
|
+
colour foreground: '#000000', background: '#00bcd4'
|
178
|
+
end
|
179
|
+
|
180
|
+
Vedeu.interface 'only_top' do
|
181
|
+
colour foreground: '#ffffff', background: '#009688'
|
182
|
+
border do
|
183
|
+
foreground '#ffffff'
|
184
|
+
show_right false
|
185
|
+
show_bottom false
|
186
|
+
show_left false
|
187
|
+
end
|
188
|
+
geometry do
|
189
|
+
x 27
|
190
|
+
y 17
|
191
|
+
height 4
|
192
|
+
width 10
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
Vedeu.interface 'only_bottom' do
|
197
|
+
colour foreground: '#000000', background: '#8bc34a'
|
198
|
+
border do
|
199
|
+
background '#00ff00'
|
200
|
+
foreground '#000000'
|
201
|
+
show_top false
|
202
|
+
show_right false
|
203
|
+
show_left false
|
204
|
+
end
|
205
|
+
geometry do
|
206
|
+
x 39
|
207
|
+
y 17
|
208
|
+
height 4
|
209
|
+
width 10
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
Vedeu.interface 'only_left' do
|
214
|
+
colour foreground: '#000000', background: '#cddc39'
|
215
|
+
border do
|
216
|
+
background '#cd39cd'
|
217
|
+
foreground '#000000'
|
218
|
+
show_top false
|
219
|
+
show_bottom false
|
220
|
+
show_right false
|
221
|
+
end
|
222
|
+
geometry do
|
223
|
+
x 3
|
224
|
+
y 23
|
225
|
+
height 4
|
226
|
+
width 10
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
Vedeu.interface 'only_right' do
|
231
|
+
colour foreground: '#000000', background: '#ffeb3b'
|
232
|
+
border do
|
233
|
+
background '#cd39cd'
|
234
|
+
foreground '#000000'
|
235
|
+
show_top false
|
236
|
+
show_bottom false
|
237
|
+
show_left false
|
238
|
+
end
|
239
|
+
geometry do
|
240
|
+
x 27
|
241
|
+
y 23
|
242
|
+
height 4
|
243
|
+
width 10
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
Vedeu.interface 'custom_colour' do
|
248
|
+
geometry do
|
249
|
+
x 15
|
250
|
+
y 23
|
251
|
+
height 4
|
252
|
+
width 10
|
253
|
+
end
|
254
|
+
colour foreground: '#000000', background: '#ffc107'
|
255
|
+
end
|
256
|
+
|
257
|
+
Vedeu.interface 'negative' do
|
258
|
+
geometry do
|
259
|
+
x 62
|
260
|
+
y 23
|
261
|
+
height 4
|
262
|
+
width 10
|
263
|
+
end
|
264
|
+
colour foreground: '#000000', background: '#ff9800'
|
265
|
+
style 'normal'
|
266
|
+
end
|
267
|
+
|
268
|
+
Vedeu.renders do
|
269
|
+
view 'horiz_ruler' do
|
270
|
+
background '#0046a3'
|
271
|
+
line do
|
272
|
+
stream '1--------1'
|
273
|
+
stream '---------2'
|
274
|
+
stream '---------3'
|
275
|
+
stream '---------4'
|
276
|
+
stream '---------5'
|
277
|
+
stream '---------6'
|
278
|
+
stream '---------7'
|
279
|
+
stream '---------8'
|
280
|
+
stream '---------9'
|
281
|
+
end
|
282
|
+
end
|
283
|
+
view 'vert_ruler' do
|
284
|
+
background '#0046a3'
|
285
|
+
line '-'; line '-'; line '-'; line '-';
|
286
|
+
line '-'; line '-'; line '-'; line '-'; line '1';
|
287
|
+
line '-'; line '-'; line '-'; line '-'; line '-';
|
288
|
+
line '-'; line '-'; line '-'; line '-'; line '2';
|
289
|
+
line '-'; line '-'; line '-'; line '-'; line '-';
|
290
|
+
line '-'; line '-'; line '-'; line '-'; line '3';
|
291
|
+
line '-'; line '-'; line '-'; line '-'; line '-';
|
292
|
+
line '-'; line '-'; line '-'; line '-'; line '4';
|
293
|
+
line '-'; line '-'; line '-'; line '-'; line '-';
|
294
|
+
end
|
295
|
+
|
296
|
+
view 'main_interface' do
|
297
|
+
line { left 'Left', background: '#f44336' }
|
298
|
+
line { centre 'Centre', background: '#e91e63' }
|
299
|
+
line { center 'Center', background: '#9c27b0' }
|
300
|
+
line { right 'Right', background: '#673ab7' }
|
301
|
+
line { centre 'Indigo', width: 20, background: '#3f51b5' }
|
302
|
+
line { centre 'Blue', width: 20, background: '#2196f3' }
|
303
|
+
line { centre 'Light Blue', width: 20, background: '#03a9f4' }
|
304
|
+
line { centre 'Cyan', width: 20, background: '#00bcd4' }
|
305
|
+
line { centre 'Teal', width: 20, background: '#009688' }
|
306
|
+
line { centre 'Green', width: 20, background: '#4caf50' }
|
307
|
+
line { centre 'Light Green', width: 20, background: '#8bc34a' }
|
308
|
+
line { centre 'Lime', width: 20, background: '#cddc39' }
|
309
|
+
line { centre 'Yellow', width: 20, background: '#ffeb3b' }
|
310
|
+
line { centre 'Amber', width: 20, background: '#ffc107' }
|
311
|
+
line { centre 'Orange', width: 20, background: '#ff9800' }
|
312
|
+
line { centre 'Deep Orange', width: 20, background: '#ff5722' }
|
313
|
+
line { centre 'Brown', width: 20, background: '#795548' }
|
314
|
+
line { centre 'Grey', width: 20, background: '#9e9e9e' }
|
315
|
+
line { centre 'Blue Grey', width: 20, background: '#607d8b' }
|
316
|
+
end
|
317
|
+
|
318
|
+
view 'other_interface' do
|
319
|
+
line { centre 'Blue Grey', width: 20, background: '#607d8b' }
|
320
|
+
line { centre 'Grey', width: 20, background: '#9e9e9e' }
|
321
|
+
line { centre 'Brown', width: 20, background: '#795548' }
|
322
|
+
line { centre 'Deep Orange', width: 20, background: '#ff5722' }
|
323
|
+
line { centre 'Orange', width: 20, background: '#ff9800' }
|
324
|
+
line { centre 'Amber', width: 20, background: '#ffc107' }
|
325
|
+
line { centre 'Yellow', width: 20, background: '#ffeb3b' }
|
326
|
+
line { centre 'Lime', width: 20, background: '#cddc39' }
|
327
|
+
line { centre 'Light Green', width: 20, background: '#8bc34a' }
|
328
|
+
line { centre 'Green', width: 20, background: '#4caf50' }
|
329
|
+
line { centre 'Teal', width: 20, background: '#009688' }
|
330
|
+
line { centre 'Cyan', width: 20, background: '#00bcd4' }
|
331
|
+
line { centre 'Light Blue', width: 20, background: '#03a9f4' }
|
332
|
+
line { centre 'Blue', width: 20, background: '#2196f3' }
|
333
|
+
line { centre 'Indigo', width: 20, background: '#3f51b5' }
|
334
|
+
line { centre 'Deep Purple', width: 20, background: '#673ab7' }
|
335
|
+
line { centre 'Purple', width: 20, background: '#9c27b0' }
|
336
|
+
line { centre 'Pink', width: 20, background: '#e91e63' }
|
337
|
+
line { centre 'Red', width: 20, background: '#f44336' }
|
338
|
+
end
|
339
|
+
|
340
|
+
view('default_border') do
|
341
|
+
border do
|
342
|
+
foreground '#ffffff'
|
343
|
+
end
|
344
|
+
lines do
|
345
|
+
line 'default'
|
346
|
+
line '4, 10'
|
347
|
+
end
|
348
|
+
end
|
349
|
+
view('border_off') do
|
350
|
+
lines do
|
351
|
+
line 'border'
|
352
|
+
line 'off'
|
353
|
+
line '4, 10'
|
354
|
+
end
|
355
|
+
end
|
356
|
+
view('no_top') do
|
357
|
+
lines do
|
358
|
+
line 'no top'
|
359
|
+
line '4, 10'
|
360
|
+
end
|
361
|
+
end
|
362
|
+
view('no_bottom') do
|
363
|
+
lines do
|
364
|
+
line 'no'
|
365
|
+
line 'bottom'
|
366
|
+
line '4, 10'
|
367
|
+
end
|
368
|
+
end
|
369
|
+
view('no_left') do
|
370
|
+
lines do
|
371
|
+
line 'no left'
|
372
|
+
line '4, 10'
|
373
|
+
end
|
374
|
+
end
|
375
|
+
view('no_right') do
|
376
|
+
lines do
|
377
|
+
line 'no right'
|
378
|
+
line '4, 10'
|
379
|
+
end
|
380
|
+
end
|
381
|
+
view('custom_corners') do
|
382
|
+
border do
|
383
|
+
foreground '#000000'
|
384
|
+
top_left 'A', colour: { background: '#ff5722' }
|
385
|
+
top_right 'B', colour: { background: '#0000ff', foreground: '#ffffff' }
|
386
|
+
bottom_left 'C', colour: { background: '#ffff00', foreground: '#000000' }
|
387
|
+
bottom_right 'D', colour: { background: '#ffffff' }
|
388
|
+
end
|
389
|
+
lines do
|
390
|
+
line 'custom'
|
391
|
+
line 'corners'
|
392
|
+
end
|
393
|
+
end
|
394
|
+
view('custom_sides') do
|
395
|
+
border do
|
396
|
+
background '#ff5722'
|
397
|
+
|
398
|
+
top_horizontal '*', colour: { background: '#000000', foreground: '#ffffff' }
|
399
|
+
left_vertical '$', colour: { background: '#0000ff', foreground: '#ffffff' }
|
400
|
+
right_vertical '%', colour: { background: '#ffff00', foreground: '#000000' }
|
401
|
+
bottom_horizontal '&', colour: { background: '#ffffff' }
|
402
|
+
end
|
403
|
+
lines do
|
404
|
+
line 'custom'
|
405
|
+
line 'sides'
|
406
|
+
end
|
407
|
+
end
|
408
|
+
view('only_top') do
|
409
|
+
lines do
|
410
|
+
line 'only'
|
411
|
+
line 'top'
|
412
|
+
line '4, 10'
|
413
|
+
end
|
414
|
+
end
|
415
|
+
view('only_bottom') do
|
416
|
+
lines do
|
417
|
+
line 'only'
|
418
|
+
line 'bottom'
|
419
|
+
line '4, 10'
|
420
|
+
end
|
421
|
+
end
|
422
|
+
view('only_left') do
|
423
|
+
lines do
|
424
|
+
line 'only'
|
425
|
+
line 'left'
|
426
|
+
line '4, 10'
|
427
|
+
end
|
428
|
+
end
|
429
|
+
view('only_right') do
|
430
|
+
lines do
|
431
|
+
line 'only'
|
432
|
+
line 'right'
|
433
|
+
line '4, 10'
|
434
|
+
end
|
435
|
+
end
|
436
|
+
view('custom_colour') do
|
437
|
+
border do
|
438
|
+
colour foreground: '#ff5500', background: '#0000ff'
|
439
|
+
end
|
440
|
+
lines do
|
441
|
+
line 'custom'
|
442
|
+
line 'color'
|
443
|
+
end
|
444
|
+
end
|
445
|
+
view('negative') do
|
446
|
+
border do
|
447
|
+
style 'negative'
|
448
|
+
end
|
449
|
+
lines do
|
450
|
+
line 'custom'
|
451
|
+
line 'style'
|
452
|
+
end
|
453
|
+
end
|
454
|
+
end
|
455
|
+
|
456
|
+
Vedeu.focus_by_name 'main_interface'
|
457
|
+
|
458
|
+
def self.start(argv = ARGV)
|
459
|
+
Vedeu::Launcher.execute!(argv)
|
460
|
+
end
|
461
|
+
|
462
|
+
end # DSLApp
|
463
|
+
|
464
|
+
DSLApp.start(ARGV)
|