vedeu 0.6.56 → 0.6.57

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/Guardfile +1 -1
  4. data/Rakefile +3 -3
  5. data/lib/vedeu/borders/all.rb +1 -0
  6. data/lib/vedeu/borders/border.rb +14 -80
  7. data/lib/vedeu/borders/caption.rb +17 -0
  8. data/lib/vedeu/borders/dsl.rb +2 -2
  9. data/lib/vedeu/borders/null.rb +14 -34
  10. data/lib/vedeu/borders/refresh.rb +28 -14
  11. data/lib/vedeu/borders/title.rb +0 -10
  12. data/lib/vedeu/buffers/buffer.rb +1 -1
  13. data/lib/vedeu/buffers/view.rb +7 -6
  14. data/lib/vedeu/colours/repository.rb +0 -15
  15. data/lib/vedeu/cursors/cursor.rb +6 -6
  16. data/lib/vedeu/cursors/refresh.rb +11 -19
  17. data/lib/vedeu/cursors/reposition.rb +3 -5
  18. data/lib/vedeu/editor/cropper.rb +9 -9
  19. data/lib/vedeu/editor/cursor.rb +5 -5
  20. data/lib/vedeu/editor/editor.rb +1 -1
  21. data/lib/vedeu/events/event.rb +1 -1
  22. data/lib/vedeu/events/trigger.rb +1 -1
  23. data/lib/vedeu/geometry/area.rb +94 -17
  24. data/lib/vedeu/geometry/coordinate.rb +15 -15
  25. data/lib/vedeu/geometry/dimension.rb +2 -2
  26. data/lib/vedeu/geometry/geometry.rb +30 -27
  27. data/lib/vedeu/geometry/null.rb +17 -11
  28. data/lib/vedeu/interfaces/clear.rb +5 -12
  29. data/lib/vedeu/output/viewport.rb +13 -13
  30. data/lib/vedeu/plugins/plugin.rb +1 -1
  31. data/lib/vedeu/repositories/repository.rb +1 -3
  32. data/lib/vedeu/version.rb +1 -1
  33. data/test/lib/vedeu/borders/border_test.rb +4 -230
  34. data/test/lib/vedeu/borders/caption_test.rb +15 -0
  35. data/test/lib/vedeu/borders/dsl_test.rb +4 -4
  36. data/test/lib/vedeu/borders/null_test.rb +3 -39
  37. data/test/lib/vedeu/buffers/view_test.rb +2 -0
  38. data/test/lib/vedeu/colours/repository_test.rb +0 -19
  39. data/test/lib/vedeu/cursors/reposition_test.rb +17 -4
  40. data/test/lib/vedeu/dsl/shared_test.rb +34 -0
  41. data/test/lib/vedeu/geometry/area_test.rb +196 -3
  42. data/test/lib/vedeu/geometry/dimension_test.rb +79 -79
  43. data/test/lib/vedeu/geometry/geometry_test.rb +4 -0
  44. data/test/lib/vedeu/groups/refresh_test.rb +1 -1
  45. data/test/lib/vedeu/logging/clock_time_test.rb +14 -0
  46. data/test/lib/vedeu/logging/ips_test.rb +43 -0
  47. data/test/lib/vedeu/output/presentation/colour_test.rb +4 -0
  48. data/test/lib/vedeu/repositories/repositories_test.rb +7 -1
  49. data/test/lib/vedeu/terminal/buffer_test.rb +10 -0
  50. data/test/support/examples/material_colours_app.rb +306 -47
  51. data/test/test_helper.rb +5 -5
  52. metadata +7 -4
  53. data/test/support/examples/borders_app.rb +0 -330
@@ -35,118 +35,118 @@ module Vedeu
35
35
  it { instance.instance_variable_get('@alignment').must_equal(alignment) }
36
36
  end
37
37
 
38
- # describe '.pair' do
39
- # let(:d) { 15 }
40
- # let(:dn) { 38 }
38
+ describe '.pair' do
39
+ let(:d) { 15 }
40
+ let(:dn) { 38 }
41
41
 
