<commit_before>// +build !windows,!darwin

// 23 february 2014

package ui

import (
	"unsafe"
)

// #include "gtk_unix.h"
import "C"

type container struct {
	*controlSingleWidget
	container *C.GtkContainer
}

type sizing struct {
	sizingbase

	// for size calculations
	// gtk+ needs nothing

	// for the actual resizing
	// gtk+ needs nothing
}

func newContainer() *container {
	c := new(container)
	c.controlSingleWidget = newControlSingleWidget(C.newContainer(unsafe.Pointer(c)))
	c.container = (*C.GtkContainer)(unsafe.Pointer(c.widget))
	return c
}

func (c *container) parent() *controlParent {
	return &controlParent{c.container}
}

const (
	gtkXMargin  = 12
	gtkYMargin  = 12
	gtkXPadding = 12
	gtkYPadding = 6
)

func (w *window) beginResize() (d *sizing) {
	d = new(sizing)
	if spaced {
		d.xmargin = gtkXMargin
		d.ymargintop = gtkYMargin
		d.ymarginbottom = d.ymargintop
		d.xpadding = gtkXPadding
		d.ypadding = gtkYPadding
	}
	return d
}<commit_msg>Readded containerResize() on GTK+; going to have to figure out how I'm going to do GTK+ size control...<commit_after>// +build !windows,!darwin

// 23 february 2014

package ui

import (
	"unsafe"
)

// #include "gtk_unix.h"
import "C"

type container struct {
	*controlSingleWidget
	container *C.GtkContainer
}

type sizing struct {
	sizingbase

	// for size calculations
	// gtk+ needs nothing

	// for the actual resizing
	// gtk+ needs nothing
}

func newContainer() *container {
	c := new(container)
	c.controlSingleWidget = newControlSingleWidget(C.newContainer(unsafe.Pointer(c)))
	c.container = (*C.GtkContainer)(unsafe.Pointer(c.widget))
	return c
}

func (c *container) parent() *controlParent {
	return &controlParent{c.container}
}

//export containerResizing
func containerResizing(data unsafe.Pointer, r *C.GtkAllocation) {
	c := (*container)(data)
	c.resize(int(r.x), int(r.y), int(r.width), int(r.height))
}

const (
	gtkXMargin  = 12
	gtkYMargin  = 12
	gtkXPadding = 12
	gtkYPadding = 6
)

func (w *window) beginResize() (d *sizing) {
	d = new(sizing)
	if spaced {
		d.xmargin = gtkXMargin
		d.ymargintop = gtkYMargin
		d.ymarginbottom = d.ymargintop
		d.xpadding = gtkXPadding
		d.ypadding = gtkYPadding
	}
	return d
}
{'fraction_non_alphanumeric': 0.12443233424159855, 'fraction_numerical': 0.011807447774750226, 'mean_word_length': 4.018223234624146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1520240', 'n_tokens_mistral': 868, 'n_tokens_neox': 812, 'n_words': 202}