MCPcopy
hub / github.com/mum4k/termdash / SplitHorizontal

Function SplitHorizontal

container/options.go:416–432  ·  view source on GitHub ↗

SplitHorizontal splits the container along the horizontal axis into two sub containers. The use of this option removes any widget placed at this container, containers with sub containers cannot contain widgets.

(t TopOption, b BottomOption, opts ...SplitOption)

Source from the content-addressed store, hash-verified

414// containers. The use of this option removes any widget placed at this
415// container, containers with sub containers cannot contain widgets.
416func SplitHorizontal(t TopOption, b BottomOption, opts ...SplitOption) Option {
417 return option(func(c *Container) error {
418 c.opts.split = splitTypeHorizontal
419 c.opts.widget = nil
420 for _, opt := range opts {
421 if err := opt.setSplit(c.opts); err != nil {
422 return err
423 }
424 }
425
426 if err := c.createFirst(t.tOpts()); err != nil {
427 return err
428 }
429
430 return c.createSecond(b.bOpts())
431 })
432}
433
434// ID sets an identifier for this container.
435// This ID can be later used to perform dynamic layout changes by passing new

Callers 15

buildFunction · 0.92
newDashboardTabFunction · 0.92
newControlsTabFunction · 0.92
newVisualizeTabFunction · 0.92
newExplorerTabFunction · 0.92
stackPreviewRowsFunction · 0.92
explorerBorderFXPreviewFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
buildLayoutFunction · 0.92
buildLayoutFunction · 0.92

Calls 6

createFirstMethod · 0.80
createSecondMethod · 0.80
optionFuncType · 0.70
setSplitMethod · 0.65
tOptsMethod · 0.65
bOptsMethod · 0.65

Tested by 10

newModalTestContainerFunction · 0.74
TestRootFunction · 0.68
ExampleFunction · 0.68
TestNewFunction · 0.68
TestKeyboardFunction · 0.68
TestMouseFunction · 0.68
TestUpdateFunction · 0.68
TestPointContFunction · 0.68
TestDrawWidgetFunction · 0.68