42
- # subject { described.pair(attributes) }
42
+ subject { described.pair(attributes) }
43
43
 
44
- # it { subject.must_be_instance_of(Array) }
45
- # it { subject.must_equal([15, 38]) }
44
+ it { subject.must_be_instance_of(Array) }
45
+ it { subject.must_equal([15, 38]) }
46
46
 
47
- # context 'when maximised' do
48
- # let(:maximised) { true }
49
- # let(:default) { 80 }
47
+ context 'when maximised' do
48
+ let(:maximised) { true }
49
+ let(:default) { 80 }
50
50
 
51
- # it { subject.must_equal([1, 80]) }
52
- # end
51
+ it { subject.must_equal([1, 80]) }
52
+ end
53
53
 
54
- # context 'when bottom aligned' do
55
- # let(:alignment) { :bottom }
54
+ context 'when bottom aligned' do
55
+ let(:alignment) { :bottom }
56
56
 
57
- # it { proc { subject }.must_raise(Vedeu::Error::NotImplemented) }
58
- # end
57
+ # @todo Add more tests.
58
+ end
59
59
 
60
- # context 'when left aligned' do
61
- # let(:alignment) { :left }
62
- # let(:default) { 80 }
60
+ context 'when left aligned' do
61
+ let(:alignment) { :left }
62
+ let(:default) { 80 }
63
63
 
64
- # context 'when a width (d_dn) is set' do
65
- # let(:d_dn) { 20 }
64
+ context 'when a width (d_dn) is set' do
65
+ let(:d_dn) { 20 }
66
66
 
67
- # it { subject.must_equal([1, 20]) }
67
+ it { subject.must_equal([1, 20]) }
68
68
 
69
- # context 'when the width is greater than the terminal width' do
70
- # let(:d_dn) { 100 }
69
+ context 'when the width is greater than the terminal width' do
70
+ let(:d_dn) { 100 }
71
71
 
72
- # it { subject.must_equal([1, 80]) }
73
- # end
74
- # end
72
+ it { subject.must_equal([1, 80]) }
73
+ end
74
+ end
75
75
 
76
- # context 'when a dn is set' do
77
- # it { subject.must_equal([1, 38]) }
78
- # end
76
+ context 'when a dn is set' do
77
+ it { subject.must_equal([1, 38]) }
78
+ end
79
79
 
80
- # context 'when neither width nor dn is set' do
81
- # let(:dn) {}
80
+ context 'when neither width nor dn is set' do
81
+ let(:dn) {}
82
82
 
83
- # it { subject.must_equal([1, 80]) }
84
- # end
85
- # end
83
+ it { subject.must_equal([1, 80]) }
84
+ end
85
+ end
86
86
 
87
- # context 'when middle aligned' do
88
- # let(:alignment) { :middle }
87
+ context 'when middle aligned' do
88
+ let(:alignment) { :middle }
89
89
 
90
- # it { proc { subject }.must_raise(Vedeu::Error::NotImplemented) }
91
- # end
90
+ # @todo Add more tests.
91
+ end
92
92
 
93
- # context 'when right aligned' do
94
- # let(:alignment) { :right }
95
- # let(:default) { 80 }
93
+ context 'when right aligned' do
94
+ let(:alignment) { :right }
95
+ let(:default) { 80 }
96
96
 
97
- # context 'when a width (d_dn) is set' do
98
- # let(:d_dn) { 20 }
97
+ context 'when a width (d_dn) is set' do
98
+ let(:d_dn) { 20 }
99
99
 
100
- # it { subject.must_equal([60, 80]) }
100
+ it { subject.must_equal([60, 80]) }
101
101
 
102
- # context 'when the width is greater than the terminal width' do
103
- # let(:d_dn) { 100 }
102
+ context 'when the width is greater than the terminal width' do
103
+ let(:d_dn) { 100 }
104
104
 
105
- # it { subject.must_equal([1, 80]) }
106
- # end
107
- # end
105
+ it { subject.must_equal([1, 80]) }
106
+ end
107
+ end
108
108
 
