You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: split.go
    path of file: ./repos/gdlv/vendor/github.com/aarzilli/nucular
    
    the code of the file until where you have to start completion: package nucular

import (
	"github.com/aarzilli/nucular/font"
	"github.com/aarzilli/nucular/rect"
	nstyle "github.com/aarzilli/nucular/style"

	"golang.org/x/mobile/event/mouse"
)

type ScalableSplit struct {
	Size     int
	MinSize  int
	Spacing  int
	lastsize int
	resize   bool
}

func (s *ScalableSplit) Horizontal(w *Window, bounds rect.Rect) (bounds0, bounds1 rect.Rect) {
	scaling := w.Master().Style().Scaling

	var rszbounds rect.Rect
	bounds0, bounds1, rszbounds = s.horizontalnw(bounds, scaling)

	w.LayoutSpacePushScaled(rszbounds)
	rszbounds, out := w.Custom(nstyle.WidgetStateInactive)

	out.Cursor(rszbounds, font.HorizontalResizeCursor)

	if w.Input().Mouse.IsClickDownInRect(mouse.ButtonLeft, rszbounds, true)
    
func (s *ScalableSplit) verticalnw(bounds rect.Rect, scaling float64) (bounds0, bounds1, rszbounds rect.Rect) {
	if bounds.H < 0 || bounds.W < 0 {
		return
	}

	if s.lastsize == 0 {
		s.lastsize = bounds.W
	}
	if s.lastsize != bounds.W {
		diff := int(float64(bounds.W-s.lastsize) / scaling)
		s.Size += diff / 2
		s.lastsize = bounds.W
	}

	ws := int(float64(s.Spacing) * scaling)
	wt := bounds.W - ws
	var w0, w1 int
	if s.Size == 0 {
		w0 = wt / 2
		w1 = wt - w0
		s.Size = int(float64(w0) / scaling)
	} else {
		w0 = int(float64(s.Size) * scaling)
		w1 = wt - w0
	}

	minw := int(float64(s.MinSize) * scaling)
	if w1 < minw {
		w1 = minw
		w0 = wt - w1
	}
	if w0 < minw {
		w0 = minw
		w1 = wt - w0
	}

	bounds0 = bounds
	bounds0.W = w0

	rszbounds = bounds
	rszbounds.X += bounds0.W
	rszbounds.W = ws

	bounds1 = bounds
	bounds1.X = rszbounds.X + rszbounds.W
	bounds1.W = w1

	return bounds0, bounds1, rszbounds
}