<commit_before>﻿//Apache2, 2014-present, WinterDev

using LayoutFarm.UI;
namespace LayoutFarm.CustomWidgets
{
    public enum BoxContentLayoutKind
    {
        Absolute,
        VerticalStack,
        HorizontalStack
    }

    public enum ContentStretch
    {
        None,
        Horizontal,
        Vertical,
        Both,
    }

    public sealed class Box : AbstractBox
    {
        public Box(int w, int h)
            : base(w, h)
        {

        }
        public override void Walk(UIVisitor visitor)
        {
            visitor.BeginElement(this, "box");
            this.Describe(visitor);
            //descrube child 
            visitor.EndElement();
        }

        public override void NotifyContentUpdate(UIElement childContent)
        {
            //set propersize

            //if (childContent is ImageBox)
            //{
            //    ImageBox imgBox = (ImageBox)childContent;
            //    this.SetSize(imgBox.Width, imgBox.Height); 
            //}

            this.InvalidateLayout();
            //this.ParentUI?.NotifyContentUpdate(this);
            this.ParentUI?.InvalidateLayout();
        }
    }

    
}<commit_msg>1963: Box<commit_after>﻿//Apache2, 2014-present, WinterDev

using LayoutFarm.UI;
namespace LayoutFarm.CustomWidgets
{
    public enum BoxContentLayoutKind
    {
        Absolute,
        VerticalStack,
        HorizontalStack
    }

    public enum ContentStretch
    {
        None,
        Horizontal,
        Vertical,
        Both,
    }

    public class Box : AbstractBox
    {
        public Box(int w, int h)
            : base(w, h)
        {

        }
        public override void Walk(UIVisitor visitor)
        {
            visitor.BeginElement(this, "box");
            this.Describe(visitor);
            //descrube child 
            visitor.EndElement();
        }

        public override void NotifyContentUpdate(UIElement childContent)
        {
            //set propersize

            //if (childContent is ImageBox)
            //{
            //    ImageBox imgBox = (ImageBox)childContent;
            //    this.SetSize(imgBox.Width, imgBox.Height); 
            //}

            this.InvalidateLayout();
            //this.ParentUI?.NotifyContentUpdate(this);
            this.ParentUI?.InvalidateLayout();
        }
    }


}
{'fraction_non_alphanumeric': 0.09161290322580645, 'fraction_numerical': 0.006021505376344086, 'mean_word_length': 1.498388829215897, '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': '6889742', 'n_tokens_mistral': 658, 'n_tokens_neox': 625, 'n_words': 124}