109
- # context 'when a d is set' do
110
- # let(:d) { 58 }
109
+ context 'when a d is set' do
110
+ let(:d) { 58 }
111
111
 
112
- # it { subject.must_equal([58, 80]) }
113
- # end
112
+ it { subject.must_equal([58, 80]) }
113
+ end
114
114
 
115
- # context 'when neither width nor d is set' do
116
- # let(:d) {}
115
+ context 'when neither width nor d is set' do
116
+ let(:d) {}
117
117
 
118
- # it { subject.must_equal([1, 80]) }
119
- # end
120
- # end
118
+ it { subject.must_equal([1, 80]) }
119
+ end
120
+ end
121
121
 
122
- # context 'when top aligned' do
123
- # let(:alignment) { :top }
122
+ context 'when top aligned' do
123
+ let(:alignment) { :top }
124
124
 
125
- # it { proc { subject }.must_raise(Vedeu::Error::NotImplemented) }
126
- # end
125
+ # @todo Add more tests.
126
+ end
127
127
 
128
- # context 'when centre aligned' do
129
- # let(:alignment) { :centre }
130
- # let(:default) { 80 }
128
+ context 'when centre aligned' do
129
+ let(:alignment) { :centre }
130
+ let(:default) { 80 }
131
131
 
132
- # context 'when d and dn are given' do
133
- # let(:d) { 7 }
134
- # let(:dn) { 47 }
132
+ context 'when d and dn are given' do
133
+ let(:d) { 7 }
134
+ let(:dn) { 47 }
135
135
 
136
- # it { subject.must_equal([20, 60]) }
137
- # end
136
+ it { subject.must_equal([20, 60]) }
137
+ end
138
138
 
139
- # context 'when only a d_dn is given' do
140
- # let(:d_dn) { 30 }
139
+ context 'when only a d_dn is given' do
140
+ let(:d_dn) { 30 }
141
141
 
142
- # it { subject.must_equal([28, 52]) }
143
- # end
142
+ it { subject.must_equal([28, 52]) }
143
+ end
144
144
 
145
- # context 'when only a default is given' do
146
- # it { subject.must_equal([28, 52]) }
147
- # end
148
- # end
149
- # end
145
+ context 'when only a default is given' do
146
+ it { subject.must_equal([28, 52]) }
147
+ end
148
+ end
149
+ end
150
150
 
151
151
  end # Dimension
152
152
 
@@ -186,6 +186,10 @@ module Vedeu
186
186
  let(:y) { 4 }
187
187
  let(:yn) { 8 }
188
188
 
189
+ before do
190
+ Vedeu.stubs(:trigger)
191
+ end
192
+
189
193
  subject { instance.move_origin }
190
194
 
191
195
  it { subject.must_be_instance_of(described) }
@@ -49,7 +49,7 @@ module Vedeu
49
49
  context 'when no interfaces/views have been registered' do
50
50
  before { Vedeu::Models::Focus.reset }
51
51
 
52
- it { proc { subject }.must_raise(Vedeu::Error::Fatal) }
52
+ it { proc { subject }.must_raise(Vedeu::Error::MissingRequired) }
53
53
  end
54
54
  end
55
55
 
@@ -6,6 +6,20 @@ module Vedeu
6
6
 
7
7
  describe ClockTime do
8
8
 
9
+ describe '.clock_time' do
10
+ subject { Vedeu.clock_time }
11
+
12
+ context 'when Process::CLOCK_MONOTONIC is defined' do
13
+ it { subject.must_be_instance_of(Float) }
14
+ end
15
+
16
+ # context 'when Process::CLOCK_MONOTONIC is not defined' do
17
+ # it { subject.must_be_instance_of(Time) }
18
+ # end
19
+
20
+ # @todo Add more tests.
21
+ end
22
+
9
23
  end # ClockTime
10
24
 
11
25
  end # Logging
