vedeu 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/examples/views/_interfaces.rb +127 -0
  3. data/examples/views/empty_template.rb +10 -0
  4. data/examples/views/expected/vedeu_full_screen.html +140 -0
  5. data/examples/views/expected/vedeu_full_screen.json +96050 -0
  6. data/examples/views/expected/vedeu_full_screen.out +1 -0
  7. data/examples/views/expected/vedeu_full_screen.txt +50 -0
  8. data/examples/views/expected/vedeu_line.html +140 -0
  9. data/examples/views/expected/vedeu_line.json +96050 -0
  10. data/examples/views/expected/vedeu_line.out +1 -0
  11. data/examples/views/expected/vedeu_line.txt +58 -0
  12. data/examples/views/expected/vedeu_lines.html +140 -0
  13. data/examples/views/expected/vedeu_lines.json +96050 -0
  14. data/examples/views/expected/{lines.out → vedeu_lines.out} +1 -1
  15. data/examples/views/expected/vedeu_lines_alignment.html +80 -0
  16. data/examples/views/expected/vedeu_lines_alignment.json +46370 -0
  17. data/examples/views/expected/vedeu_lines_alignment.out +1 -0
  18. data/examples/views/full_screen.rb +10 -0
  19. data/examples/views/line.rb +11 -106
  20. data/examples/views/lines.rb +8 -127
  21. data/examples/views/lines_alignment.rb +17 -125
  22. data/examples/views/runner.sh +65 -19
  23. data/lib/vedeu/borders/border.rb +6 -6
  24. data/lib/vedeu/borders/refresh.rb +4 -6
  25. data/lib/vedeu/buffers/buffer.rb +1 -1
  26. data/lib/vedeu/buffers/terminal.rb +4 -4
  27. data/lib/vedeu/buffers/view.rb +2 -2
  28. data/lib/vedeu/cells/all.rb +2 -2
  29. data/lib/vedeu/cells/border.rb +5 -0
  30. data/lib/vedeu/cells/borders/all.rb +2 -8
  31. data/lib/vedeu/cells/borders/edges/all.rb +6 -0
  32. data/lib/vedeu/cells/borders/{bottom_horizontal.rb → edges/bottom_horizontal.rb} +0 -0
  33. data/lib/vedeu/cells/borders/{left_vertical.rb → edges/left_vertical.rb} +0 -0
  34. data/lib/vedeu/cells/borders/{right_vertical.rb → edges/right_vertical.rb} +0 -0
  35. data/lib/vedeu/cells/borders/{top_horizontal.rb → edges/top_horizontal.rb} +0 -0
  36. data/lib/vedeu/cells/borders/horizontal.rb +5 -0
  37. data/lib/vedeu/cells/borders/vertical.rb +5 -0
  38. data/lib/vedeu/cells/borders/vertices/all.rb +6 -0
  39. data/lib/vedeu/cells/borders/{bottom_left.rb → vertices/bottom_left.rb} +5 -0
  40. data/lib/vedeu/cells/borders/{bottom_right.rb → vertices/bottom_right.rb} +5 -0
  41. data/lib/vedeu/cells/borders/{top_left.rb → vertices/top_left.rb} +5 -0
  42. data/lib/vedeu/cells/borders/{top_right.rb → vertices/top_right.rb} +5 -0
  43. data/lib/vedeu/cells/char.rb +16 -0
  44. data/lib/vedeu/cells/clear.rb +5 -0
  45. data/lib/vedeu/cells/cursor.rb +70 -0
  46. data/lib/vedeu/cells/empty.rb +24 -14
  47. data/lib/vedeu/cells/escape.rb +8 -7
  48. data/lib/vedeu/cells/support/all.rb +3 -0
  49. data/lib/vedeu/cells/support/html.rb +98 -0
  50. data/lib/vedeu/colours/background.rb +21 -1
  51. data/lib/vedeu/colours/colour.rb +10 -2
  52. data/lib/vedeu/colours/foreground.rb +21 -1
  53. data/lib/vedeu/colours/translator.rb +17 -24
  54. data/lib/vedeu/colours/validator.rb +9 -9
  55. data/lib/vedeu/configuration/api.rb +1 -1
  56. data/lib/vedeu/cursors/cursor.rb +5 -5
  57. data/lib/vedeu/dsl/elements.rb +22 -79
  58. data/lib/vedeu/dsl/string/text.rb +3 -3
  59. data/lib/vedeu/editor/cropper.rb +2 -2
  60. data/lib/vedeu/editor/cursor.rb +1 -1
  61. data/lib/vedeu/editor/document.rb +1 -1
  62. data/lib/vedeu/geometries/area/dimension.rb +1 -1
  63. data/lib/vedeu/geometries/position.rb +5 -2
  64. data/lib/vedeu/interfaces/clear.rb +5 -5
  65. data/lib/vedeu/models/row.rb +4 -3
  66. data/lib/vedeu/output/compressor.rb +7 -7
  67. data/lib/vedeu/output/output.rb +8 -13
  68. data/lib/vedeu/output/viewport.rb +1 -1
  69. data/lib/vedeu/presentation/background.rb +2 -2
  70. data/lib/vedeu/presentation/colour.rb +0 -4
  71. data/lib/vedeu/presentation/foreground.rb +2 -2
  72. data/lib/vedeu/presentation/style.rb +1 -1
  73. data/lib/vedeu/presentation/styles.rb +0 -3
  74. data/lib/vedeu/renderers/file.rb +10 -68
  75. data/lib/vedeu/renderers/html.rb +28 -96
  76. data/lib/vedeu/renderers/json.rb +15 -31
  77. data/lib/vedeu/renderers/options.rb +160 -14
  78. data/lib/vedeu/renderers/templates/html_renderer.vedeu +1 -0
  79. data/lib/vedeu/renderers/terminal.rb +16 -17
  80. data/lib/vedeu/renderers/text.rb +32 -41
  81. data/lib/vedeu/version.rb +1 -1
  82. data/lib/vedeu/views/all.rb +0 -2
  83. data/lib/vedeu/views/chars.rb +6 -3
  84. data/lib/vedeu/views/stream.rb +3 -2
  85. data/test/lib/vedeu/borders/caption_test.rb +17 -17
  86. data/test/lib/vedeu/borders/title_test.rb +12 -12
  87. data/test/lib/vedeu/cells/border_test.rb +6 -0
  88. data/test/lib/vedeu/cells/borders/{bottom_horizontal_test.rb → edges/bottom_horizontal_test.rb} +0 -0
  89. data/test/lib/vedeu/cells/borders/{left_vertical_test.rb → edges/left_vertical_test.rb} +0 -0
  90. data/test/lib/vedeu/cells/borders/{right_vertical_test.rb → edges/right_vertical_test.rb} +0 -0
  91. data/test/lib/vedeu/cells/borders/{top_horizontal_test.rb → edges/top_horizontal_test.rb} +0 -0
  92. data/test/lib/vedeu/cells/borders/horizontal_test.rb +6 -0
  93. data/test/lib/vedeu/cells/borders/vertical_test.rb +6 -0
  94. data/test/lib/vedeu/cells/borders/{bottom_left_test.rb → vertices/bottom_left_test.rb} +6 -0
  95. data/test/lib/vedeu/cells/borders/{bottom_right_test.rb → vertices/bottom_right_test.rb} +6 -0
  96. data/test/lib/vedeu/cells/borders/{top_left_test.rb → vertices/top_left_test.rb} +6 -0
  97. data/test/lib/vedeu/cells/borders/{top_right_test.rb → vertices/top_right_test.rb} +6 -0
  98. data/test/lib/vedeu/cells/char_test.rb +18 -0
  99. data/test/lib/vedeu/cells/clear_test.rb +6 -0
  100. data/test/lib/vedeu/cells/cursor_test.rb +113 -0
  101. data/test/lib/vedeu/cells/empty_test.rb +100 -7
  102. data/test/lib/vedeu/cells/escape_test.rb +29 -13
  103. data/test/lib/vedeu/cells/support/html_test.rb +100 -0
  104. data/test/lib/vedeu/colours/background_test.rb +35 -3
  105. data/test/lib/vedeu/colours/colour_test.rb +66 -0
  106. data/test/lib/vedeu/colours/foreground_test.rb +35 -3
  107. data/test/lib/vedeu/colours/translator_test.rb +0 -34
  108. data/test/lib/vedeu/colours/validator_test.rb +84 -6
  109. data/test/lib/vedeu/cursors/cursor_test.rb +4 -4
  110. data/test/lib/vedeu/cursors/refresh_test.rb +4 -1
  111. data/test/lib/vedeu/dsl/string/text_test.rb +36 -36
  112. data/test/lib/vedeu/editor/cropper_test.rb +15 -15
  113. data/test/lib/vedeu/geometries/position_test.rb +14 -1
  114. data/test/lib/vedeu/models/page_test.rb +10 -10
  115. data/test/lib/vedeu/models/row_test.rb +7 -7
  116. data/test/lib/vedeu/output/compressor_test.rb +63 -50
  117. data/test/lib/vedeu/renderers/file_test.rb +64 -35
  118. data/test/lib/vedeu/renderers/html_test.rb +15 -12
  119. data/test/lib/vedeu/renderers/json_test.rb +79 -56
  120. data/test/lib/vedeu/renderers/options_test.rb +74 -26
  121. data/test/lib/vedeu/renderers/terminal_test.rb +34 -4
  122. data/test/lib/vedeu/renderers/text_test.rb +35 -3
  123. data/test/lib/vedeu/views/chars_test.rb +6 -0
  124. metadata +50 -41
  125. data/examples/views/expected/line.out +0 -1
  126. data/examples/views/expected/lines_alignment.out +0 -1
  127. data/lib/vedeu/cells/html.rb +0 -21
  128. data/lib/vedeu/cells/json.rb +0 -21
  129. data/lib/vedeu/views/char.rb +0 -180
  130. data/lib/vedeu/views/html_char.rb +0 -133
  131. data/test/lib/vedeu/cells/html_test.rb +0 -15
  132. data/test/lib/vedeu/cells/json_test.rb +0 -15
  133. data/test/lib/vedeu/views/char_test.rb +0 -283
  134. data/test/lib/vedeu/views/html_char_test.rb +0 -125
