whirled_peas 0.9.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -2
- data/CHANGELOG.md +21 -0
- data/README.md +9 -1053
- data/doc/application.md +92 -0
- data/doc/cli.md +115 -0
- data/doc/components.md +51 -0
- data/doc/easing.md +257 -0
- data/doc/elements.md +69 -0
- data/doc/screen_test.md +23 -0
- data/doc/settings.md +466 -0
- data/doc/template_factory.md +53 -0
- data/doc/themes.md +50 -0
- data/examples/components.rb +33 -0
- data/examples/graph.rb +1 -1
- data/examples/scrolling.rb +8 -19
- data/lib/data/themes.yaml +17 -0
- data/lib/whirled_peas.rb +31 -9
- data/lib/whirled_peas/animator/debug_consumer.rb +2 -2
- data/lib/whirled_peas/animator/easing.rb +57 -0
- data/lib/whirled_peas/animator/frameset.rb +13 -8
- data/lib/whirled_peas/animator/producer.rb +7 -8
- data/lib/whirled_peas/animator/renderer_consumer.rb +7 -5
- data/lib/whirled_peas/command/config_command.rb +3 -3
- data/lib/whirled_peas/command/frames.rb +1 -3
- data/lib/whirled_peas/command/play.rb +9 -7
- data/lib/whirled_peas/command/record.rb +1 -3
- data/lib/whirled_peas/command/still.rb +6 -2
- data/lib/whirled_peas/command/themes.rb +78 -0
- data/lib/whirled_peas/command_line.rb +3 -1
- data/lib/whirled_peas/component.rb +35 -0
- data/lib/whirled_peas/component/list_with_active.rb +88 -0
- data/lib/whirled_peas/config.rb +1 -8
- data/lib/whirled_peas/device/null_device.rb +1 -1
- data/lib/whirled_peas/device/output_file.rb +2 -2
- data/lib/whirled_peas/device/rendered_frame.rb +12 -0
- data/lib/whirled_peas/device/screen.rb +12 -8
- data/lib/whirled_peas/graphics/box_painter.rb +4 -4
- data/lib/whirled_peas/graphics/composer.rb +9 -2
- data/lib/whirled_peas/graphics/container_coords.rb +23 -25
- data/lib/whirled_peas/graphics/container_dimensions.rb +24 -0
- data/lib/whirled_peas/graphics/container_painter.rb +27 -139
- data/lib/whirled_peas/graphics/debugger.rb +2 -7
- data/lib/whirled_peas/graphics/graph_painter.rb +31 -22
- data/lib/whirled_peas/graphics/pixel_grid.rb +44 -0
- data/lib/whirled_peas/graphics/renderer.rb +4 -5
- data/lib/whirled_peas/graphics/scrollbar_helper.rb +126 -0
- data/lib/whirled_peas/null_logger.rb +0 -1
- data/lib/whirled_peas/settings/bg_color.rb +5 -1
- data/lib/whirled_peas/settings/border.rb +25 -4
- data/lib/whirled_peas/settings/color.rb +8 -4
- data/lib/whirled_peas/settings/container_settings.rb +14 -7
- data/lib/whirled_peas/settings/debugger.rb +3 -1
- data/lib/whirled_peas/settings/element_settings.rb +18 -6
- data/lib/whirled_peas/settings/graph_settings.rb +1 -1
- data/lib/whirled_peas/settings/position.rb +17 -5
- data/lib/whirled_peas/settings/text_color.rb +5 -0
- data/lib/whirled_peas/settings/text_settings.rb +1 -0
- data/lib/whirled_peas/settings/theme.rb +61 -0
- data/lib/whirled_peas/settings/theme_library.rb +69 -0
- data/lib/whirled_peas/utils/ansi.rb +4 -2
- data/lib/whirled_peas/utils/file_handler.rb +14 -9
- data/lib/whirled_peas/utils/formatted_string.rb +5 -3
- data/lib/whirled_peas/version.rb +1 -1
- data/screen_test/components/list_with_active/l2r_position_end.frame +1 -0
- data/screen_test/components/list_with_active/l2r_position_end.rb +16 -0
- data/screen_test/components/list_with_active/l2r_position_middle.frame +1 -0
- data/screen_test/components/list_with_active/l2r_position_middle.rb +16 -0
- data/screen_test/components/list_with_active/l2r_position_start.frame +1 -0
- data/screen_test/components/list_with_active/l2r_position_start.rb +16 -0
- data/screen_test/components/list_with_active/l2r_separator.frame +1 -0
- data/screen_test/components/list_with_active/l2r_separator.rb +17 -0
- data/screen_test/components/list_with_active/t2b_position_end.frame +1 -0
- data/screen_test/components/list_with_active/t2b_position_end.rb +17 -0
- data/screen_test/components/list_with_active/t2b_position_middle.frame +1 -0
- data/screen_test/components/list_with_active/t2b_position_middle.rb +17 -0
- data/screen_test/components/list_with_active/t2b_position_start.frame +1 -0
- data/screen_test/components/list_with_active/t2b_position_start.rb +17 -0
- data/screen_test/components/list_with_active/t2b_separator.frame +1 -0
- data/screen_test/components/list_with_active/t2b_separator.rb +18 -0
- data/screen_test/elements/box.frame +1 -1
- data/screen_test/elements/box.rb +1 -1
- data/screen_test/elements/graph_asc.frame +1 -0
- data/screen_test/elements/{graph.rb → graph_asc.rb} +1 -1
- data/screen_test/elements/graph_desc.frame +1 -0
- data/screen_test/elements/graph_desc.rb +12 -0
- data/screen_test/elements/graph_horiz.frame +1 -0
- data/screen_test/elements/graph_horiz.rb +12 -0
- data/screen_test/elements/graph_sin.frame +1 -0
- data/screen_test/elements/graph_sin.rb +12 -0
- data/screen_test/elements/grid.frame +1 -1
- data/screen_test/elements/grid.rb +1 -1
- data/screen_test/elements/screen_overflow_x.frame +1 -1
- data/screen_test/elements/screen_overflow_x.rb +1 -1
- data/screen_test/elements/screen_overflow_y.frame +1 -1
- data/screen_test/elements/screen_overflow_y.rb +1 -1
- data/screen_test/elements/text.frame +1 -1
- data/screen_test/elements/text.rb +1 -1
- data/screen_test/elements/text_multiline.frame +1 -1
- data/screen_test/elements/text_multiline.rb +1 -1
- data/screen_test/elements/theme.frame +1 -0
- data/screen_test/elements/theme.rb +26 -0
- data/screen_test/settings/align/box_around.frame +1 -1
- data/screen_test/settings/align/box_around.rb +1 -1
- data/screen_test/settings/align/box_between.frame +1 -1
- data/screen_test/settings/align/box_between.rb +1 -1
- data/screen_test/settings/align/box_center.frame +1 -1
- data/screen_test/settings/align/box_center.rb +1 -1
- data/screen_test/settings/align/box_default.frame +1 -1
- data/screen_test/settings/align/box_default.rb +1 -1
- data/screen_test/settings/align/box_evenly.frame +1 -1
- data/screen_test/settings/align/box_evenly.rb +1 -1
- data/screen_test/settings/align/box_left.frame +1 -1
- data/screen_test/settings/align/box_left.rb +1 -1
- data/screen_test/settings/align/box_right.frame +1 -1
- data/screen_test/settings/align/box_right.rb +1 -1
- data/screen_test/settings/align/children_center.frame +1 -1
- data/screen_test/settings/align/children_center.rb +1 -1
- data/screen_test/settings/align/children_left.frame +1 -1
- data/screen_test/settings/align/children_left.rb +1 -1
- data/screen_test/settings/align/children_right.frame +1 -1
- data/screen_test/settings/align/children_right.rb +1 -1
- data/screen_test/settings/align/grid_center.frame +1 -1
- data/screen_test/settings/align/grid_center.rb +1 -1
- data/screen_test/settings/align/grid_default.frame +1 -1
- data/screen_test/settings/align/grid_default.rb +1 -1
- data/screen_test/settings/align/grid_left.frame +1 -1
- data/screen_test/settings/align/grid_left.rb +1 -1
- data/screen_test/settings/align/grid_right.frame +1 -1
- data/screen_test/settings/align/grid_right.rb +1 -1
- data/screen_test/settings/ansi/bold.frame +1 -1
- data/screen_test/settings/ansi/bold.rb +1 -1
- data/screen_test/settings/ansi/color.frame +1 -1
- data/screen_test/settings/ansi/color.rb +1 -1
- data/screen_test/settings/ansi/underline.frame +1 -1
- data/screen_test/settings/ansi/underline.rb +1 -1
- data/screen_test/settings/border.frame +1 -1
- data/screen_test/settings/border.rb +1 -1
- data/screen_test/settings/content_start/box_bottom.frame +1 -0
- data/screen_test/settings/content_start/box_bottom.rb +17 -0
- data/screen_test/settings/content_start/box_left.frame +1 -0
- data/screen_test/settings/{position → content_start}/box_left.rb +2 -2
- data/screen_test/settings/content_start/box_left_negative.frame +1 -0
- data/screen_test/settings/{position → content_start}/box_left_negative.rb +2 -2
- data/screen_test/settings/content_start/box_right.frame +1 -0
- data/screen_test/settings/content_start/box_right.rb +17 -0
- data/screen_test/settings/content_start/box_top.frame +1 -0
- data/screen_test/settings/{position → content_start}/box_top.rb +2 -2
- data/screen_test/settings/content_start/box_top_negative.frame +1 -0
- data/screen_test/settings/{position → content_start}/box_top_negative.rb +2 -2
- data/screen_test/settings/content_start/grid_left.frame +1 -0
- data/screen_test/settings/{position → content_start}/grid_left.rb +2 -2
- data/screen_test/settings/content_start/grid_left_negative.frame +1 -0
- data/screen_test/settings/{position → content_start}/grid_left_negative.rb +2 -2
- data/screen_test/settings/content_start/grid_top.frame +1 -0
- data/screen_test/settings/{position → content_start}/grid_top.rb +2 -2
- data/screen_test/settings/content_start/grid_top_negative.frame +1 -0
- data/screen_test/settings/{position → content_start}/grid_top_negative.rb +2 -2
- data/screen_test/settings/flow/box_b2t.frame +1 -1
- data/screen_test/settings/flow/box_b2t.rb +1 -1
- data/screen_test/settings/flow/box_l2r.frame +1 -1
- data/screen_test/settings/flow/box_l2r.rb +1 -1
- data/screen_test/settings/flow/box_r2l.frame +1 -1
- data/screen_test/settings/flow/box_r2l.rb +1 -1
- data/screen_test/settings/flow/box_t2b.frame +1 -1
- data/screen_test/settings/flow/box_t2b.rb +1 -1
- data/screen_test/settings/flow/grid_b2t.frame +1 -1
- data/screen_test/settings/flow/grid_b2t.rb +1 -1
- data/screen_test/settings/flow/grid_l2r.frame +1 -1
- data/screen_test/settings/flow/grid_l2r.rb +1 -1
- data/screen_test/settings/flow/grid_r2l.frame +1 -1
- data/screen_test/settings/flow/grid_r2l.rb +1 -1
- data/screen_test/settings/flow/grid_t2b.frame +1 -1
- data/screen_test/settings/flow/grid_t2b.rb +1 -1
- data/screen_test/settings/height/box.frame +1 -1
- data/screen_test/settings/height/box.rb +1 -1
- data/screen_test/settings/height/box_border_sizing.frame +1 -1
- data/screen_test/settings/height/box_border_sizing.rb +1 -1
- data/screen_test/settings/height/grid.frame +1 -1
- data/screen_test/settings/height/grid.rb +1 -1
- data/screen_test/settings/height/overflow_box.frame +1 -1
- data/screen_test/settings/height/overflow_box.rb +1 -1
- data/screen_test/settings/height/overflow_box_l2r.frame +1 -1
- data/screen_test/settings/height/overflow_box_l2r.rb +1 -1
- data/screen_test/settings/height/overflow_box_t2b.frame +1 -1
- data/screen_test/settings/height/overflow_box_t2b.rb +1 -1
- data/screen_test/settings/height/overflow_grid.frame +1 -1
- data/screen_test/settings/height/overflow_grid.rb +1 -1
- data/screen_test/settings/margin.frame +1 -1
- data/screen_test/settings/margin.rb +1 -1
- data/screen_test/settings/padding.frame +1 -1
- data/screen_test/settings/padding.rb +1 -1
- data/screen_test/settings/scroll/horiz_box.frame +1 -1
- data/screen_test/settings/scroll/horiz_box.rb +3 -5
- data/screen_test/settings/scroll/horiz_box_align_center.rb +3 -5
- data/screen_test/settings/scroll/horiz_box_align_right.rb +3 -5
- data/screen_test/settings/scroll/vert_box.frame +1 -1
- data/screen_test/settings/scroll/vert_box.rb +6 -8
- data/screen_test/settings/title_font.frame +1 -1
- data/screen_test/settings/title_font.rb +1 -1
- data/screen_test/settings/valign/box_around.frame +1 -1
- data/screen_test/settings/valign/box_around.rb +1 -1
- data/screen_test/settings/valign/box_between.frame +1 -1
- data/screen_test/settings/valign/box_between.rb +1 -1
- data/screen_test/settings/valign/box_bottom.frame +1 -1
- data/screen_test/settings/valign/box_bottom.rb +1 -1
- data/screen_test/settings/valign/box_default.frame +1 -1
- data/screen_test/settings/valign/box_default.rb +1 -1
- data/screen_test/settings/valign/box_evenly.frame +1 -1
- data/screen_test/settings/valign/box_evenly.rb +1 -1
- data/screen_test/settings/valign/box_middle.frame +1 -1
- data/screen_test/settings/valign/box_middle.rb +1 -1
- data/screen_test/settings/valign/box_top.frame +1 -1
- data/screen_test/settings/valign/box_top.rb +1 -1
- data/screen_test/settings/valign/grid_bottom.frame +1 -1
- data/screen_test/settings/valign/grid_bottom.rb +1 -1
- data/screen_test/settings/valign/grid_default.frame +1 -1
- data/screen_test/settings/valign/grid_default.rb +1 -1
- data/screen_test/settings/valign/grid_middle.frame +1 -1
- data/screen_test/settings/valign/grid_middle.rb +1 -1
- data/screen_test/settings/valign/grid_top.frame +1 -1
- data/screen_test/settings/valign/grid_top.rb +1 -1
- data/screen_test/settings/width/box_border_sizing.frame +1 -1
- data/screen_test/settings/width/box_border_sizing.rb +1 -1
- data/screen_test/settings/width/box_content.frame +1 -1
- data/screen_test/settings/width/box_content.rb +1 -1
- data/screen_test/settings/width/box_default.frame +1 -1
- data/screen_test/settings/width/box_default.rb +1 -1
- data/screen_test/settings/width/grid.frame +1 -1
- data/screen_test/settings/width/grid.rb +1 -1
- data/screen_test/settings/width/overflow_align_center.frame +1 -1
- data/screen_test/settings/width/overflow_align_center.rb +1 -1
- data/screen_test/settings/width/overflow_align_right.frame +1 -1
- data/screen_test/settings/width/overflow_align_right.rb +1 -1
- data/screen_test/settings/width/overflow_box.frame +1 -1
- data/screen_test/settings/width/overflow_box.rb +1 -1
- data/screen_test/settings/width/overflow_box_l2r.frame +1 -1
- data/screen_test/settings/width/overflow_box_l2r.rb +1 -1
- data/screen_test/settings/width/overflow_box_t2b.frame +1 -1
- data/screen_test/settings/width/overflow_box_t2b.rb +1 -1
- data/screen_test/settings/width/overflow_grid.frame +1 -1
- data/screen_test/settings/width/overflow_grid.rb +1 -1
- data/tools/whirled_peas/tools/screen_tester.rb +20 -3
- metadata +67 -22
- data/bin/easing +0 -33
- data/lib/whirled_peas/graphics/mock_screen.rb +0 -26
- data/screen_test/elements/graph.frame +0 -1
- data/screen_test/settings/position/box_left.frame +0 -1
- data/screen_test/settings/position/box_left_negative.frame +0 -1
- data/screen_test/settings/position/box_top.frame +0 -1
- data/screen_test/settings/position/box_top_negative.frame +0 -1
- data/screen_test/settings/position/grid_left.frame +0 -1
- data/screen_test/settings/position/grid_left_negative.frame +0 -1
- data/screen_test/settings/position/grid_top.frame +0 -1
- data/screen_test/settings/position/grid_top_negative.frame +0 -1
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template(:test) do |composer, settings|
|
6
|
+
settings.set_padding(left: 5, top: 5)
|
7
|
+
composer.add_box do |composer, settings|
|
8
|
+
settings.full_border(color: :green)
|
9
|
+
settings.content_start.right = 3
|
10
|
+
composer.add_box do |_, settings|
|
11
|
+
settings.full_border(color: :red)
|
12
|
+
%w[12345 22344 33333 44322 54321].join("\n")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[97m[40m [0m[2;1H[97m[40m [0m[3;1H[97m[40m [0m[4;1H[97m[40m [0m[5;1H[97m[40m [0m[6;1H[97m[40m [0m[32m[40m┏━━━━━━━┓[0m[97m[40m [0m[7;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[8;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[9;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[10;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┏━━━━━┓[0m[32m[40m┃[0m[97m[40m [0m[11;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m12345[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[12;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m22344[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[13;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m33333[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[14;1H[97m[40m [0m[32m[40m┗━━━━━━━┛[0m[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -2,12 +2,12 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer, settings|
|
5
|
+
WhirledPeas.template(:test) do |composer, settings|
|
6
6
|
settings.set_padding(left: 5, top: 5)
|
7
7
|
composer.add_box do |composer, settings|
|
8
8
|
settings.full_border(color: :green)
|
9
|
+
settings.content_start.top = 3
|
9
10
|
composer.add_box do |_, settings|
|
10
|
-
settings.set_position(top: 3)
|
11
11
|
settings.full_border(color: :red)
|
12
12
|
%w[12345 22344 33333 44322 54321].join("\n")
|
13
13
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[97m[40m [0m[2;1H[97m[40m [0m[3;1H[97m[40m [0m[4;1H[97m[40m [0m[5;1H[97m[40m [0m[6;1H[97m[40m [0m[32m[40m┏━━━━━━━┓[0m[97m[40m [0m[7;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m33333[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[8;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m44322[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[9;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m54321[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[10;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┗━━━━━┛[0m[32m[40m┃[0m[97m[40m [0m[11;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[12;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[13;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[14;1H[97m[40m [0m[32m[40m┗━━━━━━━┛[0m[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -2,12 +2,12 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer, settings|
|
5
|
+
WhirledPeas.template(:test) do |composer, settings|
|
6
6
|
settings.set_padding(left: 5, top: 5)
|
7
7
|
composer.add_box do |composer, settings|
|
8
8
|
settings.full_border(color: :green)
|
9
|
+
settings.content_start.top = -3
|
9
10
|
composer.add_box do |_, settings|
|
10
|
-
settings.position.top = -3
|
11
11
|
settings.full_border(color: :red)
|
12
12
|
%w[12345 22344 33333 44322 54321].join("\n")
|
13
13
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[97m[40m [0m[2;1H[97m[40m [0m[3;1H[97m[40m [0m[4;1H[97m[40m [0m[5;1H[97m[40m [0m[6;1H[97m[40m [0m[32m[40m┏━━━━━━━┓[0m[97m[40m [0m[7;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┏━━━[0m[32m[40m┃[0m[97m[40m [0m[8;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┃[0m[97m[40m123[0m[32m[40m┃[0m[97m[40m [0m[9;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┣━━━[0m[32m[40m┃[0m[97m[40m [0m[10;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┃[0m[97m[40m223[0m[32m[40m┃[0m[97m[40m [0m[11;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┣━━━[0m[32m[40m┃[0m[97m[40m [0m[12;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┃[0m[97m[40m333[0m[32m[40m┃[0m[97m[40m [0m[13;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┣━━━[0m[32m[40m┃[0m[97m[40m [0m[14;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┃[0m[97m[40m443[0m[32m[40m┃[0m[97m[40m [0m[15;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┣━━━[0m[32m[40m┃[0m[97m[40m [0m[16;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┃[0m[97m[40m543[0m[32m[40m┃[0m[97m[40m [0m[17;1H[97m[40m [0m[32m[40m┃ [0m[31m[40m┗━━━[0m[32m[40m┃[0m[97m[40m [0m[18;1H[97m[40m [0m[32m[40m┗━━━━━━━┛[0m[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -2,12 +2,12 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer, settings|
|
5
|
+
WhirledPeas.template(:test) do |composer, settings|
|
6
6
|
settings.set_padding(left: 5, top: 5)
|
7
7
|
composer.add_box do |composer, settings|
|
8
8
|
settings.full_border(color: :green)
|
9
|
+
settings.content_start.left = 3
|
9
10
|
composer.add_grid do |_, settings|
|
10
|
-
settings.set_position(left: 3)
|
11
11
|
settings.full_border(color: :red)
|
12
12
|
settings.num_cols = 1
|
13
13
|
%w[12345 22344 33333 44322 54321]
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[97m[40m [0m[2;1H[97m[40m [0m[3;1H[97m[40m [0m[4;1H[97m[40m [0m[5;1H[97m[40m [0m[6;1H[97m[40m [0m[32m[40m┏━━━━━━━┓[0m[97m[40m [0m[7;1H[97m[40m [0m[32m[40m┃[0m[31m[40m━━━┓[0m[32m[40m ┃[0m[97m[40m [0m[8;1H[97m[40m [0m[32m[40m┃[0m[97m[40m345[0m[31m[40m┃[0m[32m[40m ┃[0m[97m[40m [0m[9;1H[97m[40m [0m[32m[40m┃[0m[31m[40m━━━┫[0m[32m[40m ┃[0m[97m[40m [0m[10;1H[97m[40m [0m[32m[40m┃[0m[97m[40m344[0m[31m[40m┃[0m[32m[40m ┃[0m[97m[40m [0m[11;1H[97m[40m [0m[32m[40m┃[0m[31m[40m━━━┫[0m[32m[40m ┃[0m[97m[40m [0m[12;1H[97m[40m [0m[32m[40m┃[0m[97m[40m333[0m[31m[40m┃[0m[32m[40m ┃[0m[97m[40m [0m[13;1H[97m[40m [0m[32m[40m┃[0m[31m[40m━━━┫[0m[32m[40m ┃[0m[97m[40m [0m[14;1H[97m[40m [0m[32m[40m┃[0m[97m[40m322[0m[31m[40m┃[0m[32m[40m ┃[0m[97m[40m [0m[15;1H[97m[40m [0m[32m[40m┃[0m[31m[40m━━━┫[0m[32m[40m ┃[0m[97m[40m [0m[16;1H[97m[40m [0m[32m[40m┃[0m[97m[40m321[0m[31m[40m┃[0m[32m[40m ┃[0m[97m[40m [0m[17;1H[97m[40m [0m[32m[40m┃[0m[31m[40m━━━┛[0m[32m[40m ┃[0m[97m[40m [0m[18;1H[97m[40m [0m[32m[40m┗━━━━━━━┛[0m[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -2,12 +2,12 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer, settings|
|
5
|
+
WhirledPeas.template(:test) do |composer, settings|
|
6
6
|
settings.set_padding(left: 5, top: 5)
|
7
7
|
composer.add_box do |composer, settings|
|
8
8
|
settings.full_border(color: :green)
|
9
|
+
settings.content_start.left = -3
|
9
10
|
composer.add_grid('Subject') do |_, settings|
|
10
|
-
settings.set_position(left: -3)
|
11
11
|
settings.full_border(color: :red)
|
12
12
|
settings.num_cols = 1
|
13
13
|
%w[12345 22344 33333 44322 54321]
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[97m[40m [0m[2;1H[97m[40m [0m[3;1H[97m[40m [0m[4;1H[97m[40m [0m[5;1H[97m[40m [0m[6;1H[97m[40m [0m[32m[40m┏━━━━━━━┓[0m[97m[40m [0m[7;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[8;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[9;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[10;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┏━━━━━┓[0m[32m[40m┃[0m[97m[40m [0m[11;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m12345[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[12;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┣━━━━━┫[0m[32m[40m┃[0m[97m[40m [0m[13;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m22344[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[14;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┣━━━━━┫[0m[32m[40m┃[0m[97m[40m [0m[15;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m33333[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[16;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┣━━━━━┫[0m[32m[40m┃[0m[97m[40m [0m[17;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m44322[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[18;1H[97m[40m [0m[32m[40m┗━━━━━━━┛[0m[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -2,12 +2,12 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer, settings|
|
5
|
+
WhirledPeas.template(:test) do |composer, settings|
|
6
6
|
settings.set_padding(left: 5, top: 5)
|
7
7
|
composer.add_box do |composer, settings|
|
8
8
|
settings.full_border(color: :green)
|
9
|
+
settings.content_start.top = 3
|
9
10
|
composer.add_grid do |_, settings|
|
10
|
-
settings.set_position(top: 3)
|
11
11
|
settings.full_border(color: :red)
|
12
12
|
settings.num_cols = 1
|
13
13
|
%w[12345 22344 33333 44322 54321]
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[97m[40m [0m[2;1H[97m[40m [0m[3;1H[97m[40m [0m[4;1H[97m[40m [0m[5;1H[97m[40m [0m[6;1H[97m[40m [0m[32m[40m┏━━━━━━━┓[0m[97m[40m [0m[7;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m22344[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[8;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┣━━━━━┫[0m[32m[40m┃[0m[97m[40m [0m[9;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m33333[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[10;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┣━━━━━┫[0m[32m[40m┃[0m[97m[40m [0m[11;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m44322[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[12;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┣━━━━━┫[0m[32m[40m┃[0m[97m[40m [0m[13;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┃[0m[97m[40m54321[0m[31m[40m┃[0m[32m[40m┃[0m[97m[40m [0m[14;1H[97m[40m [0m[32m[40m┃[0m[31m[40m┗━━━━━┛[0m[32m[40m┃[0m[97m[40m [0m[15;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[16;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[17;1H[97m[40m [0m[32m[40m┃ ┃[0m[97m[40m [0m[18;1H[97m[40m [0m[32m[40m┗━━━━━━━┛[0m[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -2,12 +2,12 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer, settings|
|
5
|
+
WhirledPeas.template(:test) do |composer, settings|
|
6
6
|
settings.set_padding(left: 5, top: 5)
|
7
7
|
composer.add_box do |composer, settings|
|
8
8
|
settings.full_border(color: :green)
|
9
|
+
settings.content_start.top = -3
|
9
10
|
composer.add_grid do |_, settings|
|
10
|
-
settings.set_position(top: -3)
|
11
11
|
settings.full_border(color: :red)
|
12
12
|
settings.num_cols = 1
|
13
13
|
%w[12345 22344 33333 44322 54321]
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━━━━━━━━━━━━━━━━━━━━━━┓ [0m[2;1H[97m[40m┃┏━━━━━━━━━┓ ┃ [0m[3;1H[97m[40m┃┃3. NARROW┃ ┃ [0m[4;1H[97m[40m┃┗━━━━━━━━━┛ ┃ [0m[5;1H[97m[40m┃┏━━━━━━━━━━━━━━━━━━━━━┓┃ [0m[6;1H[97m[40m┃┃ 2. WIDE ┃┃ [0m[7;1H[97m[40m┃┗━━━━━━━━━━━━━━━━━━━━━┛┃ [0m[8;1H[97m[40m┃┏━━━━━━━━━━━━━━━┓ ┃ [0m[9;1H[97m[40m┃┃ 1. MEDIUM ┃ ┃ [0m[10;1H[97m[40m┃┗━━━━━━━━━━━━━━━┛ ┃ [0m[11;1H[97m[40m┗━━━━━━━━━━━━━━━━━━━━━━━┛ [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓[0m[2;1H[97m[40m┃┏━━━━━━━━━┓┏━━━━━━━┓┏━━━━━━━━┓┃[0m[3;1H[97m[40m┃┃ ┃┃ ┃┃3. SHORT┃┃[0m[4;1H[97m[40m┃┃ ┃┃ ┃┗━━━━━━━━┛┃[0m[5;1H[97m[40m┃┃1. MEDIUM┃┃ ┃ ┃[0m[6;1H[97m[40m┃┃ ┃┃ ┃ ┃[0m[7;1H[97m[40m┃┃ ┃┃2. TALL┃ ┃[0m[8;1H[97m[40m┃┗━━━━━━━━━┛┃ ┃ ┃[0m[9;1H[97m[40m┃ ┃ ┃ ┃[0m[10;1H[97m[40m┃ ┃ ┃ ┃[0m[11;1H[97m[40m┃ ┃ ┃ ┃[0m[12;1H[97m[40m┃ ┗━━━━━━━┛ ┃[0m[13;1H[97m[40m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛[0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓[0m[2;1H[97m[40m┃┏━━━━━━━━┓┏━━━━━━━┓┏━━━━━━━━━┓┃[0m[3;1H[97m[40m┃┃3. SHORT┃┃ ┃┃ ┃┃[0m[4;1H[97m[40m┃┗━━━━━━━━┛┃ ┃┃ ┃┃[0m[5;1H[97m[40m┃ ┃ ┃┃1. MEDIUM┃┃[0m[6;1H[97m[40m┃ ┃ ┃┃ ┃┃[0m[7;1H[97m[40m┃ ┃2. TALL┃┃ ┃┃[0m[8;1H[97m[40m┃ ┃ ┃┗━━━━━━━━━┛┃[0m[9;1H[97m[40m┃ ┃ ┃ ┃[0m[10;1H[97m[40m┃ ┃ ┃ ┃[0m[11;1H[97m[40m┃ ┃ ┃ ┃[0m[12;1H[97m[40m┃ ┗━━━━━━━┛ ┃[0m[13;1H[97m[40m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛[0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━━━━━━━━━━━━━━━━━━━━━━┓ [0m[2;1H[97m[40m┃┏━━━━━━━━━━━━━━━┓ ┃ [0m[3;1H[97m[40m┃┃ 1. MEDIUM ┃ ┃ [0m[4;1H[97m[40m┃┗━━━━━━━━━━━━━━━┛ ┃ [0m[5;1H[97m[40m┃┏━━━━━━━━━━━━━━━━━━━━━┓┃ [0m[6;1H[97m[40m┃┃ 2. WIDE ┃┃ [0m[7;1H[97m[40m┃┗━━━━━━━━━━━━━━━━━━━━━┛┃ [0m[8;1H[97m[40m┃┏━━━━━━━━━┓ ┃ [0m[9;1H[97m[40m┃┃3. NARROW┃ ┃ [0m[10;1H[97m[40m┃┗━━━━━━━━━┛ ┃ [0m[11;1H[97m[40m┗━━━━━━━━━━━━━━━━━━━━━━━┛ [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━┳━━┳━━┳━━┓ [0m[2;1H[97m[40m┃3 ┃6 ┃9 ┃ ┃ [0m[3;1H[97m[40m┣━━╋━━╋━━╋━━┫ [0m[4;1H[97m[40m┃2 ┃5 ┃8 ┃ ┃ [0m[5;1H[97m[40m┣━━╋━━╋━━╋━━┫ [0m[6;1H[97m[40m┃1 ┃4 ┃7 ┃10┃ [0m[7;1H[97m[40m┗━━┻━━┻━━┻━━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━┳━━┳━━┳━━┓ [0m[2;1H[97m[40m┃1 ┃2 ┃3 ┃4 ┃ [0m[3;1H[97m[40m┣━━╋━━╋━━╋━━┫ [0m[4;1H[97m[40m┃5 ┃6 ┃7 ┃8 ┃ [0m[5;1H[97m[40m┣━━╋━━╋━━╋━━┫ [0m[6;1H[97m[40m┃9 ┃10┃ ┃ ┃ [0m[7;1H[97m[40m┗━━┻━━┻━━┻━━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━┳━━┳━━┳━━┓ [0m[2;1H[97m[40m┃4 ┃3 ┃2 ┃1 ┃ [0m[3;1H[97m[40m┣━━╋━━╋━━╋━━┫ [0m[4;1H[97m[40m┃8 ┃7 ┃6 ┃5 ┃ [0m[5;1H[97m[40m┣━━╋━━╋━━╋━━┫ [0m[6;1H[97m[40m┃ ┃ ┃10┃9 ┃ [0m[7;1H[97m[40m┗━━┻━━┻━━┻━━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━┳━━┳━━┳━━┓ [0m[2;1H[97m[40m┃1 ┃4 ┃7 ┃10┃ [0m[3;1H[97m[40m┣━━╋━━╋━━╋━━┫ [0m[4;1H[97m[40m┃2 ┃5 ┃8 ┃ ┃ [0m[5;1H[97m[40m┣━━╋━━╋━━╋━━┫ [0m[6;1H[97m[40m┃3 ┃6 ┃9 ┃ ┃ [0m[7;1H[97m[40m┗━━┻━━┻━━┻━━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━━━━┓ [0m[2;1H[97m[40m┃Multi┃ [0m[3;1H[97m[40m┃Line ┃ [0m[4;1H[97m[40m┃ ┃ [0m[5;1H[97m[40m┃ ┃ [0m[6;1H[97m[40m┃ ┃ [0m[7;1H[97m[40m┗━━━━━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━┓ [0m[2;1H[97m[40m┃ ┃ [0m[3;1H[97m[40m┃11┃ [0m[4;1H[97m[40m┃22┃ [0m[5;1H[97m[40m┃ ┃ [0m[6;1H[97m[40m┗━━┛ [0m[7;1H[97m[40m [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━┳━┳━┳━┓ [0m[2;1H[97m[40m┃0┃1┃2┃3┃ [0m[3;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[4;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[5;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[6;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[7;1H[97m[40m┣━╋━╋━╋━┫ [0m[8;1H[97m[40m┃4┃5┃6┃7┃ [0m[9;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[10;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[11;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[12;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[13;1H[97m[40m┣━╋━╋━╋━┫ [0m[14;1H[97m[40m┃8┃9┃ ┃ ┃ [0m[15;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[16;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[17;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[18;1H[97m[40m┃ ┃ ┃ ┃ ┃ [0m[19;1H[97m[40m┗━┻━┻━┻━┛ [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━┓ [0m[2;1H[97m[40m┃XO┃ [0m[3;1H[97m[40m┃XO┃ [0m[4;1H[97m[40m┃XO┃ [0m[5;1H[97m[40m┃XO┃ [0m[6;1H[97m[40m┃XO┃ [0m[7;1H[97m[40m┗━━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━━┓ [0m[2;1H[97m[40m┃000┃ [0m[3;1H[97m[40m┃111┃ [0m[4;1H[97m[40m┃222┃ [0m[5;1H[97m[40m┃333┃ [0m[6;1H[97m[40m┃444┃ [0m[7;1H[97m[40m┗━━━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━┓ [0m[2;1H[97m[40m┃XO┃ [0m[3;1H[97m[40m┃XO┃ [0m[4;1H[97m[40m┃XO┃ [0m[5;1H[97m[40m┃XO┃ [0m[6;1H[97m[40m┃XO┃ [0m[7;1H[97m[40m┗━━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━┓ [0m[2;1H[97m[40m┃0┃ [0m[3;1H[97m[40m┃1┃ [0m[4;1H[97m[40m┃2┃ [0m[5;1H[97m[40m┃3┃ [0m[6;1H[97m[40m┃4┃ [0m[7;1H[97m[40m┗━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -4,7 +4,7 @@ class TemplateFactory
|
|
4
4
|
TALL_STRING = 10.times.map(&:to_s).join("\n")
|
5
5
|
|
6
6
|
def build(*)
|
7
|
-
WhirledPeas.template do |composer|
|
7
|
+
WhirledPeas.template(:test) do |composer|
|
8
8
|
composer.add_grid('TallGrid') do |composer, settings|
|
9
9
|
settings.full_border
|
10
10
|
settings.height = 5
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━━━━━━━━━━━━━━━━━━┓ [0m[2;1H[97m[40m┃ ┃ [0m[3;1H[97m[40m┃ ┃ [0m[4;1H[97m[40m┃ ┏━━━━━━━━━┓ ┃ [0m[5;1H[97m[40m┃ ┃Inner Box┃ ┃ [0m[6;1H[97m[40m┃ ┗━━━━━━━━━┛ ┃ [0m[7;1H[97m[40m┃ ┃ [0m[8;1H[97m[40m┗━━━━━━━━━━━━━━━━━━━┛ [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━━━━━━━━━━━━━━━━━━┓ [0m[2;1H[97m[40m┃ ┃ [0m[3;1H[97m[40m┃ ┃ [0m[4;1H[97m[40m┃ Padded Room ┃ [0m[5;1H[97m[40m┃ ┃ [0m[6;1H[97m[40m┗━━━━━━━━━━━━━━━━━━━┛ [0m[7;1H[97m[40m [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━━━━┓ [0m[2;1H[97m[40m┃EFGHI┃ [0m[3;1H[97m[40m┃ ▄ ┃ [0m[4;1H[97m[40m┗━━━━━┛ [0m[5;1H[97m[40m [0m[6;1H[97m[40m [0m[7;1H[97m[40m [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -2,15 +2,13 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer|
|
5
|
+
WhirledPeas.template(:test) do |composer|
|
6
6
|
composer.add_box('Outer') do |composer, settings|
|
7
7
|
settings.full_border
|
8
8
|
settings.scrollbar.horiz = true
|
9
9
|
settings.width = 5
|
10
|
-
|
11
|
-
|
12
|
-
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
13
|
-
end
|
10
|
+
settings.content_start.left = -4
|
11
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
14
12
|
end
|
15
13
|
end
|
16
14
|
end
|
@@ -2,16 +2,14 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer|
|
5
|
+
WhirledPeas.template(:test) do |composer|
|
6
6
|
composer.add_box('Outer') do |composer, settings|
|
7
7
|
settings.full_border
|
8
8
|
settings.align = :center
|
9
9
|
settings.scrollbar.horiz = true
|
10
10
|
settings.width = 5
|
11
|
-
|
12
|
-
|
13
|
-
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
14
|
-
end
|
11
|
+
settings.content_start.left = -4
|
12
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
15
13
|
end
|
16
14
|
end
|
17
15
|
end
|
@@ -2,16 +2,14 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer|
|
5
|
+
WhirledPeas.template(:test) do |composer|
|
6
6
|
composer.add_box('Outer') do |composer, settings|
|
7
7
|
settings.full_border
|
8
8
|
settings.align = :right
|
9
9
|
settings.scrollbar.horiz = true
|
10
10
|
settings.width = 5
|
11
|
-
|
12
|
-
|
13
|
-
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
14
|
-
end
|
11
|
+
settings.content_start.left = -4
|
12
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
15
13
|
end
|
16
14
|
end
|
17
15
|
end
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[
|
1
|
+
[?25l[1;1H[J[97m[40m┏━━┓ [0m[2;1H[97m[40m┃E ┃ [0m[3;1H[97m[40m┃F▐┃ [0m[4;1H[97m[40m┃G ┃ [0m[5;1H[97m[40m┃H ┃ [0m[6;1H[97m[40m┃I ┃ [0m[7;1H[97m[40m┗━━┛ [0m[8;1H[97m[40m [0m[9;1H[97m[40m [0m[10;1H[97m[40m [0m[11;1H[97m[40m [0m[12;1H[97m[40m [0m[13;1H[97m[40m [0m[14;1H[97m[40m [0m[15;1H[97m[40m [0m[16;1H[97m[40m [0m[17;1H[97m[40m [0m[18;1H[97m[40m [0m[19;1H[97m[40m [0m[20;1H[97m[40m [0m[21;1H[97m[40m [0m[22;1H[97m[40m [0m[23;1H[97m[40m [0m[24;1H[97m[40m [0m[0m[24;1H[?25h
|
@@ -2,18 +2,16 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer|
|
5
|
+
WhirledPeas.template(:test) do |composer|
|
6
6
|
composer.add_box('Outer') do |composer, settings|
|
7
7
|
settings.full_border
|
8
8
|
settings.scrollbar.vert = true
|
9
9
|
settings.height = 5
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
10
|
+
settings.flow = :t2b
|
11
|
+
settings.content_start.top = -4
|
12
|
+
26.times.map do |i|
|
13
|
+
('A'.ord + i).chr
|
14
|
+
end.join("\n")
|
17
15
|
end
|
18
16
|
end
|
19
17
|
end
|