@@ -0,0 +1,43 @@
1
+ require 'test_helper'
2
+
3
+ module Vedeu
4
+
5
+ module Logging
6
+
7
+ module Debug
8
+
9
+ describe IPS do
10
+
11
+ let(:described) { Vedeu::Logging::Debug::IPS }
12
+ let(:instance) { described.new }
13
+
14
+ describe '#initialize' do
15
+ it { instance.must_be_instance_of(described) }
16
+ it { instance.instance_variable_get('@old_stdout').must_be_instance_of(StringIO) }
17
+ it { instance.instance_variable_get('@samples').must_equal({}) }
18
+ it { instance.instance_variable_get('@benchmark').must_be_instance_of(Benchmark::IPS::Job) }
19
+ it { instance.instance_variable_get('@count').must_equal(0) }
20
+ end
21
+
22
+ describe 'accessors' do
23
+ it { instance.must_respond_to(:samples) }
24
+ it { instance.must_respond_to(:samples=) }
25
+ it { instance.must_respond_to(:benchmark) }
26
+ it { instance.must_respond_to(:benchmark=) }
27
+ end
28
+
29
+ describe '#add_item' do
30
+ # @todo Add more tests.
31
+ end
32
+
33
+ describe '#execute!' do
34
+ # @todo Add more tests.
35
+ end
36
+
37
+ end # IPS
38
+
39
+ end # Debug
40
+
41
+ end # Logging
42
+
43
+ end # Vedeu
@@ -73,6 +73,8 @@ module Vedeu
73
73
  context 'when a colour is set' do
74
74
  it { subject.colour.must_equal('#000033') }
75
75
  end
76
+
77
+ # @todo Add more tests.
76
78
  end
77
79
 
78
80
  describe '#background=' do
@@ -110,6 +112,8 @@ module Vedeu
110
112
  context 'when a colour is set' do
111
113
  it { subject.colour.must_equal('#aadd00') }
112
114
  end
115
+
116
+ # @todo Add more tests.
113
117
  end
114
118
 
115
119
  describe '#foreground=' do
@@ -6,6 +6,12 @@ module Vedeu
6
6
 
7
7
  let(:described) { Vedeu::Repositories }
8
8
 
9
+ describe '.all' do
10
+ subject { described.all }
11
+
12
+ # @todo Add more tests.
13
+ end
14
+
9
15
  describe '.register' do
10
16
  subject { described.register(klass) }
11
17
 
@@ -30,7 +36,7 @@ module Vedeu
30
36
 
31
37
  subject { described.registered }
32
38
 
33
- # @todo
39
+ # @todo Add more tests.
34
40
  # it { skip }
35
41
  end
36
42
 
@@ -27,6 +27,8 @@ module Vedeu
27
27
  subject { described.buffer }
28
28
 
29
29
  it { subject.must_be_instance_of(Array) }
30
+
31
+ # @todo Add more tests.
30
32
  end
31
33
 
32
34
  describe '#clear' do
@@ -53,6 +55,14 @@ module Vedeu
53
55
  end
54
56
  end
55
57
 
58
+ describe '#output' do
59
+ # @todo Add more tests.
60
+ end
61
+
62
+ describe '#read' do
63
+ # @todo Add more tests.
64
+ end
65
+
56
66
  describe '#render' do
57
67
  let(:ready) { false }
58
68
 
@@ -71,37 +71,199 @@ class VedeuMaterialColoursApp
71
71
  zindex(1)
72
72
  end
73
73
 
74
- Vedeu.interface 'empty_interface' do
75
- border 'empty_interface' do
76
- colour(foreground: '#ffffff', background: :default)
77
- title('Empty!')
78
- horizontal('-')
79
- top_right('+')
80
- top_left('+')
81
- bottom_right('+')
82
- bottom_left('+')
74
+ Vedeu.interface 'default_border' do
75
+ geometry do
76
+ x 50
77
+ y 2
78
+ height 4
79
+ width 10
83
80
  end
84
- colour(foreground: '#ffffff', background: :default)
85
- cursor!
86
- geometry 'empty_interface' do
87
- x(50)
88
- xn(64)
89
- y(5)
90
- yn(13)
81
+ colour foreground: '#ffffff', background: '#f44336'
82
+ end
83
+
84
+ Vedeu.interface 'border_off' do
85
+ geometry do
86
+ x 62
87
+ y 2
88
+ height 4
89
+ width 10
91
90
  end
