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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49ac999b75c8f827532fdfd56a33cdc5df094082
|
4
|
+
data.tar.gz: 0ce9c396da5d723b9859dd350e6549789646b9e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32b568646e20740ceedb3993f87e9fd45ea8da54eb07103ea85811e67859d981168279075b45c48104aabbce542143651b2603518b0c2e7e3f1e1c8d6244f8ae
|
7
|
+
data.tar.gz: 5d5325bf31f0f0cbdbf99726413de072aef1f2b3bf9dd6ba52fb65dc40e6e2d4744bfcfd939edace218c61ac1ed568775af8e3ed8411d44c4da0006e6224a151
|
data/TODO.md
ADDED
data/docs/dsl.md
CHANGED
@@ -113,7 +113,7 @@ end
|
|
113
113
|
|
114
114
|
### Creating a new named geometry
|
115
115
|
|
116
|
-
{include:Vedeu::DSL::Geometry::ClassMethods
|
116
|
+
{include:Vedeu::DSL::Geometry::ClassMethods#geometry}
|
117
117
|
|
118
118
|
### Setting the interface dimensions
|
119
119
|
|
@@ -150,7 +150,6 @@ end
|
|
150
150
|
## Keymaps
|
151
151
|
|
152
152
|
{include:Vedeu::Input::DSL}
|
153
|
-
{include:Vedeu::Input::DSL#name}
|
154
153
|
|
155
154
|
### Creating a new named group
|
156
155
|
|
@@ -161,7 +160,6 @@ end
|
|
161
160
|
{include:Vedeu::Menus::DSL}
|
162
161
|
{include:Vedeu::Menus::DSL#item}
|
163
162
|
{include:Vedeu::Menus::DSL#items}
|
164
|
-
{include:Vedeu::Menus::DSL#name}
|
165
163
|
|
166
164
|
### Creating a new named menu
|
167
165
|
|
@@ -180,14 +178,6 @@ end
|
|
180
178
|
|
181
179
|
{include:Vedeu::DSL::Views.views}
|
182
180
|
|
183
|
-
### Specifying view content
|
184
|
-
|
185
|
-
{include:Vedeu::DSL::Line}
|
186
|
-
{include:Vedeu::DSL::Line#line}
|
187
|
-
{include:Vedeu::DSL::Line#streams}
|
188
|
-
|
189
|
-
`@todo` More documentation coming soon.
|
190
|
-
|
191
181
|
#### Authors Notes
|
192
182
|
|
193
183
|
The Rubydoc documentation has more specific information about the DSL
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
### align_bottom
|
2
|
+
|
3
|
+
Providing the optional 'height' will set the interface height,
|
4
|
+
overriding any previous or calculated value for 'height'.
|
5
|
+
|
6
|
+
Aligning the view with the bottom of the terminal:
|
7
|
+
|
8
|
+
# Vedeu.geometry :my_interface do
|
9
|
+
align_bottom
|
10
|
+
|
11
|
+
# ...
|
12
|
+
# end
|
13
|
+
|
14
|
+
or...
|
15
|
+
|
16
|
+
# Vedeu.interface :my_interface do
|
17
|
+
# geometry do
|
18
|
+
align_bottom
|
19
|
+
|
20
|
+
# ...
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
|
24
|
+
Align this view with the bottom of the terminal and setting the
|
25
|
+
height to 20 rows/lines:
|
26
|
+
|
27
|
+
# Vedeu.geometry :my_interface do
|
28
|
+
align_bottom 20
|
29
|
+
|
30
|
+
# ...
|
31
|
+
# end
|
32
|
+
|
33
|
+
or...
|
34
|
+
|
35
|
+
# Vedeu.interface :my_interface do
|
36
|
+
# geometry do
|
37
|
+
align_bottom 20
|
38
|
+
|
39
|
+
# end
|
40
|
+
# end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
### align_centre
|
2
|
+
|
3
|
+
Providing the optional 'width' will set the interface width,
|
4
|
+
overriding any previous or calculated value for 'width'.
|
5
|
+
|
6
|
+
Aligning the view centrally within the terminal:
|
7
|
+
|
8
|
+
# Vedeu.geometry :my_interface do
|
9
|
+
align_centre
|
10
|
+
|
11
|
+
# ...
|
12
|
+
# end
|
13
|
+
|
14
|
+
or...
|
15
|
+
|
16
|
+
# Vedeu.interface :my_interface do
|
17
|
+
# geometry do
|
18
|
+
align_centre
|
19
|
+
|
20
|
+
# ...
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
|
24
|
+
Align this view centrally within the terminal and setting the
|
25
|
+
width to 20 columns/chars:
|
26
|
+
|
27
|
+
# Vedeu.geometry :my_interface do
|
28
|
+
align_centre 20
|
29
|
+
|
30
|
+
# ...
|
31
|
+
# end
|
32
|
+
|
33
|
+
or...
|
34
|
+
|
35
|
+
# Vedeu.interface :my_interface do
|
36
|
+
# geometry do
|
37
|
+
align_centre 20
|
38
|
+
|
39
|
+
# end
|
40
|
+
# end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
### align_left
|
2
|
+
|
3
|
+
Providing the optional 'width' will set the interface width,
|
4
|
+
overriding any previous or calculated value for 'width'.
|
5
|
+
|
6
|
+
Aligning the view to the left within the terminal:
|
7
|
+
|
8
|
+
# Vedeu.geometry :my_interface do
|
9
|
+
align_left
|
10
|
+
|
11
|
+
# ...
|
12
|
+
# end
|
13
|
+
|
14
|
+
or...
|
15
|
+
|
16
|
+
# Vedeu.interface :my_interface do
|
17
|
+
# geometry do
|
18
|
+
align_left
|
19
|
+
|
20
|
+
# ...
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
|
24
|
+
Align this view to the left within the terminal and setting the
|
25
|
+
width to 20 columns/chars:
|
26
|
+
|
27
|
+
# Vedeu.geometry :my_interface do
|
28
|
+
align_left 20
|
29
|
+
|
30
|
+
# ...
|
31
|
+
# end
|
32
|
+
|
33
|
+
or...
|
34
|
+
|
35
|
+
# Vedeu.interface :my_interface do
|
36
|
+
# geometry do
|
37
|
+
align_left 20
|
38
|
+
|
39
|
+
# end
|
40
|
+
# end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
### align_middle
|
2
|
+
|
3
|
+
Providing the optional 'height' will set the interface height,
|
4
|
+
overriding any previous or calculated value for 'height'.
|
5
|
+
|
6
|
+
Aligning the view in the vertical centre of the terminal:
|
7
|
+
|
8
|
+
# Vedeu.geometry :my_interface do
|
9
|
+
align_middle
|
10
|
+
|
11
|
+
# ...
|
12
|
+
# end
|
13
|
+
|
14
|
+
or...
|
15
|
+
|
16
|
+
# Vedeu.interface :my_interface do
|
17
|
+
# geometry do
|
18
|
+
align_middle
|
19
|
+
|
20
|
+
# ...
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
|
24
|
+
Align this view in the vertical centre of the terminal and setting the
|
25
|
+
height to 20 rows/lines:
|
26
|
+
|
27
|
+
# Vedeu.geometry :my_interface do
|
28
|
+
align_middle 20
|
29
|
+
|
30
|
+
# ...
|
31
|
+
# end
|
32
|
+
|
33
|
+
or...
|
34
|
+
|
35
|
+
# Vedeu.interface :my_interface do
|
36
|
+
# geometry do
|
37
|
+
align_middle 20
|
38
|
+
|
39
|
+
# end
|
40
|
+
# end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
### align_right
|
2
|
+
|
3
|
+
Providing the optional 'width' will set the interface width,
|
4
|
+
overriding any previous or calculated value for 'width'.
|
5
|
+
|
6
|
+
Aligning the view to the right within the terminal:
|
7
|
+
|
8
|
+
# Vedeu.geometry :my_interface do
|
9
|
+
align_right
|
10
|
+
|
11
|
+
# ...
|
12
|
+
# end
|
13
|
+
|
14
|
+
or...
|
15
|
+
|
16
|
+
# Vedeu.interface :my_interface do
|
17
|
+
# geometry do
|
18
|
+
align_right
|
19
|
+
|
20
|
+
# ...
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
|
24
|
+
Align this view to the right within the terminal and setting the
|
25
|
+
width to 20 columns/chars:
|
26
|
+
|
27
|
+
# Vedeu.geometry :my_interface do
|
28
|
+
align_right 20
|
29
|
+
|
30
|
+
# ...
|
31
|
+
# end
|
32
|
+
|
33
|
+
or...
|
34
|
+
|
35
|
+
# Vedeu.interface :my_interface do
|
36
|
+
# geometry do
|
37
|
+
align_right 20
|
38
|
+
|
39
|
+
# end
|
40
|
+
# end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
### align_top
|
2
|
+
|
3
|
+
Providing the optional 'height' will set the interface height,
|
4
|
+
overriding any previous or calculated value for 'height'.
|
5
|
+
|
6
|
+
Aligning the view with the top of the terminal:
|
7
|
+
|
8
|
+
# Vedeu.geometry :my_interface do
|
9
|
+
align_top
|
10
|
+
|
11
|
+
# ...
|
12
|
+
# end
|
13
|
+
|
14
|
+
or...
|
15
|
+
|
16
|
+
# Vedeu.interface :my_interface do
|
17
|
+
# geometry do
|
18
|
+
align_top
|
19
|
+
|
20
|
+
# ...
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
|
24
|
+
Align this view with the top of the terminal and setting the
|
25
|
+
height to 20 rows/lines:
|
26
|
+
|
27
|
+
# Vedeu.geometry :my_interface do
|
28
|
+
align_top 20
|
29
|
+
|
30
|
+
# ...
|
31
|
+
# end
|
32
|
+
|
33
|
+
or...
|
34
|
+
|
35
|
+
# Vedeu.interface :my_interface do
|
36
|
+
# geometry do
|
37
|
+
align_top 20
|
38
|
+
|
39
|
+
# end
|
40
|
+
# end
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
@@ -0,0 +1 @@
|
|
1
|
+
@todo Add more documentation.
|
@@ -1 +1,31 @@
|
|
1
|
-
|
1
|
+
### Vedeu.renders
|
2
|
+
|
3
|
+
Also aliased as `Vedeu.render`.
|
4
|
+
|
5
|
+
Directly write a view buffer to the terminal. Using this method means
|
6
|
+
that the refresh event does not need to be triggered after creating
|
7
|
+
the views, though can be later triggered when needed.
|
8
|
+
|
9
|
+
Multiple views can be rendered inside a `renders` block as the example
|
10
|
+
below shows:
|
11
|
+
|
12
|
+
Vedeu.renders do
|
13
|
+
view :some_interface do
|
14
|
+
# line do
|
15
|
+
# stream do
|
16
|
+
# left 'Title goes here', width: 35
|
17
|
+
# end
|
18
|
+
# stream do
|
19
|
+
# right Time.now.strftime('%H:%m'), width: 7
|
20
|
+
# end
|
21
|
+
# end
|
22
|
+
end
|
23
|
+
|
24
|
+
view :other_interface do
|
25
|
+
# lines do
|
26
|
+
# line 'This is content for the main interface.'
|
27
|
+
# line ''
|
28
|
+
# line 'Pretty easy eh?'
|
29
|
+
# end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
### `view`
|
2
|
+
|
3
|
+
Used within a `Vedeu.renders` or `Vedeu.views` block, the `view` DSL
|
4
|
+
method defines a view for the named interface.
|
5
|
+
|
6
|
+
# Vedeu.renders do
|
7
|
+
view :my_interface do
|
8
|
+
# ...
|
9
|
+
end
|
10
|
+
|
11
|
+
view :other_interface do
|
12
|
+
# ...
|
13
|
+
end
|
14
|
+
# end
|
15
|
+
|
16
|
+
or
|
17
|
+
|
18
|
+
# Vedeu.views do
|
19
|
+
view :my_interface do
|
20
|
+
# ...
|
21
|
+
end
|
22
|
+
|
23
|
+
view :other_interface do
|
24
|
+
# ...
|
25
|
+
end
|
26
|
+
# end
|
data/docs/dsl/by_method/views.md
CHANGED
@@ -1 +1,32 @@
|
|
1
|
-
|
1
|
+
### Vedeu.views
|
2
|
+
|
3
|
+
Define a view (content) for an interface.
|
4
|
+
|
5
|
+
The views declared within this block are stored in their respective
|
6
|
+
interface back buffers until a refresh event occurs. When the refresh
|
7
|
+
event is triggered, the back buffers are swapped into the front
|
8
|
+
buffers and the content here will be rendered.
|
9
|
+
|
10
|
+
Multiple views can be rendered inside a `views` block as the example
|
11
|
+
below shows:
|
12
|
+
|
13
|
+
Vedeu.views do
|
14
|
+
# view :some_interface do
|
15
|
+
# line do
|
16
|
+
# stream do
|
17
|
+
# left 'Title goes here', width: 35
|
18
|
+
# end
|
19
|
+
# stream do
|
20
|
+
# right Time.now.strftime('%H:%m'), width: 7
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
# end
|
24
|
+
|
25
|
+
# view :other_interface do
|
26
|
+
# lines do
|
27
|
+
# line 'This is content for the main interface.'
|
28
|
+
# line ''
|
29
|
+
# line 'Pretty easy eh?'
|
30
|
+
# end
|
31
|
+
# end
|
32
|
+
end
|