vedeu 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/TODO.md +8 -0
- data/docs/dsl/by_method/buffer_update.md +3 -1
- data/docs/dsl/by_method/buffer_write.md +3 -1
- data/docs/dsl/by_method/cursor.md +3 -1
- data/docs/dsl/by_method/cursors.md +3 -1
- data/docs/dsl/by_method/direct_write.md +3 -1
- data/docs/dsl/by_method/log_stderr.md +4 -1
- data/docs/dsl/by_method/log_stdout.md +4 -1
- data/docs/dsl/by_method/log_timestamp.md +7 -1
- data/docs/dsl/by_method/render_output.md +3 -1
- data/docs/events/by_name/{geometry_down.md → aliases/geometry_down.md} +0 -0
- data/docs/events/by_name/{geometry_left.md → aliases/geometry_left.md} +0 -0
- data/docs/events/by_name/{geometry_right.md → aliases/geometry_right.md} +0 -0
- data/docs/events/by_name/{geometry_up.md → aliases/geometry_up.md} +0 -0
- data/docs/events/by_name/cursor_down.md +5 -0
- data/docs/events/by_name/cursor_left.md +3 -0
- data/docs/events/by_name/cursor_origin.md +3 -0
- data/docs/events/by_name/cursor_right.md +5 -0
- data/docs/events/by_name/cursor_top.md +3 -0
- data/docs/events/by_name/cursor_up.md +3 -0
- data/docs/events/by_name/hide_cursor.md +6 -1
- data/docs/events/by_name/maximise.md +2 -3
- data/docs/events/by_name/show_cursor.md +6 -1
- data/docs/events/by_name/unmaximise.md +5 -3
- data/docs/events/by_name/view_down.md +8 -0
- data/docs/events/by_name/view_left.md +8 -0
- data/docs/events/by_name/view_right.md +8 -0
- data/docs/events/by_name/view_up.md +8 -0
- data/docs/events/document.md +2 -1
- data/docs/events/focus.md +2 -1
- data/docs/events/menu.md +2 -1
- data/docs/events/movement.md +2 -1
- data/docs/events/refresh.md +2 -1
- data/docs/events/view.md +2 -1
- data/docs/events/visibility.md +2 -1
- data/examples/dsl_horizontal_alignment.rb +1 -1
- data/examples/dsl_vertical_alignment.rb +1 -1
- data/integrations/dsl_app_border_001.rb +63 -0
- data/integrations/dsl_app_border_002.rb +63 -0
- data/integrations/dsl_app_border_003.rb +63 -0
- data/integrations/dsl_app_border_004.rb +63 -0
- data/integrations/dsl_app_border_005.rb +63 -0
- data/integrations/expected/dsl_app_border_001.out +1 -0
- data/integrations/expected/dsl_app_border_002.out +1 -0
- data/integrations/expected/dsl_app_border_003.out +1 -0
- data/integrations/expected/dsl_app_border_004.out +1 -0
- data/integrations/expected/dsl_app_border_005.out +1 -0
- data/integrations/test_runner.sh +7 -0
- data/lib/vedeu.rb +2 -1
- data/lib/vedeu/borders/repository.rb +1 -5
- data/lib/vedeu/cursors/cursor.rb +29 -70
- data/lib/vedeu/cursors/move.rb +11 -4
- data/lib/vedeu/cursors/reposition.rb +2 -2
- data/lib/vedeu/cursors/repository.rb +7 -12
- data/lib/vedeu/dsl/elements.rb +0 -1
- data/lib/vedeu/error.rb +17 -5
- data/lib/vedeu/geometries/dsl/dsl.rb +2 -28
- data/lib/vedeu/geometries/dsl/grid.rb +2 -0
- data/lib/vedeu/geometries/geometry.rb +2 -22
- data/lib/vedeu/geometries/move.rb +45 -10
- data/lib/vedeu/geometries/repository.rb +0 -20
- data/lib/vedeu/input/capture.rb +2 -1
- data/lib/vedeu/logging/log.rb +25 -25
- data/lib/vedeu/renderers/file.rb +0 -5
- data/lib/vedeu/renderers/json.rb +1 -1
- data/lib/vedeu/renderers/options.rb +3 -1
- data/lib/vedeu/renderers/text.rb +0 -7
- data/lib/vedeu/runtime/bootstrap.rb +1 -1
- data/lib/vedeu/runtime/launcher.rb +8 -5
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/application/application_controller_test.rb +2 -4
- data/test/lib/vedeu/cursors/cursor_test.rb +9 -12
- data/test/lib/vedeu/cursors/move_test.rb +7 -3
- data/test/lib/vedeu/geometries/move_test.rb +22 -9
- data/test/lib/vedeu/interfaces/interface_test.rb +71 -73
- data/test/lib/vedeu/logging/log_test.rb +1 -1
- data/test/lib/vedeu/runtime/launcher_test.rb +5 -4
- data/test/support/examples/material_colours_app.rb +59 -8
- data/test/test_helper.rb +1 -0
- metadata +16 -6
@@ -27,6 +27,20 @@ class VedeuMaterialColoursApp
|
|
27
27
|
Vedeu::Renderers::File.new(filename: '/tmp/material_colours.out'))
|
28
28
|
end
|
29
29
|
|
30
|
+
class CursorView
|
31
|
+
def render
|
32
|
+
Vedeu.render do
|
33
|
+
view('cursor') do
|
34
|
+
line "#{cursor_position}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def cursor_position
|
40
|
+
Vedeu.trigger(:_cursor_position_, Vedeu.focus)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
30
44
|
# Borders can be defined as standalone declarations.
|
31
45
|
Vedeu.border 'no_bottom' do
|
32
46
|
background '#000000'
|
@@ -270,11 +284,32 @@ class VedeuMaterialColoursApp
|
|
270
284
|
zindex(0)
|
271
285
|
end
|
272
286
|
|
287
|
+
Vedeu.interface 'cursor' do
|
288
|
+
geometry do
|
289
|
+
x 2
|
290
|
+
y 36
|
291
|
+
height 1
|
292
|
+
width 80
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
273
296
|
Vedeu.keymap('_global_') do
|
274
|
-
key(:up)
|
275
|
-
|
276
|
-
|
277
|
-
|
297
|
+
key(:up) do
|
298
|
+
Vedeu.trigger(:_cursor_up_);
|
299
|
+
CursorView.new.render
|
300
|
+
end
|
301
|
+
key(:right) do
|
302
|
+
Vedeu.trigger(:_cursor_right_)
|
303
|
+
CursorView.new.render
|
304
|
+
end
|
305
|
+
key(:down) do
|
306
|
+
Vedeu.trigger(:_cursor_down_)
|
307
|
+
CursorView.new.render
|
308
|
+
end
|
309
|
+
key(:left) do
|
310
|
+
Vedeu.trigger(:_cursor_left_)
|
311
|
+
CursorView.new.render
|
312
|
+
end
|
278
313
|
key(:home) { Vedeu.trigger(:_cursor_top_) }
|
279
314
|
key(:end) { Vedeu.trigger(:_cursor_bottom_) }
|
280
315
|
|
@@ -298,10 +333,26 @@ class VedeuMaterialColoursApp
|
|
298
333
|
key('3') { Vedeu.trigger(:_hide_interface_, 'other_interface') }
|
299
334
|
key('4') { Vedeu.trigger(:_show_interface_, 'other_interface') }
|
300
335
|
|
301
|
-
key('a')
|
302
|
-
|
303
|
-
|
304
|
-
|
336
|
+
key('a') do
|
337
|
+
Vedeu.trigger(:_view_left_, 'main_interface')
|
338
|
+
|
339
|
+
CursorView.new.render
|
340
|
+
end
|
341
|
+
key('s') do
|
342
|
+
Vedeu.trigger(:_view_down_, 'main_interface')
|
343
|
+
|
344
|
+
CursorView.new.render
|
345
|
+
end
|
346
|
+
key('d') do
|
347
|
+
Vedeu.trigger(:_view_up_, 'main_interface')
|
348
|
+
|
349
|
+
CursorView.new.render
|
350
|
+
end
|
351
|
+
key('f') do
|
352
|
+
Vedeu.trigger(:_view_right_, 'main_interface')
|
353
|
+
|
354
|
+
CursorView.new.render
|
355
|
+
end
|
305
356
|
|
306
357
|
key('w') { Vedeu.trigger(:_toggle_group_, :my_group) }
|
307
358
|
key('e') { Vedeu.trigger(:_hide_group_, :my_group) }
|
data/test/test_helper.rb
CHANGED
@@ -35,6 +35,7 @@ if ENV['SIMPLECOV'].to_i == 1 || ENV['CONSOLE_COVERAGE'].to_i == 1
|
|
35
35
|
add_group 'renderers', 'vedeu/renderers'
|
36
36
|
add_group 'repositories', 'vedeu/repositories'
|
37
37
|
add_group 'runtime', 'vedeu/runtime'
|
38
|
+
add_group 'support', 'vedeu/support'
|
38
39
|
add_group 'templating', 'vedeu/templating'
|
39
40
|
add_group 'terminal', 'vedeu/terminal'
|
40
41
|
add_group 'views', 'vedeu/views'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vedeu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Laking
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -372,6 +372,10 @@ files:
|
|
372
372
|
- docs/events.md
|
373
373
|
- docs/events/application.md
|
374
374
|
- docs/events/by_name/action.md
|
375
|
+
- docs/events/by_name/aliases/geometry_down.md
|
376
|
+
- docs/events/by_name/aliases/geometry_left.md
|
377
|
+
- docs/events/by_name/aliases/geometry_right.md
|
378
|
+
- docs/events/by_name/aliases/geometry_up.md
|
375
379
|
- docs/events/by_name/cleanup.md
|
376
380
|
- docs/events/by_name/clear.md
|
377
381
|
- docs/events/by_name/clear_group.md
|
@@ -411,10 +415,6 @@ files:
|
|
411
415
|
- docs/events/by_name/focus_by_name.md
|
412
416
|
- docs/events/by_name/focus_next.md
|
413
417
|
- docs/events/by_name/focus_prev.md
|
414
|
-
- docs/events/by_name/geometry_down.md
|
415
|
-
- docs/events/by_name/geometry_left.md
|
416
|
-
- docs/events/by_name/geometry_right.md
|
417
|
-
- docs/events/by_name/geometry_up.md
|
418
418
|
- docs/events/by_name/goto.md
|
419
419
|
- docs/events/by_name/hide_cursor.md
|
420
420
|
- docs/events/by_name/hide_group.md
|
@@ -521,6 +521,11 @@ files:
|
|
521
521
|
- integrations/dsl_app_020.rb
|
522
522
|
- integrations/dsl_app_021.rb
|
523
523
|
- integrations/dsl_app_022.rb
|
524
|
+
- integrations/dsl_app_border_001.rb
|
525
|
+
- integrations/dsl_app_border_002.rb
|
526
|
+
- integrations/dsl_app_border_003.rb
|
527
|
+
- integrations/dsl_app_border_004.rb
|
528
|
+
- integrations/dsl_app_border_005.rb
|
524
529
|
- integrations/expected/342_streams.out
|
525
530
|
- integrations/expected/dsl_app_001.out
|
526
531
|
- integrations/expected/dsl_app_002.out
|
@@ -540,6 +545,11 @@ files:
|
|
540
545
|
- integrations/expected/dsl_app_016.out
|
541
546
|
- integrations/expected/dsl_app_021.out
|
542
547
|
- integrations/expected/dsl_app_022.out
|
548
|
+
- integrations/expected/dsl_app_border_001.out
|
549
|
+
- integrations/expected/dsl_app_border_002.out
|
550
|
+
- integrations/expected/dsl_app_border_003.out
|
551
|
+
- integrations/expected/dsl_app_border_004.out
|
552
|
+
- integrations/expected/dsl_app_border_005.out
|
543
553
|
- integrations/support/test_interface.rb
|
544
554
|
- integrations/support/test_interface_021.rb
|
545
555
|
- integrations/support/test_interface_022.rb
|