92
- group :my_group
93
- zindex(1)
91
+ colour foreground: '#ffffff', background: '#e91e63'
92
+ end
93
+
94
+ Vedeu.interface 'no_top' do
95
+ geometry do
96
+ x 50
97
+ y 7
98
+ height 4
99
+ width 10
100
+ end
101
+ colour foreground: '#000000', background: '#9c27b0'
102
+ end
103
+
104
+ Vedeu.interface 'no_bottom' do
105
+ geometry do
106
+ x 62
107
+ y 7
108
+ height 4
109
+ width 10
110
+ end
111
+ colour foreground: '#000000', background: '#673ab7'
112
+ end
113
+
114
+ Vedeu.interface 'no_left' do
115
+ geometry do
116
+ x 50
117
+ y 12
118
+ height 4
119
+ width 10
120
+ end
121
+ colour foreground: '#000000', background: '#3f51b5'
122
+ end
123
+
124
+ Vedeu.interface 'no_right' do
125
+ geometry do
126
+ x 62
127
+ y 12
128
+ height 4
129
+ width 10
130
+ end
131
+ colour foreground: '#000000', background: '#2196f3'
132
+ end
133
+
134
+ Vedeu.interface 'custom_corners' do
135
+ geometry do
136
+ x 50
137
+ y 17
138
+ height 4
139
+ width 10
140
+ end
141
+ colour foreground: '#000000', background: '#03a9f4'
142
+ end
143
+
144
+ Vedeu.interface 'custom_sides' do
145
+ geometry do
146
+ x 62
147
+ y 17
148
+ height 4
149
+ width 10
150
+ end
151
+ colour foreground: '#000000', background: '#00bcd4'
152
+ end
153
+
154
+ # Borders can be defined as part of the interface definition.
155
+ Vedeu.interface 'only_top' do
156
+ border do
157
+ foreground '#ffffff'
158
+ show_right false
159
+ show_bottom false
160
+ show_left false
161
+ end
162
+ geometry do
163
+ x 50
164
+ y 22
165
+ height 4
166
+ width 10
167
+ end
168
+ colour foreground: '#ffffff', background: '#009688'
169
+ end
170
+
171
+ Vedeu.interface 'only_bottom' do
172
+ border do
173
+ foreground '#000000'
174
+ show_top false
175
+ show_right false
176
+ show_left false
177
+ end
178
+ geometry do
179
+ x 62
180
+ y 22
181
+ height 4
182
+ width 10
183
+ end
184
+ colour foreground: '#000000', background: '#8bc34a'
185
+ end
186
+
187
+ Vedeu.interface 'only_left' do
188
+ border do
189
+ foreground '#000000'
190
+ show_top false
191
+ show_bottom false
192
+ show_right false
193
+ end
194
+ geometry do
195
+ x 50
196
+ y 27
197
+ height 4
198
+ width 10
199
+ end
200
+ colour foreground: '#000000', background: '#cddc39'
201
+ end
202
+
203
+ Vedeu.interface 'only_right' do
204
+ border do
205
+ foreground '#000000'
206
+ show_top false
207
+ show_bottom false
208
+ show_left false
209
+ end
210
+ geometry do
211
+ x 62
212
+ y 27
213
+ height 4
214
+ width 10
215
+ end
216
+ colour foreground: '#000000', background: '#ffeb3b'
217
+ end
218
+
219
+ Vedeu.interface 'custom_colour' do
220
+ geometry do
221
+ x 50
222
+ y 32
223
+ height 4
224
+ width 10
225
+ end
226
+ colour foreground: '#000000', background: '#ffc107'
227
+ end
228
+
229
+ Vedeu.interface 'negative' do
230
+ geometry do
231
+ x 62
232
+ y 32
233
+ height 4
234
+ width 10
235
+ end
236
+ colour foreground: '#000000', background: '#ff9800'
237
+ style 'normal'
94
238
  end
95
239
 
96
240
  Vedeu.interface 'keys_interface' do
