whirled_peas 0.4.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +38 -0
- data/README.md +450 -103
- data/Rakefile +28 -3
- data/examples/intro.rb +52 -0
- data/examples/scrolling.rb +53 -0
- data/lib/whirled_peas.rb +4 -8
- data/lib/whirled_peas/command_line.rb +44 -55
- data/lib/whirled_peas/errors.rb +2 -0
- data/lib/whirled_peas/frame.rb +0 -1
- data/lib/whirled_peas/frame/consumer.rb +30 -0
- data/lib/whirled_peas/frame/debug_consumer.rb +30 -0
- data/lib/whirled_peas/frame/event_loop.rb +28 -29
- data/lib/whirled_peas/frame/producer.rb +11 -5
- data/lib/whirled_peas/graphics.rb +19 -0
- data/lib/whirled_peas/graphics/box_painter.rb +101 -0
- data/lib/whirled_peas/graphics/canvas.rb +118 -0
- data/lib/whirled_peas/graphics/composer.rb +80 -0
- data/lib/whirled_peas/graphics/container_coords.rb +72 -0
- data/lib/whirled_peas/graphics/container_dimensions.rb +93 -0
- data/lib/whirled_peas/graphics/container_painter.rb +272 -0
- data/lib/whirled_peas/graphics/debugger.rb +52 -0
- data/lib/whirled_peas/graphics/grid_painter.rb +69 -0
- data/lib/whirled_peas/graphics/mock_screen.rb +26 -0
- data/lib/whirled_peas/graphics/painter.rb +23 -0
- data/lib/whirled_peas/graphics/renderer.rb +26 -0
- data/lib/whirled_peas/graphics/screen.rb +70 -0
- data/lib/whirled_peas/graphics/text_dimensions.rb +15 -0
- data/lib/whirled_peas/graphics/text_painter.rb +40 -0
- data/lib/whirled_peas/settings.rb +5 -0
- data/lib/whirled_peas/settings/alignment.rb +24 -0
- data/lib/whirled_peas/settings/bg_color.rb +24 -0
- data/lib/whirled_peas/settings/border.rb +101 -0
- data/lib/whirled_peas/settings/box_settings.rb +8 -0
- data/lib/whirled_peas/settings/color.rb +68 -0
- data/lib/whirled_peas/settings/container_settings.rb +223 -0
- data/lib/whirled_peas/settings/debugger.rb +96 -0
- data/lib/whirled_peas/settings/display_flow.rb +27 -0
- data/lib/whirled_peas/settings/element_settings.rb +61 -0
- data/lib/whirled_peas/settings/grid_settings.rb +19 -0
- data/lib/whirled_peas/settings/margin.rb +8 -0
- data/lib/whirled_peas/settings/padding.rb +8 -0
- data/lib/whirled_peas/settings/position.rb +15 -0
- data/lib/whirled_peas/settings/scrollbar.rb +15 -0
- data/lib/whirled_peas/settings/sizing.rb +19 -0
- data/lib/whirled_peas/settings/spacing.rb +58 -0
- data/lib/whirled_peas/settings/text_color.rb +21 -0
- data/lib/whirled_peas/settings/text_settings.rb +15 -0
- data/lib/whirled_peas/settings/vert_alignment.rb +24 -0
- data/lib/whirled_peas/utils/ansi.rb +6 -56
- data/lib/whirled_peas/utils/formatted_string.rb +64 -0
- data/lib/whirled_peas/utils/title_font.rb +1 -1
- data/lib/whirled_peas/version.rb +1 -1
- data/screen_test/elements/box.frame +1 -0
- data/screen_test/elements/box.rb +20 -0
- data/screen_test/elements/grid.frame +1 -0
- data/screen_test/elements/grid.rb +13 -0
- data/screen_test/elements/screen_overflow_x.frame +1 -0
- data/screen_test/elements/screen_overflow_x.rb +9 -0
- data/screen_test/elements/screen_overflow_y.frame +1 -0
- data/screen_test/elements/screen_overflow_y.rb +9 -0
- data/screen_test/elements/text.frame +1 -0
- data/screen_test/elements/text.rb +9 -0
- data/screen_test/elements/text_multiline.frame +1 -0
- data/screen_test/elements/text_multiline.rb +9 -0
- data/screen_test/settings/align/box_around.frame +1 -0
- data/screen_test/settings/align/box_around.rb +16 -0
- data/screen_test/settings/align/box_between.frame +1 -0
- data/screen_test/settings/align/box_between.rb +16 -0
- data/screen_test/settings/align/box_center.frame +1 -0
- data/screen_test/settings/align/box_center.rb +21 -0
- data/screen_test/settings/align/box_default.frame +1 -0
- data/screen_test/settings/align/box_default.rb +20 -0
- data/screen_test/settings/align/box_evenly.frame +1 -0
- data/screen_test/settings/align/box_evenly.rb +16 -0
- data/screen_test/settings/align/box_left.frame +1 -0
- data/screen_test/settings/align/box_left.rb +21 -0
- data/screen_test/settings/align/box_right.frame +1 -0
- data/screen_test/settings/align/box_right.rb +21 -0
- data/screen_test/settings/align/children_center.frame +1 -0
- data/screen_test/settings/align/children_center.rb +15 -0
- data/screen_test/settings/align/children_left.frame +1 -0
- data/screen_test/settings/align/children_left.rb +15 -0
- data/screen_test/settings/align/children_right.frame +1 -0
- data/screen_test/settings/align/children_right.rb +15 -0
- data/screen_test/settings/align/grid_center.frame +1 -0
- data/screen_test/settings/align/grid_center.rb +18 -0
- data/screen_test/settings/align/grid_default.frame +1 -0
- data/screen_test/settings/align/grid_default.rb +17 -0
- data/screen_test/settings/align/grid_left.frame +1 -0
- data/screen_test/settings/align/grid_left.rb +18 -0
- data/screen_test/settings/align/grid_right.frame +1 -0
- data/screen_test/settings/align/grid_right.rb +18 -0
- data/screen_test/settings/ansi/bold.frame +1 -0
- data/screen_test/settings/ansi/bold.rb +14 -0
- data/screen_test/settings/ansi/color.frame +1 -0
- data/screen_test/settings/ansi/color.rb +37 -0
- data/screen_test/settings/ansi/underline.frame +1 -0
- data/screen_test/settings/ansi/underline.rb +14 -0
- data/screen_test/settings/border.frame +1 -0
- data/screen_test/settings/border.rb +13 -0
- data/screen_test/settings/flow/box_b2t.frame +1 -0
- data/screen_test/settings/flow/box_b2t.rb +26 -0
- data/screen_test/settings/flow/box_l2r.frame +1 -0
- data/screen_test/settings/flow/box_l2r.rb +26 -0
- data/screen_test/settings/flow/box_r2l.frame +1 -0
- data/screen_test/settings/flow/box_r2l.rb +26 -0
- data/screen_test/settings/flow/box_t2b.frame +1 -0
- data/screen_test/settings/flow/box_t2b.rb +26 -0
- data/screen_test/settings/flow/grid_b2t.frame +1 -0
- data/screen_test/settings/flow/grid_b2t.rb +14 -0
- data/screen_test/settings/flow/grid_l2r.frame +1 -0
- data/screen_test/settings/flow/grid_l2r.rb +14 -0
- data/screen_test/settings/flow/grid_r2l.frame +1 -0
- data/screen_test/settings/flow/grid_r2l.rb +14 -0
- data/screen_test/settings/flow/grid_t2b.frame +1 -0
- data/screen_test/settings/flow/grid_t2b.rb +14 -0
- data/screen_test/settings/height/box.frame +1 -0
- data/screen_test/settings/height/box.rb +13 -0
- data/screen_test/settings/height/box_border_sizing.frame +1 -0
- data/screen_test/settings/height/box_border_sizing.rb +15 -0
- data/screen_test/settings/height/grid.frame +1 -0
- data/screen_test/settings/height/grid.rb +14 -0
- data/screen_test/settings/height/overflow_box.frame +1 -0
- data/screen_test/settings/height/overflow_box.rb +13 -0
- data/screen_test/settings/height/overflow_box_l2r.frame +1 -0
- data/screen_test/settings/height/overflow_box_l2r.rb +17 -0
- data/screen_test/settings/height/overflow_box_t2b.frame +1 -0
- data/screen_test/settings/height/overflow_box_t2b.rb +16 -0
- data/screen_test/settings/height/overflow_grid.frame +1 -0
- data/screen_test/settings/height/overflow_grid.rb +16 -0
- data/screen_test/settings/margin.frame +1 -0
- data/screen_test/settings/margin.rb +16 -0
- data/screen_test/settings/padding.frame +1 -0
- data/screen_test/settings/padding.rb +13 -0
- data/screen_test/settings/position/box_left.frame +1 -0
- data/screen_test/settings/position/box_left.rb +17 -0
- data/screen_test/settings/position/box_left_negative.frame +1 -0
- data/screen_test/settings/position/box_left_negative.rb +17 -0
- data/screen_test/settings/position/box_top.frame +1 -0
- data/screen_test/settings/position/box_top.rb +17 -0
- data/screen_test/settings/position/box_top_negative.frame +1 -0
- data/screen_test/settings/position/box_top_negative.rb +17 -0
- data/screen_test/settings/position/grid_left.frame +1 -0
- data/screen_test/settings/position/grid_left.rb +18 -0
- data/screen_test/settings/position/grid_left_negative.frame +1 -0
- data/screen_test/settings/position/grid_left_negative.rb +18 -0
- data/screen_test/settings/position/grid_top.frame +1 -0
- data/screen_test/settings/position/grid_top.rb +18 -0
- data/screen_test/settings/position/grid_top_negative.frame +1 -0
- data/screen_test/settings/position/grid_top_negative.rb +18 -0
- data/screen_test/settings/scroll/horiz_box.frame +1 -0
- data/screen_test/settings/scroll/horiz_box.rb +17 -0
- data/screen_test/settings/scroll/horiz_box_align_center.rb +18 -0
- data/screen_test/settings/scroll/horiz_box_align_right.rb +18 -0
- data/screen_test/settings/scroll/vert_box.frame +1 -0
- data/screen_test/settings/scroll/vert_box.rb +20 -0
- data/screen_test/settings/title_font.frame +1 -0
- data/screen_test/settings/title_font.rb +12 -0
- data/screen_test/settings/valign/box_around.frame +1 -0
- data/screen_test/settings/valign/box_around.rb +17 -0
- data/screen_test/settings/valign/box_between.frame +1 -0
- data/screen_test/settings/valign/box_between.rb +17 -0
- data/screen_test/settings/valign/box_bottom.frame +1 -0
- data/screen_test/settings/valign/box_bottom.rb +17 -0
- data/screen_test/settings/valign/box_default.frame +1 -0
- data/screen_test/settings/valign/box_default.rb +16 -0
- data/screen_test/settings/valign/box_evenly.frame +1 -0
- data/screen_test/settings/valign/box_evenly.rb +17 -0
- data/screen_test/settings/valign/box_middle.frame +1 -0
- data/screen_test/settings/valign/box_middle.rb +17 -0
- data/screen_test/settings/valign/box_top.frame +1 -0
- data/screen_test/settings/valign/box_top.rb +17 -0
- data/screen_test/settings/valign/grid_bottom.frame +1 -0
- data/screen_test/settings/valign/grid_bottom.rb +15 -0
- data/screen_test/settings/valign/grid_default.frame +1 -0
- data/screen_test/settings/valign/grid_default.rb +14 -0
- data/screen_test/settings/valign/grid_middle.frame +1 -0
- data/screen_test/settings/valign/grid_middle.rb +15 -0
- data/screen_test/settings/valign/grid_top.frame +1 -0
- data/screen_test/settings/valign/grid_top.rb +15 -0
- data/screen_test/settings/width/box_border_sizing.frame +1 -0
- data/screen_test/settings/width/box_border_sizing.rb +15 -0
- data/screen_test/settings/width/box_content.frame +1 -0
- data/screen_test/settings/width/box_content.rb +15 -0
- data/screen_test/settings/width/box_default.frame +1 -0
- data/screen_test/settings/width/box_default.rb +14 -0
- data/screen_test/settings/width/grid.frame +1 -0
- data/screen_test/settings/width/grid.rb +14 -0
- data/screen_test/settings/width/overflow_align_center.frame +1 -0
- data/screen_test/settings/width/overflow_align_center.rb +14 -0
- data/screen_test/settings/width/overflow_align_right.frame +1 -0
- data/screen_test/settings/width/overflow_align_right.rb +14 -0
- data/screen_test/settings/width/overflow_box.frame +1 -0
- data/screen_test/settings/width/overflow_box.rb +13 -0
- data/screen_test/settings/width/overflow_box_l2r.frame +1 -0
- data/screen_test/settings/width/overflow_box_l2r.rb +16 -0
- data/screen_test/settings/width/overflow_box_t2b.frame +1 -0
- data/screen_test/settings/width/overflow_box_t2b.rb +17 -0
- data/screen_test/settings/width/overflow_grid.frame +1 -0
- data/screen_test/settings/width/overflow_grid.rb +14 -0
- data/tools/whirled_peas/tools/screen_tester.rb +233 -0
- metadata +191 -12
- data/bin/title_fonts +0 -6
- data/lib/whirled_peas/frame/print_consumer.rb +0 -33
- data/lib/whirled_peas/template.rb +0 -5
- data/lib/whirled_peas/template/element.rb +0 -230
- data/lib/whirled_peas/template/settings.rb +0 -530
- data/lib/whirled_peas/ui.rb +0 -5
- data/lib/whirled_peas/ui/canvas.rb +0 -68
- data/lib/whirled_peas/ui/painter.rb +0 -287
- data/lib/whirled_peas/ui/screen.rb +0 -63
- data/lib/whirled_peas/utils/color.rb +0 -101
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┗━┛[2;2H0[3;2H1[4;2H2[5;2H3[6;2H4[0m[24;1H[?25h
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
TALL_STRING = 10.times.map(&:to_s).join("\n")
|
5
|
+
|
6
|
+
def build(*)
|
7
|
+
WhirledPeas.template do |composer|
|
8
|
+
composer.add_grid('TallGrid') do |composer, settings|
|
9
|
+
settings.full_border
|
10
|
+
settings.height = 5
|
11
|
+
settings.num_cols = 1
|
12
|
+
composer.add_text { TALL_STRING }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┗━━━━━━━━━━━━━━━━━━━┛[4;7H┏━━━━━━━━━┓[5;7H┃ ┃[6;7H┗━━━━━━━━━┛[5;8HInner Box[0m[24;1H[?25h
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.full_border
|
8
|
+
composer.add_box do |_, settings|
|
9
|
+
settings.set_margin(left: 5, top: 2, right: 3, bottom: 1)
|
10
|
+
settings.full_border
|
11
|
+
'Inner Box'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┗━━━━━━━━━━━━━━━━━━━┛[4;7HPadded Room[0m[24;1H[?25h
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |_, settings|
|
7
|
+
settings.full_border
|
8
|
+
settings.set_padding(left: 5, top: 2, right: 3, bottom: 1)
|
9
|
+
"Padded Room"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[6;6H[32m┏━━━━━━━┓[0m[7;6H[32m┃ ┃[0m[8;6H[32m┃ ┃[0m[9;6H[32m┃ ┃[0m[10;6H[32m┃ ┃[0m[11;6H[32m┃ ┃[0m[12;6H[32m┃ ┃[0m[13;6H[32m┃ ┃[0m[14;6H[32m┗━━━━━━━┛[0m[7;10H[31m┏━━━[0m[8;10H[31m┃ [0m[9;10H[31m┃ [0m[10;10H[31m┃ [0m[11;10H[31m┃ [0m[12;10H[31m┃ [0m[13;10H[31m┗━━━[0m[8;11H123[9;11H223[10;11H333[11;11H443[12;11H543[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template 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
|
+
composer.add_box do |_, settings|
|
10
|
+
settings.position.left = 3
|
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[6;6H[32m┏━━━━━━━┓[0m[7;6H[32m┃ ┃[0m[8;6H[32m┃ ┃[0m[9;6H[32m┃ ┃[0m[10;6H[32m┃ ┃[0m[11;6H[32m┃ ┃[0m[12;6H[32m┃ ┃[0m[13;6H[32m┃ ┃[0m[14;6H[32m┗━━━━━━━┛[0m[7;7H[31m━━━┓[0m[8;7H[31m ┃[0m[9;7H[31m ┃[0m[10;7H[31m ┃[0m[11;7H[31m ┃[0m[12;7H[31m ┃[0m[13;7H[31m━━━┛[0m[8;7H345[9;7H344[10;7H333[11;7H322[12;7H321[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template 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
|
+
composer.add_box do |_, settings|
|
10
|
+
settings.position.left = -3
|
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[6;6H[32m┏━━━━━━━┓[0m[7;6H[32m┃ ┃[0m[8;6H[32m┃ ┃[0m[9;6H[32m┃ ┃[0m[10;6H[32m┃ ┃[0m[11;6H[32m┃ ┃[0m[12;6H[32m┃ ┃[0m[13;6H[32m┃ ┃[0m[14;6H[32m┗━━━━━━━┛[0m[10;7H[31m┏━━━━━┓[0m[11;7H[31m┃ ┃[0m[12;7H[31m┃ ┃[0m[13;7H[31m┃ ┃[0m[11;8H12345[12;8H22344[13;8H33333[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template 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
|
+
composer.add_box do |_, settings|
|
10
|
+
settings.set_position(top: 3)
|
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[6;6H[32m┏━━━━━━━┓[0m[7;6H[32m┃ ┃[0m[8;6H[32m┃ ┃[0m[9;6H[32m┃ ┃[0m[10;6H[32m┃ ┃[0m[11;6H[32m┃ ┃[0m[12;6H[32m┃ ┃[0m[13;6H[32m┃ ┃[0m[14;6H[32m┗━━━━━━━┛[0m[7;7H[31m┃ ┃[0m[8;7H[31m┃ ┃[0m[9;7H[31m┃ ┃[0m[10;7H[31m┗━━━━━┛[0m[7;8H33333[8;8H44322[9;8H54321[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template 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
|
+
composer.add_box do |_, settings|
|
10
|
+
settings.position.top = -3
|
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[6;6H[32m┏━━━━━━━┓[0m[7;6H[32m┃ ┃[0m[8;6H[32m┃ ┃[0m[9;6H[32m┃ ┃[0m[10;6H[32m┃ ┃[0m[11;6H[32m┃ ┃[0m[12;6H[32m┃ ┃[0m[13;6H[32m┃ ┃[0m[14;6H[32m┃ ┃[0m[15;6H[32m┃ ┃[0m[16;6H[32m┃ ┃[0m[17;6H[32m┃ ┃[0m[18;6H[32m┗━━━━━━━┛[0m[7;10H[31m┏━━━[0m[8;10H[31m┃ [0m[9;10H[31m┣━━━[0m[10;10H[31m┃ [0m[11;10H[31m┣━━━[0m[12;10H[31m┃ [0m[13;10H[31m┣━━━[0m[14;10H[31m┃ [0m[15;10H[31m┣━━━[0m[16;10H[31m┃ [0m[17;10H[31m┗━━━[0m[8;11H123[10;11H223[12;11H333[14;11H443[16;11H543[0m[24;1H[?25h
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template 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
|
+
composer.add_grid do |_, settings|
|
10
|
+
settings.set_position(left: 3)
|
11
|
+
settings.full_border(color: :red)
|
12
|
+
settings.num_cols = 1
|
13
|
+
%w[12345 22344 33333 44322 54321]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[6;6H[32m┏━━━━━━━┓[0m[7;6H[32m┃ ┃[0m[8;6H[32m┃ ┃[0m[9;6H[32m┃ ┃[0m[10;6H[32m┃ ┃[0m[11;6H[32m┃ ┃[0m[12;6H[32m┃ ┃[0m[13;6H[32m┃ ┃[0m[14;6H[32m┃ ┃[0m[15;6H[32m┃ ┃[0m[16;6H[32m┃ ┃[0m[17;6H[32m┃ ┃[0m[18;6H[32m┗━━━━━━━┛[0m[7;7H[31m━━━┓[0m[8;7H[31m ┃[0m[9;7H[31m━━━┫[0m[10;7H[31m ┃[0m[11;7H[31m━━━┫[0m[12;7H[31m ┃[0m[13;7H[31m━━━┫[0m[14;7H[31m ┃[0m[15;7H[31m━━━┫[0m[16;7H[31m ┃[0m[17;7H[31m━━━┛[0m[8;7H345[10;7H344[12;7H333[14;7H322[16;7H321[0m[24;1H[?25h
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template 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
|
+
composer.add_grid('Subject') do |_, settings|
|
10
|
+
settings.set_position(left: -3)
|
11
|
+
settings.full_border(color: :red)
|
12
|
+
settings.num_cols = 1
|
13
|
+
%w[12345 22344 33333 44322 54321]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[6;6H[32m┏━━━━━━━┓[0m[7;6H[32m┃ ┃[0m[8;6H[32m┃ ┃[0m[9;6H[32m┃ ┃[0m[10;6H[32m┃ ┃[0m[11;6H[32m┃ ┃[0m[12;6H[32m┃ ┃[0m[13;6H[32m┃ ┃[0m[14;6H[32m┃ ┃[0m[15;6H[32m┃ ┃[0m[16;6H[32m┃ ┃[0m[17;6H[32m┃ ┃[0m[18;6H[32m┗━━━━━━━┛[0m[10;7H[31m┏━━━━━┓[0m[11;7H[31m┃ ┃[0m[12;7H[31m┣━━━━━┫[0m[13;7H[31m┃ ┃[0m[14;7H[31m┣━━━━━┫[0m[15;7H[31m┃ ┃[0m[16;7H[31m┣━━━━━┫[0m[17;7H[31m┃ ┃[0m[11;8H12345[13;8H22344[15;8H33333[17;8H44322[0m[24;1H[?25h
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template 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
|
+
composer.add_grid do |_, settings|
|
10
|
+
settings.set_position(top: 3)
|
11
|
+
settings.full_border(color: :red)
|
12
|
+
settings.num_cols = 1
|
13
|
+
%w[12345 22344 33333 44322 54321]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[6;6H[32m┏━━━━━━━┓[0m[7;6H[32m┃ ┃[0m[8;6H[32m┃ ┃[0m[9;6H[32m┃ ┃[0m[10;6H[32m┃ ┃[0m[11;6H[32m┃ ┃[0m[12;6H[32m┃ ┃[0m[13;6H[32m┃ ┃[0m[14;6H[32m┃ ┃[0m[15;6H[32m┃ ┃[0m[16;6H[32m┃ ┃[0m[17;6H[32m┃ ┃[0m[18;6H[32m┗━━━━━━━┛[0m[7;7H[31m┃ ┃[0m[8;7H[31m┣━━━━━┫[0m[9;7H[31m┃ ┃[0m[10;7H[31m┣━━━━━┫[0m[11;7H[31m┃ ┃[0m[12;7H[31m┣━━━━━┫[0m[13;7H[31m┃ ┃[0m[14;7H[31m┗━━━━━┛[0m[7;8H22344[9;8H33333[11;8H44322[13;8H54321[0m[24;1H[?25h
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template 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
|
+
composer.add_grid do |_, settings|
|
10
|
+
settings.set_position(top: -3)
|
11
|
+
settings.full_border(color: :red)
|
12
|
+
settings.num_cols = 1
|
13
|
+
%w[12345 22344 33333 44322 54321]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━┓[2;1H┃ ┃[3;1H┃▗▖ ┃[4;1H┗━━━━━┛[2;2HEFGHI[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box('Outer') do |composer, settings|
|
7
|
+
settings.full_border
|
8
|
+
settings.scrollbar.horiz = true
|
9
|
+
settings.width = 5
|
10
|
+
composer.add_box('Inner') do |composer, settings|
|
11
|
+
settings.set_position(left: -4)
|
12
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box('Outer') do |composer, settings|
|
7
|
+
settings.full_border
|
8
|
+
settings.align = :center
|
9
|
+
settings.scrollbar.horiz = true
|
10
|
+
settings.width = 5
|
11
|
+
composer.add_box('Inner') do |composer, settings|
|
12
|
+
settings.set_position(left: -4)
|
13
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box('Outer') do |composer, settings|
|
7
|
+
settings.full_border
|
8
|
+
settings.align = :right
|
9
|
+
settings.scrollbar.horiz = true
|
10
|
+
settings.width = 5
|
11
|
+
composer.add_box('Inner') do |composer, settings|
|
12
|
+
settings.set_position(left: -4)
|
13
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━┓[2;1H┃ ▗┃[3;1H┃ ▝┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┗━━┛[2;2HE[3;2HF[4;2HG[5;2HH[6;2HI[0m[24;1H[?25h
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box('Outer') do |composer, settings|
|
7
|
+
settings.full_border
|
8
|
+
settings.scrollbar.vert = true
|
9
|
+
settings.height = 5
|
10
|
+
composer.add_box('Inner') do |composer, settings|
|
11
|
+
settings.flow = :t2b
|
12
|
+
settings.set_position(top: -4)
|
13
|
+
26.times do |i|
|
14
|
+
composer.add_text { ('A'.ord + i).chr }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H██╗ ██╗██╗██╗[2;1H██║ ██║██║██║[3;1H███████║██║██║[4;1H██╔══██║██║╚═╝[5;1H██║ ██║██║██╗[6;1H╚═╝ ╚═╝╚═╝╚═╝[0m[24;1H[?25h
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┃ ┃[9;1H┃ ┃[10;1H┃ ┃[11;1H┃ ┃[12;1H┃ ┃[13;1H┃ ┃[14;1H┃ ┃[15;1H┃ ┃[16;1H┃ ┃[17;1H┗━┛[4;2HA[9;2HB[14;2HC[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :t2b
|
8
|
+
settings.full_border
|
9
|
+
settings.valign = :around
|
10
|
+
settings.height = 15
|
11
|
+
composer.add_text { 'A' }
|
12
|
+
composer.add_text { 'B' }
|
13
|
+
composer.add_text { 'C' }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┃ ┃[9;1H┃ ┃[10;1H┃ ┃[11;1H┃ ┃[12;1H┃ ┃[13;1H┃ ┃[14;1H┃ ┃[15;1H┃ ┃[16;1H┃ ┃[17;1H┗━┛[2;2HA[9;2HB[16;2HC[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :t2b
|
8
|
+
settings.full_border
|
9
|
+
settings.valign = :between
|
10
|
+
settings.height = 15
|
11
|
+
composer.add_text { 'A' }
|
12
|
+
composer.add_text { 'B' }
|
13
|
+
composer.add_text { 'C' }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┃ ┃[9;1H┃ ┃[10;1H┃ ┃[11;1H┃ ┃[12;1H┃ ┃[13;1H┃ ┃[14;1H┃ ┃[15;1H┃ ┃[16;1H┃ ┃[17;1H┗━┛[14;2HA[15;2HB[16;2HC[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :t2b
|
8
|
+
settings.full_border
|
9
|
+
settings.valign = :bottom
|
10
|
+
settings.height = 15
|
11
|
+
composer.add_text { 'A' }
|
12
|
+
composer.add_text { 'B' }
|
13
|
+
composer.add_text { 'C' }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┃ ┃[9;1H┃ ┃[10;1H┃ ┃[11;1H┃ ┃[12;1H┃ ┃[13;1H┃ ┃[14;1H┃ ┃[15;1H┃ ┃[16;1H┃ ┃[17;1H┗━┛[2;2HA[3;2HB[4;2HC[0m[24;1H[?25h
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :t2b
|
8
|
+
settings.full_border
|
9
|
+
settings.height = 15
|
10
|
+
composer.add_text { 'A' }
|
11
|
+
composer.add_text { 'B' }
|
12
|
+
composer.add_text { 'C' }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┃ ┃[9;1H┃ ┃[10;1H┃ ┃[11;1H┃ ┃[12;1H┃ ┃[13;1H┃ ┃[14;1H┃ ┃[15;1H┃ ┃[16;1H┃ ┃[17;1H┗━┛[5;2HA[9;2HB[13;2HC[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :t2b
|
8
|
+
settings.full_border
|
9
|
+
settings.valign = :evenly
|
10
|
+
settings.height = 15
|
11
|
+
composer.add_text { 'A' }
|
12
|
+
composer.add_text { 'B' }
|
13
|
+
composer.add_text { 'C' }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|