whirled_peas 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +88 -24
- data/examples/components.rb +35 -0
- data/examples/scrolling.rb +8 -19
- data/lib/whirled_peas.rb +30 -16
- data/lib/whirled_peas/command/config_command.rb +3 -2
- data/lib/whirled_peas/command/play.rb +3 -2
- data/lib/whirled_peas/command/themes.rb +3 -2
- data/lib/whirled_peas/component.rb +35 -0
- data/lib/whirled_peas/component/list_with_active.rb +88 -0
- data/lib/whirled_peas/graphics/box_painter.rb +4 -4
- data/lib/whirled_peas/graphics/composer.rb +4 -0
- data/lib/whirled_peas/graphics/container_coords.rb +24 -2
- data/lib/whirled_peas/graphics/container_painter.rb +9 -119
- data/lib/whirled_peas/graphics/debugger.rb +1 -7
- data/lib/whirled_peas/graphics/scrollbar_helper.rb +124 -0
- data/lib/whirled_peas/null_logger.rb +0 -1
- data/lib/whirled_peas/settings/container_settings.rb +12 -5
- data/lib/whirled_peas/settings/debugger.rb +1 -1
- data/lib/whirled_peas/settings/position.rb +17 -5
- data/lib/whirled_peas/version.rb +1 -1
- data/screen_test/components/list_with_active/l2r_active_color.frame +1 -0
- data/screen_test/components/list_with_active/l2r_active_color.rb +18 -0
- 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_active_color.frame +1 -0
- data/screen_test/components/list_with_active/t2b_active_color.rb +19 -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/theme.rb +1 -1
- data/screen_test/settings/{position/box_top_negative.frame → content_start/box_bottom.frame} +0 -0
- data/screen_test/settings/content_start/box_bottom.rb +17 -0
- data/screen_test/settings/{position → content_start}/box_left.frame +0 -0
- data/screen_test/settings/{position/box_top.rb → content_start/box_left.rb} +1 -1
- data/screen_test/settings/{position → content_start}/box_left_negative.frame +0 -0
- data/screen_test/settings/{position → content_start}/box_left_negative.rb +1 -1
- 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/{position → content_start}/box_top.frame +0 -0
- data/screen_test/settings/{position/box_left.rb → content_start/box_top.rb} +1 -1
- data/screen_test/settings/content_start/box_top_negative.frame +1 -0
- data/screen_test/settings/{position → content_start}/box_top_negative.rb +1 -1
- data/screen_test/settings/{position → content_start}/grid_left.frame +0 -0
- data/screen_test/settings/{position → content_start}/grid_left.rb +1 -1
- data/screen_test/settings/{position → content_start}/grid_left_negative.frame +0 -0
- data/screen_test/settings/{position → content_start}/grid_left_negative.rb +1 -1
- data/screen_test/settings/{position → content_start}/grid_top.frame +0 -0
- data/screen_test/settings/{position → content_start}/grid_top.rb +1 -1
- data/screen_test/settings/{position → content_start}/grid_top_negative.frame +0 -0
- data/screen_test/settings/{position → content_start}/grid_top_negative.rb +1 -1
- data/screen_test/settings/scroll/horiz_box.frame +1 -1
- data/screen_test/settings/scroll/horiz_box.rb +2 -4
- data/screen_test/settings/scroll/horiz_box_align_center.rb +2 -4
- data/screen_test/settings/scroll/horiz_box_align_right.rb +2 -4
- data/screen_test/settings/scroll/vert_box.frame +1 -1
- data/screen_test/settings/scroll/vert_box.rb +5 -7
- metadata +46 -18
data/lib/whirled_peas/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[97m[40m┏━━━━━━━━━━┓[0m[2;1H[97m[40m┃ ┃[0m[3;1H[97m[40m┃ ▗▄▄▄▖ ┃[0m[4;1H[97m[40m┗━━━━━━━━━━┛[0m[2;2H[97m[40mH[0m[2;3H[97m[40mI[0m[2;4H[97m[40mJ[0m[2;5H[97m[40mK[0m[2;6H[97m[40mL[0m[2;7H[97m[40mM[0m[2;8H[90m[107mN[0m[2;9H[97m[40mO[0m[2;10H[97m[40mP[0m[2;11H[97m[40mQ[0m[0m[24;1H[?25h
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.items = ITEMS
|
11
|
+
component.active_index = ITEMS.length / 2
|
12
|
+
component.viewport_size = 10
|
13
|
+
component.active_color = :gray
|
14
|
+
component.active_bg_color = :bright_white
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[97m[40m┏━━━━━━━━━━┓[0m[2;1H[97m[40m┃ ┃[0m[3;1H[97m[40m┃ ▄▄▄▄┃[0m[4;1H[97m[40m┗━━━━━━━━━━┛[0m[2;2H[97m[40mQ[0m[2;3H[97m[40mR[0m[2;4H[97m[40mS[0m[2;5H[97m[40mT[0m[2;6H[97m[40mU[0m[2;7H[97m[40mV[0m[2;8H[97m[40mW[0m[2;9H[97m[40mX[0m[2;10H[97m[40mY[0m[2;11H[97m[40mZ[0m[0m[24;1H[?25h
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.items = ITEMS
|
11
|
+
component.active_index = ITEMS.size - 1
|
12
|
+
component.viewport_size = 10
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[97m[40m┏━━━━━━━━━━┓[0m[2;1H[97m[40m┃ ┃[0m[3;1H[97m[40m┃ ▗▄▄▄▖ ┃[0m[4;1H[97m[40m┗━━━━━━━━━━┛[0m[2;2H[97m[40mH[0m[2;3H[97m[40mI[0m[2;4H[97m[40mJ[0m[2;5H[97m[40mK[0m[2;6H[97m[40mL[0m[2;7H[97m[40mM[0m[2;8H[97m[40mN[0m[2;9H[97m[40mO[0m[2;10H[97m[40mP[0m[2;11H[97m[40mQ[0m[0m[24;1H[?25h
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.items = ITEMS
|
11
|
+
component.active_index = ITEMS.length / 2
|
12
|
+
component.viewport_size = 10
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[97m[40m┏━━━━━━━━━━┓[0m[2;1H[97m[40m┃ ┃[0m[3;1H[97m[40m┃▄▄▄▖ ┃[0m[4;1H[97m[40m┗━━━━━━━━━━┛[0m[2;2H[97m[40mA[0m[2;3H[97m[40mB[0m[2;4H[97m[40mC[0m[2;5H[97m[40mD[0m[2;6H[97m[40mE[0m[2;7H[97m[40mF[0m[2;8H[97m[40mG[0m[2;9H[97m[40mH[0m[2;10H[97m[40mI[0m[2;11H[97m[40mJ[0m[0m[24;1H[?25h
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.items = ITEMS
|
11
|
+
component.active_index = 0
|
12
|
+
component.viewport_size = 10
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[97m[40m┏━━━━━━━━━━┓[0m[2;1H[97m[40m┃ ┃[0m[3;1H[97m[40m┃ ▄▖ ┃[0m[4;1H[97m[40m┗━━━━━━━━━━┛[0m[2;2H[97m[40mL[0m[2;3H[97m[40m, [0m[2;5H[97m[40mM[0m[2;6H[97m[40m, [0m[2;8H[97m[40mN[0m[2;9H[97m[40m, [0m[2;11H[97m[40mO[0m[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.items = ITEMS
|
11
|
+
component.active_index = ITEMS.length / 2
|
12
|
+
component.viewport_size = 10
|
13
|
+
component.separator = ', '
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[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[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[2;2H[97m[40mH[0m[3;2H[97m[40mI[0m[4;2H[97m[40mJ[0m[5;2H[97m[40mK[0m[6;2H[97m[40mL[0m[7;2H[97m[40mM[0m[8;2H[90m[107mN[0m[9;2H[97m[40mO[0m[10;2H[97m[40mP[0m[11;2H[97m[40mQ[0m[0m[24;1H[?25h
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.flow = :t2b
|
11
|
+
component.items = ITEMS
|
12
|
+
component.active_index = ITEMS.length / 2
|
13
|
+
component.viewport_size = 10
|
14
|
+
component.active_color = :gray
|
15
|
+
component.active_bg_color = :bright_white
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[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[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[2;2H[97m[40mQ[0m[3;2H[97m[40mR[0m[4;2H[97m[40mS[0m[5;2H[97m[40mT[0m[6;2H[97m[40mU[0m[7;2H[97m[40mV[0m[8;2H[97m[40mW[0m[9;2H[97m[40mX[0m[10;2H[97m[40mY[0m[11;2H[97m[40mZ[0m[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.flow = :t2b
|
11
|
+
component.items = ITEMS
|
12
|
+
component.active_index = ITEMS.size - 1
|
13
|
+
component.viewport_size = 10
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[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[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[2;2H[97m[40mH[0m[3;2H[97m[40mI[0m[4;2H[97m[40mJ[0m[5;2H[97m[40mK[0m[6;2H[97m[40mL[0m[7;2H[97m[40mM[0m[8;2H[97m[40mN[0m[9;2H[97m[40mO[0m[10;2H[97m[40mP[0m[11;2H[97m[40mQ[0m[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.flow = :t2b
|
11
|
+
component.items = ITEMS
|
12
|
+
component.active_index = ITEMS.length / 2
|
13
|
+
component.viewport_size = 10
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[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[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[2;2H[97m[40mA[0m[3;2H[97m[40mB[0m[4;2H[97m[40mC[0m[5;2H[97m[40mD[0m[6;2H[97m[40mE[0m[7;2H[97m[40mF[0m[8;2H[97m[40mG[0m[9;2H[97m[40mH[0m[10;2H[97m[40mI[0m[11;2H[97m[40mJ[0m[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.flow = :t2b
|
11
|
+
component.items = ITEMS
|
12
|
+
component.active_index = 0
|
13
|
+
component.viewport_size = 10
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[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[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[2;2H[97m[40mK[0m[3;2H[97m[40m-[0m[4;2H[97m[40mL[0m[5;2H[97m[40m-[0m[6;2H[97m[40mM[0m[7;2H[97m[40m-[0m[8;2H[97m[40mN[0m[9;2H[97m[40m-[0m[10;2H[97m[40mO[0m[11;2H[97m[40m-[0m[0m[24;1H[?25h
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
require 'whirled_peas/component/list_with_active'
|
3
|
+
|
4
|
+
class TemplateFactory
|
5
|
+
ITEMS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.chars
|
6
|
+
|
7
|
+
def build(*)
|
8
|
+
WhirledPeas.template(:test) do |composer, settings|
|
9
|
+
WhirledPeas.component(composer, settings, :list_with_active) do |component|
|
10
|
+
component.flow = :t2b
|
11
|
+
component.items = ITEMS
|
12
|
+
component.active_index = ITEMS.length / 2
|
13
|
+
component.viewport_size = 10
|
14
|
+
component.separator = '-'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/screen_test/settings/{position/box_top_negative.frame → content_start/box_bottom.frame}
RENAMED
File without changes
|
@@ -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.bottom = 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
|
File without changes
|
@@ -6,8 +6,8 @@ class TemplateFactory
|
|
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_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
|
File without changes
|
@@ -6,8 +6,8 @@ class TemplateFactory
|
|
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_box do |_, settings|
|
10
|
-
settings.position.left = -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[1;1H[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[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[6;6H[32m[40m┏━━━━━━━┓[0m[7;6H[32m[40m┃ ┃[0m[8;6H[32m[40m┃ ┃[0m[9;6H[32m[40m┃ ┃[0m[10;6H[32m[40m┃ ┃[0m[11;6H[32m[40m┃ ┃[0m[12;6H[32m[40m┃ ┃[0m[13;6H[32m[40m┃ ┃[0m[14;6H[32m[40m┗━━━━━━━┛[0m[7;7H[31m[40m━━━┓[0m[8;7H[31m[40m ┃[0m[9;7H[31m[40m ┃[0m[10;7H[31m[40m ┃[0m[11;7H[31m[40m ┃[0m[12;7H[31m[40m ┃[0m[13;7H[31m[40m━━━┛[0m[8;7H[97m[40m345[0m[9;7H[97m[40m344[0m[10;7H[97m[40m333[0m[11;7H[97m[40m322[0m[12;7H[97m[40m321[0m[0m[24;1H[?25h
|
@@ -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
|
File without changes
|
@@ -6,8 +6,8 @@ class TemplateFactory
|
|
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.left = 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[1;1H[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[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[6;6H[32m[40m┏━━━━━━━┓[0m[7;6H[32m[40m┃ ┃[0m[8;6H[32m[40m┃ ┃[0m[9;6H[32m[40m┃ ┃[0m[10;6H[32m[40m┃ ┃[0m[11;6H[32m[40m┃ ┃[0m[12;6H[32m[40m┃ ┃[0m[13;6H[32m[40m┃ ┃[0m[14;6H[32m[40m┗━━━━━━━┛[0m[7;7H[31m[40m┃ ┃[0m[8;7H[31m[40m┃ ┃[0m[9;7H[31m[40m┃ ┃[0m[10;7H[31m[40m┗━━━━━┛[0m[7;8H[97m[40m33333[0m[8;8H[97m[40m44322[0m[9;8H[97m[40m54321[0m[0m[24;1H[?25h
|
@@ -6,8 +6,8 @@ class TemplateFactory
|
|
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
|
File without changes
|
@@ -6,8 +6,8 @@ class TemplateFactory
|
|
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]
|
File without changes
|
@@ -6,8 +6,8 @@ class TemplateFactory
|
|
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]
|
File without changes
|
@@ -6,8 +6,8 @@ class TemplateFactory
|
|
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]
|
File without changes
|
@@ -6,8 +6,8 @@ class TemplateFactory
|
|
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;1H[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[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[1;1H[97m[40m┏━━━━━┓[0m[2;1H[97m[40m┃ ┃[0m[3;1H[97m[40m┃▗▖ ┃[0m[4;1H[97m[40m┗━━━━━┛[0m[2;2H[97m[
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[97m[40m┏━━━━━┓[0m[2;1H[97m[40m┃ ┃[0m[3;1H[97m[40m┃▗▖ ┃[0m[4;1H[97m[40m┗━━━━━┛[0m[2;2H[97m[40mEFGHI[0m[0m[24;1H[?25h
|
@@ -7,10 +7,8 @@ class TemplateFactory
|
|
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
|
@@ -8,10 +8,8 @@ class TemplateFactory
|
|
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
|
@@ -8,10 +8,8 @@ class TemplateFactory
|
|
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;1H[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[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[1;1H[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[7;1H[97m[40m┗━━┛[0m[2;2H[97m[
|
1
|
+
[?25l[1;1H[J[1;1H[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[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[1;1H[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[7;1H[97m[40m┗━━┛[0m[2;2H[97m[40mE[0m[3;2H[97m[40mF[0m[4;2H[97m[40mG[0m[5;2H[97m[40mH[0m[6;2H[97m[40mI[0m[0m[24;1H[?25h
|
@@ -7,13 +7,11 @@ class TemplateFactory
|
|
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
|