97
241
  colour(foreground: '#ffffff', background: :default)
98
242
  geometry 'keys_interface' do
99
243
  x(3)
100
- xn(64)
244
+ xn(45)
101
245
  y(15)
102
246
  yn(34)
103
247
  end
104
- zindex(1)
248
+ zindex(0)
249
+ end
250
+
251
+ # Borders can be defined as standalone declarations.
252
+ Vedeu.border 'no_bottom' do
253
+ foreground '#ffffff'
254
+ show_bottom false
255
+ end
256
+ Vedeu.border 'no_left' do
257
+ foreground '#ffffff'
258
+ show_left false
259
+ end
260
+ Vedeu.border 'no_right' do
261
+ foreground '#ffffff'
262
+ show_right false
263
+ end
264
+ Vedeu.border 'no_top' do
265
+ foreground '#ffffff'
266
+ show_top false
105
267
  end
106
268
 
107
269
  Vedeu.keymap('_global_') do
@@ -204,104 +366,100 @@ class VedeuMaterialColoursApp
204
366
  line { centre 'Red', width: 20, background: '#f44336' }
205
367
  end
206
368
 
207
- view 'empty_interface' do
208
- line { line '' }
209
- end
210
-
211
369
  view 'keys_interface' do
212
- cursor false
370
+ # cursor false
213
371
  line {
214
372
  stream {
215
373
  left "\u2190 \u2193 \u2191 \u2192",
216
- foreground: '#ffff00', width: 20
374
+ foreground: '#ffff00', width: 15
217
375
  }
218
376
  stream { left "Move cursor" }
219
377
  }
220
378
  line {
221
379
  stream {
222
380
  left "home",
223
- foreground: '#ffff00', width: 20
381
+ foreground: '#ffff00', width: 15
224
382
  }
225
- stream { left "Move cursor to first line of content." }
383
+ stream { left "Move cursor to first line" }
226
384
  }
227
385
  line {
228
386
  stream {
229
387
  left "end",
230
- foreground: '#ffff00', width: 20
388
+ foreground: '#ffff00', width: 15
231
389
  }
232
- stream { left "Move cursor to last line of content." }
390
+ stream { left "Move cursor to last line" }
233
391
  }
234
392
  line {}
235
393
  line {
236
394
  stream {
237
395
  left 'a, s, d, f',
238
- foreground: '#ffff00', width: 20
396
+ foreground: '#ffff00', width: 15
239
397
  }
240
- stream { left 'Move Rainbow! left, down, up, right' }
398
+ stream { left "Move Rainbow! (\u2190 \u2193 \u2191 \u2192)" }
241
399
  }
242
400
  line {
243
401
  stream {
244
402
  left 'h, j, k, l',
245
- foreground: '#ffff00', width: 20
403
+ foreground: '#ffff00', width: 15
246
404
  }
247
- stream { left 'Move Wow! left, down, up, right' }
405
+ stream { left "Move Wow! (\u2190 \u2193 \u2191 \u2192)" }
248
406
  }
249
407
  line {}
250
408
  line {
251
409
  stream {
252
410
  left 't',
253
- foreground: '#ffff00', width: 20
411
+ foreground: '#ffff00', width: 15
254
412
  }
255
413
  stream { left 'Toggle Rainbow!/Wow!' }
256
414
  }
257
415
  line {
258
416
  stream {
259
417
  left '1, 2',
260
- foreground: '#ffff00', width: 20
418
+ foreground: '#ffff00', width: 15
261
419
  }
262
420
  stream { left 'Hide/Show Rainbow!' }
263
421
  }
264
422
  line {
265
423
  stream {
266
424
  left '3, 4',
267
- foreground: '#ffff00', width: 20
425
+ foreground: '#ffff00', width: 15
268
426
  }
269
427
  stream { left 'Hide/Show Wow!' }
270
428
  }
271
429
  line {}
272
430
  line {
273
431
  stream {
274
- left 'm, n',
275
- foreground: '#ffff00', width: 20
432
+ left 'n, m',
433
+ foreground: '#ffff00', width: 15
276
434
  }
277
- stream { left 'Maximise/Unmaximise Rainbow!' }
435
+ stream { left 'Un/Maximise Rainbow!' }
278
436
  }