@@ -0,0 +1 @@
1
+ (0l(B(0q(B Test 1 (0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0k(B(0l(B(0q(B Test 2 (0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0k(B(0x(Bview->line (align: :left)     (0x(B(0x(Bview->left                    (0x(B(0x(B view->line (align: :center)  (0x(B(0x(B         view->center         (0x(B(0x(B view->line (align: :centre)  (0x(B(0x(B         view->centre         (0x(B(0x(B    view->line (align: :right)(0x(B(0x(B                   view->right(0x(B(0m(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0j(B(0m(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0j(B`:align` option on the `line`                                   DSL method. (no width or name                                   set)                                                                                                                                                                                            (0l(B(0q(B Test 3 (0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0k(B(0l(B(0q(B Test 4 (0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0k(B(0x(Bview->lines->left 1           (0x(B(0x(B          view->lines->right 1(0x(B(0x(Bview->lines->left 2           (0x(B(0x(B          view->lines->right 2(0x(B(0x(B                              (0x(B(0x(B                              (0x(B(0m(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0j(B(0m(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0j(B                                                                                                                                                                                                                                                                                                                                (0l(B(0q(B Test 5 (0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0k(B(0l(B(0q(B Test 6 (0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0q(B(0k(B(0x(B    view->lines->centre 1     (0x(B(0x(Bv->l->left         v->l->right(0x(B(0x(B    view->lines->centre 2     (0x(B(0x(B         v->l->centre         (0x(B(0x(B                              (0x(B(0x(B                              (0x(B
@@ -9,6 +9,16 @@ class DSLApp
9
9
 
10
10
  Vedeu.configure do
11
11
  log '/tmp/vedeu_views_dsl.log'
12
+ renderers(Vedeu::Renderers::Terminal.new(
13
+ filename: '/tmp/vedeu_full_screen.out',
14
+ write_file: true),
15
+ Vedeu::Renderers::JSON.new(
16
+ filename: '/tmp/vedeu_full_screen.json'),
17
+ Vedeu::Renderers::HTML.new(
18
+ filename: '/tmp/vedeu_full_screen.html'),
19
+ Vedeu::Renderers::Text.new(
20
+ filename: '/tmp/vedeu_full_screen.txt')
21
+ )
12
22
  debug!
13
23
  run_once!
14
24
  standalone!
@@ -12,116 +12,21 @@ class DSLApp
12
12
  Vedeu.configure do
13
13
  debug!
14
14
  log '/tmp/vedeu_views_dsl.log'
15
- renderers(Vedeu::Renderers::Terminal.new,
16
- Vedeu::Renderers::File.new(filename: '/tmp/line.out'))
15
+ renderers(Vedeu::Renderers::Terminal.new(
16
+ filename: '/tmp/vedeu_line.out',
17
+ write_file: true),
18
+ Vedeu::Renderers::JSON.new(
19
+ filename: '/tmp/vedeu_line.json'),
20
+ Vedeu::Renderers::HTML.new(
21
+ filename: '/tmp/vedeu_line.html'),
22
+ Vedeu::Renderers::Text.new(
23
+ filename: '/tmp/vedeu_line.txt')
24
+ )
17
25
  run_once!
18
26
  standalone!
19
27
  end
20
28
 
21
- Vedeu.interface :test1_interface do
22
- border do
23
- title 'Test 1'
24
- end
25
- geometry do
26
- x 4
27
- y 3
28
- xn 34
29
- yn 8
30
- end
31
- end
32
-
33
- Vedeu.interface :help1_interface do
34
- geometry do
35
- x use(:test1_interface).x
36
- y use(:test1_interface).south
37
- xn use(:test1_interface).xn
38
- yn use(:test1_interface).south(3)
39
- end
40
- end
41
-
42
- Vedeu.interface :test2_interface do
43
- border do
44
- title 'Test 2'
45
- end
46
- geometry do
47
- x use(:test1_interface).east(6)
48
- y use(:test1_interface).y
49
- width use(:test1_interface).width
50
- height use(:test1_interface).height
51
- end
52
- end
53
-
54
- Vedeu.interface :help2_interface do
55
- geometry do
56
- x use(:test2_interface).x
57
- y use(:test2_interface).south
58
- xn use(:test2_interface).xn
59
- yn use(:test2_interface).south(3)
60
- end
61
- end
62
-
63
- Vedeu.interface :test3_interface do
64
- border do
65
- title 'Test 3'
66
- end
67
- geometry do
68
- x use(:help1_interface).x
69
- y use(:help1_interface).south
70
- xn use(:help1_interface).xn
71
- yn use(:help1_interface).south(5)
72
- end
73
- end
74
-
75
- Vedeu.interface :help3_interface do
76
- geometry do
77
- x use(:test3_interface).x
78
- y use(:test3_interface).south
79
- xn use(:test3_interface).xn
80
- yn use(:test3_interface).south(5)
81
- end
82
- end
83
-
84
- Vedeu.interface :test4_interface do
85
- border do
86
- title 'Test 4'
87
- end
88
- geometry do
89
- x use(:help2_interface).x
90
- y use(:help2_interface).south
91
- xn use(:help2_interface).xn
92
- yn use(:help2_interface).south(5)
93
- end
94
- end
95
-
96
- Vedeu.interface :help4_interface do
97
- geometry do
98
- x use(:test4_interface).x
99
- y use(:test4_interface).south
100
- xn use(:test4_interface).xn
101
- yn use(:test4_interface).south(5)
102
- end
103
- end
104
-
105
- Vedeu.interface :test5_interface do
106
- border do
107
- title 'Test 5'
108
- end
109
- geometry do
110
- x use(:help1_interface).x
111
- y use(:help3_interface).south
112
- xn use(:help1_interface).xn
113
- yn use(:help3_interface).south(5)
114
- end
115
- end
116
-
117
- Vedeu.interface :help5_interface do
118
- geometry do
119
- x use(:test5_interface).x
120
- y use(:test5_interface).south
121
- xn use(:test5_interface).xn
122
- yn use(:test5_interface).south(5)
123
- end
124
- end
29
+ load './_interfaces.rb'
125
30
 
126
31
  Vedeu.render do
127
32
  view(:test1_interface) do
@@ -12,137 +12,18 @@ class DSLApp
12
12
  Vedeu.configure do
13
13
  debug!
14
14
  log '/tmp/vedeu_views_dsl.log'
15
- renderers(Vedeu::Renderers::Terminal.new,
16
- Vedeu::Renderers::File.new(filename: '/tmp/lines.out'))
15
+ renderers(Vedeu::Renderers::Terminal.new(
16
+ filename: '/tmp/vedeu_lines.out',
17
+ write_file: true),
18
+ Vedeu::Renderers::JSON.new(
19
+ filename: '/tmp/vedeu_lines.json'),
20
+ Vedeu::Renderers::HTML.new(
21
+ filename: '/tmp/vedeu_lines.html'))
17
22
  run_once!
18
23
  standalone!
19
24
  end
20
25
 
21
- Vedeu.interface :test1_interface do
22
- border do
23
- title 'Test 1'
24
- end
25
- geometry do
26
- x 4
27
- y 3
28
- xn 34
29
- yn 8
30
- end
31
- end
32
-
33
- Vedeu.interface :help1_interface do
34
- geometry do
35
- x use(:test1_interface).x
36
- y use(:test1_interface).south
37
- xn use(:test1_interface).xn
38
- yn use(:test1_interface).south(3)
39
- end
40
- end
41
-
42
- Vedeu.interface :test2_interface do
43
- border do
44
- title 'Test 2'
45
- end
46
- geometry do
47
- x use(:test1_interface).east(6)
48
- y use(:test1_interface).y
49
- width use(:test1_interface).width
50
- height use(:test1_interface).height
51
- end
52
- end
53
-
54
- Vedeu.interface :help2_interface do
55
- geometry do
56
- x use(:test2_interface).x
57
- y use(:test2_interface).south
58
- xn use(:test2_interface).xn
59
- yn use(:test2_interface).south(3)
60
- end
61
- end
62
-
63
- Vedeu.interface :test3_interface do
64
- border do
65
- title 'Test 3'
66
- end
67
- geometry do
68
- x use(:help1_interface).x
69
- y use(:help1_interface).south
70
- xn use(:help1_interface).xn
71
- yn use(:help1_interface).south(5)
72
- end
73
- end
74
-
75
- Vedeu.interface :help3_interface do
76
- geometry do
77
- x use(:test3_interface).x
78
- y use(:test3_interface).south
79
- xn use(:test3_interface).xn
80
- yn use(:test3_interface).south(5)
81
- end
82
- end
83
-
84
- Vedeu.interface :test4_interface do
85
- border do
86
- title 'Test 4'
87
- end
88
- geometry do
89
- x use(:help2_interface).x
90
- y use(:help2_interface).south
91
- xn use(:help2_interface).xn
92
- yn use(:help2_interface).south(5)
93
- end
94
- end
95
-
96
- Vedeu.interface :help4_interface do
97
- geometry do
98
- x use(:test4_interface).x
99
- y use(:test4_interface).south
100
- xn use(:test4_interface).xn
101
- yn use(:test4_interface).south(5)
102
- end
103
- end
104
-
105
- Vedeu.interface :test5_interface do
106
- border do
107
- title 'Test 5'
108
- end
109
- geometry do
110
- x use(:help1_interface).x
111
- y use(:help3_interface).south
112
- xn use(:help1_interface).xn
113
- yn use(:help3_interface).south(5)
114
- end
115
- end
116
-
117
- Vedeu.interface :help5_interface do
118
- geometry do
119
- x use(:test5_interface).x
120
- y use(:test5_interface).south
121
- xn use(:test5_interface).xn
122
- yn use(:test5_interface).south(5)
123
- end
124
- end
125
-
126
- Vedeu.interface :test6_interface do
127
- border do
128
- title 'Test 6'
129
- end
130
- geometry do
131
- x use(:help4_interface).x
132
- y use(:help4_interface).south
133
- xn use(:help4_interface).xn
134
- yn use(:help4_interface).south(5)
135
- end
136
- end
137
-
138
- Vedeu.interface :help6_interface do
139
- geometry do
140
- x use(:test6_interface).x
141
- y use(:test6_interface).south
142
- xn use(:test6_interface).xn
143
- yn use(:test6_interface).south(5)
144
- end
145
- end
26
+ load './_interfaces.rb'
146
27
 
147
28
  Vedeu.render do
148
29
  view(:test1_interface) do
@@ -12,140 +12,32 @@ class DSLApp
12
12
  Vedeu.configure do
13
13
  debug!
14
14
  log '/tmp/vedeu_views_dsl.log'
15
- renderers(Vedeu::Renderers::Terminal.new,
16
- Vedeu::Renderers::File.new(filename: '/tmp/lines_alignment.out'))
15
+ renderers(Vedeu::Renderers::Terminal.new(
16
+ filename: '/tmp/vedeu_lines_alignment.out',
17
+ write_file: true),
18
+ Vedeu::Renderers::JSON.new(
19
+ filename: '/tmp/vedeu_lines_alignment.json'),
20
+ Vedeu::Renderers::HTML.new(
21
+ filename: '/tmp/vedeu_lines_alignment.html'),
22
+ Vedeu::Renderers::Text.new(
23
+ filename: '/tmp/vedeu_lines_alignment.txt')
24
+ )
17
25
  run_once!
18
26
  standalone!
19
27
  end
20
28
 
21
- Vedeu.interface :test1_interface do
22
- border do
23
- title 'Test 1'
24
- end
25
- geometry do
26
- x 4
27
- y 3
28
- xn 35
29
- yn 8
30
- end
31
- end
32
-
33
- Vedeu.interface :help1_interface do
34
- geometry do
35
- x use(:test1_interface).x
36
- y use(:test1_interface).south
37
- xn use(:test1_interface).xn
38
- yn use(:test1_interface).south(5)
39
- end
40
- end
41
-
42
- Vedeu.interface :test2_interface do
43
- border do
44
- title 'Test 2'
45
- end
46
- geometry do
47
- x use(:test1_interface).east(6)
48
- y use(:test1_interface).y
49
- width use(:test1_interface).width
50
- height use(:test1_interface).height
51
- end
52
- end
53
-
54
- Vedeu.interface :help2_interface do
55
- geometry do
56
- x use(:test2_interface).x
57
- y use(:test2_interface).south
58
- xn use(:test2_interface).xn
59
- yn use(:test2_interface).south(5)
60
- end
61
- end
62
-
63
- Vedeu.interface :test3_interface do
64
- border do
65
- title 'Test 3'
66
- end
67
- geometry do
68
- x use(:help1_interface).x
69
- y use(:help1_interface).south
70
- xn use(:help1_interface).xn
71
- yn use(:help1_interface).south(5)
72
- end
73
- end
74
-
75
- Vedeu.interface :help3_interface do
76
- geometry do
77
- x use(:test3_interface).x
78
- y use(:test3_interface).south
79
- xn use(:test3_interface).xn
80
- yn use(:test3_interface).south(5)
81
- end
82
- end
29
+ load './_interfaces.rb'
83
30
 
84
- Vedeu.interface :test4_interface do
85
- border do
86
- title 'Test 4'
87
- end
88
- geometry do
89
- x use(:help2_interface).x
90
- y use(:help2_interface).south
91
- xn use(:help2_interface).xn
92
- yn use(:help2_interface).south(5)
93
- end
94
- end
95
-
96
- Vedeu.interface :help4_interface do
97
- geometry do
98
- x use(:test4_interface).x
99
- y use(:test4_interface).south
100
- xn use(:test4_interface).xn
101
- yn use(:test4_interface).south(5)
102
- end
103
- end
104
-
105
- Vedeu.interface :test5_interface do
106
- border do
107
- title 'Test 5'
108
- end
109
- geometry do
110
- x use(:help1_interface).x
111
- y use(:help3_interface).south
112
- xn use(:help1_interface).xn
113
- yn use(:help3_interface).south(5)
114
- end
115
- end
116
-
117
- Vedeu.interface :help5_interface do
118
- geometry do
119
- x use(:test5_interface).x
120
- y use(:test5_interface).south
121
- xn use(:test5_interface).xn
122
- yn use(:test5_interface).south(5)
123
- end
124
- end
125
-
126
- Vedeu.interface :test6_interface do
127
- border do
128
- title 'Test 6'
129
- end
130
- geometry do
131
- x use(:help4_interface).x
132
- y use(:help4_interface).south
133
- xn use(:help4_interface).xn
134
- yn use(:help4_interface).south(5)
135
- end
136
- end
137
-
138
- Vedeu.interface :help6_interface do
139
- geometry do
140
- x use(:test6_interface).x
141
- y use(:test6_interface).south
142
- xn use(:test6_interface).xn
143
- yn use(:test6_interface).south(5)
144
- end
31
+ Vedeu.border :test2_interface do
32
+ background '#220022'
33
+ foreground '#00aaff'
34
+ title 'Test 2'
145
35
  end
146
36
 
147
37
  Vedeu.render do
148
38
  view(:test1_interface) do
39
+ background '#002200'
40
+ foreground '#aaff00'
149
41
  line 'view->line (align: :left)', { align: :left }
150
42
  line 'view->line (align: :center)', { align: :center }
151
43
  line 'view->line (align: :centre)', { align: :centre }