279
437
  line {
280
438
  stream {
281
- left 'b, v',
282
- foreground: '#ffff00', width: 20
439
+ left 'v, b',
440
+ foreground: '#ffff00', width: 15
283
441
  }
284
- stream { left 'Maximise/Unmaximise Wow!' }
442
+ stream { left 'Un/Maximise Wow!' }
285
443
  }
286
444
  line {}
287
445
  line {
288
446
  stream {
289
447
  left 'escape',
290
- foreground: '#ffff00', width: 20
448
+ foreground: '#ffff00', width: 15
291
449
  }
292
450
  stream { left 'Mode Switch' }
293
451
  }
294
452
  line {
295
453
  stream {
296
454
  left 'shift+tab',
297
- foreground: '#ffff00', width: 20
455
+ foreground: '#ffff00', width: 15
298
456
  }
299
457
  stream { left 'Focus previous view' }
300
458
  }
301
459
  line {
302
460
  stream {
303
461
  left 'tab',
304
- foreground: '#ffff00', width: 20
462
+ foreground: '#ffff00', width: 15
305
463
  }
306
464
  stream { left 'Focus next view' }
307
465
  }
@@ -309,11 +467,112 @@ class VedeuMaterialColoursApp
309
467
  line {
310
468
  stream {
311
469
  left 'q',
312
- foreground: '#ffff00', width: 20
470
+ foreground: '#ffff00', width: 15
313
471
  }
314
472
  stream { left 'Exit' }
315
473
  }
316
474
  end
475
+ view('default_border') do
476
+ border do
477
+ foreground '#ffffff'
478
+ end
479
+ lines do
480
+ line 'default'
481
+ end
482
+ end
483
+ view('border_off') do
484
+ lines do
485
+ line 'border'
486
+ line 'off'
487
+ end
488
+ end
489
+ view('no_top') do
490
+ lines do
491
+ line 'no top'
492
+ end
493
+ end
494
+ view('no_bottom') do
495
+ lines do
496
+ line 'no'
497
+ line 'bottom'
498
+ end
499
+ end
500
+ view('no_left') do
501
+ lines do
502
+ line 'no left'
503
+ end
504
+ end
505
+ view('no_right') do
506
+ lines do
507
+ line 'no right'
508
+ end
509
+ end
510
+ view('custom_corners') do
511
+ border do
512
+ foreground '#ffffff'
513
+ top_right 'B'
514
+ top_left 'A'
515
+ bottom_right 'D'
516
+ bottom_left 'C'
517
+ end
518
+ lines do
519
+ line 'custom'
520
+ line 'corners'
521
+ end
522
+ end
523
+ view('custom_sides') do
524
+ border do
525
+ background '#ff5722'
526
+ horizontal '*'
527
+ vertical '$'
528
+ end
529
+ lines do
530
+ line 'custom'
531
+ line 'sides'
532
+ end
533
+ end
534
+ view('only_top') do
535
+ lines do
536
+ line 'only'
537
+ line 'top'
538
+ end
539
+ end
540
+ view('only_bottom') do
541
+ lines do
542
+ line 'only'
543
+ line 'bottom'
544
+ end
545
+ end
546
+ view('only_left') do
547
+ lines do
548
+ line 'only'
549
+ line 'left'
550
+ end
551
+ end
552
+ view('only_right') do
553
+ lines do
554
+ line 'only'
555
+ line 'right'
556
+ end
557
+ end
558
+ view('custom_colour') do
559
+ border do
560
+ colour foreground: '#ff5500', background: '#0000ff'
561
+ end
562
+ lines do
563
+ line 'custom'
564
+ line 'color'
565
+ end
566
+ end
567
+ view('negative') do
568
+ border do
569
+ style 'negative'
570
+ end
571
+ lines do
572
+ line 'custom'
573
+ line 'style'
574
+ end
575
+ end
317
576
  end
318
577
 
319
578
  Vedeu.focus_by_name 'main_interface'